Compare commits
132 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
59c995f53d | |
|
|
df53975ed7 | |
|
|
913ab9a0c3 | |
|
|
c2ee92cc42 | |
|
|
3fe458f392 | |
|
|
7b4ab93f4b | |
|
|
50684c9c68 | |
|
|
5ea2902bba | |
|
|
bc755769a1 | |
|
|
034196dd9d | |
|
|
8259cb5eae | |
|
|
50c84eb11e | |
|
|
49738114fc | |
|
|
eeba5870bd | |
|
|
6de4a4f241 | |
|
|
1f910b28d3 | |
|
|
dee4e13c6c | |
|
|
3b772e0f91 | |
|
|
629ff298a6 | |
|
|
8640398252 | |
|
|
bd4e0b14e8 | |
|
|
eb35dddfbd | |
|
|
8e7abc1854 | |
|
|
ffe8c88392 | |
|
|
0cea01300d | |
|
|
7acdc94380 | |
|
|
b83a916610 | |
|
|
e7923a2486 | |
|
|
eebfa5ec3f | |
|
|
10a11dcca4 | |
|
|
cf68e118fa | |
|
|
cb423962a2 | |
|
|
d1abbad832 | |
|
|
00fc87ffd8 | |
|
|
5377a472cc | |
|
|
9f0c00ef25 | |
|
|
85e0b85871 | |
|
|
84e57edee1 | |
|
|
37ff12bf6a | |
|
|
4b717e9b2c | |
|
|
6a061592e5 | |
|
|
20bd294397 | |
|
|
44b5113ae9 | |
|
|
e6a474261c | |
|
|
e537107538 | |
|
|
3dd8db37dc | |
|
|
0a1acc89d3 | |
|
|
b4994dab3f | |
|
|
310be11f43 | |
|
|
f1bd47f8b7 | |
|
|
a74227f12a | |
|
|
038fac392c | |
|
|
953a590cca | |
|
|
9205c736ba | |
|
|
014cdd7618 | |
|
|
0adfa422a4 | |
|
|
f5f84a9ec3 | |
|
|
e3d6cbe5a1 | |
|
|
60755a9a0b | |
|
|
fbce286c17 | |
|
|
f57582da52 | |
|
|
6ed1d5033f | |
|
|
fd75e9fe54 | |
|
|
1ae436e91a | |
|
|
f224916aac | |
|
|
2767114bfb | |
|
|
aa79512ded | |
|
|
0762fbee4d | |
|
|
28ec56e4cc | |
|
|
24676fe027 | |
|
|
b053e7df83 | |
|
|
3274043397 | |
|
|
e603883635 | |
|
|
70732f38a9 | |
|
|
3775dbe686 | |
|
|
d1d2130a52 | |
|
|
e225965e33 | |
|
|
fb239f34ed | |
|
|
cbdc483c4c | |
|
|
9830b156a5 | |
|
|
8168a42b61 | |
|
|
5cc0dda5f6 | |
|
|
2cd9484069 | |
|
|
bfd953d082 | |
|
|
45acec8468 | |
|
|
904c053d2c | |
|
|
71a3ba4569 | |
|
|
e402029f6c | |
|
|
63c9558331 | |
|
|
d4e6e111fc | |
|
|
f7cba636b3 | |
|
|
a8c6e8e59e | |
|
|
919ade5715 | |
|
|
de5caded9e | |
|
|
1263514a81 | |
|
|
c2f2390013 | |
|
|
2c39a1fa12 | |
|
|
84339ab715 | |
|
|
af64d39fa7 | |
|
|
aff5dbf185 | |
|
|
578842aa39 | |
|
|
61153309ca | |
|
|
1026ff1aae | |
|
|
5ebae4208a | |
|
|
d9982d2508 | |
|
|
5435a5a736 | |
|
|
93dc70de26 | |
|
|
79f23e4e5a | |
|
|
81e87ec9ce | |
|
|
bb84021758 | |
|
|
05e92add4a | |
|
|
a0f85ea367 | |
|
|
7de3dca2a3 | |
|
|
ac1a767a29 | |
|
|
98556e3a90 | |
|
|
af89a43da7 | |
|
|
48632444fe | |
|
|
ca75a5f403 | |
|
|
1a66a1f846 | |
|
|
23b1fae3a3 | |
|
|
bc8e80b4e6 | |
|
|
344571997f | |
|
|
25c8479d53 | |
|
|
508012c82b | |
|
|
99f6c43f25 | |
|
|
22f494fe12 | |
|
|
491a746c75 | |
|
|
2fe958f5db | |
|
|
7a7030a91c | |
|
|
6e6606f3ac | |
|
|
552cee8a6f | |
|
|
0e93cbab04 |
Binary file not shown.
|
|
@ -1,5 +1,5 @@
|
||||||
log=false
|
log=false
|
||||||
defaultCloseNonStandard149=true
|
defaultCloseNonStandard149=true
|
||||||
AESEncryptScrect=990EB004A1C862721C1513AE90038C9E
|
AESEncryptScrect=990EB004A1C862721C1513AE90038C9E
|
||||||
version=3.0.2.2504.01
|
version=3.0.4.2603.01
|
||||||
openFormulaForcedEditing=false
|
openFormulaForcedEditing=false
|
||||||
|
|
@ -34,8 +34,8 @@ CREATE TABLE hrsa_push_record_detail
|
||||||
)
|
)
|
||||||
/
|
/
|
||||||
|
|
||||||
ALTER TABLE hrsa_push_record ADD fail_reason varchar2(4000);
|
ALTER TABLE hrsa_push_record ADD fail_reason varchar2(4000)
|
||||||
/
|
/
|
||||||
|
|
||||||
ALTER TABLE hrsa_push_record_detail ADD fail_reason varchar2(4000);
|
ALTER TABLE hrsa_push_record_detail ADD fail_reason varchar2(4000)
|
||||||
/
|
/
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
ALTER TABLE hrsa_push_setting_item ADD sorted_index NUMBER;
|
ALTER TABLE hrsa_push_setting_item ADD sorted_index NUMBER
|
||||||
/
|
/
|
||||||
|
|
||||||
ALTER TABLE hrsa_push_record_detail ADD data_id NUMBER(38,0);
|
ALTER TABLE hrsa_push_record_detail ADD data_id NUMBER(38,0)
|
||||||
/
|
/
|
||||||
|
|
@ -1,54 +1,35 @@
|
||||||
alter table hrsa_bill_detail_temp add subcompany_name varchar2(200) NULL;
|
alter table hrsa_bill_detail_temp add subcompany_name varchar(200) NULL;
|
||||||
/
|
|
||||||
|
|
||||||
alter table hrsa_bill_detail_temp add subcompany_id NUMBER null;
|
alter table hrsa_bill_detail_temp add subcompany_id bigint null;
|
||||||
/
|
|
||||||
|
|
||||||
alter table hrsa_bill_detail_temp add department_name varchar2(200) NULL;
|
alter table hrsa_bill_detail_temp add department_name varchar(200) NULL;
|
||||||
/
|
|
||||||
|
|
||||||
alter table hrsa_bill_detail_temp add department_id NUMBER null;
|
alter table hrsa_bill_detail_temp add department_id bigint null;
|
||||||
/
|
|
||||||
|
|
||||||
alter table hrsa_bill_detail_temp add jobtitle_name varchar2(200) NULL;
|
alter table hrsa_bill_detail_temp add jobtitle_name varchar(200) NULL;
|
||||||
/
|
|
||||||
|
|
||||||
alter table hrsa_bill_detail_temp add jobtitle_id NUMBER NULL;
|
alter table hrsa_bill_detail_temp add jobtitle_id bigint NULL;
|
||||||
/
|
|
||||||
|
|
||||||
alter table hrsa_bill_detail_temp add jobcall varchar2(200) NULL;
|
alter table hrsa_bill_detail_temp add jobcall varchar(200) NULL;
|
||||||
/
|
|
||||||
|
|
||||||
alter table hrsa_bill_detail_temp add jobcall_id NUMBER NULL;
|
alter table hrsa_bill_detail_temp add jobcall_id bigint NULL;
|
||||||
/
|
|
||||||
|
|
||||||
alter table hrsa_bill_detail_temp add status varchar2(200) NULL;
|
alter table hrsa_bill_detail_temp add status varchar(200) NULL;
|
||||||
/
|
|
||||||
|
|
||||||
|
alter table hrsa_bill_detail add subcompany_name varchar(200) NULL;
|
||||||
|
|
||||||
alter table hrsa_bill_detail add subcompany_name varchar2(200) NULL;
|
alter table hrsa_bill_detail add subcompany_id bigint null;
|
||||||
/
|
|
||||||
|
|
||||||
alter table hrsa_bill_detail add subcompany_id NUMBER null;
|
alter table hrsa_bill_detail add department_name varchar(200) NULL;
|
||||||
/
|
|
||||||
|
|
||||||
alter table hrsa_bill_detail add department_name varchar2(200) NULL;
|
alter table hrsa_bill_detail add department_id bigint null;
|
||||||
/
|
|
||||||
|
|
||||||
alter table hrsa_bill_detail add department_id NUMBER null;
|
alter table hrsa_bill_detail add jobtitle_name varchar(200) NULL;
|
||||||
/
|
|
||||||
|
|
||||||
alter table hrsa_bill_detail add jobtitle_name varchar2(200) NULL;
|
alter table hrsa_bill_detail add jobtitle_id bigint NULL;
|
||||||
/
|
|
||||||
|
|
||||||
alter table hrsa_bill_detail add jobtitle_id NUMBER NULL;
|
alter table hrsa_bill_detail add jobcall varchar(200) NULL;
|
||||||
/
|
|
||||||
|
|
||||||
alter table hrsa_bill_detail add jobcall varchar2(200) NULL;
|
alter table hrsa_bill_detail add jobcall_id bigint NULL;
|
||||||
/
|
|
||||||
|
|
||||||
alter table hrsa_bill_detail add jobcall_id NUMBER NULL;
|
alter table hrsa_bill_detail add status varchar(200) NULL;
|
||||||
/
|
|
||||||
|
|
||||||
alter table hrsa_bill_detail add status varchar2(200) NULL;
|
|
||||||
/
|
|
||||||
|
|
@ -1,41 +1,42 @@
|
||||||
CREATE TABLE hrsa_hrm_snapshot (
|
CREATE TABLE hrsa_hrm_snapshot
|
||||||
ID bigint(0) NOT NULL,
|
(
|
||||||
|
ID bigint NOT NULL,
|
||||||
snapshot_time timestamp,
|
snapshot_time timestamp,
|
||||||
employee_id bigint(0),
|
employee_id bigint,
|
||||||
loginid varchar(100),
|
loginid varchar(100),
|
||||||
LASTNAME varchar(60),
|
LASTNAME varchar(60),
|
||||||
SEX char(1),
|
SEX char(1),
|
||||||
BIRTHDAY char(10) ,
|
BIRTHDAY char(10) ,
|
||||||
NATIONALITY int(0) ,
|
NATIONALITY int ,
|
||||||
MARITALSTATUS char(1) ,
|
MARITALSTATUS char(1) ,
|
||||||
TELEPHONE varchar(60),
|
TELEPHONE varchar(60),
|
||||||
MOBILE varchar(60) ,
|
MOBILE varchar(60) ,
|
||||||
MOBILECALL varchar(60) ,
|
MOBILECALL varchar(60) ,
|
||||||
EMAIL varchar(60),
|
EMAIL varchar(60),
|
||||||
LOCATIONID int(0),
|
LOCATIONID int,
|
||||||
WORKROOM varchar(60),
|
WORKROOM varchar(60),
|
||||||
HOMEADDRESS varchar(100),
|
HOMEADDRESS varchar(100),
|
||||||
RESOURCETYPE char(1) ,
|
RESOURCETYPE char(1) ,
|
||||||
STARTDATE char(10) ,
|
STARTDATE char(10) ,
|
||||||
ENDDATE char(10),
|
ENDDATE char(10),
|
||||||
JOBTITLE int(0) ,
|
JOBTITLE int ,
|
||||||
JOBTITLENAME varchar(200) ,
|
JOBTITLENAME varchar(200) ,
|
||||||
JOBACTIVITYDESC varchar(200),
|
JOBACTIVITYDESC varchar(200),
|
||||||
JOBLEVEL int(0) ,
|
JOBLEVEL int ,
|
||||||
SECLEVEL int(0) ,
|
SECLEVEL int ,
|
||||||
DEPARTMENTID int(0) ,
|
DEPARTMENTID int ,
|
||||||
DEPARTMENTNAME varchar(200) ,
|
DEPARTMENTNAME varchar(200) ,
|
||||||
SUBCOMPANYID1 int(0) ,
|
SUBCOMPANYID1 int ,
|
||||||
SUBCOMPANYNAME varchar(200) ,
|
SUBCOMPANYNAME varchar(200) ,
|
||||||
COSTCENTERID int(0) ,
|
COSTCENTERID int ,
|
||||||
MANAGERID int(0) ,
|
MANAGERID int ,
|
||||||
ASSISTANTID int(0),
|
ASSISTANTID int,
|
||||||
BANKID1 int(0) ,
|
BANKID1 int ,
|
||||||
ACCOUNTID1 varchar(100) ,
|
ACCOUNTID1 varchar(100) ,
|
||||||
LASTLOGINDATE char(10) ,
|
LASTLOGINDATE char(10) ,
|
||||||
CERTIFICATENUM varchar(60) ,
|
CERTIFICATENUM varchar(60) ,
|
||||||
NATIVEPLACE varchar(100) ,
|
NATIVEPLACE varchar(100) ,
|
||||||
EDUCATIONLEVEL int(0) ,
|
EDUCATIONLEVEL int ,
|
||||||
BEMEMBERDATE char(10) ,
|
BEMEMBERDATE char(10) ,
|
||||||
BEPARTYDATE char(10) ,
|
BEPARTYDATE char(10) ,
|
||||||
WORKCODE varchar(60) ,
|
WORKCODE varchar(60) ,
|
||||||
|
|
@ -44,8 +45,8 @@ CREATE TABLE hrsa_hrm_snapshot (
|
||||||
RESIDENTPLACE varchar(200) ,
|
RESIDENTPLACE varchar(200) ,
|
||||||
POLICY varchar(30) ,
|
POLICY varchar(30) ,
|
||||||
DEGREE varchar(30) ,
|
DEGREE varchar(30) ,
|
||||||
USEKIND int(0) ,
|
USEKIND int ,
|
||||||
JOBCALL int(0) ,
|
JOBCALL int ,
|
||||||
jobcallname varchar(200) ,
|
jobcallname varchar(200) ,
|
||||||
ACCUMFUNDACCOUNT varchar(30),
|
ACCUMFUNDACCOUNT varchar(30),
|
||||||
BIRTHPLACE varchar(60) ,
|
BIRTHPLACE varchar(60) ,
|
||||||
|
|
@ -54,14 +55,14 @@ CREATE TABLE hrsa_hrm_snapshot (
|
||||||
RESIDENTPOSTCODE varchar(60) ,
|
RESIDENTPOSTCODE varchar(60) ,
|
||||||
EXTPHONE varchar(50) ,
|
EXTPHONE varchar(50) ,
|
||||||
MANAGERSTR varchar(500),
|
MANAGERSTR varchar(500),
|
||||||
STATUS int(0) ,
|
STATUS int ,
|
||||||
FAX varchar(60) ,
|
FAX varchar(60) ,
|
||||||
ISLABOUUNION char(1),
|
ISLABOUUNION char(1),
|
||||||
TEMPRESIDENTNUMBER varchar(60),
|
TEMPRESIDENTNUMBER varchar(60),
|
||||||
PROBATIONENDDATE char(10),
|
PROBATIONENDDATE char(10),
|
||||||
COUNTRYID int(0) ,
|
COUNTRYID int ,
|
||||||
ACCOUNTTYPE int(0) ,
|
ACCOUNTTYPE int ,
|
||||||
BELONGTO int(0) ,
|
BELONGTO int ,
|
||||||
ACCOUNTNAME varchar(200) ,
|
ACCOUNTNAME varchar(200) ,
|
||||||
companystartdate varchar(10),
|
companystartdate varchar(10),
|
||||||
workstartdate varchar(10) ,
|
workstartdate varchar(10) ,
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,8 @@ update hrsa_salary_archive set delete_type=3 where tax_agent_id=扣缴义务人
|
||||||
|
|
||||||
|
|
||||||
二、删除停薪员工档案
|
二、删除停薪员工档案
|
||||||
update hrsa_salary_archive set delete_type=3 where run_status in ('STOP_FROM_PENDING','STOP_FROM_SUSPEND')
|
update hrsa_salary_archive set delete_type=3 where delete_type=0 and run_status in ('STOP_FROM_PENDING','STOP_FROM_SUSPEND')
|
||||||
|
update hrsa_salary_archive_item set delete_type=3 where delete_type=0
|
||||||
|
|
||||||
二、删除停薪员工社保档案
|
二、删除停薪员工社保档案
|
||||||
update hrsa_insurance_base_info set delete_type=3 where run_status in ('4','5')
|
update hrsa_insurance_base_info set delete_type=3 where run_status in ('4','5')
|
||||||
|
|
@ -28,10 +29,10 @@ update hrsa_insurance_base_info set delete_type=3 where run_status in ('4','5')
|
||||||
|
|
||||||
|
|
||||||
--删除社保福利档案
|
--删除社保福利档案
|
||||||
update hrsa_insurance_base_info set delete_type=3 WHERE employee_id = ? and payment_organization =?
|
update hrsa_insurance_base_info set delete_type=3 WHERE delete_type=0 and employee_id = ? and payment_organization =?
|
||||||
update hrsa_social_archives set delete_type=3 WHERE employee_id = ? and payment_organization =?
|
update hrsa_social_archives set delete_type=3 WHERE delete_type=0 and employee_id = ? and payment_organization =?
|
||||||
update hrsa_fund_archives set delete_type=3 WHERE employee_id = ? and payment_organization =?
|
update hrsa_fund_archives set delete_type=3 WHERE delete_type=0 and employee_id = ? and payment_organization =?
|
||||||
update hrsa_other_archives set delete_type=3 WHERE employee_id = ? and payment_organization =?
|
update hrsa_other_archives set delete_type=3 WHERE delete_type=0 and employee_id = ? and payment_organization =?
|
||||||
|
|
||||||
-- 删除薪资档案
|
-- 删除薪资档案
|
||||||
update hrsa_salary_archive set delete_type=3 where employee_id = ? and tax_agent_id=?
|
update hrsa_salary_archive set delete_type=3 where employee_id = ? and tax_agent_id=?
|
||||||
|
|
@ -45,4 +46,13 @@ update hrsa_other_archives set delete_type=3;
|
||||||
update hrsa_tax_agent_emp set delete_type=3;
|
update hrsa_tax_agent_emp set delete_type=3;
|
||||||
|
|
||||||
|
|
||||||
|
-- 删除核算记录
|
||||||
|
update hrsa_salary_acct_record set delete_type=3 where delete_type=0 and id= 核算记录id;
|
||||||
|
update hrsa_salary_acct_emp set delete_type=3 where delete_type=0 and salary_acct_record_id=核算记录id;
|
||||||
|
update hrsa_salary_acct_result set delete_type=3 where delete_type=0 and salary_acct_record_id = 核算记录id;
|
||||||
|
|
||||||
|
--删除工资单信息
|
||||||
|
update hrsa_salary_send set delete_type=3 where delete_type=0 and salary_accounting_id = 核算记录id;
|
||||||
|
update hrsa_salary_send_info set delete_type=3 where delete_type=0 and salary_acct_record_id = 核算记录id;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
|
||||||
|
## 薪资档案生成不了
|
||||||
select id from hrsa_tax_agent_emp
|
select id from hrsa_tax_agent_emp
|
||||||
where tax_agent_id =扣缴义务人id
|
where tax_agent_id =扣缴义务人id
|
||||||
and delete_type = 0
|
and delete_type = 0
|
||||||
|
|
@ -6,5 +8,14 @@ and employee_id not in
|
||||||
where tax_agent_id =扣缴义务人id and delete_type = 0)
|
where tax_agent_id =扣缴义务人id and delete_type = 0)
|
||||||
|
|
||||||
|
|
||||||
update hrsa_tax_agent_emp set delete_type = 3
|
update hrsa_tax_agent_emp set delete_type = 3 where delete_type = 0
|
||||||
where tax_agent_id=扣缴义务人id and delete_type = 0 and employee_id not in (select employee_id from hrsa_salary_archive where tax_agent_id =扣缴义务人id and delete_type = 0)
|
where tax_agent_id=扣缴义务人id and delete_type = 0 and employee_id not in (select employee_id from hrsa_salary_archive where tax_agent_id =扣缴义务人id and delete_type = 0)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## 考勤引用
|
||||||
|
drop sequence HRSA_ATTEND_QUOTE_ID
|
||||||
|
/
|
||||||
|
|
||||||
|
drop trigger HRSA_ATTEND_QUOTE_TRI
|
||||||
|
/
|
||||||
|
|
@ -80,6 +80,8 @@ public class CheckEditSIArchiveAction implements Action {
|
||||||
}
|
}
|
||||||
List<Map<String, Object>> importData = new ArrayList<>();
|
List<Map<String, Object>> importData = new ArrayList<>();
|
||||||
importData.add(SalaryEntityUtil.convert2Map(list, CheckEditSIArchiveAction.SalaryField::getSalaryName, CheckEditSIArchiveAction.SalaryField::getValue));
|
importData.add(SalaryEntityUtil.convert2Map(list, CheckEditSIArchiveAction.SalaryField::getSalaryName, CheckEditSIArchiveAction.SalaryField::getValue));
|
||||||
|
log.info("CheckEditSIArchiveAction,tableName :{},workflowid:{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importData);
|
||||||
|
|
||||||
//福利执行状态
|
//福利执行状态
|
||||||
String runStatus = list.stream().filter(f -> f.salaryName.equals("档案状态")).findFirst().map(CheckEditSIArchiveAction.SalaryField::getValue).orElse("1");
|
String runStatus = list.stream().filter(f -> f.salaryName.equals("档案状态")).findFirst().map(CheckEditSIArchiveAction.SalaryField::getValue).orElse("1");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,7 @@ public class CheckEditSalaryAction implements Action {
|
||||||
List<Map<String, Object>> importData = new ArrayList<>();
|
List<Map<String, Object>> importData = new ArrayList<>();
|
||||||
importData.add(SalaryEntityUtil.convert2Map(list, SalaryField::getSalaryName, SalaryField::getValue));
|
importData.add(SalaryEntityUtil.convert2Map(list, SalaryField::getSalaryName, SalaryField::getValue));
|
||||||
|
|
||||||
|
log.info("CheckEditSalaryAction,tableName :{},workflowid:{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importData);
|
||||||
SalaryArchiveImportActionParam build = SalaryArchiveImportActionParam.builder()
|
SalaryArchiveImportActionParam build = SalaryArchiveImportActionParam.builder()
|
||||||
.importDatas(importData)
|
.importDatas(importData)
|
||||||
.build();
|
.build();
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@ public class CheckInitSalaryAction implements Action {
|
||||||
list.add(new SalaryField(processField, salaryName, value));
|
list.add(new SalaryField(processField, salaryName, value));
|
||||||
}
|
}
|
||||||
Map<String, Object> importDataMap = SalaryEntityUtil.convert2Map(list, SalaryField::getSalaryName, SalaryField::getValue);
|
Map<String, Object> importDataMap = SalaryEntityUtil.convert2Map(list, SalaryField::getSalaryName, SalaryField::getValue);
|
||||||
|
log.info("CheckInitSalaryAction,tableName :{},workflowid:{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importDataMap);
|
||||||
return doSalaryArchiveInit(requestInfo, importDataMap);
|
return doSalaryArchiveInit(requestInfo, importDataMap);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("定薪检查异常", e);
|
log.error("定薪检查异常", e);
|
||||||
|
|
|
||||||
|
|
@ -89,6 +89,7 @@ public class CheckStayAddToPaySIArchiveAction implements Action {
|
||||||
}
|
}
|
||||||
// 流程数据
|
// 流程数据
|
||||||
Map<String, Object> importDataMap = SalaryEntityUtil.convert2Map(list, CheckStayAddToPaySIArchiveAction.SalaryField::getSalaryName, CheckStayAddToPaySIArchiveAction.SalaryField::getValue);
|
Map<String, Object> importDataMap = SalaryEntityUtil.convert2Map(list, CheckStayAddToPaySIArchiveAction.SalaryField::getSalaryName, CheckStayAddToPaySIArchiveAction.SalaryField::getValue);
|
||||||
|
log.info("CheckStayAddToPaySIArchiveAction,tableName :{},workflowid:{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importDataMap);
|
||||||
String taxAgentName = importDataMap.getOrDefault("个税扣缴义务人", "").toString();
|
String taxAgentName = importDataMap.getOrDefault("个税扣缴义务人", "").toString();
|
||||||
List<TaxAgentPO> taxAgentPOS = getTaxAgentMapper().listByName(taxAgentName);
|
List<TaxAgentPO> taxAgentPOS = getTaxAgentMapper().listByName(taxAgentName);
|
||||||
if(CollectionUtils.isEmpty(taxAgentPOS)){
|
if(CollectionUtils.isEmpty(taxAgentPOS)){
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,7 @@ public class CheckStayDelToStopSIArchiveAction implements Action {
|
||||||
}
|
}
|
||||||
// 流程数据
|
// 流程数据
|
||||||
Map<String, Object> importDataMap = SalaryEntityUtil.convert2Map(list, CheckStayDelToStopSIArchiveAction.SalaryField::getSalaryName, CheckStayDelToStopSIArchiveAction.SalaryField::getValue);
|
Map<String, Object> importDataMap = SalaryEntityUtil.convert2Map(list, CheckStayDelToStopSIArchiveAction.SalaryField::getSalaryName, CheckStayDelToStopSIArchiveAction.SalaryField::getValue);
|
||||||
|
log.info("CheckStayDelToStopSIArchiveAction,tableName :{},workflowid:{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importDataMap);
|
||||||
String taxAgentName = importDataMap.getOrDefault("个税扣缴义务人", "").toString();
|
String taxAgentName = importDataMap.getOrDefault("个税扣缴义务人", "").toString();
|
||||||
List<TaxAgentPO> taxAgentPOS = getTaxAgentMapper().listByName(taxAgentName);
|
List<TaxAgentPO> taxAgentPOS = getTaxAgentMapper().listByName(taxAgentName);
|
||||||
if(CollectionUtils.isEmpty(taxAgentPOS)){
|
if(CollectionUtils.isEmpty(taxAgentPOS)){
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,7 @@ public class CheckStopSalaryAction implements Action {
|
||||||
}
|
}
|
||||||
// 流程数据
|
// 流程数据
|
||||||
Map<String, Object> importDataMap = SalaryEntityUtil.convert2Map(list, CheckStopSalaryAction.SalaryField::getSalaryName, CheckStopSalaryAction.SalaryField::getValue);
|
Map<String, Object> importDataMap = SalaryEntityUtil.convert2Map(list, CheckStopSalaryAction.SalaryField::getSalaryName, CheckStopSalaryAction.SalaryField::getValue);
|
||||||
|
log.info("CheckStopSalaryAction,tableName :{},workflowid:{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importDataMap);
|
||||||
String taxAgentName = importDataMap.getOrDefault("个税扣缴义务人", "").toString();
|
String taxAgentName = importDataMap.getOrDefault("个税扣缴义务人", "").toString();
|
||||||
List<TaxAgentPO> taxAgentPOS = getTaxAgentMapper().listByName(taxAgentName);
|
List<TaxAgentPO> taxAgentPOS = getTaxAgentMapper().listByName(taxAgentName);
|
||||||
if(CollectionUtils.isEmpty(taxAgentPOS)){
|
if(CollectionUtils.isEmpty(taxAgentPOS)){
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,7 @@ public class CopyToPaySIArchiveAction implements Action {
|
||||||
}
|
}
|
||||||
List<Map<String, Object>> importData = new ArrayList<>();
|
List<Map<String, Object>> importData = new ArrayList<>();
|
||||||
importData.add(SalaryEntityUtil.convert2Map(list, CopyToPaySIArchiveAction.SalaryField::getSalaryName, CopyToPaySIArchiveAction.SalaryField::getValue));
|
importData.add(SalaryEntityUtil.convert2Map(list, CopyToPaySIArchiveAction.SalaryField::getSalaryName, CopyToPaySIArchiveAction.SalaryField::getValue));
|
||||||
|
log.info("CopyToPaySIArchiveAction,tableName :{},workflowid:{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importData);
|
||||||
//操作人
|
//操作人
|
||||||
String uid = list.stream().filter(f -> f.salaryName.equals("操作人")).findFirst().map(CopyToPaySIArchiveAction.SalaryField::getValue).orElse("1");
|
String uid = list.stream().filter(f -> f.salaryName.equals("操作人")).findFirst().map(CopyToPaySIArchiveAction.SalaryField::getValue).orElse("1");
|
||||||
//增员
|
//增员
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,7 @@ public class EditSIArchiveAction implements Action {
|
||||||
}
|
}
|
||||||
List<Map<String, Object>> importData = new ArrayList<>();
|
List<Map<String, Object>> importData = new ArrayList<>();
|
||||||
importData.add(SalaryEntityUtil.convert2Map(list, EditSIArchiveAction.SalaryField::getSalaryName, EditSIArchiveAction.SalaryField::getValue));
|
importData.add(SalaryEntityUtil.convert2Map(list, EditSIArchiveAction.SalaryField::getSalaryName, EditSIArchiveAction.SalaryField::getValue));
|
||||||
|
log.info("EditSIArchiveAction,tableName :{},workflowid:{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importData);
|
||||||
//福利执行状态
|
//福利执行状态
|
||||||
String runStatus = list.stream().filter(f -> f.salaryName.equals("档案状态")).findFirst().map(EditSIArchiveAction.SalaryField::getValue).orElse("1");
|
String runStatus = list.stream().filter(f -> f.salaryName.equals("档案状态")).findFirst().map(EditSIArchiveAction.SalaryField::getValue).orElse("1");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ public class EditSalaryAction implements Action {
|
||||||
}
|
}
|
||||||
List<Map<String, Object>> importData = new ArrayList<>();
|
List<Map<String, Object>> importData = new ArrayList<>();
|
||||||
importData.add(SalaryEntityUtil.convert2Map(list, SalaryField::getSalaryName, SalaryField::getValue));
|
importData.add(SalaryEntityUtil.convert2Map(list, SalaryField::getSalaryName, SalaryField::getValue));
|
||||||
|
log.info("EditSalaryAction,tableName :{},workflowid:{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importData);
|
||||||
SalaryArchiveImportActionParam build = SalaryArchiveImportActionParam.builder()
|
SalaryArchiveImportActionParam build = SalaryArchiveImportActionParam.builder()
|
||||||
.importDatas(importData)
|
.importDatas(importData)
|
||||||
.build();
|
.build();
|
||||||
|
|
|
||||||
|
|
@ -97,6 +97,7 @@ public class EditToPaySIArchiveAction implements Action {
|
||||||
}
|
}
|
||||||
List<Map<String, Object>> importData = new ArrayList<>();
|
List<Map<String, Object>> importData = new ArrayList<>();
|
||||||
importData.add(SalaryEntityUtil.convert2Map(list, EditToPaySIArchiveAction.SalaryField::getSalaryName, EditToPaySIArchiveAction.SalaryField::getValue));
|
importData.add(SalaryEntityUtil.convert2Map(list, EditToPaySIArchiveAction.SalaryField::getSalaryName, EditToPaySIArchiveAction.SalaryField::getValue));
|
||||||
|
log.info("EditToPaySIArchiveAction,tableName :{},workflowid:{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importData);
|
||||||
//福利执行状态
|
//福利执行状态
|
||||||
String runStatus = EmployeeStatusEnum.STAY_ADD.getValue();
|
String runStatus = EmployeeStatusEnum.STAY_ADD.getValue();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -97,6 +97,7 @@ public class EditToStopSIArchiveAction implements Action {
|
||||||
}
|
}
|
||||||
List<Map<String, Object>> importData = new ArrayList<>();
|
List<Map<String, Object>> importData = new ArrayList<>();
|
||||||
importData.add(SalaryEntityUtil.convert2Map(list, EditToStopSIArchiveAction.SalaryField::getSalaryName, EditToStopSIArchiveAction.SalaryField::getValue));
|
importData.add(SalaryEntityUtil.convert2Map(list, EditToStopSIArchiveAction.SalaryField::getSalaryName, EditToStopSIArchiveAction.SalaryField::getValue));
|
||||||
|
log.info("EditToStopSIArchiveAction,tableName :{},workflowid:{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importData);
|
||||||
//福利执行状态
|
//福利执行状态
|
||||||
String runStatus = EmployeeStatusEnum.PAYING.getValue();
|
String runStatus = EmployeeStatusEnum.PAYING.getValue();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ public class InitSalaryAction implements Action {
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, Object> importDataMap = SalaryEntityUtil.convert2Map(list, SalaryField::getSalaryName, SalaryField::getValue);
|
Map<String, Object> importDataMap = SalaryEntityUtil.convert2Map(list, SalaryField::getSalaryName, SalaryField::getValue);
|
||||||
|
log.info("InitSalaryAction,tableName :{},workflowid:{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importDataMap);
|
||||||
return doSalaryArchiveInit(requestInfo, importDataMap);
|
return doSalaryArchiveInit(requestInfo, importDataMap);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("定薪异常", e);
|
log.error("定薪异常", e);
|
||||||
|
|
|
||||||
|
|
@ -108,6 +108,7 @@ public class RehireAction implements Action {
|
||||||
list.add(new SalaryField(processField, salaryName, value));
|
list.add(new SalaryField(processField, salaryName, value));
|
||||||
}
|
}
|
||||||
Map<String, Object> salaryFieldMap = SalaryEntityUtil.convert2Map(list, SalaryField::getSalaryName, SalaryField::getValue);
|
Map<String, Object> salaryFieldMap = SalaryEntityUtil.convert2Map(list, SalaryField::getSalaryName, SalaryField::getValue);
|
||||||
|
log.info("RehireAction,tableName :{},workflowid:{},流程参数:{}",tableName, requestInfo.getWorkflowid(), salaryFieldMap);
|
||||||
String taxAgentName = salaryFieldMap.getOrDefault("个税扣缴义务人", "").toString();
|
String taxAgentName = salaryFieldMap.getOrDefault("个税扣缴义务人", "").toString();
|
||||||
String empIdStr = salaryFieldMap.getOrDefault("员工id", "").toString();
|
String empIdStr = salaryFieldMap.getOrDefault("员工id", "").toString();
|
||||||
if (StringUtils.isBlank(taxAgentName) || StringUtils.isBlank(empIdStr)) {
|
if (StringUtils.isBlank(taxAgentName) || StringUtils.isBlank(empIdStr)) {
|
||||||
|
|
|
||||||
|
|
@ -93,6 +93,7 @@ public class StayAddToPaySIArchiveAction implements Action {
|
||||||
}
|
}
|
||||||
// 流程数据
|
// 流程数据
|
||||||
Map<String, Object> importDataMap = SalaryEntityUtil.convert2Map(list, StayAddToPaySIArchiveAction.SalaryField::getSalaryName, StayAddToPaySIArchiveAction.SalaryField::getValue);
|
Map<String, Object> importDataMap = SalaryEntityUtil.convert2Map(list, StayAddToPaySIArchiveAction.SalaryField::getSalaryName, StayAddToPaySIArchiveAction.SalaryField::getValue);
|
||||||
|
log.info("StayAddToPaySIArchiveAction,tableName :{},workflowid:{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importDataMap);
|
||||||
String taxAgentName = importDataMap.getOrDefault("个税扣缴义务人", "").toString();
|
String taxAgentName = importDataMap.getOrDefault("个税扣缴义务人", "").toString();
|
||||||
List<TaxAgentPO> taxAgentPOS = getTaxAgentMapper().listByName(taxAgentName);
|
List<TaxAgentPO> taxAgentPOS = getTaxAgentMapper().listByName(taxAgentName);
|
||||||
if(CollectionUtils.isEmpty(taxAgentPOS)){
|
if(CollectionUtils.isEmpty(taxAgentPOS)){
|
||||||
|
|
|
||||||
|
|
@ -94,6 +94,7 @@ public class StayDelToStopSIArchiveAction implements Action {
|
||||||
}
|
}
|
||||||
// 流程数据
|
// 流程数据
|
||||||
Map<String, Object> importDataMap = SalaryEntityUtil.convert2Map(list, StayDelToStopSIArchiveAction.SalaryField::getSalaryName, StayDelToStopSIArchiveAction.SalaryField::getValue);
|
Map<String, Object> importDataMap = SalaryEntityUtil.convert2Map(list, StayDelToStopSIArchiveAction.SalaryField::getSalaryName, StayDelToStopSIArchiveAction.SalaryField::getValue);
|
||||||
|
log.info("StayDelToStopSIArchiveAction,tableName :{},workflowid:{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importDataMap);
|
||||||
String taxAgentName = importDataMap.getOrDefault("个税扣缴义务人", "").toString();
|
String taxAgentName = importDataMap.getOrDefault("个税扣缴义务人", "").toString();
|
||||||
List<TaxAgentPO> taxAgentPOS = getTaxAgentMapper().listByName(taxAgentName);
|
List<TaxAgentPO> taxAgentPOS = getTaxAgentMapper().listByName(taxAgentName);
|
||||||
if(CollectionUtils.isEmpty(taxAgentPOS)){
|
if(CollectionUtils.isEmpty(taxAgentPOS)){
|
||||||
|
|
|
||||||
|
|
@ -99,6 +99,7 @@ public class StopSalaryAction implements Action {
|
||||||
}
|
}
|
||||||
// 流程数据
|
// 流程数据
|
||||||
Map<String, Object> importDataMap = SalaryEntityUtil.convert2Map(list, StopSalaryAction.SalaryField::getSalaryName, StopSalaryAction.SalaryField::getValue);
|
Map<String, Object> importDataMap = SalaryEntityUtil.convert2Map(list, StopSalaryAction.SalaryField::getSalaryName, StopSalaryAction.SalaryField::getValue);
|
||||||
|
log.info("StopSalaryAction,tableName :{},workflowid:{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importDataMap);
|
||||||
//操作人
|
//操作人
|
||||||
String uid = importDataMap.getOrDefault("操作人","1").toString();
|
String uid = importDataMap.getOrDefault("操作人","1").toString();
|
||||||
User user = new User(Integer.parseInt(uid));
|
User user = new User(Integer.parseInt(uid));
|
||||||
|
|
|
||||||
|
|
@ -117,6 +117,7 @@ public class UpdateSISchemeDetailAction implements Action {
|
||||||
rs.beforFirst();
|
rs.beforFirst();
|
||||||
// 流程数据
|
// 流程数据
|
||||||
Map<String, Object> importDataMap = SalaryEntityUtil.convert2Map(list, UpdateSISchemeDetailAction.SalaryField::getSalaryName, UpdateSISchemeDetailAction.SalaryField::getValue);
|
Map<String, Object> importDataMap = SalaryEntityUtil.convert2Map(list, UpdateSISchemeDetailAction.SalaryField::getSalaryName, UpdateSISchemeDetailAction.SalaryField::getValue);
|
||||||
|
log.info("UpdateSISchemeDetailAction,tableName :{},workflowid:{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importDataMap);
|
||||||
//设置更新对象元素
|
//设置更新对象元素
|
||||||
String schemeId = importDataMap.getOrDefault("福利方案id", "").toString();
|
String schemeId = importDataMap.getOrDefault("福利方案id", "").toString();
|
||||||
String schemeName = importDataMap.getOrDefault("福利方案名称", "").toString();
|
String schemeName = importDataMap.getOrDefault("福利方案名称", "").toString();
|
||||||
|
|
|
||||||
|
|
@ -630,7 +630,8 @@ public class SalaryBillBO {
|
||||||
} else {
|
} else {
|
||||||
for (Object keyName : e.keySet()) {
|
for (Object keyName : e.keySet()) {
|
||||||
if ((salaryItem.getId() + SalaryArchiveConstant.DYNAMIC_SUFFIX).equals(keyName.toString())) {
|
if ((salaryItem.getId() + SalaryArchiveConstant.DYNAMIC_SUFFIX).equals(keyName.toString())) {
|
||||||
boolean isHide = (isHideNull && StringUtils.isEmpty(e.getOrDefault(keyName.toString(), StringUtils.EMPTY).toString()))
|
String itemValue = Util.null2String(e.get(keyName.toString()));
|
||||||
|
boolean isHide = (isHideNull && StringUtils.isEmpty(itemValue))
|
||||||
||
|
||
|
||||||
(isHideZero && NumberUtils.isCreatable(e.getOrDefault(keyName.toString(), "0").toString())
|
(isHideZero && NumberUtils.isCreatable(e.getOrDefault(keyName.toString(), "0").toString())
|
||||||
&& BigDecimal.ZERO.compareTo(new BigDecimal(e.getOrDefault(keyName.toString(), "0").toString())) == 0);
|
&& BigDecimal.ZERO.compareTo(new BigDecimal(e.getOrDefault(keyName.toString(), "0").toString())) == 0);
|
||||||
|
|
@ -641,7 +642,7 @@ public class SalaryBillBO {
|
||||||
emailContent.append("</th>");
|
emailContent.append("</th>");
|
||||||
|
|
||||||
emailContent.append("<td style=\"padding: 16px 24px;display: table-cell;flex: 1;color: #000000d9;font-size: 12px;line-height: 1.5715;word-break: break-word;overflow-wrap: break-word;border-collapse: collapse;border: 1px solid rgba(0,0,0,.06);\">");
|
emailContent.append("<td style=\"padding: 16px 24px;display: table-cell;flex: 1;color: #000000d9;font-size: 12px;line-height: 1.5715;word-break: break-word;overflow-wrap: break-word;border-collapse: collapse;border: 1px solid rgba(0,0,0,.06);\">");
|
||||||
emailContent.append(e.get(keyName.toString()));
|
emailContent.append(itemValue.replaceAll("null", ""));
|
||||||
emailContent.append("</td>");
|
emailContent.append("</td>");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
@ -710,7 +711,8 @@ public class SalaryBillBO {
|
||||||
SalaryTemplateSalaryItemListDTO salaryItem = itemPartition.get(i);
|
SalaryTemplateSalaryItemListDTO salaryItem = itemPartition.get(i);
|
||||||
for (Object keyName : e.keySet()) {
|
for (Object keyName : e.keySet()) {
|
||||||
if ((salaryItem.getId() + SalaryArchiveConstant.DYNAMIC_SUFFIX).equals(keyName.toString())) {
|
if ((salaryItem.getId() + SalaryArchiveConstant.DYNAMIC_SUFFIX).equals(keyName.toString())) {
|
||||||
boolean isHide = (isHideNull && StringUtils.isEmpty(e.getOrDefault(keyName.toString(), StringUtils.EMPTY).toString()))
|
String itemValue = Util.null2String(e.get(keyName.toString()));
|
||||||
|
boolean isHide = (isHideNull && StringUtils.isEmpty(itemValue))
|
||||||
||
|
||
|
||||||
(isHideZero && NumberUtils.isCreatable(e.getOrDefault(keyName.toString(), "0").toString())
|
(isHideZero && NumberUtils.isCreatable(e.getOrDefault(keyName.toString(), "0").toString())
|
||||||
&& BigDecimal.ZERO.compareTo(new BigDecimal(e.getOrDefault(keyName.toString(), "0").toString())) == 0);
|
&& BigDecimal.ZERO.compareTo(new BigDecimal(e.getOrDefault(keyName.toString(), "0").toString())) == 0);
|
||||||
|
|
@ -721,7 +723,7 @@ public class SalaryBillBO {
|
||||||
emailContent.append("</th>");
|
emailContent.append("</th>");
|
||||||
|
|
||||||
emailContent.append("<td style=\"padding: 16px 24px;display: table-cell;flex: 1;color: #000000d9;font-size: 12px;line-height: 1.5715;word-break: break-word;overflow-wrap: break-word;border-collapse: collapse;border: 1px solid rgba(0,0,0,.06);\">");
|
emailContent.append("<td style=\"padding: 16px 24px;display: table-cell;flex: 1;color: #000000d9;font-size: 12px;line-height: 1.5715;word-break: break-word;overflow-wrap: break-word;border-collapse: collapse;border: 1px solid rgba(0,0,0,.06);\">");
|
||||||
emailContent.append(e.get(keyName.toString()));
|
emailContent.append(itemValue.replaceAll("null", ""));
|
||||||
emailContent.append("</td>");
|
emailContent.append("</td>");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
@ -848,7 +850,7 @@ public class SalaryBillBO {
|
||||||
if ("text".equals(wmClassify)) {
|
if ("text".equals(wmClassify)) {
|
||||||
wmTextFieldIds = (List<String>) salaryBillWatermark.getWmSetting().getOrDefault("wmSelectedFieldIds", Collections.emptyList());
|
wmTextFieldIds = (List<String>) salaryBillWatermark.getWmSetting().getOrDefault("wmSelectedFieldIds", Collections.emptyList());
|
||||||
|
|
||||||
List<String> empFields = Arrays.asList(HRM_Name, HRM_Num, HRM_Mobile, HRM_Email, HRM_CurrentOperatorId, HRM_Department);
|
List<String> empFields = Arrays.asList(HRM_Name, HRM_Num, HRM_Mobile, HRM_Email, HRM_CurrentOperatorId, HRM_Department, HRM_SecondDepartment);
|
||||||
if (wmTextFieldIds.contains(HRM_SecondDepartment)) {
|
if (wmTextFieldIds.contains(HRM_SecondDepartment)) {
|
||||||
// 需要查分部
|
// 需要查分部
|
||||||
salaryBillWatermark.getWmSetting().put("needQuerySubDepart", true);
|
salaryBillWatermark.getWmSetting().put("needQuerySubDepart", true);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
package com.engine.salary.entity.salaryBill.param;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工资单批量操作参数
|
||||||
|
* <p>Copyright: Copyright (c) 2024</p>
|
||||||
|
* <p>Company: 泛微软件</p>
|
||||||
|
*
|
||||||
|
* @author qiantao
|
||||||
|
* @version 1.0
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class SalarySendBatParam {
|
||||||
|
|
||||||
|
// 工资单发放Id
|
||||||
|
private List<Long> salarySendIds;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.engine.salary.entity.salaryacct.bo;
|
package com.engine.salary.entity.salaryacct.bo;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.engine.salary.constant.TaxDeclarationDataIndexConstant;
|
import com.engine.salary.constant.TaxDeclarationDataIndexConstant;
|
||||||
import com.engine.salary.entity.salaryacct.po.SalaryAcctResultPO;
|
import com.engine.salary.entity.salaryacct.po.SalaryAcctResultPO;
|
||||||
import com.engine.salary.entity.salaryitem.po.SalaryItemPO;
|
import com.engine.salary.entity.salaryitem.po.SalaryItemPO;
|
||||||
|
|
@ -73,6 +74,9 @@ public class SalaryAcctConsolidatedTaxBO {
|
||||||
.filter(e -> Objects.equals(e.getSalaryItemId(), optional.get()))
|
.filter(e -> Objects.equals(e.getSalaryItemId(), optional.get()))
|
||||||
.map(e -> SalaryEntityUtil.empty2Zero(e.getResultValue()))
|
.map(e -> SalaryEntityUtil.empty2Zero(e.getResultValue()))
|
||||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
|
if (StrUtil.isBlank(resultValue)) {
|
||||||
|
resultValue = "0.00";
|
||||||
|
}
|
||||||
return new BigDecimal(resultValue).add(income).toPlainString();
|
return new BigDecimal(resultValue).add(income).toPlainString();
|
||||||
}
|
}
|
||||||
// 个税调差为0
|
// 个税调差为0
|
||||||
|
|
@ -98,6 +102,9 @@ public class SalaryAcctConsolidatedTaxBO {
|
||||||
.map(e -> SalaryEntityUtil.empty2Zero(e.getResultValue()))
|
.map(e -> SalaryEntityUtil.empty2Zero(e.getResultValue()))
|
||||||
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
}
|
}
|
||||||
|
if (StrUtil.isBlank(resultValue)) {
|
||||||
|
resultValue = "0.00";
|
||||||
|
}
|
||||||
return new BigDecimal(resultValue).add(refundedOrSupplementedTax).subtract(taxAdjustment).toPlainString();
|
return new BigDecimal(resultValue).add(refundedOrSupplementedTax).subtract(taxAdjustment).toPlainString();
|
||||||
}
|
}
|
||||||
return resultValue;
|
return resultValue;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
package com.engine.salary.entity.salaryacct.param;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量操作参数
|
||||||
|
* <p>Copyright: Copyright (c) 2024</p>
|
||||||
|
* <p>Company: 泛微软件</p>
|
||||||
|
*
|
||||||
|
* @author qiantao
|
||||||
|
* @version 1.0
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class SalaryAcctBatParam {
|
||||||
|
|
||||||
|
//薪资所属月
|
||||||
|
private Date salaryMonth;
|
||||||
|
//薪资账套id
|
||||||
|
private List<Long> salarySobIds;
|
||||||
|
//备注
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
|
||||||
|
private List<Long> salaryAcctRecordIds;
|
||||||
|
}
|
||||||
|
|
@ -20,7 +20,7 @@ import java.util.Collection;
|
||||||
@Builder
|
@Builder
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class SalaryAcctCalculateParam {
|
public class SalaryAcctCalculateParam {
|
||||||
|
|
||||||
//核算人员的id,不是employeeId而是salaryAcctEmpId
|
//核算人员的id,不是employeeId而是salaryAcctEmpId
|
||||||
private Collection<Long> ids;
|
private Collection<Long> ids;
|
||||||
|
|
|
||||||
|
|
@ -144,7 +144,7 @@ public class SalarySobItemAggregateBO {
|
||||||
.canEdit(openFormulaForcedEditing || Objects.equals(salaryItemPO.getCanEdit(), 1))
|
.canEdit(openFormulaForcedEditing || Objects.equals(salaryItemPO.getCanEdit(), 1))
|
||||||
.canDelete(openFormulaForcedEditing || salaryItemPO.getCanDelete() == null || Objects.equals(salaryItemPO.getCanDelete(), 1))
|
.canDelete(openFormulaForcedEditing || salaryItemPO.getCanDelete() == null || Objects.equals(salaryItemPO.getCanDelete(), 1))
|
||||||
.width(salaryItemPO.getWidth())
|
.width(salaryItemPO.getWidth())
|
||||||
.defaultValue(salaryItemPO.getDefaultValue())
|
.defaultValue(salarySobItemPO.getDefaultValue())
|
||||||
.build());
|
.build());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,4 +28,6 @@ public class SalarySobQueryParam extends BaseQueryParam {
|
||||||
* 数据过滤级别
|
* 数据过滤级别
|
||||||
*/
|
*/
|
||||||
private AuthFilterTypeEnum filterType;
|
private AuthFilterTypeEnum filterType;
|
||||||
|
|
||||||
|
private boolean isShare;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
package com.engine.salary.entity.siaccount.param;
|
||||||
|
|
||||||
|
|
||||||
|
import com.engine.salary.util.valid.DataCheck;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class AccountBatParam {
|
||||||
|
|
||||||
|
//账单月份")
|
||||||
|
//@NotNull
|
||||||
|
@DataCheck(require = true,message = "账单月份不能为空")
|
||||||
|
private String billMonth;
|
||||||
|
|
||||||
|
//备注")
|
||||||
|
//@Length(max = 60)
|
||||||
|
@DataCheck(max = 60,message = "备注长度不能超过60个字符")
|
||||||
|
private String remarks;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 个税扣缴义务人id
|
||||||
|
*/
|
||||||
|
@DataCheck(require = true,message = "个税扣缴义务人不能为空")
|
||||||
|
private List<Long> paymentOrganizations;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private List<Long> ids;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -45,4 +45,6 @@ public class InsuranceExportParam extends BaseQueryParam {
|
||||||
private List<Long> taxAgents;
|
private List<Long> taxAgents;
|
||||||
|
|
||||||
private String workcode;
|
private String workcode;
|
||||||
|
private List<Long> departmentIds;
|
||||||
|
private List<Long> subCompanyIds;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,4 +26,6 @@ public class TaxAgentQueryParam extends BaseQueryParam {
|
||||||
|
|
||||||
//个税扣缴义务人名称
|
//个税扣缴义务人名称
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
private boolean isShare;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -723,6 +723,7 @@ public class TaxDeclarationBO {
|
||||||
private static String findStringValue(String fieldCode, Map<Long, List<SalaryAcctResultPO>> resultMap, Map<String, Long> salaryItemMap) {
|
private static String findStringValue(String fieldCode, Map<Long, List<SalaryAcctResultPO>> resultMap, Map<String, Long> salaryItemMap) {
|
||||||
return resultMap.getOrDefault(salaryItemMap.getOrDefault(fieldCode, 0L), Collections.emptyList()).stream()
|
return resultMap.getOrDefault(salaryItemMap.getOrDefault(fieldCode, 0L), Collections.emptyList()).stream()
|
||||||
.map(SalaryAcctResultPO::getResultValue)
|
.map(SalaryAcctResultPO::getResultValue)
|
||||||
|
.filter(Objects::nonNull)
|
||||||
.findFirst().orElse("");
|
.findFirst().orElse("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,10 @@ public class TaxDeclarationListDTO {
|
||||||
@TableTitle(title = "薪资类型", dataIndex = "incomeCategory", key = "incomeCategory")
|
@TableTitle(title = "薪资类型", dataIndex = "incomeCategory", key = "incomeCategory")
|
||||||
private String incomeCategory;
|
private String incomeCategory;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8")
|
||||||
|
@TableTitle(title = "税款所属期", dataIndex = "taxCycle", key = "taxCycle")
|
||||||
|
private Date taxCycle;
|
||||||
|
|
||||||
@JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8")
|
@JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8")
|
||||||
@TableTitle(title = "薪资所属月", dataIndex = "salaryMonth", key = "salaryMonth")
|
@TableTitle(title = "薪资所属月", dataIndex = "salaryMonth", key = "salaryMonth")
|
||||||
private Date salaryMonth;
|
private Date salaryMonth;
|
||||||
|
|
@ -48,10 +52,6 @@ public class TaxDeclarationListDTO {
|
||||||
@TableTitle(title = "个税扣缴义务人", dataIndex = "taxAgentName", key = "taxAgentName")
|
@TableTitle(title = "个税扣缴义务人", dataIndex = "taxAgentName", key = "taxAgentName")
|
||||||
private String taxAgentName;
|
private String taxAgentName;
|
||||||
|
|
||||||
@JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8")
|
|
||||||
@TableTitle(title = "税款所属期", dataIndex = "taxCycle", key = "taxCycle")
|
|
||||||
private Date taxCycle;
|
|
||||||
|
|
||||||
//@TableTitle(title = "操作人id", dataIndex = "operateEmployeeId", key = "operateEmployeeId")
|
//@TableTitle(title = "操作人id", dataIndex = "operateEmployeeId", key = "operateEmployeeId")
|
||||||
private Long operateEmployeeId;
|
private Long operateEmployeeId;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
package com.engine.salary.entity.taxdeclaration.param;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.time.YearMonth;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成个税申报表参数
|
||||||
|
* <p>Copyright: Copyright (c) 2022</p>
|
||||||
|
* <p>Company: 泛微软件</p>
|
||||||
|
*
|
||||||
|
* @author qiantao
|
||||||
|
* @version 1.0
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class TaxDeclarationBatParam {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 个税申报id
|
||||||
|
*/
|
||||||
|
private Long taxDeclarationId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 薪资所属月
|
||||||
|
*/
|
||||||
|
private YearMonth salaryMonth;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 个税扣缴义务人
|
||||||
|
*/
|
||||||
|
private List<Long> taxAgentIds;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
private String salaryMonthStr;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
private Date taxCycle;
|
||||||
|
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
private Date salaryDate;
|
||||||
|
}
|
||||||
|
|
@ -1,9 +1,14 @@
|
||||||
package com.engine.salary.entity.taxdeclaration.param;
|
package com.engine.salary.entity.taxdeclaration.param;
|
||||||
|
|
||||||
import com.engine.salary.common.BaseQueryParam;
|
import com.engine.salary.common.BaseQueryParam;
|
||||||
import lombok.*;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
import java.time.YearMonth;
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 个税申报记录查询条件
|
* 个税申报记录查询条件
|
||||||
|
|
@ -20,12 +25,13 @@ import java.time.YearMonth;
|
||||||
public class TaxDeclarationListQueryParam extends BaseQueryParam {
|
public class TaxDeclarationListQueryParam extends BaseQueryParam {
|
||||||
|
|
||||||
//薪资所属月范围起点
|
//薪资所属月范围起点
|
||||||
private YearMonth fromSalaryMonth;
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
private Date fromSalaryMonth;
|
||||||
|
|
||||||
//薪资所属月范围终点
|
//薪资所属月范围终点
|
||||||
private YearMonth endSalaryMonth;
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
private Date endSalaryMonth;
|
||||||
|
|
||||||
private String fromSalaryMonthStr;
|
//个税扣缴义务人菜单")
|
||||||
|
private String taxAgentName;
|
||||||
private String endSalaryMonthStr;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -90,6 +90,13 @@ public class TaxDeclarationPO {
|
||||||
LocalDateRange salaryMonths;
|
LocalDateRange salaryMonths;
|
||||||
|
|
||||||
|
|
||||||
|
//"开始日期
|
||||||
|
private Date taxCycleFromDate;
|
||||||
|
|
||||||
|
//结束日期
|
||||||
|
private Date taxCycleEndDate;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private Collection<Long> taxAgentIds;
|
private Collection<Long> taxAgentIds;
|
||||||
private Set<String> opts;
|
private Set<String> opts;
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@
|
||||||
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
||||||
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
|
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
|
||||||
where e.status not in (7)
|
where e.status not in (7)
|
||||||
|
<include refid="paramSql"/>
|
||||||
|
|
||||||
<!-- 排序 -->
|
<!-- 排序 -->
|
||||||
<if test="param.orderRule != null">
|
<if test="param.orderRule != null">
|
||||||
|
|
@ -51,6 +52,7 @@
|
||||||
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
||||||
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
|
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
|
||||||
where e.status not in (7)
|
where e.status not in (7)
|
||||||
|
<include refid="paramSql"/>
|
||||||
|
|
||||||
<!-- 排序 -->
|
<!-- 排序 -->
|
||||||
<if test="param.orderRule != null">
|
<if test="param.orderRule != null">
|
||||||
|
|
@ -79,6 +81,7 @@
|
||||||
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
||||||
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
|
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
|
||||||
where e.status not in (7)
|
where e.status not in (7)
|
||||||
|
<include refid="paramSql"/>
|
||||||
|
|
||||||
<!-- 排序 -->
|
<!-- 排序 -->
|
||||||
<if test="param.orderRule != null">
|
<if test="param.orderRule != null">
|
||||||
|
|
@ -96,6 +99,7 @@
|
||||||
LEFT JOIN hrmresource e ON e.ID = a.employee_id
|
LEFT JOIN hrmresource e ON e.ID = a.employee_id
|
||||||
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
||||||
where e.status not in (7)
|
where e.status not in (7)
|
||||||
|
<include refid="paramSql"/>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
<select id="exportExcelAccount" resultType="com.engine.salary.entity.siexport.po.ExcelAccountExportPO" databaseId="oracle">
|
<select id="exportExcelAccount" resultType="com.engine.salary.entity.siexport.po.ExcelAccountExportPO" databaseId="oracle">
|
||||||
|
|
@ -108,6 +112,7 @@
|
||||||
LEFT JOIN hrmresource e ON e.ID = a.employee_id
|
LEFT JOIN hrmresource e ON e.ID = a.employee_id
|
||||||
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
||||||
where e.status not in (7)
|
where e.status not in (7)
|
||||||
|
<include refid="paramSql"/>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
<select id="exportExcelAccount" resultType="com.engine.salary.entity.siexport.po.ExcelAccountExportPO" databaseId="sqlserver">
|
<select id="exportExcelAccount" resultType="com.engine.salary.entity.siexport.po.ExcelAccountExportPO" databaseId="sqlserver">
|
||||||
|
|
@ -120,6 +125,7 @@
|
||||||
LEFT JOIN hrmresource e ON e.ID = a.employee_id
|
LEFT JOIN hrmresource e ON e.ID = a.employee_id
|
||||||
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
||||||
where e.status not in (7)
|
where e.status not in (7)
|
||||||
|
<include refid="paramSql"/>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
@ -147,6 +153,7 @@
|
||||||
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
||||||
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
|
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
|
||||||
where e.status not in (7)
|
where e.status not in (7)
|
||||||
|
<include refid="paramSql"/>
|
||||||
|
|
||||||
<!-- 排序 -->
|
<!-- 排序 -->
|
||||||
<if test="param.orderRule != null">
|
<if test="param.orderRule != null">
|
||||||
|
|
@ -176,6 +183,7 @@
|
||||||
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
||||||
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
|
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
|
||||||
where e.status not in (7)
|
where e.status not in (7)
|
||||||
|
<include refid="paramSql"/>
|
||||||
|
|
||||||
<!-- 排序 -->
|
<!-- 排序 -->
|
||||||
<if test="param.orderRule != null">
|
<if test="param.orderRule != null">
|
||||||
|
|
@ -205,6 +213,7 @@
|
||||||
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
||||||
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
|
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
|
||||||
where e.status not in (7)
|
where e.status not in (7)
|
||||||
|
<include refid="paramSql"/>
|
||||||
|
|
||||||
<!-- 排序 -->
|
<!-- 排序 -->
|
||||||
<if test="param.orderRule != null">
|
<if test="param.orderRule != null">
|
||||||
|
|
@ -233,6 +242,7 @@
|
||||||
LEFT JOIN hrmdepartment d ON d.id = e.department_id
|
LEFT JOIN hrmdepartment d ON d.id = e.department_id
|
||||||
LEFT JOIN hrmsubcompany c ON c.id = e.subcompany_id
|
LEFT JOIN hrmsubcompany c ON c.id = e.subcompany_id
|
||||||
where e.status not in (7)
|
where e.status not in (7)
|
||||||
|
<include refid="extParamSql"/>
|
||||||
<!-- 排序 -->
|
<!-- 排序 -->
|
||||||
</select>
|
</select>
|
||||||
<select id="exportExtAccount" resultType="com.engine.salary.entity.siexport.po.AccountExportPO" databaseId="oracle">
|
<select id="exportExtAccount" resultType="com.engine.salary.entity.siexport.po.AccountExportPO" databaseId="oracle">
|
||||||
|
|
@ -256,6 +266,7 @@
|
||||||
LEFT JOIN hrmdepartment d ON d.id = e.department_id
|
LEFT JOIN hrmdepartment d ON d.id = e.department_id
|
||||||
LEFT JOIN hrmsubcompany c ON c.id = e.subcompany_id
|
LEFT JOIN hrmsubcompany c ON c.id = e.subcompany_id
|
||||||
where e.status not in (7)
|
where e.status not in (7)
|
||||||
|
<include refid="extParamSql"/>
|
||||||
<!-- 排序 -->
|
<!-- 排序 -->
|
||||||
</select>
|
</select>
|
||||||
<select id="exportExtAccount" resultType="com.engine.salary.entity.siexport.po.AccountExportPO" databaseId="sqlserver">
|
<select id="exportExtAccount" resultType="com.engine.salary.entity.siexport.po.AccountExportPO" databaseId="sqlserver">
|
||||||
|
|
@ -279,6 +290,7 @@
|
||||||
LEFT JOIN hrmdepartment d ON d.id = e.department_id
|
LEFT JOIN hrmdepartment d ON d.id = e.department_id
|
||||||
LEFT JOIN hrmsubcompany c ON c.id = e.subcompany_id
|
LEFT JOIN hrmsubcompany c ON c.id = e.subcompany_id
|
||||||
where e.status not in (7)
|
where e.status not in (7)
|
||||||
|
<include refid="extParamSql"/>
|
||||||
<!-- 排序 -->
|
<!-- 排序 -->
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
@ -293,6 +305,7 @@
|
||||||
LEFT JOIN hrsa_external_employee e ON e.ID = a.employee_id
|
LEFT JOIN hrsa_external_employee e ON e.ID = a.employee_id
|
||||||
LEFT JOIN hrmdepartment d ON d.id = e.department_id
|
LEFT JOIN hrmdepartment d ON d.id = e.department_id
|
||||||
where e.status not in (7)
|
where e.status not in (7)
|
||||||
|
<include refid="extParamSql"/>
|
||||||
</select>
|
</select>
|
||||||
<select id="exportExtExcelAccount" resultType="com.engine.salary.entity.siexport.po.ExcelAccountExportPO" databaseId="oracle">
|
<select id="exportExtExcelAccount" resultType="com.engine.salary.entity.siexport.po.ExcelAccountExportPO" databaseId="oracle">
|
||||||
SELECT
|
SELECT
|
||||||
|
|
@ -305,6 +318,7 @@
|
||||||
LEFT JOIN hrsa_external_employee e ON e.ID = a.employee_id
|
LEFT JOIN hrsa_external_employee e ON e.ID = a.employee_id
|
||||||
LEFT JOIN hrmdepartment d ON d.id = e.department_id
|
LEFT JOIN hrmdepartment d ON d.id = e.department_id
|
||||||
where e.status not in (7)
|
where e.status not in (7)
|
||||||
|
<include refid="extParamSql"/>
|
||||||
</select>
|
</select>
|
||||||
<select id="exportExtExcelAccount" resultType="com.engine.salary.entity.siexport.po.ExcelAccountExportPO" databaseId="sqlserver">
|
<select id="exportExtExcelAccount" resultType="com.engine.salary.entity.siexport.po.ExcelAccountExportPO" databaseId="sqlserver">
|
||||||
SELECT
|
SELECT
|
||||||
|
|
@ -317,5 +331,113 @@
|
||||||
LEFT JOIN hrsa_external_employee e ON e.ID = a.employee_id
|
LEFT JOIN hrsa_external_employee e ON e.ID = a.employee_id
|
||||||
LEFT JOIN hrmdepartment d ON d.id = e.department_id
|
LEFT JOIN hrmdepartment d ON d.id = e.department_id
|
||||||
where e.status not in (7)
|
where e.status not in (7)
|
||||||
|
<include refid="extParamSql"/>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<sql id="paramSql">
|
||||||
|
<if test="param.workcode != null and param.workcode != ''">
|
||||||
|
AND e.workcode like CONCAT('%',#{param.workcode},'%')
|
||||||
|
</if>
|
||||||
|
<if test="param.departmentIds != null and param.departmentIds.size()>0">
|
||||||
|
AND e.departmentid IN
|
||||||
|
<foreach collection="param.departmentIds" open="(" item="departmentId" separator="," close=")">
|
||||||
|
#{departmentId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="param.subCompanyIds != null and param.subCompanyIds.size()>0">
|
||||||
|
AND e.subcompanyid1 IN
|
||||||
|
<foreach collection="param.subCompanyIds" open="(" item="subCompanyId" separator="," close=")">
|
||||||
|
#{subCompanyId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
|
<sql id="paramSql" databaseId="oracle">
|
||||||
|
<if test="param.workcode != null and param.workcode != ''">
|
||||||
|
AND e.workcode like '%'||#{param.workcode}||'%'
|
||||||
|
</if>
|
||||||
|
<if test="param.departmentIds != null and param.departmentIds.size()>0">
|
||||||
|
AND e.departmentid IN
|
||||||
|
<foreach collection="param.departmentIds" open="(" item="departmentId" separator="," close=")">
|
||||||
|
#{departmentId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="param.subCompanyIds != null and param.subCompanyIds.size()>0">
|
||||||
|
AND e.subcompanyid1 IN
|
||||||
|
<foreach collection="param.subCompanyIds" open="(" item="subCompanyId" separator="," close=")">
|
||||||
|
#{subCompanyId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<sql id="paramSql" databaseId="sqlserver">
|
||||||
|
<if test="param.workcode != null and param.workcode != ''">
|
||||||
|
AND e.workcode like '%'+#{param.workcode}+'%'
|
||||||
|
</if>
|
||||||
|
<if test="param.departmentIds != null and param.departmentIds.size()>0">
|
||||||
|
AND e.departmentid IN
|
||||||
|
<foreach collection="param.departmentIds" open="(" item="departmentId" separator="," close=")">
|
||||||
|
#{departmentId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="param.subCompanyIds != null and param.subCompanyIds.size()>0">
|
||||||
|
AND e.subcompanyid1 IN
|
||||||
|
<foreach collection="param.subCompanyIds" open="(" item="subCompanyId" separator="," close=")">
|
||||||
|
#{subCompanyId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<sql id="extParamSql">
|
||||||
|
<if test="param.workcode != null and param.workcode != ''">
|
||||||
|
AND e.workcode like CONCAT('%',#{param.workcode},'%')
|
||||||
|
</if>
|
||||||
|
<if test="param.departmentIds != null and param.departmentIds.size()>0">
|
||||||
|
AND e.department_id IN
|
||||||
|
<foreach collection="param.departmentIds" open="(" item="departmentId" separator="," close=")">
|
||||||
|
#{departmentId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="param.subCompanyIds != null and param.subCompanyIds.size()>0">
|
||||||
|
AND e.subcompany_id IN
|
||||||
|
<foreach collection="param.subCompanyIds" open="(" item="subCompanyId" separator="," close=")">
|
||||||
|
#{subCompanyId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<sql id="extParamSql" databaseId="oracle">
|
||||||
|
<if test="param.workcode != null and param.workcode != ''">
|
||||||
|
AND e.workcode like '%'||#{param.workcode}||'%'
|
||||||
|
</if>
|
||||||
|
<if test="param.departmentIds != null and param.departmentIds.size()>0">
|
||||||
|
AND e.department_id IN
|
||||||
|
<foreach collection="param.departmentIds" open="(" item="departmentId" separator="," close=")">
|
||||||
|
#{departmentId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="param.subCompanyIds != null and param.subCompanyIds.size()>0">
|
||||||
|
AND e.subcompany_id IN
|
||||||
|
<foreach collection="param.subCompanyIds" open="(" item="subCompanyId" separator="," close=")">
|
||||||
|
#{subCompanyId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<sql id="extParamSql" databaseId="sqlserver">
|
||||||
|
<if test="param.workcode != null and param.workcode != ''">
|
||||||
|
AND e.workcode like '%'+#{param.workcode}+'%'
|
||||||
|
</if>
|
||||||
|
<if test="param.departmentIds != null and param.departmentIds.size()>0">
|
||||||
|
AND e.department_id IN
|
||||||
|
<foreach collection="param.departmentIds" open="(" item="departmentId" separator="," close=")">
|
||||||
|
#{departmentId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="param.subCompanyIds != null and param.subCompanyIds.size()>0">
|
||||||
|
AND e.subcompany_id IN
|
||||||
|
<foreach collection="param.subCompanyIds" open="(" item="subCompanyId" separator="," close=")">
|
||||||
|
#{subCompanyId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</sql>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -620,9 +620,7 @@
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="pay_end_date =case" suffix="end,">
|
<trim prefix="pay_end_date =case" suffix="end,">
|
||||||
<foreach collection="collection" item="item" index="index">
|
<foreach collection="collection" item="item" index="index">
|
||||||
<if test="item.payEndDate!=null">
|
when id=#{item.id} then #{item.payEndDate}
|
||||||
when id=#{item.id} then #{item.payEndDate}
|
|
||||||
</if>
|
|
||||||
</foreach>
|
</foreach>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="update_time =case" suffix="end,">
|
<trim prefix="update_time =case" suffix="end,">
|
||||||
|
|
@ -650,9 +648,7 @@
|
||||||
<if test="item.payStartDate != null">
|
<if test="item.payStartDate != null">
|
||||||
pay_start_date=#{item.payStartDate},
|
pay_start_date=#{item.payStartDate},
|
||||||
</if>
|
</if>
|
||||||
<if test="item.payEndDate != null">
|
|
||||||
pay_end_date=#{item.payEndDate},
|
pay_end_date=#{item.payEndDate},
|
||||||
</if>
|
|
||||||
</set>
|
</set>
|
||||||
WHERE id = #{item.id} AND delete_type = 0
|
WHERE id = #{item.id} AND delete_type = 0
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
e.workcode,
|
e.workcode,
|
||||||
e.certificatenum as idNo,
|
e.certificatenum as idNo,
|
||||||
e.accounttype as accountType,
|
e.accounttype as accountType,
|
||||||
|
e.sex as sex,
|
||||||
'false' as extEmp
|
'false' as extEmp
|
||||||
from hrmresource e
|
from hrmresource e
|
||||||
left join hrmdepartment d on e.departmentid = d.id
|
left join hrmdepartment d on e.departmentid = d.id
|
||||||
|
|
@ -21,6 +22,7 @@
|
||||||
<select id="getEmployeeByIds" resultType="com.engine.salary.entity.datacollection.DataCollectionEmployee">
|
<select id="getEmployeeByIds" resultType="com.engine.salary.entity.datacollection.DataCollectionEmployee">
|
||||||
select e.id as employeeId,
|
select e.id as employeeId,
|
||||||
e.lastname as username,
|
e.lastname as username,
|
||||||
|
e.sex as sex,
|
||||||
e.certificatenum as idNo,
|
e.certificatenum as idNo,
|
||||||
e.status as status,
|
e.status as status,
|
||||||
e.workcode as workcode,
|
e.workcode as workcode,
|
||||||
|
|
@ -42,6 +44,7 @@
|
||||||
resultType="com.engine.salary.entity.datacollection.DataCollectionEmployee">
|
resultType="com.engine.salary.entity.datacollection.DataCollectionEmployee">
|
||||||
select e.id as employeeId,
|
select e.id as employeeId,
|
||||||
e.lastname as username,
|
e.lastname as username,
|
||||||
|
e.sex as sex,
|
||||||
e.certificatenum as idNo,
|
e.certificatenum as idNo,
|
||||||
e.status as status,
|
e.status as status,
|
||||||
e.workcode as workcode,
|
e.workcode as workcode,
|
||||||
|
|
@ -123,6 +126,7 @@
|
||||||
select e.id as employeeId,
|
select e.id as employeeId,
|
||||||
e.lastname as username,
|
e.lastname as username,
|
||||||
e.status as status,
|
e.status as status,
|
||||||
|
e.sex as sex,
|
||||||
e.certificatenum as idNo,
|
e.certificatenum as idNo,
|
||||||
e.workcode as workcode,
|
e.workcode as workcode,
|
||||||
d.departmentname as departmentName,
|
d.departmentname as departmentName,
|
||||||
|
|
@ -229,6 +233,7 @@
|
||||||
select e.id as employeeId,
|
select e.id as employeeId,
|
||||||
e.lastname as username,
|
e.lastname as username,
|
||||||
e.status as status,
|
e.status as status,
|
||||||
|
e.sex as sex,
|
||||||
e.certificatenum as idNo,
|
e.certificatenum as idNo,
|
||||||
e.workcode as workcode,
|
e.workcode as workcode,
|
||||||
d.departmentname as departmentName,
|
d.departmentname as departmentName,
|
||||||
|
|
@ -283,6 +288,7 @@
|
||||||
e.lastname as username,
|
e.lastname as username,
|
||||||
e.status as status,
|
e.status as status,
|
||||||
e.workcode as workcode,
|
e.workcode as workcode,
|
||||||
|
e.sex as sex,
|
||||||
e.certificatenum as idNo,
|
e.certificatenum as idNo,
|
||||||
e.companystartdate as companystartdate,
|
e.companystartdate as companystartdate,
|
||||||
e.mobile as mobile,
|
e.mobile as mobile,
|
||||||
|
|
@ -304,6 +310,7 @@
|
||||||
e.status as status,
|
e.status as status,
|
||||||
e.workcode as workcode,
|
e.workcode as workcode,
|
||||||
e.certificatenum as idNo,
|
e.certificatenum as idNo,
|
||||||
|
e.sex as sex,
|
||||||
e.companystartdate as companystartdate,
|
e.companystartdate as companystartdate,
|
||||||
e.mobile as mobile,
|
e.mobile as mobile,
|
||||||
e.accounttype as accountType,
|
e.accounttype as accountType,
|
||||||
|
|
@ -324,6 +331,7 @@
|
||||||
e.status as status,
|
e.status as status,
|
||||||
e.workcode as workcode,
|
e.workcode as workcode,
|
||||||
e.certificatenum as idNo,
|
e.certificatenum as idNo,
|
||||||
|
e.sex as sex,
|
||||||
e.companystartdate as companystartdate,
|
e.companystartdate as companystartdate,
|
||||||
e.mobile as mobile,
|
e.mobile as mobile,
|
||||||
e.departmentid as departmentId,
|
e.departmentid as departmentId,
|
||||||
|
|
@ -487,6 +495,7 @@
|
||||||
e.lastname as username,
|
e.lastname as username,
|
||||||
e.status as status,
|
e.status as status,
|
||||||
e.certificatenum as idNo,
|
e.certificatenum as idNo,
|
||||||
|
e.sex as sex,
|
||||||
e.workcode as workcode,
|
e.workcode as workcode,
|
||||||
e.companystartdate as companystartdate,
|
e.companystartdate as companystartdate,
|
||||||
e.mobile as mobile,
|
e.mobile as mobile,
|
||||||
|
|
@ -562,6 +571,7 @@
|
||||||
e.lastname as username,
|
e.lastname as username,
|
||||||
e.status as status,
|
e.status as status,
|
||||||
e.certificatenum as idNo,
|
e.certificatenum as idNo,
|
||||||
|
e.sex as sex,
|
||||||
e.workcode as workcode,
|
e.workcode as workcode,
|
||||||
d.departmentname as departmentName,
|
d.departmentname as departmentName,
|
||||||
d.id as departmentId,
|
d.id as departmentId,
|
||||||
|
|
|
||||||
|
|
@ -290,7 +290,7 @@
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="update_time = case" suffix="end,">
|
<trim prefix="update_time = case" suffix="end,">
|
||||||
<foreach collection="collection" item="item" index="index">
|
<foreach collection="collection" item="item" index="index">
|
||||||
WHEN id = #{item.id} THEN #{item.updateTime}
|
WHEN id = #{item.id} THEN #{item.updateTime,jdbcType=TIMESTAMP}
|
||||||
</foreach>
|
</foreach>
|
||||||
</trim>
|
</trim>
|
||||||
</trim>
|
</trim>
|
||||||
|
|
|
||||||
|
|
@ -632,7 +632,7 @@
|
||||||
<if test="param.startSalaryMonth != null">
|
<if test="param.startSalaryMonth != null">
|
||||||
AND t1.salary_month >= #{param.startSalaryMonth}
|
AND t1.salary_month >= #{param.startSalaryMonth}
|
||||||
</if>
|
</if>
|
||||||
ORDER BY t1.id DESC
|
ORDER BY t1.salary_month DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -370,7 +370,7 @@
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="update_time = case" suffix="end,">
|
<trim prefix="update_time = case" suffix="end,">
|
||||||
<foreach collection="collection" item="item" index="index">
|
<foreach collection="collection" item="item" index="index">
|
||||||
WHEN id = #{item.id} THEN #{item.updateTime}
|
WHEN id = #{item.id} THEN #{item.updateTime,jdbcType=TIMESTAMP}
|
||||||
</foreach>
|
</foreach>
|
||||||
</trim>
|
</trim>
|
||||||
</trim>
|
</trim>
|
||||||
|
|
|
||||||
|
|
@ -379,7 +379,33 @@
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="update_time = case" suffix="end,">
|
<trim prefix="update_time = case" suffix="end,">
|
||||||
<foreach collection="collection" item="item" index="index">
|
<foreach collection="collection" item="item" index="index">
|
||||||
WHEN id = #{item.id} THEN #{item.updateTime}
|
WHEN id = #{item.id} THEN #{item.updateTime,jdbcType=TIMESTAMP}
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="delete_type = case" suffix="end,">
|
||||||
|
<foreach collection="collection" item="item" index="index">
|
||||||
|
WHEN id = #{item.id} THEN #{item.deleteType}
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
</trim>
|
||||||
|
WHERE delete_type = 0
|
||||||
|
AND id IN
|
||||||
|
<foreach collection="collection" item="item" open="(" close=")" separator=",">
|
||||||
|
#{item.id}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="batchUpdate" databaseId="postgresql">
|
||||||
|
UPDATE hrsa_insurance_base_info
|
||||||
|
<trim prefix="set" suffixOverrides=",">
|
||||||
|
<trim prefix="run_status = case" suffix="end,">
|
||||||
|
<foreach collection="collection" item="item" index="index">
|
||||||
|
WHEN id = #{item.id} THEN #{item.runStatus}
|
||||||
|
</foreach>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="update_time = case" suffix="end,">
|
||||||
|
<foreach collection="collection" item="item" index="index">
|
||||||
|
WHEN id = #{item.id} THEN cast(#{item.updateTime} as timestamp)
|
||||||
</foreach>
|
</foreach>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="delete_type = case" suffix="end,">
|
<trim prefix="delete_type = case" suffix="end,">
|
||||||
|
|
|
||||||
|
|
@ -377,7 +377,7 @@
|
||||||
WHERE
|
WHERE
|
||||||
1=1
|
1=1
|
||||||
AND base.delete_type = 0
|
AND base.delete_type = 0
|
||||||
AND base.employee_type is null
|
AND (base.employee_type is null or base.employee_type = 0)
|
||||||
<include refid="condition"></include>
|
<include refid="condition"></include>
|
||||||
<if test="param.orderRule != null">
|
<if test="param.orderRule != null">
|
||||||
ORDER BY ${param.orderRule.orderRule} ${param.orderRule.ascOrDesc}
|
ORDER BY ${param.orderRule.orderRule} ${param.orderRule.ascOrDesc}
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,12 @@
|
||||||
<if test="salaryMonths != null and salaryMonths.endDate != null">
|
<if test="salaryMonths != null and salaryMonths.endDate != null">
|
||||||
AND salary_month <![CDATA[ <= ]]> #{salaryMonths.endDate}
|
AND salary_month <![CDATA[ <= ]]> #{salaryMonths.endDate}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="taxCycleFromDate != null">
|
||||||
|
AND tax_cycle <![CDATA[ >= ]]> #{taxCycleFromDate}
|
||||||
|
</if>
|
||||||
|
<if test="taxCycleEndDate != null">
|
||||||
|
AND tax_cycle <![CDATA[ <= ]]> #{taxCycleEndDate}
|
||||||
|
</if>
|
||||||
<if test="taxAgentIds != null and taxAgentIds.size()>0">
|
<if test="taxAgentIds != null and taxAgentIds.size()>0">
|
||||||
AND tax_agent_id IN
|
AND tax_agent_id IN
|
||||||
<foreach collection="taxAgentIds" open="(" item="id" separator="," close=")">
|
<foreach collection="taxAgentIds" open="(" item="id" separator="," close=")">
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,9 @@ public class SalaryStatisticsDataPerspectiveQueryParam extends BaseQueryParam {
|
||||||
//个税扣缴义务人配置
|
//个税扣缴义务人配置
|
||||||
private List<Long> taxAgent;
|
private List<Long> taxAgent;
|
||||||
|
|
||||||
|
@JsonIgnore
|
||||||
|
private List<Long> salarySob;
|
||||||
|
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
//收入所得项目配置
|
//收入所得项目配置
|
||||||
private List<Integer> incomeCategory;
|
private List<Integer> incomeCategory;
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ import com.engine.salary.entity.salaryacct.po.SalaryAcctResultPO;
|
||||||
import com.engine.salary.entity.salaryitem.po.SalaryItemPO;
|
import com.engine.salary.entity.salaryitem.po.SalaryItemPO;
|
||||||
import com.engine.salary.entity.salarysob.po.SalarySobPO;
|
import com.engine.salary.entity.salarysob.po.SalarySobPO;
|
||||||
import com.engine.salary.entity.taxagent.param.TaxAgentQueryParam;
|
import com.engine.salary.entity.taxagent.param.TaxAgentQueryParam;
|
||||||
import com.engine.salary.entity.setting.param.PageListSettingQueryParam;
|
|
||||||
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
||||||
import com.engine.salary.enums.UserStatusEnum;
|
import com.engine.salary.enums.UserStatusEnum;
|
||||||
import com.engine.salary.enums.auth.AuthFilterTypeEnum;
|
import com.engine.salary.enums.auth.AuthFilterTypeEnum;
|
||||||
|
|
@ -31,6 +30,8 @@ import com.engine.salary.service.*;
|
||||||
import com.engine.salary.service.auth.AuthService;
|
import com.engine.salary.service.auth.AuthService;
|
||||||
import com.engine.salary.service.auth.AuthServiceImpl;
|
import com.engine.salary.service.auth.AuthServiceImpl;
|
||||||
import com.engine.salary.service.impl.*;
|
import com.engine.salary.service.impl.*;
|
||||||
|
import com.engine.salary.sys.service.SalarySysConfService;
|
||||||
|
import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl;
|
||||||
import com.engine.salary.util.SalaryAssert;
|
import com.engine.salary.util.SalaryAssert;
|
||||||
import com.engine.salary.util.SalaryDateUtil;
|
import com.engine.salary.util.SalaryDateUtil;
|
||||||
import com.engine.salary.util.SalaryEntityUtil;
|
import com.engine.salary.util.SalaryEntityUtil;
|
||||||
|
|
@ -49,6 +50,8 @@ import weaver.hrm.User;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import static com.engine.salary.sys.constant.SalarySysConstant.REPORT_ORGANIZATIN_TYPE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 薪酬统计员工明细
|
* 薪酬统计员工明细
|
||||||
* <p>Copyright: Copyright (c) 2022</p>
|
* <p>Copyright: Copyright (c) 2022</p>
|
||||||
|
|
@ -103,6 +106,11 @@ public class SalaryStatisticsEmployeeServiceImpl extends Service implements Sala
|
||||||
return ServiceUtil.getService(SettingServiceImpl.class, user);
|
return ServiceUtil.getService(SettingServiceImpl.class, user);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private SalarySysConfService getSalarySysConfService(User user) {
|
||||||
|
return ServiceUtil.getService(SalarySysConfServiceImpl.class, user);
|
||||||
|
}
|
||||||
|
|
||||||
|
private final boolean isRealOrg = "1".equals(getSalarySysConfService(user).getValueByCode(REPORT_ORGANIZATIN_TYPE));
|
||||||
@Override
|
@Override
|
||||||
public PageInfo<SalaryStatisticsEmployeeListDTO> listPage(SalaryStatisticsEmployeeQueryParam queryParam) {
|
public PageInfo<SalaryStatisticsEmployeeListDTO> listPage(SalaryStatisticsEmployeeQueryParam queryParam) {
|
||||||
List<SalaryStatisticsEmployeeListDTO> list = Collections.emptyList();
|
List<SalaryStatisticsEmployeeListDTO> list = Collections.emptyList();
|
||||||
|
|
@ -262,14 +270,22 @@ public class SalaryStatisticsEmployeeServiceImpl extends Service implements Sala
|
||||||
map.put("salarySob", SalarySobMap.get(se.getSalarySobId()));
|
map.put("salarySob", SalarySobMap.get(se.getSalarySobId()));
|
||||||
map.put("acctTimes", salaryAcctRecordMap.get(se.getSalaryAcctRecordId()));
|
map.put("acctTimes", salaryAcctRecordMap.get(se.getSalaryAcctRecordId()));
|
||||||
map.put("userName", Util.null2String(emp.getUsername()));
|
map.put("userName", Util.null2String(emp.getUsername()));
|
||||||
map.put("subCompany", Util.null2String(emp.getSubcompanyName()));
|
|
||||||
map.put("department", Util.null2String(emp.getDepartmentName()));
|
|
||||||
map.put("jobTitle", Util.null2String(emp.getJobtitleName()));
|
|
||||||
map.put("status", Util.null2String(NumberUtil.isNumber(emp.getStatus()) ? SalaryEmployeeStatusEnum.parseByValue(Integer.valueOf(emp.getStatus())).getDefaultLabel() : null));
|
|
||||||
map.put("workCode", Util.null2String(emp.getWorkcode()));
|
map.put("workCode", Util.null2String(emp.getWorkcode()));
|
||||||
map.put("idNo", Util.null2String(emp.getIdNo()));
|
map.put("idNo", Util.null2String(emp.getIdNo()));
|
||||||
map.put("companystartdate", Util.null2String(emp.getCompanystartdate()));
|
map.put("companystartdate", Util.null2String(emp.getCompanystartdate()));
|
||||||
|
|
||||||
|
if(isRealOrg){
|
||||||
|
map.put("subCompany", Util.null2String(emp.getSubcompanyName()));
|
||||||
|
map.put("department", Util.null2String(emp.getDepartmentName()));
|
||||||
|
map.put("jobTitle", Util.null2String(emp.getJobtitleName()));
|
||||||
|
map.put("status", Util.null2String(NumberUtil.isNumber(emp.getStatus()) ? SalaryEmployeeStatusEnum.parseByValue(Integer.valueOf(emp.getStatus())).getDefaultLabel() : null));
|
||||||
|
}else {
|
||||||
|
map.put("subCompany", Util.null2String(se.getSubcompanyName()));
|
||||||
|
map.put("department", Util.null2String(se.getDepartmentName()));
|
||||||
|
map.put("jobTitle", Util.null2String(se.getJobtitleName()));
|
||||||
|
map.put("status", Util.null2String(NumberUtil.isNumber(se.getStatus()) ? SalaryEmployeeStatusEnum.parseByValue(Integer.valueOf(se.getStatus())).getDefaultLabel() : null));
|
||||||
|
}
|
||||||
|
|
||||||
// IncomeCategoryEnum incomeCategoryEnum = IncomeCategoryEnum.parseByValue(Integer.parseInt(se.getIncomeCategory()));
|
// IncomeCategoryEnum incomeCategoryEnum = IncomeCategoryEnum.parseByValue(Integer.parseInt(se.getIncomeCategory()));
|
||||||
// map.put("incomeCategory", Objects.isNull(incomeCategoryEnum) ? "" : SalaryI18nUtil.getI18nLabel(incomeCategoryEnum.getLabelId(), incomeCategoryEnum.getDefaultLabel()));
|
// map.put("incomeCategory", Objects.isNull(incomeCategoryEnum) ? "" : SalaryI18nUtil.getI18nLabel(incomeCategoryEnum.getLabelId(), incomeCategoryEnum.getDefaultLabel()));
|
||||||
list.add(map);
|
list.add(map);
|
||||||
|
|
|
||||||
|
|
@ -464,12 +464,21 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary
|
||||||
if (reportPO.getTaxAgentSetting() != null) {
|
if (reportPO.getTaxAgentSetting() != null) {
|
||||||
param.setTaxAgent(((List<Map>) JSON.parseArray(reportPO.getTaxAgentSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList()));
|
param.setTaxAgent(((List<Map>) JSON.parseArray(reportPO.getTaxAgentSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList()));
|
||||||
}
|
}
|
||||||
|
if (reportPO.getSalarySobSetting() != null) {
|
||||||
|
param.setSalarySob(((List<Map>) JSON.parseArray(reportPO.getSalarySobSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
if (reportPO.getSubCompanySetting() != null) {
|
if (reportPO.getSubCompanySetting() != null) {
|
||||||
param.setSubCompany(((List<Map>) JSON.parseArray(reportPO.getSubCompanySetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList()));
|
param.setSubCompany(((List<Map>) JSON.parseArray(reportPO.getSubCompanySetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList()));
|
||||||
}
|
}
|
||||||
if (reportPO.getDepartSetting() != null) {
|
if (reportPO.getDepartSetting() != null) {
|
||||||
param.setDepart(((List<Map>) JSON.parseArray(reportPO.getDepartSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList()));
|
param.setDepart(((List<Map>) JSON.parseArray(reportPO.getDepartSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList()));
|
||||||
}
|
}
|
||||||
|
if (reportPO.getPositionSetting() != null) {
|
||||||
|
param.setPosition(((List<Map>) JSON.parseArray(reportPO.getPositionSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
|
if (reportPO.getStatusSetting() != null) {
|
||||||
|
param.setStatus(((List<Map>) JSON.parseArray(reportPO.getStatusSetting(), Map.class)).stream().map(m -> m.get(key).toString()).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
if (reportPO.getEmployeeSetting() != null) {
|
if (reportPO.getEmployeeSetting() != null) {
|
||||||
param.setEmployee(((List<Map>) JSON.parseArray(reportPO.getEmployeeSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList()));
|
param.setEmployee(((List<Map>) JSON.parseArray(reportPO.getEmployeeSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList()));
|
||||||
}
|
}
|
||||||
|
|
@ -499,7 +508,7 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary
|
||||||
List<Long> finalSalaryAcctEmpIds = getSalaryAcctResultService(user).listAcctEmpIdByAcctEmpId(salaryAcctEmployeeIds);
|
List<Long> finalSalaryAcctEmpIds = getSalaryAcctResultService(user).listAcctEmpIdByAcctEmpId(salaryAcctEmployeeIds);
|
||||||
Map<Long, List<SalaryAcctResultPO>> salaryAcctEmpResultMap = SalaryEntityUtil.group2Map(salaryAcctResultValues, SalaryAcctResultPO::getSalaryAcctEmpId);
|
Map<Long, List<SalaryAcctResultPO>> salaryAcctEmpResultMap = SalaryEntityUtil.group2Map(salaryAcctResultValues, SalaryAcctResultPO::getSalaryAcctEmpId);
|
||||||
salaryAcctEmpResultMap.forEach((k, v) -> {
|
salaryAcctEmpResultMap.forEach((k, v) -> {
|
||||||
Map<String, String> collect = v.stream().collect(Collectors.toMap(p -> Util.null2String(p.getSalaryItemId()), SalaryAcctResultPO::getResultValue, (key1, key2) -> key2));
|
Map<String, String> collect = v.stream().collect(Collectors.toMap(p -> Util.null2String(p.getSalaryItemId()), p -> Util.null2String(p.getResultValue()), (key1, key2) -> key2));
|
||||||
resultMap.put(k, collect);
|
resultMap.put(k, collect);
|
||||||
});
|
});
|
||||||
salaryAcctEmployeeIds.stream().forEach(id -> {
|
salaryAcctEmployeeIds.stream().forEach(id -> {
|
||||||
|
|
@ -516,7 +525,7 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary
|
||||||
throw new SalaryRunTimeException("该维度值中无数据!");
|
throw new SalaryRunTimeException("该维度值中无数据!");
|
||||||
}
|
}
|
||||||
// 同一个人放在一起
|
// 同一个人放在一起
|
||||||
listByDimensionValue = listByDimensionValue.stream().sorted(Comparator.comparing(SalaryAcctEmployeePO::getEmployeeId)).collect(Collectors.toList());
|
listByDimensionValue = listByDimensionValue.stream().sorted((a,b)-> b.getSalaryMonth().compareTo(a.getSalaryMonth())).collect(Collectors.toList());
|
||||||
List<SalaryAcctEmployeePO> salaryAcctEmployeePOList = SalaryPageUtil.subList(param.getCurrent(), param.getPageSize(), listByDimensionValue);
|
List<SalaryAcctEmployeePO> salaryAcctEmployeePOList = SalaryPageUtil.subList(param.getCurrent(), param.getPageSize(), listByDimensionValue);
|
||||||
|
|
||||||
// 获取此分页的核算人员
|
// 获取此分页的核算人员
|
||||||
|
|
|
||||||
|
|
@ -334,7 +334,7 @@ public class SalaryStatisticsEmployeeWrapper extends Service {
|
||||||
sumRow.add(Util.null2String(countResult.get(weaTableColumnGroup.getColumn())));
|
sumRow.add(Util.null2String(countResult.get(weaTableColumnGroup.getColumn())));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
sumRow.add(Util.null2String(countResult.get(weaTableColumnGroup.getColumn())));
|
sumRow.add("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rowList.add(sumRow);
|
rowList.add(sumRow);
|
||||||
|
|
|
||||||
|
|
@ -303,6 +303,7 @@ public class SalaryStatisticsReportWrapper extends Service {
|
||||||
// 如果是被分享的报表,校验分享权限,通过后将user赋值为报表创建人
|
// 如果是被分享的报表,校验分享权限,通过后将user赋值为报表创建人
|
||||||
User creator = new User();
|
User creator = new User();
|
||||||
creator.setUid(po.getCreator().intValue());
|
creator.setUid(po.getCreator().intValue());
|
||||||
|
creator.setLogintype("1");
|
||||||
user = creator;
|
user = creator;
|
||||||
} else {
|
} else {
|
||||||
// 判断报表是否是登陆人创建的,或薪酬总管理员
|
// 判断报表是否是登陆人创建的,或薪酬总管理员
|
||||||
|
|
|
||||||
|
|
@ -324,5 +324,13 @@ public interface SIAccountService {
|
||||||
void deleteSocialAcctEmp(SaveCommonAccountParam param);
|
void deleteSocialAcctEmp(SaveCommonAccountParam param);
|
||||||
|
|
||||||
String addSocialAcctEmp(SaveCommonAccountParam param);
|
String addSocialAcctEmp(SaveCommonAccountParam param);
|
||||||
|
|
||||||
|
void batSave(AccountBatParam param);
|
||||||
|
|
||||||
|
void batDelete(AccountBatParam param);
|
||||||
|
|
||||||
|
void batFile(AccountBatParam param);
|
||||||
|
|
||||||
|
void batSocialSecurityBenefitsRecalculate(AccountBatParam batParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.engine.salary.service;
|
package com.engine.salary.service;
|
||||||
|
|
||||||
import com.engine.salary.common.LocalDateRange;
|
import com.engine.salary.common.LocalDateRange;
|
||||||
|
import com.engine.salary.entity.salaryacct.param.SalaryAcctBatParam;
|
||||||
import com.engine.salary.entity.salaryacct.param.SalaryAcctRecordQueryParam;
|
import com.engine.salary.entity.salaryacct.param.SalaryAcctRecordQueryParam;
|
||||||
import com.engine.salary.entity.salaryacct.param.SalaryAcctRecordSaveParam;
|
import com.engine.salary.entity.salaryacct.param.SalaryAcctRecordSaveParam;
|
||||||
import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO;
|
import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO;
|
||||||
|
|
@ -210,4 +211,11 @@ public interface SalaryAcctRecordService {
|
||||||
List<SalaryAcctRecordPO> listSome(SalaryAcctRecordPO po);
|
List<SalaryAcctRecordPO> listSome(SalaryAcctRecordPO po);
|
||||||
|
|
||||||
void updateDate(Long id, Date updateTime);
|
void updateDate(Long id, Date updateTime);
|
||||||
|
|
||||||
|
void batSave(SalaryAcctBatParam saveParam);
|
||||||
|
|
||||||
|
void batFile(SalaryAcctBatParam param);
|
||||||
|
|
||||||
|
void batReCalculate(SalaryAcctBatParam param);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ import com.engine.salary.mapper.auth.AuthRoleMapper;
|
||||||
import com.engine.salary.util.db.IdGenerator;
|
import com.engine.salary.util.db.IdGenerator;
|
||||||
import com.engine.salary.util.db.MapperProxyFactory;
|
import com.engine.salary.util.db.MapperProxyFactory;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
|
@ -156,7 +157,7 @@ public class AuthDataServiceImpl extends Service implements AuthDataService {
|
||||||
public List<AuthRoleDataDTO> listRoleData( AuthDataQueryParam param) {
|
public List<AuthRoleDataDTO> listRoleData( AuthDataQueryParam param) {
|
||||||
List<AuthRoleDataDTO> authRoleDataDTOS = getAuthRoleDataMapper().listRoleData(param.getRoleId());
|
List<AuthRoleDataDTO> authRoleDataDTOS = getAuthRoleDataMapper().listRoleData(param.getRoleId());
|
||||||
if (StrUtil.isNotEmpty(param.getUsername())){
|
if (StrUtil.isNotEmpty(param.getUsername())){
|
||||||
authRoleDataDTOS = authRoleDataDTOS.stream().filter(authRoleDataDTO -> authRoleDataDTO.getUsername().contains(param.getUsername())).collect(Collectors.toList());
|
authRoleDataDTOS = authRoleDataDTOS.stream().filter(authRoleDataDTO -> StringUtils.isNotBlank(authRoleDataDTO.getUsername()) && authRoleDataDTO.getUsername().contains(param.getUsername())).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
return authRoleDataDTOS;
|
return authRoleDataDTOS;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ import com.engine.salary.util.SalaryI18nUtil;
|
||||||
import com.engine.salary.util.db.IdGenerator;
|
import com.engine.salary.util.db.IdGenerator;
|
||||||
import com.engine.salary.util.db.MapperProxyFactory;
|
import com.engine.salary.util.db.MapperProxyFactory;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
@ -196,7 +197,7 @@ public class AuthMemberServiceImpl extends Service implements AuthMemberService
|
||||||
public List<AuthRoleEmpDTO> listRoleEmp(AuthMemberQueryParam param) {
|
public List<AuthRoleEmpDTO> listRoleEmp(AuthMemberQueryParam param) {
|
||||||
List<AuthRoleEmpDTO> empDTOS = getAuthRoleEmpMapper().getByRoleId(param.getRoleId());
|
List<AuthRoleEmpDTO> empDTOS = getAuthRoleEmpMapper().getByRoleId(param.getRoleId());
|
||||||
if(StrUtil.isNotEmpty(param.getUsername())){
|
if(StrUtil.isNotEmpty(param.getUsername())){
|
||||||
empDTOS = empDTOS.stream().filter(item -> item.getUsername().contains(param.getUsername())).collect(Collectors.toList());
|
empDTOS = empDTOS.stream().filter(item -> StringUtils.isNotBlank(item.getUsername()) && item.getUsername().contains(param.getUsername())).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
return empDTOS;
|
return empDTOS;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.engine.salary.service.auth;
|
package com.engine.salary.service.auth;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.engine.common.util.ServiceUtil;
|
import com.engine.common.util.ServiceUtil;
|
||||||
import com.engine.core.impl.Service;
|
import com.engine.core.impl.Service;
|
||||||
import com.engine.hrmelog.entity.dto.LoggerContext;
|
import com.engine.hrmelog.entity.dto.LoggerContext;
|
||||||
|
|
@ -63,6 +64,12 @@ public class AuthRoleServiceImpl extends Service implements AuthRoleService {
|
||||||
public PageInfo<AuthRoleDTO> roleList(AuthRoleListQueryParam param) {
|
public PageInfo<AuthRoleDTO> roleList(AuthRoleListQueryParam param) {
|
||||||
|
|
||||||
List<AuthRolePO> authRolePOS = getAuthRoleMapper().list(param);
|
List<AuthRolePO> authRolePOS = getAuthRoleMapper().list(param);
|
||||||
|
|
||||||
|
String name = param.getName();
|
||||||
|
if(StrUtil.isNotBlank(name)){
|
||||||
|
authRolePOS = authRolePOS.stream().filter(po -> po.getName().contains(name)).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
int total = authRolePOS.size();
|
int total = authRolePOS.size();
|
||||||
|
|
||||||
List<AuthRoleDTO> list = SalaryPageUtil.subList(param.getCurrent(), param.getPageSize(), authRolePOS)
|
List<AuthRoleDTO> list = SalaryPageUtil.subList(param.getCurrent(), param.getPageSize(), authRolePOS)
|
||||||
|
|
|
||||||
|
|
@ -193,7 +193,11 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
|
||||||
String imageId = Util.null2String(importParam.getImageId());
|
String imageId = Util.null2String(importParam.getImageId());
|
||||||
Validate.notBlank(imageId, "imageId为空");
|
Validate.notBlank(imageId, "imageId为空");
|
||||||
// 获取所有个税扣缴义务人
|
// 获取所有个税扣缴义务人
|
||||||
Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
|
// 获取所有个税扣缴义务人
|
||||||
|
TaxAgentQueryParam param = TaxAgentQueryParam.builder().build();
|
||||||
|
param.setFilterType(AuthFilterTypeEnum.ADMIN_DATA);
|
||||||
|
Collection<TaxAgentPO> taxAgentList = getTaxAgentService(user).listAuth(param);
|
||||||
|
// Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList = getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
|
||||||
//个税扣缴义务人
|
//个税扣缴义务人
|
||||||
String taxAgentId = Util.null2String(importParam.getTaxAgentId());
|
String taxAgentId = Util.null2String(importParam.getTaxAgentId());
|
||||||
// 获取租户下所有的人员
|
// 获取租户下所有的人员
|
||||||
|
|
@ -295,17 +299,17 @@ public class AddUpDeductionServiceImpl extends Service implements AddUpDeduction
|
||||||
errorData.add(errorMessageMap);
|
errorData.add(errorMessageMap);
|
||||||
errorSum += 1;
|
errorSum += 1;
|
||||||
} else {
|
} else {
|
||||||
Optional<TaxAgentManageRangeEmployeeDTO> optionalTemp = taxAgentList.stream().filter(m -> m.getTaxAgentName().equals(taxAgentName)).findFirst();
|
Optional<TaxAgentPO> optionalTemp = taxAgentList.stream().filter(m -> m.getName().equals(taxAgentName)).findFirst();
|
||||||
if (optionalTemp.isPresent()) {
|
if (optionalTemp.isPresent()) {
|
||||||
if (StringUtils.isNotEmpty(taxAgentId) && !optionalTemp.get().getTaxAgentId().equals(Long.valueOf(taxAgentId))) {
|
if (StringUtils.isNotEmpty(taxAgentId) && !optionalTemp.get().getId().equals(Long.valueOf(taxAgentId))) {
|
||||||
//个税扣缴义务人与导入时选择的不一致
|
//个税扣缴义务人与导入时选择的不一致
|
||||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||||
errorMessageMap.put("message", rowIndex + "个税扣缴义务人与导入时选择的不一致");
|
errorMessageMap.put("message", rowIndex + "个税扣缴义务人与导入时选择的不一致");
|
||||||
errorData.add(errorMessageMap);
|
errorData.add(errorMessageMap);
|
||||||
errorSum += 1;
|
errorSum += 1;
|
||||||
} else {
|
} else {
|
||||||
addUpDeduction.setTaxAgentId(optionalTemp.get().getTaxAgentId());
|
addUpDeduction.setTaxAgentId(optionalTemp.get().getId());
|
||||||
taxAgentEmployees = optionalTemp.get().getEmployeeList();
|
// taxAgentEmployees = optionalTemp.get().getEmployeeList();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//个税扣缴义务人不存在
|
//个税扣缴义务人不存在
|
||||||
|
|
|
||||||
|
|
@ -275,7 +275,7 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
effectiveFields.forEach(attendQuoteField -> {
|
effectiveFields.forEach(attendQuoteField -> {
|
||||||
header.add(attendQuoteField.getFieldName());
|
header.add(Util.formatMultiLang(attendQuoteField.getFieldName(), String.valueOf(user.getLanguage())));
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -519,7 +519,7 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
|
||||||
List<Map<String, Object>> attendQuoteSyncData = new ArrayList<>();
|
List<Map<String, Object>> attendQuoteSyncData = new ArrayList<>();
|
||||||
Attend4Salary attend4Salary = new Attend4Salary();
|
Attend4Salary attend4Salary = new Attend4Salary();
|
||||||
try {
|
try {
|
||||||
int partSize = 500;
|
int partSize = 100;
|
||||||
List<List<Long>> partition = Lists.partition(employeeIds, partSize);
|
List<List<Long>> partition = Lists.partition(employeeIds, partSize);
|
||||||
for (List<Long> part : partition) {
|
for (List<Long> part : partition) {
|
||||||
attend4Salary.setBeginDate(attendCycleRange.getFromDate());
|
attend4Salary.setBeginDate(attendCycleRange.getFromDate());
|
||||||
|
|
@ -606,7 +606,7 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
|
||||||
header.add(SalaryI18nUtil.getI18nLabel(86317, "证件号码"));
|
header.add(SalaryI18nUtil.getI18nLabel(86317, "证件号码"));
|
||||||
// 动态列
|
// 动态列
|
||||||
for (AttendQuoteFieldPO attendQuoteField : attendQuoteFields) {
|
for (AttendQuoteFieldPO attendQuoteField : attendQuoteFields) {
|
||||||
header.add(attendQuoteField.getFieldName());
|
header.add(Util.formatMultiLang(attendQuoteField.getFieldName(), String.valueOf(user.getLanguage())));
|
||||||
}
|
}
|
||||||
List<List<Object>> rows = new ArrayList<>();
|
List<List<Object>> rows = new ArrayList<>();
|
||||||
rows.add(header);
|
rows.add(header);
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ import com.google.common.collect.Lists;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import weaver.general.Util;
|
||||||
import weaver.hrm.User;
|
import weaver.hrm.User;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
@ -292,7 +293,7 @@ public class AttendQuoteFieldServiceImpl extends Service implements AttendQuoteF
|
||||||
Map<String, String> column = columnsOptional.get();
|
Map<String, String> column = columnsOptional.get();
|
||||||
updates.add(AttendQuoteFieldPO.builder()
|
updates.add(AttendQuoteFieldPO.builder()
|
||||||
.code(column.get("code"))
|
.code(column.get("code"))
|
||||||
.fieldName(column.get("name"))
|
.fieldName(Util.formatMultiLang(column.get("name"), String.valueOf(user.getLanguage())))
|
||||||
.updateTime(now)
|
.updateTime(now)
|
||||||
.build());
|
.build());
|
||||||
}
|
}
|
||||||
|
|
@ -312,7 +313,7 @@ public class AttendQuoteFieldServiceImpl extends Service implements AttendQuoteF
|
||||||
Optional<Map<String, String>> columnsOptional = columns.stream().filter(column -> code.equals(column.get("code"))).findFirst();
|
Optional<Map<String, String>> columnsOptional = columns.stream().filter(column -> code.equals(column.get("code"))).findFirst();
|
||||||
if (columnsOptional.isPresent()) {
|
if (columnsOptional.isPresent()) {
|
||||||
Map<String, String> column = columnsOptional.get();
|
Map<String, String> column = columnsOptional.get();
|
||||||
saves.add(buildAttendQuoteField(column.get("code"), column.get("name")));
|
saves.add(buildAttendQuoteField(column.get("code"), Util.formatMultiLang(column.get("name"), String.valueOf(user.getLanguage()))));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (CollectionUtils.isNotEmpty(saves)) {
|
if (CollectionUtils.isNotEmpty(saves)) {
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ public class AttendQuoteFieldSettingServiceImpl extends Service implements Atten
|
||||||
@Override
|
@Override
|
||||||
public List<AttendQuoteFieldSettingListDTO> list(AttendQuoteFieldSettingQueryParam queryParam) {
|
public List<AttendQuoteFieldSettingListDTO> list(AttendQuoteFieldSettingQueryParam queryParam) {
|
||||||
//同步字段
|
//同步字段
|
||||||
getAttendQuoteFieldService(user).syncAttendFields();
|
// getAttendQuoteFieldService(user).syncAttendFields();
|
||||||
// 获取字段设置
|
// 获取字段设置
|
||||||
List<AttendQuoteFieldSettingPO> list = biz.getAttendQuoteFieldSetting(queryParam.getSourceType());
|
List<AttendQuoteFieldSettingPO> list = biz.getAttendQuoteFieldSetting(queryParam.getSourceType());
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -112,16 +112,16 @@ public class PushServiceImpl extends Service implements PushService {
|
||||||
Map<Long, SalarySobPO> sobPOMap = SalaryEntityUtil.convert2Map(salarySobPOS, SalarySobPO::getId);
|
Map<Long, SalarySobPO> sobPOMap = SalaryEntityUtil.convert2Map(salarySobPOS, SalarySobPO::getId);
|
||||||
|
|
||||||
List<PushSettingDTO> list = pushSettingPOS.stream()
|
List<PushSettingDTO> list = pushSettingPOS.stream()
|
||||||
.filter(po -> StrUtil.isBlank(param.getName()) || po.getName().contains(param.getName())).map(
|
.filter(po -> StrUtil.isBlank(param.getName()) || po.getName().contains(param.getName()))
|
||||||
po -> PushSettingDTO.builder()
|
.map(po -> PushSettingDTO.builder()
|
||||||
.id(po.getId())
|
.id(po.getId())
|
||||||
.name(po.getName())
|
.name(po.getName())
|
||||||
.tableName(po.getTableName())
|
.tableName(po.getTableName())
|
||||||
.modeName(po.getModeName())
|
.modeName(po.getModeName())
|
||||||
.modeId(po.getModeId())
|
.modeId(po.getModeId())
|
||||||
.able(po.getAble())
|
.able(po.getAble())
|
||||||
.salarySobs(po.getSalarySobIds().stream().map(sobPOMap::get).collect(Collectors.toList()))
|
.salarySobs(po.getSalarySobIds().stream().map(sobPOMap::get).collect(Collectors.toList()))
|
||||||
.build()).collect(Collectors.toList());
|
.build()).collect(Collectors.toList());
|
||||||
return SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), list, PushSettingDTO.class);
|
return SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), list, PushSettingDTO.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -526,8 +526,9 @@ public class PushServiceImpl extends Service implements PushService {
|
||||||
@Override
|
@Override
|
||||||
public PageInfo<PushRecordDTO> recordList(RecordListQueryParam param) {
|
public PageInfo<PushRecordDTO> recordList(RecordListQueryParam param) {
|
||||||
List<PushRecordPO> pushRecordPOS = getPushRecordMapper().listAll();
|
List<PushRecordPO> pushRecordPOS = getPushRecordMapper().listAll();
|
||||||
List<PushRecordDTO> listDTOS = SalaryPageUtil.subList(param.getCurrent(), param.getPageSize(), pushRecordPOS)
|
List<PushRecordDTO> listDTOS = pushRecordPOS
|
||||||
.stream()
|
.stream()
|
||||||
|
.filter(po -> StrUtil.isBlank(param.getName()) || po.getName().contains(param.getName()))
|
||||||
.map(po -> PushRecordDTO.builder()
|
.map(po -> PushRecordDTO.builder()
|
||||||
.id(po.getId())
|
.id(po.getId())
|
||||||
.name(po.getName())
|
.name(po.getName())
|
||||||
|
|
@ -544,7 +545,6 @@ public class PushServiceImpl extends Service implements PushService {
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
PageInfo<PushRecordDTO> pageInfo = SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), listDTOS, PushRecordDTO.class);
|
PageInfo<PushRecordDTO> pageInfo = SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), listDTOS, PushRecordDTO.class);
|
||||||
pageInfo.setTotal(pushRecordPOS.size());
|
|
||||||
return pageInfo;
|
return pageInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ
|
||||||
Map<Long, DataCollectionEmployee> collect = employeeByIds.stream().collect(Collectors.toMap(DataCollectionEmployee::getEmployeeId, Function.identity()));
|
Map<Long, DataCollectionEmployee> collect = employeeByIds.stream().collect(Collectors.toMap(DataCollectionEmployee::getEmployeeId, Function.identity()));
|
||||||
list.forEach(item -> {
|
list.forEach(item -> {
|
||||||
Map<String, Object> record = new HashMap<>();
|
Map<String, Object> record = new HashMap<>();
|
||||||
DataCollectionEmployee simpleEmployee = collect.get(item.getEmployeeId());
|
DataCollectionEmployee simpleEmployee = collect.get(item.getEmployeeId()) ==null?new DataCollectionEmployee():collect.get(item.getEmployeeId());
|
||||||
record.put("id", item.getId());
|
record.put("id", item.getId());
|
||||||
record.put("employeeId", item.getEmployeeId());
|
record.put("employeeId", item.getEmployeeId());
|
||||||
record.put("billMonth", item.getBillMonth());
|
record.put("billMonth", item.getBillMonth());
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@ import org.apache.commons.collections4.MapUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
import weaver.general.Util;
|
||||||
import weaver.hrm.User;
|
import weaver.hrm.User;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
|
|
@ -483,7 +484,7 @@ public class RemoteExcelServiceImpl extends Service implements RemoteExcelServic
|
||||||
List<FormulaVar> formulaVars = fields.stream().map(e -> {
|
List<FormulaVar> formulaVars = fields.stream().map(e -> {
|
||||||
FormulaVar formulaVar = new FormulaVar();
|
FormulaVar formulaVar = new FormulaVar();
|
||||||
formulaVar.setFieldId(referenceEnum.getValue() + SalaryFormulaFieldConstant.FIELD_ID_SEPARATOR + e.getId());
|
formulaVar.setFieldId(referenceEnum.getValue() + SalaryFormulaFieldConstant.FIELD_ID_SEPARATOR + e.getId());
|
||||||
formulaVar.setName(e.getFieldName());
|
formulaVar.setName(Util.formatMultiLang(e.getFieldName(), String.valueOf(user.getLanguage())));
|
||||||
formulaVar.setSource("" + referenceEnum.getValue());
|
formulaVar.setSource("" + referenceEnum.getValue());
|
||||||
formulaVar.setFieldType(DataType.NUMBER);
|
formulaVar.setFieldType(DataType.NUMBER);
|
||||||
return formulaVar;
|
return formulaVar;
|
||||||
|
|
|
||||||
|
|
@ -172,7 +172,8 @@ public class SIAComparisonResultServiceImpl extends Service implements SIACompar
|
||||||
List<InsuranceArchivesBaseInfoPO> baseInfoPOList = getInsuranceBaseInfoMapper().listAll();
|
List<InsuranceArchivesBaseInfoPO> baseInfoPOList = getInsuranceBaseInfoMapper().listAll();
|
||||||
List<Long> canAccountIds = baseInfoPOList.stream()
|
List<Long> canAccountIds = baseInfoPOList.stream()
|
||||||
.filter(f->f.getPaymentOrganization().toString().equals(queryParam.getPaymentOrganization())
|
.filter(f->f.getPaymentOrganization().toString().equals(queryParam.getPaymentOrganization())
|
||||||
&& (f.getRunStatus().equals(EmployeeStatusEnum.PAYING.getValue()) || f.getRunStatus().equals(EmployeeStatusEnum.STAY_DEL.getValue())))
|
&& !f.getRunStatus().equals(EmployeeStatusEnum.STAY_ADD.getValue())
|
||||||
|
)
|
||||||
.map(InsuranceArchivesBaseInfoPO::getEmployeeId)
|
.map(InsuranceArchivesBaseInfoPO::getEmployeeId)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
accountExportPOS = accountExportPOS.stream().filter(v -> canAccountIds.contains(v.getEmployeeId())).collect(Collectors.toList());
|
accountExportPOS = accountExportPOS.stream().filter(v -> canAccountIds.contains(v.getEmployeeId())).collect(Collectors.toList());
|
||||||
|
|
|
||||||
|
|
@ -1666,7 +1666,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
||||||
// Long taxAgentId = 0L;
|
// Long taxAgentId = 0L;
|
||||||
|
|
||||||
List<InsuranceAccountDetailPO> list = new ArrayList<>();
|
List<InsuranceAccountDetailPO> list = new ArrayList<>();
|
||||||
|
String username = (String) map.getOrDefault("姓名", "");
|
||||||
String billMonth = (String) map.getOrDefault("账单月份", "");
|
String billMonth = (String) map.getOrDefault("账单月份", "");
|
||||||
String taxAgentName = (String) map.getOrDefault("个税扣缴义务人", "");
|
String taxAgentName = (String) map.getOrDefault("个税扣缴义务人", "");
|
||||||
String supplementaryMonth = (String) map.getOrDefault("补缴月份", "");
|
String supplementaryMonth = (String) map.getOrDefault("补缴月份", "");
|
||||||
|
|
@ -1770,11 +1770,11 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
||||||
//校验补缴人员是否存在福利档案基础信息,并且runStatus处于正在缴纳或者待减员
|
//校验补缴人员是否存在福利档案基础信息,并且runStatus处于正在缴纳或者待减员
|
||||||
InsuranceArchivesBaseInfoPO insuranceBaseInfo = getInsuranceBaseInfoMapper().getOneByEmployeeIdAndPayOrg(paymentOrganization, employeeId);
|
InsuranceArchivesBaseInfoPO insuranceBaseInfo = getInsuranceBaseInfoMapper().getOneByEmployeeIdAndPayOrg(paymentOrganization, employeeId);
|
||||||
if (insuranceBaseInfo == null || !(insuranceBaseInfo.getRunStatus().equals(EmployeeStatusEnum.STAY_DEL.getValue()) || insuranceBaseInfo.getRunStatus().equals(EmployeeStatusEnum.PAYING.getValue())) ) {
|
if (insuranceBaseInfo == null || !(insuranceBaseInfo.getRunStatus().equals(EmployeeStatusEnum.STAY_DEL.getValue()) || insuranceBaseInfo.getRunStatus().equals(EmployeeStatusEnum.PAYING.getValue())) ) {
|
||||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "补缴人员中存在未设置福利档案人员或相关人员不在福利在缴人员中,不可新建补缴信息!"));
|
throw new SalaryRunTimeException(username + SalaryI18nUtil.getI18nLabel(0, "补缴未设置福利档案人员或不在福利在缴人员中,不可新建补缴信息!"));
|
||||||
}
|
}
|
||||||
List<Long> empIdsInPayMonthRange = listCanPayEmpIds(paymentOrganization, billMonth.substring(0, 7));
|
List<Long> empIdsInPayMonthRange = listCanPayEmpIds(paymentOrganization, billMonth.substring(0, 7));
|
||||||
if (!empIdsInPayMonthRange.contains(employeeId)) {
|
if (!empIdsInPayMonthRange.contains(employeeId)) {
|
||||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(99920, "无核算人员"));
|
throw new SalaryRunTimeException(username + SalaryI18nUtil.getI18nLabel(99920, "无核算人员"));
|
||||||
}
|
}
|
||||||
DataCollectionEmployee employee = getSalaryEmployeeService(user).getEmployeeById(employeeId);
|
DataCollectionEmployee employee = getSalaryEmployeeService(user).getEmployeeById(employeeId);
|
||||||
// 封装InsuranceAccountDetailPO
|
// 封装InsuranceAccountDetailPO
|
||||||
|
|
@ -6719,6 +6719,55 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
||||||
Util_DataCache.setObjVal(cacheKey, JsonUtil.toJsonString(welfareNames));
|
Util_DataCache.setObjVal(cacheKey, JsonUtil.toJsonString(welfareNames));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void batSave(AccountBatParam accountBatParam) {
|
||||||
|
List<Long> paymentOrganizations = accountBatParam.getPaymentOrganizations();
|
||||||
|
for (Long paymentOrganization : paymentOrganizations) {
|
||||||
|
AccountParam param = AccountParam.builder()
|
||||||
|
.billMonth(accountBatParam.getBillMonth())
|
||||||
|
.paymentOrganization(paymentOrganization)
|
||||||
|
.flag(true)
|
||||||
|
.remarks(accountBatParam.getRemarks())
|
||||||
|
.build();
|
||||||
|
save(param);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void batDelete(AccountBatParam batParam) {
|
||||||
|
List<Long> ids = batParam.getIds();
|
||||||
|
for (Long id : ids) {
|
||||||
|
InsuranceAccountBatchPO po = getInsuranceAccountBatchMapper().getById(id);
|
||||||
|
AccountParam param = AccountParam.builder()
|
||||||
|
.billMonth(po.getBillMonth())
|
||||||
|
.paymentOrganization(po.getPaymentOrganization())
|
||||||
|
.build();
|
||||||
|
delete(param);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void batFile(AccountBatParam batParam) {
|
||||||
|
List<Long> ids = batParam.getIds();
|
||||||
|
for (Long id : ids) {
|
||||||
|
InsuranceAccountBatchPO po = getInsuranceAccountBatchMapper().getById(id);
|
||||||
|
AccountParam param = AccountParam.builder()
|
||||||
|
.billMonth(po.getBillMonth())
|
||||||
|
.paymentOrganization(po.getPaymentOrganization())
|
||||||
|
.build();
|
||||||
|
file(param);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void batSocialSecurityBenefitsRecalculate(AccountBatParam batParam) {
|
||||||
|
List<Long> ids = batParam.getIds();
|
||||||
|
for (Long id : ids) {
|
||||||
|
InsuranceAccountBatchPO param = InsuranceAccountBatchPO.builder().id(id).build();
|
||||||
|
socialSecurityBenefitsRecalculate(param);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void accountOtherView(InsuranceAccountViewListDTO dto, List<InsuranceAccountDetailPO> pos) {
|
public void accountOtherView(InsuranceAccountViewListDTO dto, List<InsuranceAccountDetailPO> pos) {
|
||||||
int otherNum = 0;
|
int otherNum = 0;
|
||||||
BigDecimal otherPaySum = new BigDecimal("0");
|
BigDecimal otherPaySum = new BigDecimal("0");
|
||||||
|
|
|
||||||
|
|
@ -2770,12 +2770,22 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
|
||||||
if (otherPaymentBaseString != null) {
|
if (otherPaymentBaseString != null) {
|
||||||
updateOtherInfo.setOtherPaymentBaseString(otherPaymentBaseString);
|
updateOtherInfo.setOtherPaymentBaseString(otherPaymentBaseString);
|
||||||
}
|
}
|
||||||
|
if (!welBaseDiffSign) {
|
||||||
|
otherPaymentBaseString = adaptWelBaseLimit(updateOtherInfo.getOtherSchemeId(), updateOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue());
|
||||||
|
if (otherPaymentBaseString != null) {
|
||||||
|
updateOtherInfo.setOtherPaymentBaseString(otherPaymentBaseString);
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
StringBuilder errorMsg = new StringBuilder("");
|
StringBuilder errorMsg = new StringBuilder("");
|
||||||
if (!checkWelBaseLimit(updateOtherInfo.getOtherSchemeId(),updateOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) {
|
if (!checkWelBaseLimit(updateOtherInfo.getOtherSchemeId(),updateOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) {
|
||||||
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
|
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
|
||||||
combineErrorMsg = "其他福利个人: " + errorMsg;
|
combineErrorMsg = "其他福利个人: " + errorMsg;
|
||||||
}
|
}
|
||||||
|
if ( (!welBaseDiffSign) && (!checkWelBaseLimit(updateOtherInfo.getOtherSchemeId(),updateOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg))) {
|
||||||
|
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
|
||||||
|
combineErrorMsg = "其他福利公司: " + errorMsg;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//需要拆分个人和公司福利基数时
|
//需要拆分个人和公司福利基数时
|
||||||
if (welBaseDiffSign) {
|
if (welBaseDiffSign) {
|
||||||
|
|
@ -2841,12 +2851,22 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
|
||||||
if (otherPaymentBaseString != null) {
|
if (otherPaymentBaseString != null) {
|
||||||
insertOtherInfo.setOtherPaymentBaseString(otherPaymentBaseString);
|
insertOtherInfo.setOtherPaymentBaseString(otherPaymentBaseString);
|
||||||
}
|
}
|
||||||
|
if (!welBaseDiffSign) {
|
||||||
|
otherPaymentBaseString = adaptWelBaseLimit(insertOtherInfo.getOtherSchemeId(), insertOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue());
|
||||||
|
if (otherPaymentBaseString != null) {
|
||||||
|
insertOtherInfo.setOtherPaymentBaseString(otherPaymentBaseString);
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
StringBuilder errorMsg = new StringBuilder("");
|
StringBuilder errorMsg = new StringBuilder("");
|
||||||
if (!checkWelBaseLimit(insertOtherInfo.getOtherSchemeId(),insertOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) {
|
if (!checkWelBaseLimit(insertOtherInfo.getOtherSchemeId(),insertOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) {
|
||||||
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
|
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
|
||||||
combineErrorMsg = "其他福利个人:" + errorMsg;
|
combineErrorMsg = "其他福利个人:" + errorMsg;
|
||||||
}
|
}
|
||||||
|
if ( (!welBaseDiffSign) && (!checkWelBaseLimit(insertOtherInfo.getOtherSchemeId(),insertOtherInfo.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg))) {
|
||||||
|
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
|
||||||
|
combineErrorMsg = "其他福利公司:" + errorMsg;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//需要拆分个人和公司福利基数时
|
//需要拆分个人和公司福利基数时
|
||||||
if (welBaseDiffSign) {
|
if (welBaseDiffSign) {
|
||||||
|
|
@ -2981,12 +3001,22 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
|
||||||
if (fundPaymentBaseString != null) {
|
if (fundPaymentBaseString != null) {
|
||||||
updateFundInfo.setFundPaymentBaseString(fundPaymentBaseString);
|
updateFundInfo.setFundPaymentBaseString(fundPaymentBaseString);
|
||||||
}
|
}
|
||||||
|
if (!welBaseDiffSign) {
|
||||||
|
fundPaymentBaseString = adaptWelBaseLimit(updateFundInfo.getFundSchemeId(), updateFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue());
|
||||||
|
if (fundPaymentBaseString != null) {
|
||||||
|
updateFundInfo.setFundPaymentBaseString(fundPaymentBaseString);
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
StringBuilder errorMsg = new StringBuilder("");
|
StringBuilder errorMsg = new StringBuilder("");
|
||||||
if (!checkWelBaseLimit(updateFundInfo.getFundSchemeId(),updateFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) {
|
if (!checkWelBaseLimit(updateFundInfo.getFundSchemeId(),updateFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) {
|
||||||
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
|
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
|
||||||
combineErrorMsg = "公积金个人" + errorMsg;
|
combineErrorMsg = "公积金个人" + errorMsg;
|
||||||
}
|
}
|
||||||
|
if ( (!welBaseDiffSign) && (!checkWelBaseLimit(updateFundInfo.getFundSchemeId(),updateFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg))) {
|
||||||
|
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
|
||||||
|
combineErrorMsg = "公积金公司" + errorMsg;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//需要拆分个人和公司福利基数时
|
//需要拆分个人和公司福利基数时
|
||||||
|
|
@ -3057,12 +3087,22 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
|
||||||
if (fundPaymentBaseString != null) {
|
if (fundPaymentBaseString != null) {
|
||||||
insertFundInfo.setFundPaymentBaseString(fundPaymentBaseString);
|
insertFundInfo.setFundPaymentBaseString(fundPaymentBaseString);
|
||||||
}
|
}
|
||||||
|
if (!welBaseDiffSign) {
|
||||||
|
fundPaymentBaseString = adaptWelBaseLimit(insertFundInfo.getFundSchemeId(), insertFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue());
|
||||||
|
if (fundPaymentBaseString != null) {
|
||||||
|
insertFundInfo.setFundPaymentBaseString(fundPaymentBaseString);
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
StringBuilder errorMsg = new StringBuilder("");
|
StringBuilder errorMsg = new StringBuilder("");
|
||||||
if (!checkWelBaseLimit(insertFundInfo.getFundSchemeId(),insertFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) {
|
if (!checkWelBaseLimit(insertFundInfo.getFundSchemeId(),insertFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) {
|
||||||
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
|
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
|
||||||
combineErrorMsg = "公积金个人:" + errorMsg;
|
combineErrorMsg = "公积金个人:" + errorMsg;
|
||||||
}
|
}
|
||||||
|
if ((!welBaseDiffSign) && (!checkWelBaseLimit(insertFundInfo.getFundSchemeId(),insertFundInfo.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg))) {
|
||||||
|
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
|
||||||
|
combineErrorMsg = "公积金公司:" + errorMsg;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//需要拆分个人和公司福利基数时
|
//需要拆分个人和公司福利基数时
|
||||||
|
|
@ -3204,12 +3244,22 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
|
||||||
if (socialPaymentBaseString != null) {
|
if (socialPaymentBaseString != null) {
|
||||||
updateSocialInfo.setSocialPaymentBaseString(socialPaymentBaseString);
|
updateSocialInfo.setSocialPaymentBaseString(socialPaymentBaseString);
|
||||||
}
|
}
|
||||||
|
if (!welBaseDiffSign) {
|
||||||
|
socialPaymentBaseString = adaptWelBaseLimit(updateSocialInfo.getSocialSchemeId(), updateSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue());
|
||||||
|
if (socialPaymentBaseString != null) {
|
||||||
|
updateSocialInfo.setSocialPaymentBaseString(socialPaymentBaseString);
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
StringBuilder errorMsg = new StringBuilder("");
|
StringBuilder errorMsg = new StringBuilder("");
|
||||||
if (!checkWelBaseLimit(updateSocialInfo.getSocialSchemeId(),updateSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) {
|
if (!checkWelBaseLimit(updateSocialInfo.getSocialSchemeId(),updateSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) {
|
||||||
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
|
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
|
||||||
combineErrorMsg = "社保个人:" + errorMsg;
|
combineErrorMsg = "社保个人:" + errorMsg;
|
||||||
}
|
}
|
||||||
|
if ((!welBaseDiffSign) && (!checkWelBaseLimit(updateSocialInfo.getSocialSchemeId(),updateSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg))) {
|
||||||
|
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
|
||||||
|
combineErrorMsg = "社保公司:" + errorMsg;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//需要拆分个人和公司福利基数时
|
//需要拆分个人和公司福利基数时
|
||||||
|
|
@ -3279,12 +3329,22 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
|
||||||
if (socialPaymentBaseString != null) {
|
if (socialPaymentBaseString != null) {
|
||||||
insertSocialInfo.setSocialPaymentBaseString(socialPaymentBaseString);
|
insertSocialInfo.setSocialPaymentBaseString(socialPaymentBaseString);
|
||||||
}
|
}
|
||||||
|
if (!welBaseDiffSign) {
|
||||||
|
socialPaymentBaseString = adaptWelBaseLimit(insertSocialInfo.getSocialSchemeId(), insertSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue());
|
||||||
|
if (socialPaymentBaseString != null) {
|
||||||
|
insertSocialInfo.setSocialPaymentBaseString(socialPaymentBaseString);
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
StringBuilder errorMsg = new StringBuilder("");
|
StringBuilder errorMsg = new StringBuilder("");
|
||||||
if (!checkWelBaseLimit(insertSocialInfo.getSocialSchemeId(),insertSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) {
|
if (!checkWelBaseLimit(insertSocialInfo.getSocialSchemeId(),insertSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg)) {
|
||||||
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
|
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
|
||||||
combineErrorMsg = "社保个人:" + errorMsg;
|
combineErrorMsg = "社保个人:" + errorMsg;
|
||||||
}
|
}
|
||||||
|
if ((!welBaseDiffSign) && (!checkWelBaseLimit(insertSocialInfo.getSocialSchemeId(),insertSocialInfo.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg))) {
|
||||||
|
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0,"社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!"));
|
||||||
|
combineErrorMsg = "社保公司:" + errorMsg;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//需要拆分个人和公司福利基数时
|
//需要拆分个人和公司福利基数时
|
||||||
if (welBaseDiffSign) {
|
if (welBaseDiffSign) {
|
||||||
|
|
@ -4028,7 +4088,12 @@ public class SIArchivesServiceImpl extends Service implements SIArchivesService
|
||||||
if (org.apache.commons.collections.CollectionUtils.isEmpty(employeeIds)) {
|
if (org.apache.commons.collections.CollectionUtils.isEmpty(employeeIds)) {
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
return getInsuranceBaseInfoMapper().listEndDateIsNull(employeeIds);
|
List<InsuranceArchivesBaseInfoPO> resultList = new ArrayList<>();
|
||||||
|
List<List<Long>> partition = Lists.partition(employeeIds, 500);
|
||||||
|
partition.forEach(part -> {
|
||||||
|
resultList.addAll(getInsuranceBaseInfoMapper().listEndDateIsNull(part));
|
||||||
|
});
|
||||||
|
return resultList;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
package com.engine.salary.service.impl;
|
package com.engine.salary.service.impl;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alipay.oceanbase.jdbc.StringUtils;
|
|
||||||
import com.cloudstore.eccom.pc.table.WeaTable;
|
import com.cloudstore.eccom.pc.table.WeaTable;
|
||||||
import com.cloudstore.eccom.pc.table.WeaTableColumn;
|
import com.cloudstore.eccom.pc.table.WeaTableColumn;
|
||||||
import com.engine.common.util.ServiceUtil;
|
import com.engine.common.util.ServiceUtil;
|
||||||
|
|
@ -41,6 +40,7 @@ import com.engine.salary.util.db.MapperProxyFactory;
|
||||||
import com.engine.salary.util.page.Column;
|
import com.engine.salary.util.page.Column;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.engine.salary.util.db.IdGenerator;
|
import com.engine.salary.util.db.IdGenerator;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import weaver.hrm.User;
|
import weaver.hrm.User;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -387,11 +387,15 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
|
||||||
&& (projects.contains(ProjectTypeEnum.MEDICAL_INSURANCE.getValue()))) {
|
&& (projects.contains(ProjectTypeEnum.MEDICAL_INSURANCE.getValue()))) {
|
||||||
if (socialSchemePO != null && (StringUtils.isNotBlank(socialSchemePO.getSocialPaymentBaseString()) || StringUtils.isNotBlank(socialSchemePO.getSocialPaymentComBaseString()))) {
|
if (socialSchemePO != null && (StringUtils.isNotBlank(socialSchemePO.getSocialPaymentBaseString()) || StringUtils.isNotBlank(socialSchemePO.getSocialPaymentComBaseString()))) {
|
||||||
Map<String, String> socialMap = JSON.parseObject(socialSchemePO.getSocialPaymentBaseString(), new HashMap<String, String>().getClass());
|
Map<String, String> socialMap = JSON.parseObject(socialSchemePO.getSocialPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||||
socialMap = socialMap.entrySet().stream().filter(e -> "9001".equals(e.getKey()) || "9002".equals(e.getKey()))
|
if(socialMap!=null){
|
||||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
socialMap = socialMap.entrySet().stream().filter(e -> "9001".equals(e.getKey()) || "9002".equals(e.getKey()))
|
||||||
|
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
||||||
|
}
|
||||||
Map<String, String> socialComMap = JSON.parseObject(socialSchemePO.getSocialPaymentComBaseString(), new HashMap<String, String>().getClass());
|
Map<String, String> socialComMap = JSON.parseObject(socialSchemePO.getSocialPaymentComBaseString(), new HashMap<String, String>().getClass());
|
||||||
socialComMap = socialComMap.entrySet().stream().filter(e -> "9001".equals(e.getKey()) || "9002".equals(e.getKey()))
|
if(socialComMap!=null){
|
||||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
socialComMap = socialComMap.entrySet().stream().filter(e -> "9001".equals(e.getKey()) || "9002".equals(e.getKey()))
|
||||||
|
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
||||||
|
}
|
||||||
List<String> socialIds = new ArrayList<>();
|
List<String> socialIds = new ArrayList<>();
|
||||||
socialIds.addAll(socialMap == null ? Collections.emptyList() : socialMap.keySet());
|
socialIds.addAll(socialMap == null ? Collections.emptyList() : socialMap.keySet());
|
||||||
socialIds.addAll(socialComMap == null ? Collections.emptyList() : socialMap.keySet());
|
socialIds.addAll(socialComMap == null ? Collections.emptyList() : socialMap.keySet());
|
||||||
|
|
@ -434,12 +438,16 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
|
||||||
&& (!projects.contains(ProjectTypeEnum.MEDICAL_INSURANCE.getValue()))) {
|
&& (!projects.contains(ProjectTypeEnum.MEDICAL_INSURANCE.getValue()))) {
|
||||||
if (socialSchemePO != null && (StringUtils.isNotBlank(socialSchemePO.getSocialPaymentBaseString()) || StringUtils.isNotBlank(socialSchemePO.getSocialPaymentComBaseString()))) {
|
if (socialSchemePO != null && (StringUtils.isNotBlank(socialSchemePO.getSocialPaymentBaseString()) || StringUtils.isNotBlank(socialSchemePO.getSocialPaymentComBaseString()))) {
|
||||||
Map<String, String> socialMap = JSON.parseObject(socialSchemePO.getSocialPaymentBaseString(), new HashMap<String, String>().getClass());
|
Map<String, String> socialMap = JSON.parseObject(socialSchemePO.getSocialPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||||
socialMap = socialMap.entrySet().stream().filter(e -> "9001".equals(e.getKey()))
|
if (socialMap != null) {
|
||||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
socialMap = socialMap.entrySet().stream().filter(e -> "9001".equals(e.getKey()))
|
||||||
|
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
||||||
|
}
|
||||||
|
|
||||||
Map<String, String> socialComMap = JSON.parseObject(socialSchemePO.getSocialPaymentComBaseString(), new HashMap<String, String>().getClass());
|
Map<String, String> socialComMap = JSON.parseObject(socialSchemePO.getSocialPaymentComBaseString(), new HashMap<String, String>().getClass());
|
||||||
socialComMap = socialComMap.entrySet().stream().filter(e -> "9001".equals(e.getKey()))
|
if (socialComMap != null) {
|
||||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
socialComMap = socialComMap.entrySet().stream().filter(e -> "9001".equals(e.getKey()))
|
||||||
|
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
||||||
|
}
|
||||||
List<String> socialIds = new ArrayList<>();
|
List<String> socialIds = new ArrayList<>();
|
||||||
socialIds.addAll(socialMap == null ? Collections.emptyList() : socialMap.keySet());
|
socialIds.addAll(socialMap == null ? Collections.emptyList() : socialMap.keySet());
|
||||||
socialIds.addAll(socialComMap == null ? Collections.emptyList() :socialComMap.keySet());
|
socialIds.addAll(socialComMap == null ? Collections.emptyList() :socialComMap.keySet());
|
||||||
|
|
@ -482,11 +490,15 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
|
||||||
&& (projects.contains(ProjectTypeEnum.MEDICAL_INSURANCE.getValue()))) {
|
&& (projects.contains(ProjectTypeEnum.MEDICAL_INSURANCE.getValue()))) {
|
||||||
if (socialSchemePO != null && (StringUtils.isNotBlank(socialSchemePO.getSocialPaymentBaseString()) || StringUtils.isNotBlank(socialSchemePO.getSocialPaymentComBaseString()))) {
|
if (socialSchemePO != null && (StringUtils.isNotBlank(socialSchemePO.getSocialPaymentBaseString()) || StringUtils.isNotBlank(socialSchemePO.getSocialPaymentComBaseString()))) {
|
||||||
Map<String, String> socialMap = JSON.parseObject(socialSchemePO.getSocialPaymentBaseString(), new HashMap<String, String>().getClass());
|
Map<String, String> socialMap = JSON.parseObject(socialSchemePO.getSocialPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||||
socialMap = socialMap.entrySet().stream().filter(e -> "9002".equals(e.getKey()))
|
if(socialMap!=null){
|
||||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
socialMap = socialMap.entrySet().stream().filter(e -> "9002".equals(e.getKey()))
|
||||||
|
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
||||||
|
}
|
||||||
Map<String, String> socialComMap = JSON.parseObject(socialSchemePO.getSocialPaymentComBaseString(), new HashMap<String, String>().getClass());
|
Map<String, String> socialComMap = JSON.parseObject(socialSchemePO.getSocialPaymentComBaseString(), new HashMap<String, String>().getClass());
|
||||||
socialComMap = socialComMap.entrySet().stream().filter(e -> "9002".equals(e.getKey()))
|
if(socialComMap !=null){
|
||||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
socialComMap = socialComMap.entrySet().stream().filter(e -> "9002".equals(e.getKey()))
|
||||||
|
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
||||||
|
}
|
||||||
List<String> socialIds = new ArrayList<>();
|
List<String> socialIds = new ArrayList<>();
|
||||||
socialIds.addAll(socialMap == null ? Collections.emptyList() : socialMap.keySet());
|
socialIds.addAll(socialMap == null ? Collections.emptyList() : socialMap.keySet());
|
||||||
socialIds.addAll(socialComMap == null ? Collections.emptyList() : socialComMap.keySet());
|
socialIds.addAll(socialComMap == null ? Collections.emptyList() : socialComMap.keySet());
|
||||||
|
|
|
||||||
|
|
@ -1409,6 +1409,14 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
||||||
|
|
||||||
Boolean otherCheckBase = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesOtherSchemePO.getOtherSchemeId(), insuranceArchivesOtherSchemePO.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg);
|
Boolean otherCheckBase = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesOtherSchemePO.getOtherSchemeId(), insuranceArchivesOtherSchemePO.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_PERSON.getValue(), errorMsg);
|
||||||
|
|
||||||
|
Boolean socialCheckBase2 = true;
|
||||||
|
Boolean fundCheckBase2 = true;
|
||||||
|
Boolean otherCheckBase2 = true;
|
||||||
|
if (!welBaseDiffSign) {
|
||||||
|
socialCheckBase2 = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesSocialSchemePO.getSocialSchemeId(), insuranceArchivesSocialSchemePO.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg);
|
||||||
|
fundCheckBase2 = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesFundSchemePO.getFundSchemeId(), insuranceArchivesFundSchemePO.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg);
|
||||||
|
otherCheckBase2 = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesOtherSchemePO.getOtherSchemeId(), insuranceArchivesOtherSchemePO.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg);
|
||||||
|
}
|
||||||
Boolean socialCheckComBase = true;
|
Boolean socialCheckComBase = true;
|
||||||
Boolean fundCheckComBase = true;
|
Boolean fundCheckComBase = true;
|
||||||
Boolean otherCheckComBase = true;
|
Boolean otherCheckComBase = true;
|
||||||
|
|
@ -1417,17 +1425,17 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
||||||
fundCheckComBase = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesFundSchemePO.getFundSchemeId(), insuranceArchivesFundSchemePO.getFundPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg);
|
fundCheckComBase = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesFundSchemePO.getFundSchemeId(), insuranceArchivesFundSchemePO.getFundPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg);
|
||||||
otherCheckComBase = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesOtherSchemePO.getOtherSchemeId(), insuranceArchivesOtherSchemePO.getOtherPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg);
|
otherCheckComBase = getSIArchivesService(user).checkWelBaseLimit(insuranceArchivesOtherSchemePO.getOtherSchemeId(), insuranceArchivesOtherSchemePO.getOtherPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue(), errorMsg);
|
||||||
}
|
}
|
||||||
if (socialCheckBase && fundCheckBase && otherCheckBase && socialCheckComBase && fundCheckComBase && otherCheckComBase) {
|
if (socialCheckBase && fundCheckBase && otherCheckBase && socialCheckBase2 && fundCheckBase2 && otherCheckBase2 && socialCheckComBase && fundCheckComBase && otherCheckComBase) {
|
||||||
insuranceArchivesAccountPOS.add(insuranceArchivesAccountPO);
|
insuranceArchivesAccountPOS.add(insuranceArchivesAccountPO);
|
||||||
} else {
|
} else {
|
||||||
String checkMessage = "该条数据中";
|
String checkMessage = "该条数据中";
|
||||||
if (!socialCheckBase || !socialCheckComBase) {
|
if (!socialCheckBase || !socialCheckBase2 || !socialCheckComBase) {
|
||||||
checkMessage = checkMessage + "社保福利基数、";
|
checkMessage = checkMessage + "社保福利基数、";
|
||||||
}
|
}
|
||||||
if (!fundCheckBase || !fundCheckComBase) {
|
if (!fundCheckBase || !fundCheckBase2 || !fundCheckComBase) {
|
||||||
checkMessage = checkMessage + "公积金福利基数、";
|
checkMessage = checkMessage + "公积金福利基数、";
|
||||||
}
|
}
|
||||||
if (!otherCheckBase || !otherCheckComBase) {
|
if (!otherCheckBase || !otherCheckBase2 || !otherCheckComBase) {
|
||||||
checkMessage = checkMessage + "其他福利基数、";
|
checkMessage = checkMessage + "其他福利基数、";
|
||||||
}
|
}
|
||||||
checkMessage = checkMessage.substring(0, checkMessage.length() - 1);
|
checkMessage = checkMessage.substring(0, checkMessage.length() - 1);
|
||||||
|
|
@ -1447,6 +1455,14 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
||||||
insuranceArchivesSocialSchemePO.setSocialPaymentBaseString(newSocialPaymentBaseString);
|
insuranceArchivesSocialSchemePO.setSocialPaymentBaseString(newSocialPaymentBaseString);
|
||||||
insuranceArchivesFundSchemePO.setFundPaymentBaseString(newFundPaymentBaseString);
|
insuranceArchivesFundSchemePO.setFundPaymentBaseString(newFundPaymentBaseString);
|
||||||
insuranceArchivesOtherSchemePO.setOtherPaymentBaseString(newOtherPaymentBaseString);
|
insuranceArchivesOtherSchemePO.setOtherPaymentBaseString(newOtherPaymentBaseString);
|
||||||
|
if (!welBaseDiffSign) {
|
||||||
|
newSocialPaymentBaseString = getSIArchivesService(user).checkAndBuildWelBaseWithLimit(insuranceArchivesSocialSchemePO.getSocialSchemeId(), insuranceArchivesSocialSchemePO.getSocialPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue());
|
||||||
|
newFundPaymentBaseString = getSIArchivesService(user).checkAndBuildWelBaseWithLimit(insuranceArchivesFundSchemePO.getFundSchemeId(), insuranceArchivesFundSchemePO.getFundPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue());
|
||||||
|
newOtherPaymentBaseString = getSIArchivesService(user).checkAndBuildWelBaseWithLimit(insuranceArchivesOtherSchemePO.getOtherSchemeId(), insuranceArchivesOtherSchemePO.getOtherPaymentBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue());
|
||||||
|
insuranceArchivesSocialSchemePO.setSocialPaymentBaseString(newSocialPaymentBaseString);
|
||||||
|
insuranceArchivesFundSchemePO.setFundPaymentBaseString(newFundPaymentBaseString);
|
||||||
|
insuranceArchivesOtherSchemePO.setOtherPaymentBaseString(newOtherPaymentBaseString);
|
||||||
|
}
|
||||||
|
|
||||||
if (welBaseDiffSign) {
|
if (welBaseDiffSign) {
|
||||||
String newSocialPaymentComBaseString = getSIArchivesService(user).checkAndBuildWelBaseWithLimit(insuranceArchivesSocialSchemePO.getSocialSchemeId(), insuranceArchivesSocialSchemePO.getSocialPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue());
|
String newSocialPaymentComBaseString = getSIArchivesService(user).checkAndBuildWelBaseWithLimit(insuranceArchivesSocialSchemePO.getSocialSchemeId(), insuranceArchivesSocialSchemePO.getSocialPaymentComBaseString(), PaymentScopeEnum.SCOPE_COMPANY.getValue());
|
||||||
|
|
@ -2457,6 +2473,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
||||||
* @param employeeId
|
* @param employeeId
|
||||||
*/
|
*/
|
||||||
public String update(InsuranceSchemeReqParam updateParam, long employeeId) {
|
public String update(InsuranceSchemeReqParam updateParam, long employeeId) {
|
||||||
|
log.info("福利方案更新参数:{}", updateParam);
|
||||||
//查询是否存在福利方案
|
//查询是否存在福利方案
|
||||||
InsuranceSchemePO insuranceSchemePO = getById(updateParam.getInsuranceScheme().getId());
|
InsuranceSchemePO insuranceSchemePO = getById(updateParam.getInsuranceScheme().getId());
|
||||||
if (Objects.isNull(insuranceSchemePO)) {
|
if (Objects.isNull(insuranceSchemePO)) {
|
||||||
|
|
@ -2490,6 +2507,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
||||||
//更新福利方案主表
|
//更新福利方案主表
|
||||||
InsuranceSchemePO insuranceSchemePO1 = InsuranceSchemeBO.buildInsuranceSchemePO(insuranceSchemePO, updateParam.getInsuranceScheme());
|
InsuranceSchemePO insuranceSchemePO1 = InsuranceSchemeBO.buildInsuranceSchemePO(insuranceSchemePO, updateParam.getInsuranceScheme());
|
||||||
getInsuranceSchemeMapper().update(insuranceSchemePO1);
|
getInsuranceSchemeMapper().update(insuranceSchemePO1);
|
||||||
|
log.info("福利方案更新主表:{}", insuranceSchemePO1);
|
||||||
//记录主表操作日志
|
//记录主表操作日志
|
||||||
loggerContext.setNewValues(insuranceSchemePO1);
|
loggerContext.setNewValues(insuranceSchemePO1);
|
||||||
SalaryElogConfig.siSchemeLoggerTemplate.write(loggerContext);
|
SalaryElogConfig.siSchemeLoggerTemplate.write(loggerContext);
|
||||||
|
|
@ -2513,6 +2531,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
||||||
//更新福利方案明细表 先删后插
|
//更新福利方案明细表 先删后插
|
||||||
getInsuranceSchemeDetailMapper().batchDeleteByPrimaryIds(Collections.singleton(updateParam.getInsuranceScheme().getId()));
|
getInsuranceSchemeDetailMapper().batchDeleteByPrimaryIds(Collections.singleton(updateParam.getInsuranceScheme().getId()));
|
||||||
//更新明细表
|
//更新明细表
|
||||||
|
log.info("福利方案更新明细表:{}", insuranceSchemeDetailPOS);
|
||||||
encryptUtil.encryptList(insuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class);
|
encryptUtil.encryptList(insuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class);
|
||||||
insuranceSchemeDetailPOS.forEach(getInsuranceSchemeDetailMapper()::insert);
|
insuranceSchemeDetailPOS.forEach(getInsuranceSchemeDetailMapper()::insert);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -405,11 +405,13 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
||||||
if (openSum != null && StringUtils.isNotBlank(openSum.getConfValue()) && OpenEnum.parseByValue(openSum.getConfValue()) == OpenEnum.OPEN) {
|
if (openSum != null && StringUtils.isNotBlank(openSum.getConfValue()) && OpenEnum.parseByValue(openSum.getConfValue()) == OpenEnum.OPEN) {
|
||||||
total = true;
|
total = true;
|
||||||
Map<String, Object> sumRow = getSalaryAcctResultService(user).sumRow(queryParam);
|
Map<String, Object> sumRow = getSalaryAcctResultService(user).sumRow(queryParam);
|
||||||
sumRow.forEach((k, v) -> {
|
if (sumRow != null) {
|
||||||
if (NumberUtils.isCreatable(v.toString())) {
|
sumRow.forEach((k, v) -> {
|
||||||
sumRow.put(k, new BigDecimal(v.toString()));
|
if (NumberUtils.isCreatable(v.toString())) {
|
||||||
}
|
sumRow.put(k, new BigDecimal(v.toString()));
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
if (sumRow != null) {
|
if (sumRow != null) {
|
||||||
sumRow.put("taxAgentName", "总计");
|
sumRow.put("taxAgentName", "总计");
|
||||||
resultMapList.add(sumRow);
|
resultMapList.add(sumRow);
|
||||||
|
|
@ -1437,7 +1439,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
||||||
loggerContext.setOperateType(OperateTypeEnum.EXCEL_IMPORT.getValue());
|
loggerContext.setOperateType(OperateTypeEnum.EXCEL_IMPORT.getValue());
|
||||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "导入薪资核算数据"));
|
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "导入薪资核算数据"));
|
||||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "导入薪资核算数据 ") + targetName);
|
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "导入薪资核算数据 ") + targetName);
|
||||||
loggerContext.setOldValueList(list4log);
|
loggerContext.setNewValueList(list4log);
|
||||||
SalaryElogConfig.salaryAcctRecordLoggerTemplate.write(loggerContext);
|
SalaryElogConfig.salaryAcctRecordLoggerTemplate.write(loggerContext);
|
||||||
|
|
||||||
// //报表
|
// //报表
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ import com.engine.salary.common.LocalDateRange;
|
||||||
import com.engine.salary.config.SalaryElogConfig;
|
import com.engine.salary.config.SalaryElogConfig;
|
||||||
import com.engine.salary.entity.salaryBill.po.SalarySendPO;
|
import com.engine.salary.entity.salaryBill.po.SalarySendPO;
|
||||||
import com.engine.salary.entity.salaryacct.bo.SalaryAcctRecordBO;
|
import com.engine.salary.entity.salaryacct.bo.SalaryAcctRecordBO;
|
||||||
|
import com.engine.salary.entity.salaryacct.param.SalaryAcctBatParam;
|
||||||
import com.engine.salary.entity.salaryacct.param.SalaryAcctRecordQueryParam;
|
import com.engine.salary.entity.salaryacct.param.SalaryAcctRecordQueryParam;
|
||||||
import com.engine.salary.entity.salaryacct.param.SalaryAcctRecordSaveParam;
|
import com.engine.salary.entity.salaryacct.param.SalaryAcctRecordSaveParam;
|
||||||
import com.engine.salary.entity.salaryacct.po.SalaryAcctEmployeePO;
|
import com.engine.salary.entity.salaryacct.po.SalaryAcctEmployeePO;
|
||||||
|
|
@ -43,6 +44,7 @@ import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.commons.lang3.math.NumberUtils;
|
import org.apache.commons.lang3.math.NumberUtils;
|
||||||
import weaver.hrm.User;
|
import weaver.hrm.User;
|
||||||
|
|
||||||
|
import java.time.YearMonth;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
@ -636,9 +638,9 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe
|
||||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(98819, "薪资核算结果还未归档,可直接核算"));
|
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(98819, "薪资核算结果还未归档,可直接核算"));
|
||||||
}
|
}
|
||||||
// 税款所在年的日期范围(第一天~最后一天)
|
// 税款所在年的日期范围(第一天~最后一天)
|
||||||
LocalDateRange yearRange = SalaryDateUtil.localDate2YearRange(salaryAcctRecordPO.getSalaryMonth());
|
LocalDateRange yearRange = SalaryDateUtil.localDate2YearRange(salaryAcctRecordPO.getTaxCycle());
|
||||||
if (Objects.isNull(yearRange)) {
|
if (Objects.isNull(yearRange)) {
|
||||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(84026, "薪资所属月为空"));
|
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(84026, "税款所属期为空"));
|
||||||
}
|
}
|
||||||
// 查询税款所在年的该个税扣缴义务人所有薪资核算记录
|
// 查询税款所在年的该个税扣缴义务人所有薪资核算记录
|
||||||
// 获取账套所属个税扣缴义务人的核算记录
|
// 获取账套所属个税扣缴义务人的核算记录
|
||||||
|
|
@ -655,13 +657,13 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe
|
||||||
if (!taxDeclarationFunctionEnum.getValue().equals(TaxDeclarationFunctionEnum.CLOSURE.getValue())) {
|
if (!taxDeclarationFunctionEnum.getValue().equals(TaxDeclarationFunctionEnum.CLOSURE.getValue())) {
|
||||||
// 如果已经存在之后月份的薪资核算记录了,就不允许重新核算本月了
|
// 如果已经存在之后月份的薪资核算记录了,就不允许重新核算本月了
|
||||||
SalaryAcctRecordPO afterSalaryAcctRecordPO = selfSalaryAcctRecordPOS.stream()
|
SalaryAcctRecordPO afterSalaryAcctRecordPO = selfSalaryAcctRecordPOS.stream()
|
||||||
.filter(po -> po.getSalaryMonth().compareTo(salaryAcctRecordPO.getSalaryMonth()) > 0)
|
.filter(po -> po.getTaxCycle().compareTo(salaryAcctRecordPO.getTaxCycle()) > 0)
|
||||||
.findAny()
|
.findAny()
|
||||||
.orElse(null);
|
.orElse(null);
|
||||||
if (Objects.nonNull(afterSalaryAcctRecordPO)) {
|
if (Objects.nonNull(afterSalaryAcctRecordPO)) {
|
||||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(105826, "已经存在{0}的薪资核算记录了,不能重新核算{1}的薪资了")
|
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(105826, "已经存在{0}的薪资核算记录了,不能重新核算{1}的薪资了")
|
||||||
.replace("{0}", SalaryDateUtil.localDate2YearMonth(afterSalaryAcctRecordPO.getSalaryMonth()).toString())
|
.replace("{0}", SalaryDateUtil.localDate2YearMonth(afterSalaryAcctRecordPO.getTaxCycle()).toString())
|
||||||
.replace("{1}", SalaryDateUtil.localDate2YearMonth(salaryAcctRecordPO.getSalaryMonth()).toString()));
|
.replace("{1}", SalaryDateUtil.localDate2YearMonth(salaryAcctRecordPO.getTaxCycle()).toString()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -822,4 +824,38 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe
|
||||||
public void updateDate(Long id, Date updateTime) {
|
public void updateDate(Long id, Date updateTime) {
|
||||||
getSalaryAcctRecordMapper().updateDate(id, updateTime);
|
getSalaryAcctRecordMapper().updateDate(id, updateTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void batSave(SalaryAcctBatParam saveParam) {
|
||||||
|
|
||||||
|
List<Long> salarySobIds = saveParam.getSalarySobIds();
|
||||||
|
YearMonth salaryMonth = SalaryDateUtil.localDate2YearMonth(saveParam.getSalaryMonth());
|
||||||
|
for (int i = 0; i < salarySobIds.size(); i++) {
|
||||||
|
Long salarySobId = salarySobIds.get(i);
|
||||||
|
SalaryAcctRecordSaveParam param = SalaryAcctRecordSaveParam.builder()
|
||||||
|
.salarySobId(salarySobId)
|
||||||
|
.salaryMonth(salaryMonth)
|
||||||
|
.description(saveParam.getDescription())
|
||||||
|
.build();
|
||||||
|
save(param);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void batFile(SalaryAcctBatParam param) {
|
||||||
|
List<Long> salaryAcctRecordIds = param.getSalaryAcctRecordIds();
|
||||||
|
for (int i = 0; i < salaryAcctRecordIds.size(); i++) {
|
||||||
|
Long recordId = salaryAcctRecordIds.get(i);
|
||||||
|
file(recordId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void batReCalculate(SalaryAcctBatParam param) {
|
||||||
|
List<Long> salaryAcctRecordIds = param.getSalaryAcctRecordIds();
|
||||||
|
for (int i = 0; i < salaryAcctRecordIds.size(); i++) {
|
||||||
|
Long recordId = salaryAcctRecordIds.get(i);
|
||||||
|
reCalculate(recordId);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -326,14 +326,25 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
|
||||||
if (CollectionUtils.isNotEmpty(otherConditions)) {
|
if (CollectionUtils.isNotEmpty(otherConditions)) {
|
||||||
List<Long> items = SalaryEntityUtil.properties(otherConditions, SalaryAcctResultQueryParam.OtherCondition::getItemId, Collectors.toList());
|
List<Long> items = SalaryEntityUtil.properties(otherConditions, SalaryAcctResultQueryParam.OtherCondition::getItemId, Collectors.toList());
|
||||||
List<SalaryAcctResultPO> list = listBySalaryAcctRecordIdsAndSalaryItemIds(Collections.singletonList(queryParam.getSalaryAcctRecordId()), items);
|
List<SalaryAcctResultPO> list = listBySalaryAcctRecordIdsAndSalaryItemIds(Collections.singletonList(queryParam.getSalaryAcctRecordId()), items);
|
||||||
for (int i = 0; i < otherConditions.size(); i++) {
|
Map<Long, List<SalaryAcctResultPO>> acctEmpResultsMap = SalaryEntityUtil.group2Map(list, SalaryAcctResultPO::getSalaryAcctEmpId);
|
||||||
SalaryAcctResultQueryParam.OtherCondition otherCondition = otherConditions.get(i);
|
Set<Long> removeAcctEmpIds = new HashSet<>();
|
||||||
Long itemId = otherCondition.getItemId();
|
for (Long acctEmpId : acctEmpResultsMap.keySet()) {
|
||||||
FilterEnum filter = otherCondition.getFilter();
|
List<SalaryAcctResultPO> acctEmpResults = acctEmpResultsMap.get(acctEmpId);
|
||||||
List<String> params = otherCondition.getParams();
|
//如果有一个条件不成立就删除
|
||||||
list = list.stream().filter(a -> Objects.equals(a.getSalaryItemId(), itemId)).filter(a -> filter.filter(params).test(a.getResultValue())).collect(Collectors.toList());
|
for (int i = 0; i < otherConditions.size(); i++) {
|
||||||
|
SalaryAcctResultQueryParam.OtherCondition otherCondition = otherConditions.get(i);
|
||||||
|
Long itemId = otherCondition.getItemId();
|
||||||
|
FilterEnum filter = otherCondition.getFilter();
|
||||||
|
List<String> params = otherCondition.getParams();
|
||||||
|
for (SalaryAcctResultPO po : acctEmpResults) {
|
||||||
|
if(Objects.equals(po.getSalaryItemId(), itemId) && !filter.filter(params).test(po.getResultValue())){
|
||||||
|
removeAcctEmpIds.add(po.getSalaryAcctEmpId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
List<Long> salaryAcctEmpId = SalaryEntityUtil.properties(list, SalaryAcctResultPO::getSalaryAcctEmpId, Collectors.toList());
|
acctEmpResultsMap.keySet().removeAll(removeAcctEmpIds);
|
||||||
|
List<Long> salaryAcctEmpId = Lists.newArrayList(acctEmpResultsMap.keySet());
|
||||||
|
|
||||||
if (CollectionUtils.isEmpty(salaryAcctEmpId)) {
|
if (CollectionUtils.isEmpty(salaryAcctEmpId)) {
|
||||||
//条件不满足直接返回空列表
|
//条件不满足直接返回空列表
|
||||||
|
|
@ -1052,7 +1063,14 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateLockStatusByParam(SalaryAcctResultUpdateLockStatusParam updateParam) {
|
public void updateLockStatusByParam(SalaryAcctResultUpdateLockStatusParam updateParam) {
|
||||||
List<SalaryAcctEmployeePO> salaryAcctEmployees = getSalaryAcctEmployeeService(user).listBySalaryAcctRecordId(updateParam.getSalaryAcctRecordId());
|
Set<Long> acctEmpIds = updateParam.getAcctEmpIds();
|
||||||
|
List<SalaryAcctEmployeePO> salaryAcctEmployees;
|
||||||
|
if (CollUtil.isNotEmpty(acctEmpIds)) {
|
||||||
|
salaryAcctEmployees = getSalaryAcctEmployeeService(user).listByIds(acctEmpIds);
|
||||||
|
} else {
|
||||||
|
salaryAcctEmployees = getSalaryAcctEmployeeService(user).listBySalaryAcctRecordId(updateParam.getSalaryAcctRecordId());
|
||||||
|
}
|
||||||
|
|
||||||
if (CollectionUtils.isEmpty(salaryAcctEmployees)) {
|
if (CollectionUtils.isEmpty(salaryAcctEmployees)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -662,8 +662,6 @@ public class SalaryArchiveItemServiceImpl extends Service implements SalaryArchi
|
||||||
public XSSFWorkbook exportAdjustRecordList(SalaryItemAdjustRecordQueryParam queryParam) {
|
public XSSFWorkbook exportAdjustRecordList(SalaryItemAdjustRecordQueryParam queryParam) {
|
||||||
// 1.工作簿名称
|
// 1.工作簿名称
|
||||||
String sheetName = SalaryI18nUtil.getI18nLabel(85368, "薪资项目调整记录");
|
String sheetName = SalaryI18nUtil.getI18nLabel(85368, "薪资项目调整记录");
|
||||||
// 获取所有可被引用的薪资项目
|
|
||||||
List<SalaryItemPO> salaryItems = salaryItemMapper.getCanAdjustSalaryItems();
|
|
||||||
String[] header = {
|
String[] header = {
|
||||||
SalaryI18nUtil.getI18nLabel(85429, "姓名"),
|
SalaryI18nUtil.getI18nLabel(85429, "姓名"),
|
||||||
SalaryI18nUtil.getI18nLabel(86187, "员工状态"),
|
SalaryI18nUtil.getI18nLabel(86187, "员工状态"),
|
||||||
|
|
|
||||||
|
|
@ -515,7 +515,7 @@ public class SalaryArchiveServiceImpl extends Service implements SalaryArchiveSe
|
||||||
// 1.工作簿名称
|
// 1.工作簿名称
|
||||||
String sheetName = SalaryI18nUtil.getI18nLabel(85368, "薪资档案");
|
String sheetName = SalaryI18nUtil.getI18nLabel(85368, "薪资档案");
|
||||||
// 获取所有可被引用的薪资项目
|
// 获取所有可被引用的薪资项目
|
||||||
List<SalaryItemPO> salaryItems = salaryItemMapper.getCanAdjustSalaryItems();
|
List<SalaryItemPO> salaryItems = getSalaryArchiveItemService(user).getCanAdjustSalaryItems();
|
||||||
Object[] header = {
|
Object[] header = {
|
||||||
new WeaTableColumnGroup("150px", SalaryI18nUtil.getI18nLabel(85429, "姓名"), "", "", 0),
|
new WeaTableColumnGroup("150px", SalaryI18nUtil.getI18nLabel(85429, "姓名"), "", "", 0),
|
||||||
new WeaTableColumnGroup("150px", SalaryI18nUtil.getI18nLabel(86184, "个税扣缴义务人"), "", "", 0),
|
new WeaTableColumnGroup("150px", SalaryI18nUtil.getI18nLabel(86184, "个税扣缴义务人"), "", "", 0),
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.engine.salary.service.impl;
|
package com.engine.salary.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.util.NumberUtil;
|
import cn.hutool.core.util.NumberUtil;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.api.formmode.mybatis.util.SqlProxyHandle;
|
import com.api.formmode.mybatis.util.SqlProxyHandle;
|
||||||
|
|
@ -174,7 +175,7 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
|
||||||
}
|
}
|
||||||
|
|
||||||
//外部人员
|
//外部人员
|
||||||
if(hasExtEmp){
|
if (hasExtEmp) {
|
||||||
List<SalarySobExtRangePO> salarySobExtRangePOS = getSalarySobExtRangeService(user).listBySalarySobId(salarySobId);
|
List<SalarySobExtRangePO> salarySobExtRangePOS = getSalarySobExtRangeService(user).listBySalarySobId(salarySobId);
|
||||||
if (CollectionUtils.isNotEmpty(salarySobExtRangePOS)) {
|
if (CollectionUtils.isNotEmpty(salarySobExtRangePOS)) {
|
||||||
List<Long> ids = SalaryEntityUtil.properties(salarySobExtRangePOS, SalarySobExtRangePO::getTargetId, Collectors.toList());
|
List<Long> ids = SalaryEntityUtil.properties(salarySobExtRangePOS, SalarySobExtRangePO::getTargetId, Collectors.toList());
|
||||||
|
|
@ -418,20 +419,24 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
|
||||||
|
|
||||||
result.addAll(employBiz.listByVirtualParams(virtualParams));
|
result.addAll(employBiz.listByVirtualParams(virtualParams));
|
||||||
|
|
||||||
List<Long> empIds = new ArrayList<>();
|
for (SalarySobRangeEmpQueryParam param:includeQueryParams) {
|
||||||
includeQueryParams.stream()
|
if(param.getTargetType().equals(TargetTypeEnum.SQL.name())){
|
||||||
.filter(param -> param.getTargetType().equals(TargetTypeEnum.SQL.name()))
|
List<Long> empIds = new ArrayList<>();
|
||||||
.forEach(param -> {
|
String sql = param.getTarget();
|
||||||
String sql = param.getTarget();
|
RecordSet rs = new RecordSet();
|
||||||
RecordSet rs = new RecordSet();
|
if (rs.execute(sql)) {
|
||||||
if (rs.execute(sql)) {
|
while (rs.next()) {
|
||||||
while (rs.next()) {
|
empIds.add((long) rs.getInt("id"));
|
||||||
empIds.add((long) rs.getInt("id"));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
List<DataCollectionEmployee> employees = getSalaryEmployeeService(user).getEmployeeByIdsAll(empIds);
|
if(CollUtil.isNotEmpty(empIds)){
|
||||||
result.addAll(employees);
|
Collection<String> employeeStatus = param.getEmployeeStatus();
|
||||||
|
List<DataCollectionEmployee> employeeByIdsAll = getSalaryEmployeeService(user).getEmployeeByIdsAll(empIds);
|
||||||
|
List<DataCollectionEmployee> collect = employeeByIdsAll.stream().filter(e -> employeeStatus.contains(e.getStatus())).collect(Collectors.toList());
|
||||||
|
result.addAll(collect);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 从hrmresource和hrmresourcevirtual可能获取到重复人员数据,需要根据人员id去重
|
// 从hrmresource和hrmresourcevirtual可能获取到重复人员数据,需要根据人员id去重
|
||||||
result = result.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparingLong(DataCollectionEmployee::getEmployeeId))), ArrayList::new));
|
result = result.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparingLong(DataCollectionEmployee::getEmployeeId))), ArrayList::new));
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
package com.engine.salary.service.impl;
|
package com.engine.salary.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.lang.Validator;
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.api.formmode.mybatis.util.SqlProxyHandle;
|
import com.api.formmode.mybatis.util.SqlProxyHandle;
|
||||||
|
|
@ -497,6 +496,11 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
|
||||||
if (salarySendInfo == null) {
|
if (salarySendInfo == null) {
|
||||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100511, "工资单信息不存在"));
|
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100511, "工资单信息不存在"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!Objects.equals(salarySendInfo.getSendStatus(), 1)) {
|
||||||
|
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100511, "工资单信息不存在"));
|
||||||
|
}
|
||||||
|
|
||||||
Long employeeId = salarySendInfo.getEmployeeId();
|
Long employeeId = salarySendInfo.getEmployeeId();
|
||||||
if (currentEmployeeId.compareTo(employeeId) != 0) {
|
if (currentEmployeeId.compareTo(employeeId) != 0) {
|
||||||
|
|
||||||
|
|
@ -1386,7 +1390,6 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> withdraw(SalarySendWithdrawParam param) {
|
public Map<String, Object> withdraw(SalarySendWithdrawParam param) {
|
||||||
if (param.getSalarySendId() == null) {
|
if (param.getSalarySendId() == null) {
|
||||||
|
|
@ -1748,9 +1751,6 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
|
||||||
}
|
}
|
||||||
|
|
||||||
String mobile = employee.getMobile();
|
String mobile = employee.getMobile();
|
||||||
if (Validator.isMobile(mobile)) {
|
|
||||||
throw new SalaryRunTimeException("手机号信息有误");
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean checkSendSMS = MessageUtil.checkSendSMS();
|
boolean checkSendSMS = MessageUtil.checkSendSMS();
|
||||||
if (!checkSendSMS) {
|
if (!checkSendSMS) {
|
||||||
|
|
@ -1778,6 +1778,9 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
|
||||||
|
|
||||||
//取出验证码
|
//取出验证码
|
||||||
String cacheValue = getSalaryCacheService(user).get(SALARY_CACHE_SMS_CODE + "_" + id);
|
String cacheValue = getSalaryCacheService(user).get(SALARY_CACHE_SMS_CODE + "_" + id);
|
||||||
|
if (cacheValue == null) {
|
||||||
|
throw new SalaryRunTimeException("未获取到验证码,请重新发送");
|
||||||
|
}
|
||||||
String[] cache = cacheValue.split("_");
|
String[] cache = cacheValue.split("_");
|
||||||
String code = cache[0];
|
String code = cache[0];
|
||||||
//失效时间
|
//失效时间
|
||||||
|
|
|
||||||
|
|
@ -238,6 +238,9 @@ public class SalarySobServiceImpl extends Service implements SalarySobService {
|
||||||
}
|
}
|
||||||
|
|
||||||
List<SalarySobPO> list = getSalarySobMapper().listSome(build);
|
List<SalarySobPO> list = getSalarySobMapper().listSome(build);
|
||||||
|
if (param.isShare() == true) {
|
||||||
|
return list;
|
||||||
|
}
|
||||||
return getAuthService(user).auth(list, param.getFilterType(), SalarySobPO.class);
|
return getAuthService(user).auth(list, param.getFilterType(), SalarySobPO.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -471,15 +471,20 @@ public class SpecialAddDeductionServiceImpl extends Service implements SpecialAd
|
||||||
SpecialAddDeductionBiz SpecialAddDeductionBiz = new SpecialAddDeductionBiz();
|
SpecialAddDeductionBiz SpecialAddDeductionBiz = new SpecialAddDeductionBiz();
|
||||||
Long currentEmployeeId = (long) user.getUID();
|
Long currentEmployeeId = (long) user.getUID();
|
||||||
// 获取所有个税扣缴义务人
|
// 获取所有个税扣缴义务人
|
||||||
Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList =
|
// Collection<TaxAgentManageRangeEmployeeDTO> taxAgentList =
|
||||||
getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
|
// getTaxAgentService(user).listTaxAgentAndEmployeeTree(currentEmployeeId);
|
||||||
|
|
||||||
|
TaxAgentQueryParam param = TaxAgentQueryParam.builder().build();
|
||||||
|
param.setFilterType(AuthFilterTypeEnum.ADMIN_DATA);
|
||||||
|
Collection<TaxAgentPO> taxAgentList = getTaxAgentService(user).listAuth(param);
|
||||||
|
|
||||||
SpecialAddDeductionPO byId = SpecialAddDeductionBiz.getById(specialAddDeductionParam.getId());
|
SpecialAddDeductionPO byId = SpecialAddDeductionBiz.getById(specialAddDeductionParam.getId());
|
||||||
if (byId == null) {
|
if (byId == null) {
|
||||||
throw new SalaryRunTimeException("该数据不存在!");
|
throw new SalaryRunTimeException("该数据不存在!");
|
||||||
}
|
}
|
||||||
//管理员可以编辑该扣缴义务人数据,其他人可以编辑本人数据
|
//管理员可以编辑该扣缴义务人数据,其他人可以编辑本人数据
|
||||||
boolean canEdit = byId.getEmployeeId().equals((long) user.getUID())
|
boolean canEdit = byId.getEmployeeId().equals((long) user.getUID())
|
||||||
|| taxAgentList.stream().anyMatch(t -> Objects.equals(t.getTaxAgentId(), byId.getTaxAgentId()));
|
|| taxAgentList.stream().anyMatch(t -> Objects.equals(t.getId(), byId.getTaxAgentId()));
|
||||||
if (!canEdit) {
|
if (!canEdit) {
|
||||||
//没有编辑权限
|
//没有编辑权限
|
||||||
throw new SalaryRunTimeException("该个税扣缴义务人无权限编辑此数据!");
|
throw new SalaryRunTimeException("该个税扣缴义务人无权限编辑此数据!");
|
||||||
|
|
|
||||||
|
|
@ -291,6 +291,9 @@ public class TaxAgentServiceImpl extends Service implements TaxAgentService {
|
||||||
public List<TaxAgentPO> listAuth(TaxAgentQueryParam queryParam) {
|
public List<TaxAgentPO> listAuth(TaxAgentQueryParam queryParam) {
|
||||||
List<TaxAgentPO> taxAgents = getTaxAgentMapper().listBySome(queryParam);
|
List<TaxAgentPO> taxAgents = getTaxAgentMapper().listBySome(queryParam);
|
||||||
AuthFilterTypeEnum filterType = queryParam.getFilterType();
|
AuthFilterTypeEnum filterType = queryParam.getFilterType();
|
||||||
|
if (queryParam.isShare()) {
|
||||||
|
return taxAgents;
|
||||||
|
}
|
||||||
return getAuthService(user).auth(taxAgents, filterType, TaxAgentPO.class);
|
return getAuthService(user).auth(taxAgents, filterType, TaxAgentPO.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -586,7 +589,7 @@ public class TaxAgentServiceImpl extends Service implements TaxAgentService {
|
||||||
public List<Map<String, Object>> selectList(boolean needAuth) {
|
public List<Map<String, Object>> selectList(boolean needAuth) {
|
||||||
List<TaxAgentPO> taxAgents = getTaxAgentMapper().listAll();
|
List<TaxAgentPO> taxAgents = getTaxAgentMapper().listAll();
|
||||||
if (needAuth) {
|
if (needAuth) {
|
||||||
taxAgents = handleForDevolution(taxAgents, (long) user.getUID(), true);
|
taxAgents = getAuthService(user).auth(taxAgents, AuthFilterTypeEnum.QUERY_DATA, TaxAgentPO.class);
|
||||||
}
|
}
|
||||||
return taxAgents.stream().map(m -> {
|
return taxAgents.stream().map(m -> {
|
||||||
Map<String, Object> map = new HashMap<>(2);
|
Map<String, Object> map = new HashMap<>(2);
|
||||||
|
|
@ -687,29 +690,15 @@ public class TaxAgentServiceImpl extends Service implements TaxAgentService {
|
||||||
return taxAgentManageRangeEmployeeList;
|
return taxAgentManageRangeEmployeeList;
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Long> taxAgentIds = allTaxAgents.stream().map(TaxAgentPO::getId).collect(Collectors.toList());
|
TaxAgentQueryParam param = TaxAgentQueryParam.builder().build();
|
||||||
if (employeeStatus != null) {
|
param.setFilterType(AuthFilterTypeEnum.QUERY_DATA);
|
||||||
List<String> personnelStatusList;
|
List<TaxAgentPO> taxAgentList = listAuth(param);
|
||||||
// 查询人员状态
|
List<Long> taxAgentIds = SalaryEntityUtil.properties(taxAgentList, TaxAgentPO::getId, Collectors.toList());
|
||||||
// if (employeeStatus.equals(SalaryEmployeeStatusEnum.NORMAL)) {
|
|
||||||
// allEmployees = allEmployees.stream().filter(f -> UserStatusEnum.getNormalStatus().contains(f.getStatus())).collect(Collectors.toList());
|
|
||||||
// } else if (employeeStatus.equals(SalaryEmployeeStatusEnum.UNAVAILABLE)) {
|
|
||||||
// allEmployees = allEmployees.stream().filter(f -> UserStatusEnum.getUnavailableStatus().contains(f.getStatus())).collect(Collectors.toList());
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
// 是否开启分权
|
|
||||||
if (!isOpenDevolution() || isChief(employeeId)) {
|
|
||||||
return getTaxAgentEmp(allTaxAgents, taxAgentIds);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 1.判断自己是否是管理员, 如果是管理员,就是能够操作所属个税扣缴义务人下的所有人的数据
|
if (CollectionUtils.isNotEmpty(taxAgentIds)) {
|
||||||
List<TaxAgentAdminPO> taxAgentAdminList = getTaxAgentAdminService(user).listByTaxAgentIdsAndEmployeeId(taxAgentIds, (long) user.getUID());
|
List<TaxAgentManageRangeEmployeeDTO> taxAgentEmp = getTaxAgentEmp(allTaxAgents, taxAgentIds);
|
||||||
// 是管理员的列表
|
taxAgentManageRangeEmployeeList.addAll(taxAgentEmp);
|
||||||
List<Long> adminTaxAgentIds = taxAgentAdminList.stream().map(TaxAgentAdminPO::getTaxAgentId).collect(Collectors.toList());
|
|
||||||
|
|
||||||
if (CollectionUtils.isNotEmpty(adminTaxAgentIds)) {
|
|
||||||
taxAgentManageRangeEmployeeList.addAll(getTaxAgentEmp(allTaxAgents, adminTaxAgentIds));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return taxAgentManageRangeEmployeeList;
|
return taxAgentManageRangeEmployeeList;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.engine.salary.service.impl;
|
package com.engine.salary.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.engine.common.util.ServiceUtil;
|
import com.engine.common.util.ServiceUtil;
|
||||||
import com.engine.core.impl.Service;
|
import com.engine.core.impl.Service;
|
||||||
import com.engine.hrmelog.entity.dto.LoggerContext;
|
import com.engine.hrmelog.entity.dto.LoggerContext;
|
||||||
|
|
@ -119,20 +120,24 @@ public class TaxDeclarationServiceImpl extends Service implements TaxDeclaration
|
||||||
public PageInfo<TaxDeclarationPO> listPageByParam(TaxDeclarationListQueryParam queryParam) {
|
public PageInfo<TaxDeclarationPO> listPageByParam(TaxDeclarationListQueryParam queryParam) {
|
||||||
// 分页参数
|
// 分页参数
|
||||||
TaxDeclarationPO po = TaxDeclarationPO.builder().build();
|
TaxDeclarationPO po = TaxDeclarationPO.builder().build();
|
||||||
LocalDateRange localDateRange = new LocalDateRange();
|
|
||||||
if (Objects.nonNull(queryParam.getFromSalaryMonth())) {
|
if (Objects.nonNull(queryParam.getFromSalaryMonth())) {
|
||||||
localDateRange.setFromDate(SalaryDateUtil.localDateToDate(queryParam.getFromSalaryMonth().atDay(1)));
|
po.setTaxCycleFromDate(queryParam.getFromSalaryMonth());
|
||||||
}
|
}
|
||||||
if (Objects.nonNull(queryParam.getEndSalaryMonth())) {
|
if (Objects.nonNull(queryParam.getEndSalaryMonth())) {
|
||||||
localDateRange.setEndDate(SalaryDateUtil.localDateToDate(queryParam.getEndSalaryMonth().atEndOfMonth()));
|
po.setTaxCycleEndDate(queryParam.getEndSalaryMonth());
|
||||||
}
|
}
|
||||||
po.setSalaryMonths(localDateRange);
|
|
||||||
|
|
||||||
// 查询个税申报表
|
// 查询个税申报表
|
||||||
List<TaxDeclarationPO> taxDeclarationPOS = getTaxDeclarationMapper().listSome(po);
|
List<TaxDeclarationPO> taxDeclarationPOS = getTaxDeclarationMapper().listSome(po);
|
||||||
|
|
||||||
taxDeclarationPOS = getAuthService(user).auth(taxDeclarationPOS, AuthFilterTypeEnum.DATA_OPT, TaxDeclarationPO.class);
|
taxDeclarationPOS = getAuthService(user).auth(taxDeclarationPOS, AuthFilterTypeEnum.DATA_OPT, TaxDeclarationPO.class);
|
||||||
|
|
||||||
|
if (StrUtil.isNotBlank(queryParam.getTaxAgentName())) {
|
||||||
|
List<TaxAgentPO> taxAgentPOs = getTaxAgentService(user).list(TaxAgentQueryParam.builder().name(queryParam.getTaxAgentName()).build());
|
||||||
|
Set<Long> taxAgentIds = SalaryEntityUtil.properties(taxAgentPOs, TaxAgentPO::getId);
|
||||||
|
taxDeclarationPOS = taxDeclarationPOS.stream().filter(tax -> taxAgentIds.contains(tax.getTaxAgentId())).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),
|
return SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),
|
||||||
taxDeclarationPOS, TaxDeclarationPO.class);
|
taxDeclarationPOS, TaxDeclarationPO.class);
|
||||||
|
|
||||||
|
|
@ -205,7 +210,14 @@ public class TaxDeclarationServiceImpl extends Service implements TaxDeclaration
|
||||||
.replace("{1}", SalaryDateUtil.getFormatYearMonth(saveParam.getSalaryMonth())));
|
.replace("{1}", SalaryDateUtil.getFormatYearMonth(saveParam.getSalaryMonth())));
|
||||||
}
|
}
|
||||||
// 查询薪资所属月的薪资核算记录
|
// 查询薪资所属月的薪资核算记录
|
||||||
salaryAcctRecordPOS = listBySalaryMonth(SalaryAcctRecordPO.builder().salaryMonths(salaryMonthDateRange).taxAgentId(taxAgentId).build());
|
salaryAcctRecordPOS = listBySalaryMonth(SalaryAcctRecordPO.builder().salaryMonths(salaryMonthDateRange).build());
|
||||||
|
List<SalarySobPO> salarySobPOS = getSalarySobService(user).listByTaxAgentId(saveParam.getTaxAgentId());
|
||||||
|
if (CollectionUtils.isEmpty(salarySobPOS)) {
|
||||||
|
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(98874, "{0}该义务人下无账套数据").replace("{0}", saveParam.getSalaryMonth().toString()));
|
||||||
|
}
|
||||||
|
List<Long> salarySobIds = salarySobPOS.stream().map(SalarySobPO::getId).collect(Collectors.toList());
|
||||||
|
|
||||||
|
salaryAcctRecordPOS.stream().filter(record -> salarySobIds.contains(record.getSalarySobId())).collect(Collectors.toList());
|
||||||
|
|
||||||
// 无薪资核算记录,不允许生成个税申报表
|
// 无薪资核算记录,不允许生成个税申报表
|
||||||
if (CollectionUtils.isEmpty(salaryAcctRecordPOS)) {
|
if (CollectionUtils.isEmpty(salaryAcctRecordPOS)) {
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import com.engine.salary.common.SalaryContext;
|
||||||
import com.engine.salary.exception.ExceptionUtil;
|
import com.engine.salary.exception.ExceptionUtil;
|
||||||
import com.engine.salary.exception.SalaryRunTimeException;
|
import com.engine.salary.exception.SalaryRunTimeException;
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
|
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import weaver.general.BaseBean;
|
import weaver.general.BaseBean;
|
||||||
|
|
@ -15,6 +16,7 @@ import weaver.hrm.User;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
@ -52,6 +54,17 @@ public class ResponseResult<T, R> {
|
||||||
SalaryContext.get().setValue("response", response);
|
SalaryContext.get().setValue("response", response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public T parseParams(HttpServletRequest request, Class<T> clazz) {
|
||||||
|
T t = null;
|
||||||
|
try {
|
||||||
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
|
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||||
|
t = mapper.readValue(request.getInputStream(), clazz);
|
||||||
|
} catch (IOException e) {
|
||||||
|
log.error("salary api parseParams fail , param {}", t, e);
|
||||||
|
}
|
||||||
|
return t;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 统一返回方法
|
* 统一返回方法
|
||||||
|
|
|
||||||
|
|
@ -135,6 +135,15 @@ public class SalaryEntityUtil {
|
||||||
.collect(Collectors.toMap(keyMapper, valueMapper, (a, b) -> a));
|
.collect(Collectors.toMap(keyMapper, valueMapper, (a, b) -> a));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static <T, K, V> Map<K, V> convert2LinkedMap(Collection<T> objs, Function<T, K> keyMapper, Function<T, V> valueMapper) {
|
||||||
|
if (CollectionUtils.isEmpty(objs)) {
|
||||||
|
return Maps.newHashMap();
|
||||||
|
}
|
||||||
|
return objs.stream()
|
||||||
|
.filter(e -> valueMapper.apply(e) != null && keyMapper.apply(e) != null)
|
||||||
|
.collect(Collectors.toMap(keyMapper, valueMapper, (a, b) -> a, LinkedHashMap::new));
|
||||||
|
}
|
||||||
|
|
||||||
public static <R, T> Map<R, List<T>> group2Map(Collection<T> objs, Function<T, R> function) {
|
public static <R, T> Map<R, List<T>> group2Map(Collection<T> objs, Function<T, R> function) {
|
||||||
if (CollectionUtils.isEmpty(objs)) {
|
if (CollectionUtils.isEmpty(objs)) {
|
||||||
return Maps.newHashMap();
|
return Maps.newHashMap();
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import com.engine.salary.encrypt.AESEncryptUtil;
|
||||||
import com.engine.salary.entity.salaryBill.param.SalaryBillGetTokenParam;
|
import com.engine.salary.entity.salaryBill.param.SalaryBillGetTokenParam;
|
||||||
import com.engine.salary.exception.SalaryRunTimeException;
|
import com.engine.salary.exception.SalaryRunTimeException;
|
||||||
import com.engine.salary.util.db.IdGenerator;
|
import com.engine.salary.util.db.IdGenerator;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import weaver.conn.RecordSet;
|
import weaver.conn.RecordSet;
|
||||||
import weaver.general.BaseBean;
|
import weaver.general.BaseBean;
|
||||||
|
|
@ -23,6 +24,7 @@ import java.time.LocalDateTime;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
public class SalaryTokenUtil {
|
public class SalaryTokenUtil {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -99,15 +101,18 @@ public class SalaryTokenUtil {
|
||||||
// 获取appid的id
|
// 获取appid的id
|
||||||
String appidId = baseBean.getPropValue("hrmSalaryBillToken", "appid_id");
|
String appidId = baseBean.getPropValue("hrmSalaryBillToken", "appid_id");
|
||||||
if (StringUtils.isBlank(appidId)) {
|
if (StringUtils.isBlank(appidId)) {
|
||||||
|
resultMap.put("msg", "appid_id为空");
|
||||||
return resultMap;
|
return resultMap;
|
||||||
}
|
}
|
||||||
String ip = baseBean.getPropValue("hrmSalaryBillToken", "ip");
|
String ip = baseBean.getPropValue("hrmSalaryBillToken", "ip");
|
||||||
rs.execute("select APPID from ECOLOGY_BIZ_EC where id =" + appidId);
|
String appidSql = String.format("select APPID from ECOLOGY_BIZ_EC where id ='%s'", appidId);
|
||||||
|
rs.execute(appidSql);
|
||||||
// 获取appid
|
// 获取appid
|
||||||
String appid ="";
|
String appid ="";
|
||||||
if (rs.next() && StringUtils.isNotEmpty(rs.getString("APPID"))) {
|
if (rs.next() && StringUtils.isNotEmpty(rs.getString("APPID"))) {
|
||||||
appid = rs.getString("APPID");
|
appid = rs.getString("APPID");
|
||||||
} else {
|
} else {
|
||||||
|
resultMap.put("msg", "APPID为空,sql:"+appidSql);
|
||||||
return resultMap;
|
return resultMap;
|
||||||
}
|
}
|
||||||
String sql= " SELECT conf_value FROM hrsa_salary_sys_conf t WHERE delete_type = 0 AND conf_key = 'SALARY_TOKEN_SECRET'";
|
String sql= " SELECT conf_value FROM hrsa_salary_sys_conf t WHERE delete_type = 0 AND conf_key = 'SALARY_TOKEN_SECRET'";
|
||||||
|
|
@ -126,28 +131,37 @@ public class SalaryTokenUtil {
|
||||||
heads.put("appid", appid);
|
heads.put("appid", appid);
|
||||||
heads.put("cpk", cpk);
|
heads.put("cpk", cpk);
|
||||||
// 调用ECOLOGY系统接口进行注册
|
// 调用ECOLOGY系统接口进行注册
|
||||||
String data = post(httpKey + ip + "/api/ec/dev/auth/regist", null, heads);
|
String url = httpKey + ip + "/api/ec/dev/auth/regist";
|
||||||
|
String data = post(url , null, heads);
|
||||||
Map<String, Object> datas = JSONObject.parseObject(data, new TypeReference<Map<String, Object>>() {});
|
Map<String, Object> datas = JSONObject.parseObject(data, new TypeReference<Map<String, Object>>() {});
|
||||||
|
log.info("GetToken regist url {} ,heads {}, data: {}",url ,heads, data);
|
||||||
// ECOLOGY返回的系统公钥
|
// ECOLOGY返回的系统公钥
|
||||||
String spk = (String) (datas.get("spk"));
|
String spk = (String) (datas.get("spk"));
|
||||||
RSA rsa = new RSA();
|
RSA rsa = new RSA();
|
||||||
// 对秘钥进行加密传输,防止篡改数据
|
// 对秘钥进行加密传输,防止篡改数据
|
||||||
secret = rsa.encrypt(null, (String) (datas.get("secrit")), null, "utf-8", spk, false);
|
secret = rsa.encrypt(null, (String) (datas.get("secrit")), null, "utf-8", spk, false);
|
||||||
// secret存库
|
// secret存库
|
||||||
String date = SalaryDateUtil.getFormatLocalDateTime(LocalDateTime.now());
|
String date = "'"+SalaryDateUtil.getFormatLocalDateTime(LocalDateTime.now())+"'";
|
||||||
sql = String.format("insert into hrsa_salary_sys_conf(id, conf_key, conf_value, title, module, order_weight, delete_type, create_time, update_time) values (%s,'%s','%s','%s','%s',%s,%s,'%s','%s')",
|
if(rs.getDBType().equalsIgnoreCase("oracle")){
|
||||||
|
date = String.format("to_date(%s,'yyyy-mm-dd hh24:mi:ss')", date);
|
||||||
|
}
|
||||||
|
sql = String.format("insert into hrsa_salary_sys_conf(id, conf_key, conf_value, title, module, order_weight, delete_type, create_time, update_time) values (%s,'%s','%s','%s','%s',%s,%s,%s,%s)",
|
||||||
IdGenerator.generate(), "SALARY_TOKEN_SECRET", secret, "token", "basic",0,0,date,date);
|
IdGenerator.generate(), "SALARY_TOKEN_SECRET", secret, "token", "basic",0,0,date,date);
|
||||||
rs.execute(sql);
|
rs.execute(sql);
|
||||||
|
log.info("GetToken regist secret , sql: {}", sql);
|
||||||
// 保存spk
|
// 保存spk
|
||||||
sql = String.format("insert into hrsa_salary_sys_conf(id, conf_key, conf_value, title, module, order_weight, delete_type, create_time, update_time) values (%s,'%s','%s','%s','%s',%s,%s,'%s','%s')",
|
sql = String.format("insert into hrsa_salary_sys_conf(id, conf_key, conf_value, title, module, order_weight, delete_type, create_time, update_time) values (%s,'%s','%s','%s','%s',%s,%s,%s,%s)",
|
||||||
IdGenerator.generate(), "SALARY_TOKEN_SPK", spk, "spk", "basic",0,0,date,date);
|
IdGenerator.generate(), "SALARY_TOKEN_SPK", spk, "spk", "basic",0,0,date,date);
|
||||||
rs.execute(sql);
|
rs.execute(sql);
|
||||||
|
log.info("GetToken regist spk , sql: {}", sql);
|
||||||
}
|
}
|
||||||
//封装参数到请求头
|
//封装参数到请求头
|
||||||
heads.put("appid", appid);
|
heads.put("appid", appid);
|
||||||
heads.put("secret", secret);
|
heads.put("secret", secret);
|
||||||
//调用ECOLOGY系统接口进行注册
|
//调用ECOLOGY系统接口进行注册
|
||||||
String data2 = post(httpKey + ip + "/api/ec/dev/auth/applytoken", null, heads);
|
String url = httpKey + ip + "/api/ec/dev/auth/applytoken";
|
||||||
|
String data2 = post(url, null, heads);
|
||||||
|
log.info("GetToken=====applytoken url {} ,heads {}, data: {}",url ,heads, data2);
|
||||||
// 通过第一步注册许可时返回spk公钥对userid进行加密生成的密文
|
// 通过第一步注册许可时返回spk公钥对userid进行加密生成的密文
|
||||||
sql= " SELECT conf_value FROM hrsa_salary_sys_conf t WHERE delete_type = 0 AND conf_key = 'SALARY_TOKEN_SPK'";
|
sql= " SELECT conf_value FROM hrsa_salary_sys_conf t WHERE delete_type = 0 AND conf_key = 'SALARY_TOKEN_SPK'";
|
||||||
rs.execute(sql);
|
rs.execute(sql);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.engine.salary.util.excel;
|
package com.engine.salary.util.excel;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.engine.salary.entity.taxdeclaration.dto.TaxDeclarationLaborListDTO;
|
import com.engine.salary.entity.taxdeclaration.dto.TaxDeclarationLaborListDTO;
|
||||||
import com.engine.salary.util.SalaryDateUtil;
|
import com.engine.salary.util.SalaryDateUtil;
|
||||||
import com.engine.salary.util.SalaryI18nUtil;
|
import com.engine.salary.util.SalaryI18nUtil;
|
||||||
|
|
@ -139,8 +140,10 @@ public class ExcelUtil {
|
||||||
}
|
}
|
||||||
Object o = infoList.get(cellIndex);
|
Object o = infoList.get(cellIndex);
|
||||||
if (o instanceof String) {
|
if (o instanceof String) {
|
||||||
cell.setCellType(CellType.STRING);
|
if (StrUtil.isNotBlank(String.valueOf(o))) {
|
||||||
cell.setCellValue(String.valueOf(o));
|
cell.setCellType(CellType.STRING);
|
||||||
|
cell.setCellValue(String.valueOf(o));
|
||||||
|
}
|
||||||
} else if (o instanceof BigDecimal) {
|
} else if (o instanceof BigDecimal) {
|
||||||
cell.setCellType(CellType.NUMERIC);
|
cell.setCellType(CellType.NUMERIC);
|
||||||
cell.setCellValue(o == null ? 0 : ((BigDecimal) o).doubleValue());
|
cell.setCellValue(o == null ? 0 : ((BigDecimal) o).doubleValue());
|
||||||
|
|
@ -235,8 +238,10 @@ public class ExcelUtil {
|
||||||
}
|
}
|
||||||
Object o = infoList.get(cellIndex);
|
Object o = infoList.get(cellIndex);
|
||||||
if (o instanceof String) {
|
if (o instanceof String) {
|
||||||
cell.setCellType(CellType.STRING);
|
if (StrUtil.isNotBlank(String.valueOf(o))) {
|
||||||
cell.setCellValue(String.valueOf(o));
|
cell.setCellType(CellType.STRING);
|
||||||
|
cell.setCellValue(String.valueOf(o));
|
||||||
|
}
|
||||||
} else if (o instanceof BigDecimal) {
|
} else if (o instanceof BigDecimal) {
|
||||||
cell.setCellType(CellType.NUMERIC);
|
cell.setCellType(CellType.NUMERIC);
|
||||||
cell.setCellValue(o == null ? 0 : ((BigDecimal) o).doubleValue());
|
cell.setCellValue(o == null ? 0 : ((BigDecimal) o).doubleValue());
|
||||||
|
|
@ -311,8 +316,10 @@ public class ExcelUtil {
|
||||||
}
|
}
|
||||||
Object o = infoList.get(cellIndex);
|
Object o = infoList.get(cellIndex);
|
||||||
if (o instanceof String) {
|
if (o instanceof String) {
|
||||||
cell.setCellType(CellType.STRING);
|
if (StrUtil.isNotBlank(String.valueOf(o))) {
|
||||||
cell.setCellValue(String.valueOf(o));
|
cell.setCellType(CellType.STRING);
|
||||||
|
cell.setCellValue(String.valueOf(o));
|
||||||
|
}
|
||||||
} else if (o instanceof BigDecimal) {
|
} else if (o instanceof BigDecimal) {
|
||||||
cell.setCellType(CellType.NUMERIC);
|
cell.setCellType(CellType.NUMERIC);
|
||||||
cell.setCellValue(o == null ? 0 : ((BigDecimal) o).doubleValue());
|
cell.setCellValue(o == null ? 0 : ((BigDecimal) o).doubleValue());
|
||||||
|
|
@ -377,8 +384,10 @@ public class ExcelUtil {
|
||||||
}
|
}
|
||||||
Object o = infoList.get(cellIndex);
|
Object o = infoList.get(cellIndex);
|
||||||
if (o instanceof String) {
|
if (o instanceof String) {
|
||||||
cell.setCellType(CellType.STRING);
|
if (StrUtil.isNotBlank(String.valueOf(o))) {
|
||||||
cell.setCellValue(String.valueOf(o));
|
cell.setCellType(CellType.STRING);
|
||||||
|
cell.setCellValue(String.valueOf(o));
|
||||||
|
}
|
||||||
} else if (o instanceof Boolean) {
|
} else if (o instanceof Boolean) {
|
||||||
cell.setCellType(CellType.BOOLEAN);
|
cell.setCellType(CellType.BOOLEAN);
|
||||||
cell.setCellValue(String.valueOf(o));
|
cell.setCellValue(String.valueOf(o));
|
||||||
|
|
@ -458,8 +467,10 @@ public class ExcelUtil {
|
||||||
}
|
}
|
||||||
Object o = infoList.get(cellIndex);
|
Object o = infoList.get(cellIndex);
|
||||||
if (o instanceof String) {
|
if (o instanceof String) {
|
||||||
cell.setCellType(CellType.STRING);
|
if (StrUtil.isNotBlank(String.valueOf(o))) {
|
||||||
cell.setCellValue(String.valueOf(o));
|
cell.setCellType(CellType.STRING);
|
||||||
|
cell.setCellValue(String.valueOf(o));
|
||||||
|
}
|
||||||
} else if (o instanceof Boolean) {
|
} else if (o instanceof Boolean) {
|
||||||
cell.setCellType(CellType.BOOLEAN);
|
cell.setCellType(CellType.BOOLEAN);
|
||||||
cell.setCellValue(String.valueOf(o));
|
cell.setCellValue(String.valueOf(o));
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
package com.engine.salary.util.excel;
|
package com.engine.salary.util.excel;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.engine.salary.component.WeaTableColumnGroup;
|
import com.engine.salary.component.WeaTableColumnGroup;
|
||||||
import com.engine.salary.util.SalaryDateUtil;
|
import com.engine.salary.util.SalaryDateUtil;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.poi.ss.usermodel.*;
|
import org.apache.poi.ss.usermodel.*;
|
||||||
import org.apache.poi.ss.util.CellRangeAddress;
|
import org.apache.poi.ss.util.CellRangeAddress;
|
||||||
import org.apache.poi.xssf.usermodel.*;
|
import org.apache.poi.xssf.usermodel.*;
|
||||||
|
import weaver.wechat.util.Utils;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
@ -131,10 +133,10 @@ public class ExcelUtilPlus {
|
||||||
for (int i = 0; i < header.size(); i++) {
|
for (int i = 0; i < header.size(); i++) {
|
||||||
WeaTableColumnGroup columnGroupItem = (WeaTableColumnGroup) header.get(i);
|
WeaTableColumnGroup columnGroupItem = (WeaTableColumnGroup) header.get(i);
|
||||||
XSSFCell rowZeroCell = row0.createCell(i, CellType.STRING);
|
XSSFCell rowZeroCell = row0.createCell(i, CellType.STRING);
|
||||||
rowZeroCell.setCellValue(columnGroupItem.getText().toString());
|
rowZeroCell.setCellValue(columnGroupItem.getText());
|
||||||
rowZeroCell.setCellStyle(titleCellStyle);
|
rowZeroCell.setCellStyle(titleCellStyle);
|
||||||
//设置列宽
|
//设置列宽
|
||||||
sheet.setColumnWidth(i, Math.min(255, Math.max(12, columnGroupItem.getText().length() * 4)) * 256);
|
sheet.setColumnWidth(i, Math.min(255, Math.max(12, Utils.null2String(columnGroupItem.getText()).length() * 4)) * 256);
|
||||||
patternList.add(columnGroupItem.getPattern());
|
patternList.add(columnGroupItem.getPattern());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -190,8 +192,10 @@ public class ExcelUtilPlus {
|
||||||
}
|
}
|
||||||
Object o = infoList.get(cellIndex);
|
Object o = infoList.get(cellIndex);
|
||||||
if (o instanceof String) {
|
if (o instanceof String) {
|
||||||
cell.setCellType(CellType.STRING);
|
if (StrUtil.isNotBlank(String.valueOf(o))) {
|
||||||
cell.setCellValue(String.valueOf(o));
|
cell.setCellType(CellType.STRING);
|
||||||
|
cell.setCellValue(String.valueOf(o));
|
||||||
|
}
|
||||||
} else if (o instanceof BigDecimal) {
|
} else if (o instanceof BigDecimal) {
|
||||||
if (lastRowRed && rowIndex == rowList.size() - 1) {
|
if (lastRowRed && rowIndex == rowList.size() - 1) {
|
||||||
cell.setCellStyle(numberRedCellStyleMap.get(patternList.get(cellIndex)));
|
cell.setCellStyle(numberRedCellStyleMap.get(patternList.get(cellIndex)));
|
||||||
|
|
@ -199,8 +203,7 @@ public class ExcelUtilPlus {
|
||||||
cell.setCellStyle(numberCellStyleMap.get(patternList.get(cellIndex)));
|
cell.setCellStyle(numberCellStyleMap.get(patternList.get(cellIndex)));
|
||||||
}
|
}
|
||||||
cell.setCellType(CellType.NUMERIC);
|
cell.setCellType(CellType.NUMERIC);
|
||||||
double value = o == null ? 0 : ((BigDecimal) o).doubleValue();
|
cell.setCellValue(((BigDecimal) o).doubleValue());
|
||||||
cell.setCellValue(o == null ? 0 : ((BigDecimal) o).doubleValue());
|
|
||||||
} else if (o instanceof Boolean) {
|
} else if (o instanceof Boolean) {
|
||||||
cell.setCellType(CellType.BOOLEAN);
|
cell.setCellType(CellType.BOOLEAN);
|
||||||
cell.setCellValue(String.valueOf(o));
|
cell.setCellValue(String.valueOf(o));
|
||||||
|
|
@ -220,6 +223,7 @@ public class ExcelUtilPlus {
|
||||||
}
|
}
|
||||||
return workbook;
|
return workbook;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static XSSFWorkbook genWorkbookV2(List<List<Object>> rowList, String sheetName) {
|
public static XSSFWorkbook genWorkbookV2(List<List<Object>> rowList, String sheetName) {
|
||||||
XSSFWorkbook workbook = new XSSFWorkbook();
|
XSSFWorkbook workbook = new XSSFWorkbook();
|
||||||
|
|
||||||
|
|
@ -280,11 +284,13 @@ public class ExcelUtilPlus {
|
||||||
}
|
}
|
||||||
Object o = infoList.get(cellIndex);
|
Object o = infoList.get(cellIndex);
|
||||||
if (o instanceof String) {
|
if (o instanceof String) {
|
||||||
cell.setCellType(CellType.STRING);
|
if (StrUtil.isNotBlank(String.valueOf(o))) {
|
||||||
cell.setCellValue(String.valueOf(o));
|
cell.setCellType(CellType.STRING);
|
||||||
|
cell.setCellValue(String.valueOf(o));
|
||||||
|
}
|
||||||
} else if (o instanceof BigDecimal) {
|
} else if (o instanceof BigDecimal) {
|
||||||
cell.setCellType(CellType.NUMERIC);
|
cell.setCellType(CellType.NUMERIC);
|
||||||
cell.setCellValue(o == null ? 0 : ((BigDecimal) o).doubleValue());
|
cell.setCellValue(((BigDecimal) o).doubleValue());
|
||||||
} else if (o instanceof Boolean) {
|
} else if (o instanceof Boolean) {
|
||||||
cell.setCellType(CellType.BOOLEAN);
|
cell.setCellType(CellType.BOOLEAN);
|
||||||
cell.setCellValue(String.valueOf(o));
|
cell.setCellValue(String.valueOf(o));
|
||||||
|
|
@ -367,8 +373,10 @@ public class ExcelUtilPlus {
|
||||||
}
|
}
|
||||||
Object o = infoList.get(cellIndex);
|
Object o = infoList.get(cellIndex);
|
||||||
if (o instanceof String) {
|
if (o instanceof String) {
|
||||||
cell.setCellType(CellType.STRING);
|
if (StrUtil.isNotBlank(String.valueOf(o))) {
|
||||||
cell.setCellValue(String.valueOf(o));
|
cell.setCellType(CellType.STRING);
|
||||||
|
cell.setCellValue(String.valueOf(o));
|
||||||
|
}
|
||||||
} else if (o instanceof Boolean) {
|
} else if (o instanceof Boolean) {
|
||||||
cell.setCellType(CellType.BOOLEAN);
|
cell.setCellType(CellType.BOOLEAN);
|
||||||
cell.setCellValue(String.valueOf(o));
|
cell.setCellValue(String.valueOf(o));
|
||||||
|
|
@ -476,11 +484,13 @@ public class ExcelUtilPlus {
|
||||||
}
|
}
|
||||||
Object o = infoList.get(cellIndex);
|
Object o = infoList.get(cellIndex);
|
||||||
if (o instanceof String) {
|
if (o instanceof String) {
|
||||||
cell.setCellType(CellType.STRING);
|
if (StrUtil.isNotBlank(String.valueOf(o))) {
|
||||||
cell.setCellValue(String.valueOf(o));
|
cell.setCellType(CellType.STRING);
|
||||||
|
cell.setCellValue(String.valueOf(o));
|
||||||
|
}
|
||||||
} else if (o instanceof BigDecimal) {
|
} else if (o instanceof BigDecimal) {
|
||||||
cell.setCellType(CellType.NUMERIC);
|
cell.setCellType(CellType.NUMERIC);
|
||||||
cell.setCellValue(o == null ? 0 : ((BigDecimal) o).doubleValue());
|
cell.setCellValue(((BigDecimal) o).doubleValue());
|
||||||
} else if (o instanceof Boolean) {
|
} else if (o instanceof Boolean) {
|
||||||
cell.setCellType(CellType.BOOLEAN);
|
cell.setCellType(CellType.BOOLEAN);
|
||||||
cell.setCellValue(String.valueOf(o));
|
cell.setCellValue(String.valueOf(o));
|
||||||
|
|
@ -674,8 +684,10 @@ public class ExcelUtilPlus {
|
||||||
}
|
}
|
||||||
Object o = infoList.get(cellIndex);
|
Object o = infoList.get(cellIndex);
|
||||||
if (o instanceof String) {
|
if (o instanceof String) {
|
||||||
cell.setCellType(CellType.STRING);
|
if (StrUtil.isNotBlank(String.valueOf(o))) {
|
||||||
cell.setCellValue(String.valueOf(o));
|
cell.setCellType(CellType.STRING);
|
||||||
|
cell.setCellValue(String.valueOf(o));
|
||||||
|
}
|
||||||
} else if (o instanceof BigDecimal) {
|
} else if (o instanceof BigDecimal) {
|
||||||
if (lastRowRed && rowIndex == rowList.size() - 1) {
|
if (lastRowRed && rowIndex == rowList.size() - 1) {
|
||||||
cell.setCellStyle(numberRedCellStyleMap.get(patternList.get(cellIndex)));
|
cell.setCellStyle(numberRedCellStyleMap.get(patternList.get(cellIndex)));
|
||||||
|
|
@ -839,8 +851,10 @@ public class ExcelUtilPlus {
|
||||||
}
|
}
|
||||||
Object o = infoList.get(cellIndex);
|
Object o = infoList.get(cellIndex);
|
||||||
if (o instanceof String) {
|
if (o instanceof String) {
|
||||||
cell.setCellType(CellType.STRING);
|
if (StrUtil.isNotBlank(String.valueOf(o))) {
|
||||||
cell.setCellValue(String.valueOf(o));
|
cell.setCellType(CellType.STRING);
|
||||||
|
cell.setCellValue(String.valueOf(o));
|
||||||
|
}
|
||||||
} else if (o instanceof BigDecimal) {
|
} else if (o instanceof BigDecimal) {
|
||||||
cell.setCellType(CellType.NUMERIC);
|
cell.setCellType(CellType.NUMERIC);
|
||||||
cell.setCellValue(o == null ? 0 : ((BigDecimal) o).doubleValue());
|
cell.setCellValue(o == null ? 0 : ((BigDecimal) o).doubleValue());
|
||||||
|
|
|
||||||
|
|
@ -250,7 +250,9 @@ public class ValidUtil {
|
||||||
.replace("between", "between")
|
.replace("between", "between")
|
||||||
.replace("BETWEEN", "BETWEEN")
|
.replace("BETWEEN", "BETWEEN")
|
||||||
.replace("union", "union")
|
.replace("union", "union")
|
||||||
.replace("UNION", "UNION");
|
.replace("UNION", "UNION")
|
||||||
|
.replace("substr", "substr")
|
||||||
|
.replace("SUBSTR", "SUBSTR");
|
||||||
}
|
}
|
||||||
setValue(t, field.getName(), result);
|
setValue(t, field.getName(), result);
|
||||||
} else if (valueTypeEnum == ValueTypeEnum.OBJECT) {
|
} else if (valueTypeEnum == ValueTypeEnum.OBJECT) {
|
||||||
|
|
|
||||||
|
|
@ -217,6 +217,38 @@ public class SIAccountController {
|
||||||
return new ResponseResult<AccountParam, String>(user).run(getService(user)::save, param);
|
return new ResponseResult<AccountParam, String>(user).run(getService(user)::save, param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/batSave")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public String batSave(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody AccountBatParam param) {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
return new ResponseResult<AccountBatParam, String>(user).run(getService(user)::batSave, param);
|
||||||
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/batDelete")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public String batDelete(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody AccountBatParam param) {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
return new ResponseResult<AccountBatParam, String>(user).run(getService(user)::batDelete, param);
|
||||||
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/batFile")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public String batFile(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody AccountBatParam param) {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
return new ResponseResult<AccountBatParam, String>(user).run(getService(user)::batFile, param);
|
||||||
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/batSocialSecurityBenefitsRecalculate")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public String batSocialSecurityBenefitsRecalculate(@Context HttpServletRequest request, @Context HttpServletResponse response,@RequestBody AccountBatParam batParam ){
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
return new ResponseResult<AccountBatParam, String>(user).run(getService(user)::batSocialSecurityBenefitsRecalculate,batParam);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 正常缴纳页核算
|
* 正常缴纳页核算
|
||||||
|
|
|
||||||
|
|
@ -112,8 +112,14 @@ public class SIExportController {
|
||||||
@Path("/common/export")
|
@Path("/common/export")
|
||||||
@Produces(MediaType.APPLICATION_OCTET_STREAM)
|
@Produces(MediaType.APPLICATION_OCTET_STREAM)
|
||||||
public Response exportAccount(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
public Response exportAccount(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
||||||
@QueryParam("billMonth") String billMonth,@QueryParam("paymentOrganization") String paymentOrganization) {
|
@QueryParam("billMonth") String billMonth,@QueryParam("paymentOrganization") String paymentOrganization,@QueryParam("departmentIds") String departmentIds,@QueryParam("subCompanyIds") String subCompanyIds,@QueryParam("workcode") String workcode) {
|
||||||
InsuranceExportParam param = InsuranceExportParam.builder().billMonth(billMonth).paymentOrganization(paymentOrganization).build();
|
InsuranceExportParam param = InsuranceExportParam.builder().billMonth(billMonth).paymentOrganization(paymentOrganization).workcode(workcode).build();
|
||||||
|
if(StringUtils.isNotBlank(departmentIds)){
|
||||||
|
param.setDepartmentIds(Arrays.stream(departmentIds.split(",")).map(Long::parseLong).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
|
if(StringUtils.isNotBlank(subCompanyIds)){
|
||||||
|
param.setSubCompanyIds(Arrays.stream(subCompanyIds.split(",")).map(Long::parseLong).collect(Collectors.toList()));
|
||||||
|
}
|
||||||
User user = HrmUserVarify.getUser(request, response);
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
XSSFWorkbook workbook = getSIExportWrapper(user).exportAccount(PaymentStatusEnum.COMMON.getValue(),param);
|
XSSFWorkbook workbook = getSIExportWrapper(user).exportAccount(PaymentStatusEnum.COMMON.getValue(),param);
|
||||||
String time = LocalDate.now().toString();
|
String time = LocalDate.now().toString();
|
||||||
|
|
|
||||||
|
|
@ -141,6 +141,43 @@ public class SalaryAcctController {
|
||||||
return new ResponseResult<Long, Long>(user).run(getSalaryAcctRecordWrapper(user)::reCalculate, param.getSalaryAcctRecordId());
|
return new ResponseResult<Long, Long>(user).run(getSalaryAcctRecordWrapper(user)::reCalculate, param.getSalaryAcctRecordId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//薪资核算
|
||||||
|
@POST
|
||||||
|
@Path("/batAccounting")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public String batAccounting(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryAcctBatParam param) {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
return new ResponseResult<SalaryAcctBatParam, String>(user).run(getSalaryAcctRecordWrapper(user)::batCalculate, param);
|
||||||
|
}
|
||||||
|
|
||||||
|
//保存薪资核算的基本信息
|
||||||
|
@POST
|
||||||
|
@Path("/basic/batSave")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public String batSave(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryAcctBatParam param) {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
return new ResponseResult<SalaryAcctBatParam, Long>(user).run(getSalaryAcctRecordWrapper(user)::batSave, param);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//归档薪资核算记录
|
||||||
|
@POST
|
||||||
|
@Path("/batFile")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public String batFile(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryAcctBatParam param) {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
return new ResponseResult<SalaryAcctBatParam, Long>(user).run(getSalaryAcctRecordWrapper(user)::batFile, param);
|
||||||
|
}
|
||||||
|
|
||||||
|
//重新核算
|
||||||
|
@POST
|
||||||
|
@Path("/batReAccounting")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public String batReAccounting(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryAcctBatParam param) {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
return new ResponseResult<SalaryAcctBatParam, Long>(user).run(getSalaryAcctRecordWrapper(user)::batReCalculate, param);
|
||||||
|
}
|
||||||
|
|
||||||
//判断是否存在合并计税
|
//判断是否存在合并计税
|
||||||
@GET
|
@GET
|
||||||
@Path("/hasConsolidatedTax")
|
@Path("/hasConsolidatedTax")
|
||||||
|
|
|
||||||
|
|
@ -480,6 +480,29 @@ public class SalaryBillController {
|
||||||
return new ResponseResult<SalarySendWithdrawParam, Map<String, Object>>(user).run(getSalarySendWrapper(user)::withdraw, queryParam);
|
return new ResponseResult<SalarySendWithdrawParam, Map<String, Object>>(user).run(getSalarySendWrapper(user)::withdraw, queryParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/send/batGrant")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public String batGrant(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalarySendBatParam queryParam) {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
return new ResponseResult<SalarySendBatParam, String>(user).run(getSalarySendWrapper(user)::batGrant, queryParam);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工资单撤回
|
||||||
|
*
|
||||||
|
* @param queryParam
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@POST
|
||||||
|
@Path("/send/batWithdraw")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public String batWithdraw(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalarySendBatParam queryParam) {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
return new ResponseResult<SalarySendBatParam, String>(user).run(getSalarySendWrapper(user)::batWithdraw, queryParam);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工资单发放详情列表的高级搜索
|
* 工资单发放详情列表的高级搜索
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import com.engine.common.util.ServiceUtil;
|
||||||
import com.engine.salary.entity.taxdeclaration.dto.TaxDeclarationFormDTO;
|
import com.engine.salary.entity.taxdeclaration.dto.TaxDeclarationFormDTO;
|
||||||
import com.engine.salary.entity.taxdeclaration.dto.TaxDeclarationInfoDTO;
|
import com.engine.salary.entity.taxdeclaration.dto.TaxDeclarationInfoDTO;
|
||||||
import com.engine.salary.entity.taxdeclaration.dto.TaxDeclarationListDTO;
|
import com.engine.salary.entity.taxdeclaration.dto.TaxDeclarationListDTO;
|
||||||
|
import com.engine.salary.entity.taxdeclaration.param.TaxDeclarationBatParam;
|
||||||
import com.engine.salary.entity.taxdeclaration.param.TaxDeclarationDetailListQueryParam;
|
import com.engine.salary.entity.taxdeclaration.param.TaxDeclarationDetailListQueryParam;
|
||||||
import com.engine.salary.entity.taxdeclaration.param.TaxDeclarationListQueryParam;
|
import com.engine.salary.entity.taxdeclaration.param.TaxDeclarationListQueryParam;
|
||||||
import com.engine.salary.entity.taxdeclaration.param.TaxDeclarationSaveParam;
|
import com.engine.salary.entity.taxdeclaration.param.TaxDeclarationSaveParam;
|
||||||
|
|
@ -31,7 +32,6 @@ import javax.ws.rs.core.Response;
|
||||||
import javax.ws.rs.core.StreamingOutput;
|
import javax.ws.rs.core.StreamingOutput;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.text.ParseException;
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -58,10 +58,8 @@ public class TaxDeclarationController {
|
||||||
@POST
|
@POST
|
||||||
@Path("/list")
|
@Path("/list")
|
||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
public String list(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody TaxDeclarationListQueryParam queryParam) throws ParseException {
|
public String list(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody TaxDeclarationListQueryParam queryParam){
|
||||||
User user = HrmUserVarify.getUser(request, response);
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
queryParam.setFromSalaryMonth(SalaryDateUtil.String2YearMonth(queryParam.getFromSalaryMonthStr() == null ? "" : queryParam.getFromSalaryMonthStr()));
|
|
||||||
queryParam.setEndSalaryMonth(SalaryDateUtil.String2YearMonth(queryParam.getEndSalaryMonthStr() == null ? "" : queryParam.getEndSalaryMonthStr()));
|
|
||||||
return new ResponseResult<TaxDeclarationListQueryParam, PageInfo<TaxDeclarationListDTO>>(user).run(getTaxDeclarationWrapper(user)::listPage, queryParam);
|
return new ResponseResult<TaxDeclarationListQueryParam, PageInfo<TaxDeclarationListDTO>>(user).run(getTaxDeclarationWrapper(user)::listPage, queryParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -102,6 +100,15 @@ public class TaxDeclarationController {
|
||||||
return new ResponseResult<TaxDeclarationSaveParam, Long>(user).run(getTaxDeclarationWrapper(user)::save, param);
|
return new ResponseResult<TaxDeclarationSaveParam, Long>(user).run(getTaxDeclarationWrapper(user)::save, param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Path("/batSave")
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
public String batSave(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody TaxDeclarationBatParam param) {
|
||||||
|
User user = HrmUserVarify.getUser(request, response);
|
||||||
|
param.setSalaryMonth(SalaryDateUtil.String2YearMonth(param.getSalaryMonthStr()));
|
||||||
|
return new ResponseResult<TaxDeclarationBatParam, Long>(user).run(getTaxDeclarationWrapper(user)::batSave, param);
|
||||||
|
}
|
||||||
|
|
||||||
//个税申报表详情列表
|
//个税申报表详情列表
|
||||||
@POST
|
@POST
|
||||||
@Path("/detail/list")
|
@Path("/detail/list")
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ public class AttendQuoteDataWrapper extends Service {
|
||||||
attendQuoteFields.stream()
|
attendQuoteFields.stream()
|
||||||
.filter(attendQuoteField->effectiveColumns.contains(Util.null2String(attendQuoteField.getId())))
|
.filter(attendQuoteField->effectiveColumns.contains(Util.null2String(attendQuoteField.getId())))
|
||||||
.forEach(attendQuoteField -> {
|
.forEach(attendQuoteField -> {
|
||||||
columns.add(Column.builder().title(attendQuoteField.getFieldName())
|
columns.add(Column.builder().title(Util.formatMultiLang(attendQuoteField.getFieldName(), String.valueOf(user.getLanguage())))
|
||||||
.dataIndex(attendQuoteField.getId() + "_attendQuoteData")
|
.dataIndex(attendQuoteField.getId() + "_attendQuoteData")
|
||||||
.key(attendQuoteField.getId() + "_attendQuoteData").display(Boolean.TRUE).build());
|
.key(attendQuoteField.getId() + "_attendQuoteData").display(Boolean.TRUE).build());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,12 +10,13 @@ import com.engine.salary.entity.salaryacct.bo.SalaryAcctRecordBO;
|
||||||
import com.engine.salary.entity.salaryacct.dto.SalaryAcctEmployeeCountDTO;
|
import com.engine.salary.entity.salaryacct.dto.SalaryAcctEmployeeCountDTO;
|
||||||
import com.engine.salary.entity.salaryacct.dto.SalaryAcctRecordFormDTO;
|
import com.engine.salary.entity.salaryacct.dto.SalaryAcctRecordFormDTO;
|
||||||
import com.engine.salary.entity.salaryacct.dto.SalaryAcctRecordListDTO;
|
import com.engine.salary.entity.salaryacct.dto.SalaryAcctRecordListDTO;
|
||||||
|
import com.engine.salary.entity.salaryacct.param.SalaryAcctBatParam;
|
||||||
|
import com.engine.salary.entity.salaryacct.param.SalaryAcctCalculateParam;
|
||||||
import com.engine.salary.entity.salaryacct.param.SalaryAcctRecordQueryParam;
|
import com.engine.salary.entity.salaryacct.param.SalaryAcctRecordQueryParam;
|
||||||
import com.engine.salary.entity.salaryacct.param.SalaryAcctRecordSaveParam;
|
import com.engine.salary.entity.salaryacct.param.SalaryAcctRecordSaveParam;
|
||||||
import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO;
|
import com.engine.salary.entity.salaryacct.po.SalaryAcctRecordPO;
|
||||||
import com.engine.salary.entity.salaryacct.po.SalaryAcctSobConfigPO;
|
import com.engine.salary.entity.salaryacct.po.SalaryAcctSobConfigPO;
|
||||||
import com.engine.salary.entity.salarysob.dto.SalarySobCycleDTO;
|
import com.engine.salary.entity.salarysob.dto.SalarySobCycleDTO;
|
||||||
import com.engine.salary.entity.salarysob.po.SalaryApprovalRulePO;
|
|
||||||
import com.engine.salary.entity.salarysob.po.*;
|
import com.engine.salary.entity.salarysob.po.*;
|
||||||
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
||||||
import com.engine.salary.enums.salaryaccounting.SalaryAcctRecordStatusEnum;
|
import com.engine.salary.enums.salaryaccounting.SalaryAcctRecordStatusEnum;
|
||||||
|
|
@ -55,6 +56,9 @@ public class SalaryAcctRecordWrapper extends Service implements SalaryAcctRecord
|
||||||
private SalaryAcctRecordService getSalaryAcctRecordService(User user) {
|
private SalaryAcctRecordService getSalaryAcctRecordService(User user) {
|
||||||
return ServiceUtil.getService(SalaryAcctRecordServiceImpl.class, user);
|
return ServiceUtil.getService(SalaryAcctRecordServiceImpl.class, user);
|
||||||
}
|
}
|
||||||
|
private SalaryAcctResultWrapper getSalaryAcctResultWrapper(User user) {
|
||||||
|
return ServiceUtil.getService(SalaryAcctResultWrapper.class, user);
|
||||||
|
}
|
||||||
|
|
||||||
private SalarySobService getSalarySobService(User user) {
|
private SalarySobService getSalarySobService(User user) {
|
||||||
return ServiceUtil.getService(SalarySobServiceImpl.class, user);
|
return ServiceUtil.getService(SalarySobServiceImpl.class, user);
|
||||||
|
|
@ -380,4 +384,28 @@ public class SalaryAcctRecordWrapper extends Service implements SalaryAcctRecord
|
||||||
public void updateSobConfig(Long id) {
|
public void updateSobConfig(Long id) {
|
||||||
getSalaryAcctSobConfigService(user).updateBySalaryAcctRecordId(id);
|
getSalaryAcctSobConfigService(user).updateBySalaryAcctRecordId(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void batSave(SalaryAcctBatParam param) {
|
||||||
|
getSalaryAcctRecordService(user).batSave(param);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void batFile(SalaryAcctBatParam param) {
|
||||||
|
getSalaryAcctRecordService(user).batFile(param);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void batReCalculate(SalaryAcctBatParam param) {
|
||||||
|
getSalaryAcctRecordService(user).batReCalculate(param);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void batCalculate(SalaryAcctBatParam param) {
|
||||||
|
List<Long> salaryAcctRecordIds = param.getSalaryAcctRecordIds();
|
||||||
|
for (int i = 0; i < salaryAcctRecordIds.size(); i++) {
|
||||||
|
Long recordId = salaryAcctRecordIds.get(i);
|
||||||
|
SalaryAcctCalculateParam calculateParam = SalaryAcctCalculateParam.builder().salaryAcctRecordId(recordId).build();
|
||||||
|
getSalaryAcctResultWrapper(user).calculate(calculateParam);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -534,9 +534,6 @@ public class SalaryArchiveWrapper extends Service {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, Object> selectSalaryArchiveColumns(String importType) {
|
|
||||||
return getSalaryArchiveService(user).selectSalaryArchiveColumns(SalaryArchiveImportTypeEnum.parseByValue(importType));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public Map<String, Object> checkSalaryArchiveInit(SalaryArchiveImportActionParam importData) {
|
public Map<String, Object> checkSalaryArchiveInit(SalaryArchiveImportActionParam importData) {
|
||||||
|
|
|
||||||
|
|
@ -117,9 +117,9 @@ public class SalarySendWrapper extends Service implements SalarySendWrapperProxy
|
||||||
|
|
||||||
list.forEach(dto -> {
|
list.forEach(dto -> {
|
||||||
// 回算过,但是查看的是普通工资单(不能查看详情);回算过,但是查看的是回算工资单(可以发);记录没回算过(可以发)
|
// 回算过,但是查看的是普通工资单(不能查看详情);回算过,但是查看的是回算工资单(可以发);记录没回算过(可以发)
|
||||||
if(Objects.equals(dto.getSalaryAcctRecordType(), NumberUtils.INTEGER_ONE) && Objects.equals(dto.getSalaryAcctType(),NumberUtils.INTEGER_ZERO)){
|
if (Objects.equals(dto.getSalaryAcctRecordType(), NumberUtils.INTEGER_ONE) && Objects.equals(dto.getSalaryAcctType(), NumberUtils.INTEGER_ZERO)) {
|
||||||
dto.setCanSeeDetail(false);
|
dto.setCanSeeDetail(false);
|
||||||
}else{
|
} else {
|
||||||
dto.setCanSeeDetail(true);
|
dto.setCanSeeDetail(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -142,7 +142,7 @@ public class SalarySendWrapper extends Service implements SalarySendWrapperProxy
|
||||||
e.setTemplate(NumberUtils.INTEGER_ONE.equals(e.getSalaryAcctType()) ? salaryTemplatePO.getReplenishName() : salaryTemplatePO.getName());
|
e.setTemplate(NumberUtils.INTEGER_ONE.equals(e.getSalaryAcctType()) ? salaryTemplatePO.getReplenishName() : salaryTemplatePO.getName());
|
||||||
e.setTemplateId(salaryTemplatePO.getId());
|
e.setTemplateId(salaryTemplatePO.getId());
|
||||||
if ((salaryTemplatePO.getAckFeedbackStatus() != null && salaryTemplatePO.getAckFeedbackStatus() == 1) ||
|
if ((salaryTemplatePO.getAckFeedbackStatus() != null && salaryTemplatePO.getAckFeedbackStatus() == 1) ||
|
||||||
(salaryTemplatePO.getFeedbackStatus() != null && salaryTemplatePO.getFeedbackStatus() == 1) ) {
|
(salaryTemplatePO.getFeedbackStatus() != null && salaryTemplatePO.getFeedbackStatus() == 1)) {
|
||||||
e.setAckFeedbackStatus(1);
|
e.setAckFeedbackStatus(1);
|
||||||
} else {
|
} else {
|
||||||
e.setAckFeedbackStatus(0);
|
e.setAckFeedbackStatus(0);
|
||||||
|
|
@ -688,6 +688,7 @@ public class SalarySendWrapper extends Service implements SalarySendWrapperProxy
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发送短信验证码
|
* 发送短信验证码
|
||||||
|
*
|
||||||
* @param param 短信验证码发送参数
|
* @param param 短信验证码发送参数
|
||||||
*/
|
*/
|
||||||
public void sendMobileCode(SMSCodeSendParam param) {
|
public void sendMobileCode(SMSCodeSendParam param) {
|
||||||
|
|
@ -696,6 +697,7 @@ public class SalarySendWrapper extends Service implements SalarySendWrapperProxy
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验短信验证码
|
* 校验短信验证码
|
||||||
|
*
|
||||||
* @param param
|
* @param param
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -706,7 +708,7 @@ public class SalarySendWrapper extends Service implements SalarySendWrapperProxy
|
||||||
public PayrollCheckTypeEnum payrollCheckType() {
|
public PayrollCheckTypeEnum payrollCheckType() {
|
||||||
SalarySysConfPO conf = getSalarySysConfService(user).getOneByCode(SalarySysConstant.SALARY_PAYROLL_CHECK_TYPE);
|
SalarySysConfPO conf = getSalarySysConfService(user).getOneByCode(SalarySysConstant.SALARY_PAYROLL_CHECK_TYPE);
|
||||||
|
|
||||||
if(conf == null){
|
if (conf == null) {
|
||||||
return PayrollCheckTypeEnum.PWD;
|
return PayrollCheckTypeEnum.PWD;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -714,14 +716,14 @@ public class SalarySendWrapper extends Service implements SalarySendWrapperProxy
|
||||||
}
|
}
|
||||||
|
|
||||||
public void confirmSalaryBill(Long salaryInfoId) {
|
public void confirmSalaryBill(Long salaryInfoId) {
|
||||||
if(ObjectUtil.isNull(salaryInfoId)){
|
if (ObjectUtil.isNull(salaryInfoId)) {
|
||||||
throw new SalaryRunTimeException("工资单id不能为空!");
|
throw new SalaryRunTimeException("工资单id不能为空!");
|
||||||
}
|
}
|
||||||
getSalaryBillService(user).confirmSalaryBill(salaryInfoId);
|
getSalaryBillService(user).confirmSalaryBill(salaryInfoId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void feedBackSalaryBill(Long salaryInfoId) {
|
public void feedBackSalaryBill(Long salaryInfoId) {
|
||||||
if(ObjectUtil.isNull(salaryInfoId)){
|
if (ObjectUtil.isNull(salaryInfoId)) {
|
||||||
throw new SalaryRunTimeException("工资单id不能为空!");
|
throw new SalaryRunTimeException("工资单id不能为空!");
|
||||||
}
|
}
|
||||||
getSalaryBillService(user).feedBackSalaryBill(salaryInfoId);
|
getSalaryBillService(user).feedBackSalaryBill(salaryInfoId);
|
||||||
|
|
@ -738,4 +740,50 @@ public class SalarySendWrapper extends Service implements SalarySendWrapperProxy
|
||||||
public String genPdfBeforeExport(SalaryExportPdfParam salaryExportPdfParam) {
|
public String genPdfBeforeExport(SalaryExportPdfParam salaryExportPdfParam) {
|
||||||
return getSalaryBillService(user).genPdfBeforeExport(salaryExportPdfParam);
|
return getSalaryBillService(user).genPdfBeforeExport(salaryExportPdfParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String batGrant(SalarySendBatParam param) {
|
||||||
|
List<Long> salarySendIds = param.getSalarySendIds();
|
||||||
|
|
||||||
|
int successCount = 0;
|
||||||
|
int failCount = 0;
|
||||||
|
String failMsg = "";
|
||||||
|
for (int i = 0; i < salarySendIds.size(); i++) {
|
||||||
|
try {
|
||||||
|
Long sendId = salarySendIds.get(i);
|
||||||
|
SalarySendGrantParam grantParam = SalarySendGrantParam.builder()
|
||||||
|
.salarySendId(sendId)
|
||||||
|
.build();
|
||||||
|
grant(grantParam);
|
||||||
|
successCount++;
|
||||||
|
} catch (Exception e) {
|
||||||
|
failCount++;
|
||||||
|
failMsg = failMsg + "第" + (i + 1) + "个发放失败!失败原因:" + e.getMessage() + "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return String.format("成功:" + successCount + "个,失败:" + failCount + "个%s", failCount == 0 ? "" : ",失败原因:" + failMsg);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String batWithdraw(SalarySendBatParam param) {
|
||||||
|
List<Long> salarySendIds = param.getSalarySendIds();
|
||||||
|
|
||||||
|
int successCount = 0;
|
||||||
|
int failCount = 0;
|
||||||
|
String failMsg = "";
|
||||||
|
for (int i = 0; i < salarySendIds.size(); i++) {
|
||||||
|
try {
|
||||||
|
Long sendId = salarySendIds.get(i);
|
||||||
|
SalarySendWithdrawParam grantParam = SalarySendWithdrawParam.builder()
|
||||||
|
.salarySendId(sendId)
|
||||||
|
.build();
|
||||||
|
withdraw(grantParam);
|
||||||
|
} catch (Exception e) {
|
||||||
|
failCount++;
|
||||||
|
failMsg = failMsg + "第" + (i + 1) + "个撤回失败!失败原因:" + e.getMessage() + "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return String.format("成功:" + successCount + "个,失败:" + failCount + "个%s", failCount == 0 ? "" : ",失败原因:" + failMsg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,10 @@ public class SalarySobRangeWrapper extends Service {
|
||||||
.replace("between", "between")
|
.replace("between", "between")
|
||||||
.replace("BETWEEN", "BETWEEN")
|
.replace("BETWEEN", "BETWEEN")
|
||||||
.replace("union", "union")
|
.replace("union", "union")
|
||||||
.replace("UNION", "UNION"));
|
.replace("UNION", "UNION")
|
||||||
|
.replace("substr", "substr")
|
||||||
|
.replace("SUBSTR", "SUBSTR")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -127,7 +130,10 @@ public class SalarySobRangeWrapper extends Service {
|
||||||
.replace("between", "between")
|
.replace("between", "between")
|
||||||
.replace("BETWEEN", "BETWEEN")
|
.replace("BETWEEN", "BETWEEN")
|
||||||
.replace("union", "union")
|
.replace("union", "union")
|
||||||
.replace("UNION", "UNION"));
|
.replace("UNION", "UNION")
|
||||||
|
.replace("substr", "substr")
|
||||||
|
.replace("SUBSTR", "SUBSTR")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -352,7 +352,10 @@ public class TaxAgentWrapper extends Service {
|
||||||
.replace("between", "between")
|
.replace("between", "between")
|
||||||
.replace("BETWEEN", "BETWEEN")
|
.replace("BETWEEN", "BETWEEN")
|
||||||
.replace("union", "union")
|
.replace("union", "union")
|
||||||
.replace("UNION", "UNION"));
|
.replace("UNION", "UNION")
|
||||||
|
.replace("substr", "substr")
|
||||||
|
.replace("SUBSTR", "SUBSTR")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -386,7 +389,10 @@ public class TaxAgentWrapper extends Service {
|
||||||
.replace("between", "between")
|
.replace("between", "between")
|
||||||
.replace("BETWEEN", "BETWEEN")
|
.replace("BETWEEN", "BETWEEN")
|
||||||
.replace("union", "union")
|
.replace("union", "union")
|
||||||
.replace("UNION", "UNION"));
|
.replace("UNION", "UNION")
|
||||||
|
.replace("substr", "substr")
|
||||||
|
.replace("SUBSTR", "SUBSTR")
|
||||||
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue