Compare commits
52 Commits
6300f098e5
...
72188c2c48
| Author | SHA1 | Date |
|---|---|---|
|
|
72188c2c48 | |
|
|
9b68321962 | |
|
|
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 |
|
|
@ -1,5 +1,5 @@
|
|||
log=false
|
||||
defaultCloseNonStandard149=true
|
||||
AESEncryptScrect=990EB004A1C862721C1513AE90038C9E
|
||||
version=3.0.2.2510.01
|
||||
version=3.0.3.2510.01.s
|
||||
openFormulaForcedEditing=false
|
||||
|
|
@ -1,41 +1,42 @@
|
|||
CREATE TABLE hrsa_hrm_snapshot (
|
||||
ID bigint(0) NOT NULL,
|
||||
CREATE TABLE hrsa_hrm_snapshot
|
||||
(
|
||||
ID bigint NOT NULL,
|
||||
snapshot_time timestamp,
|
||||
employee_id bigint(0),
|
||||
employee_id bigint,
|
||||
loginid varchar(100),
|
||||
LASTNAME varchar(60),
|
||||
SEX char(1),
|
||||
BIRTHDAY char(10) ,
|
||||
NATIONALITY int(0) ,
|
||||
NATIONALITY int ,
|
||||
MARITALSTATUS char(1) ,
|
||||
TELEPHONE varchar(60),
|
||||
MOBILE varchar(60) ,
|
||||
MOBILECALL varchar(60) ,
|
||||
EMAIL varchar(60),
|
||||
LOCATIONID int(0),
|
||||
LOCATIONID int,
|
||||
WORKROOM varchar(60),
|
||||
HOMEADDRESS varchar(100),
|
||||
RESOURCETYPE char(1) ,
|
||||
STARTDATE char(10) ,
|
||||
ENDDATE char(10),
|
||||
JOBTITLE int(0) ,
|
||||
JOBTITLE int ,
|
||||
JOBTITLENAME varchar(200) ,
|
||||
JOBACTIVITYDESC varchar(200),
|
||||
JOBLEVEL int(0) ,
|
||||
SECLEVEL int(0) ,
|
||||
DEPARTMENTID int(0) ,
|
||||
JOBLEVEL int ,
|
||||
SECLEVEL int ,
|
||||
DEPARTMENTID int ,
|
||||
DEPARTMENTNAME varchar(200) ,
|
||||
SUBCOMPANYID1 int(0) ,
|
||||
SUBCOMPANYID1 int ,
|
||||
SUBCOMPANYNAME varchar(200) ,
|
||||
COSTCENTERID int(0) ,
|
||||
MANAGERID int(0) ,
|
||||
ASSISTANTID int(0),
|
||||
BANKID1 int(0) ,
|
||||
COSTCENTERID int ,
|
||||
MANAGERID int ,
|
||||
ASSISTANTID int,
|
||||
BANKID1 int ,
|
||||
ACCOUNTID1 varchar(100) ,
|
||||
LASTLOGINDATE char(10) ,
|
||||
CERTIFICATENUM varchar(60) ,
|
||||
NATIVEPLACE varchar(100) ,
|
||||
EDUCATIONLEVEL int(0) ,
|
||||
EDUCATIONLEVEL int ,
|
||||
BEMEMBERDATE char(10) ,
|
||||
BEPARTYDATE char(10) ,
|
||||
WORKCODE varchar(60) ,
|
||||
|
|
@ -44,8 +45,8 @@ CREATE TABLE hrsa_hrm_snapshot (
|
|||
RESIDENTPLACE varchar(200) ,
|
||||
POLICY varchar(30) ,
|
||||
DEGREE varchar(30) ,
|
||||
USEKIND int(0) ,
|
||||
JOBCALL int(0) ,
|
||||
USEKIND int ,
|
||||
JOBCALL int ,
|
||||
jobcallname varchar(200) ,
|
||||
ACCUMFUNDACCOUNT varchar(30),
|
||||
BIRTHPLACE varchar(60) ,
|
||||
|
|
@ -54,14 +55,14 @@ CREATE TABLE hrsa_hrm_snapshot (
|
|||
RESIDENTPOSTCODE varchar(60) ,
|
||||
EXTPHONE varchar(50) ,
|
||||
MANAGERSTR varchar(500),
|
||||
STATUS int(0) ,
|
||||
STATUS int ,
|
||||
FAX varchar(60) ,
|
||||
ISLABOUUNION char(1),
|
||||
TEMPRESIDENTNUMBER varchar(60),
|
||||
PROBATIONENDDATE char(10),
|
||||
COUNTRYID int(0) ,
|
||||
ACCOUNTTYPE int(0) ,
|
||||
BELONGTO int(0) ,
|
||||
COUNTRYID int ,
|
||||
ACCOUNTTYPE int ,
|
||||
BELONGTO int ,
|
||||
ACCOUNTNAME varchar(200) ,
|
||||
companystartdate 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')
|
||||
|
|
@ -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_social_archives set delete_type=3 WHERE employee_id = ? and payment_organization =?
|
||||
update hrsa_fund_archives set delete_type=3 WHERE employee_id = ? and payment_organization =?
|
||||
update hrsa_other_archives 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 delete_type=0 and 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 delete_type=0 and employee_id = ? and payment_organization =?
|
||||
|
||||
-- 删除薪资档案
|
||||
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_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
|
||||
where tax_agent_id =扣缴义务人id
|
||||
and delete_type = 0
|
||||
|
|
@ -6,5 +8,14 @@ and employee_id not in
|
|||
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)
|
||||
|
||||
|
||||
|
||||
## 考勤引用
|
||||
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<>();
|
||||
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");
|
||||
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@ public class CheckEditSalaryAction implements Action {
|
|||
List<Map<String, Object>> importData = new ArrayList<>();
|
||||
importData.add(SalaryEntityUtil.convert2Map(list, SalaryField::getSalaryName, SalaryField::getValue));
|
||||
|
||||
log.info("CheckEditSalaryAction,tableName :{},workflowid:{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importData);
|
||||
SalaryArchiveImportActionParam build = SalaryArchiveImportActionParam.builder()
|
||||
.importDatas(importData)
|
||||
.build();
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ public class CheckInitSalaryAction implements Action {
|
|||
list.add(new SalaryField(processField, salaryName, value));
|
||||
}
|
||||
Map<String, Object> importDataMap = SalaryEntityUtil.convert2Map(list, SalaryField::getSalaryName, SalaryField::getValue);
|
||||
|
||||
log.info("CheckInitSalaryAction,tableName :{},workflowid:{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importDataMap);
|
||||
return doSalaryArchiveInit(requestInfo, importDataMap);
|
||||
} catch (Exception 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);
|
||||
log.info("CheckStayAddToPaySIArchiveAction,tableName :{},workflowid:{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importDataMap);
|
||||
String taxAgentName = importDataMap.getOrDefault("个税扣缴义务人", "").toString();
|
||||
List<TaxAgentPO> taxAgentPOS = getTaxAgentMapper().listByName(taxAgentName);
|
||||
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);
|
||||
log.info("CheckStayDelToStopSIArchiveAction,tableName :{},workflowid:{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importDataMap);
|
||||
String taxAgentName = importDataMap.getOrDefault("个税扣缴义务人", "").toString();
|
||||
List<TaxAgentPO> taxAgentPOS = getTaxAgentMapper().listByName(taxAgentName);
|
||||
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);
|
||||
log.info("CheckStopSalaryAction,tableName :{},workflowid:{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importDataMap);
|
||||
String taxAgentName = importDataMap.getOrDefault("个税扣缴义务人", "").toString();
|
||||
List<TaxAgentPO> taxAgentPOS = getTaxAgentMapper().listByName(taxAgentName);
|
||||
if(CollectionUtils.isEmpty(taxAgentPOS)){
|
||||
|
|
|
|||
|
|
@ -88,6 +88,7 @@ public class CopyToPaySIArchiveAction implements Action {
|
|||
}
|
||||
List<Map<String, Object>> importData = new ArrayList<>();
|
||||
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");
|
||||
//增员
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@ public class EditSIArchiveAction implements Action {
|
|||
}
|
||||
List<Map<String, Object>> importData = new ArrayList<>();
|
||||
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");
|
||||
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ public class EditSalaryAction implements Action {
|
|||
}
|
||||
List<Map<String, Object>> importData = new ArrayList<>();
|
||||
importData.add(SalaryEntityUtil.convert2Map(list, SalaryField::getSalaryName, SalaryField::getValue));
|
||||
|
||||
log.info("EditSalaryAction,tableName :{},workflowid:{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importData);
|
||||
SalaryArchiveImportActionParam build = SalaryArchiveImportActionParam.builder()
|
||||
.importDatas(importData)
|
||||
.build();
|
||||
|
|
|
|||
|
|
@ -97,6 +97,7 @@ public class EditToPaySIArchiveAction implements Action {
|
|||
}
|
||||
List<Map<String, Object>> importData = new ArrayList<>();
|
||||
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();
|
||||
|
||||
|
|
|
|||
|
|
@ -97,6 +97,7 @@ public class EditToStopSIArchiveAction implements Action {
|
|||
}
|
||||
List<Map<String, Object>> importData = new ArrayList<>();
|
||||
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();
|
||||
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ public class InitSalaryAction implements Action {
|
|||
}
|
||||
|
||||
Map<String, Object> importDataMap = SalaryEntityUtil.convert2Map(list, SalaryField::getSalaryName, SalaryField::getValue);
|
||||
|
||||
log.info("InitSalaryAction,tableName :{},workflowid:{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importDataMap);
|
||||
return doSalaryArchiveInit(requestInfo, importDataMap);
|
||||
} catch (Exception e) {
|
||||
log.error("定薪异常", e);
|
||||
|
|
|
|||
|
|
@ -108,6 +108,7 @@ public class RehireAction implements Action {
|
|||
list.add(new SalaryField(processField, salaryName, value));
|
||||
}
|
||||
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 empIdStr = salaryFieldMap.getOrDefault("员工id", "").toString();
|
||||
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);
|
||||
log.info("StayAddToPaySIArchiveAction,tableName :{},workflowid:{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importDataMap);
|
||||
String taxAgentName = importDataMap.getOrDefault("个税扣缴义务人", "").toString();
|
||||
List<TaxAgentPO> taxAgentPOS = getTaxAgentMapper().listByName(taxAgentName);
|
||||
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);
|
||||
log.info("StayDelToStopSIArchiveAction,tableName :{},workflowid:{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importDataMap);
|
||||
String taxAgentName = importDataMap.getOrDefault("个税扣缴义务人", "").toString();
|
||||
List<TaxAgentPO> taxAgentPOS = getTaxAgentMapper().listByName(taxAgentName);
|
||||
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);
|
||||
log.info("StopSalaryAction,tableName :{},workflowid:{},流程参数:{}",tableName, requestInfo.getWorkflowid(), importDataMap);
|
||||
//操作人
|
||||
String uid = importDataMap.getOrDefault("操作人","1").toString();
|
||||
User user = new User(Integer.parseInt(uid));
|
||||
|
|
|
|||
|
|
@ -117,6 +117,7 @@ public class UpdateSISchemeDetailAction implements Action {
|
|||
rs.beforFirst();
|
||||
// 流程数据
|
||||
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 schemeName = importDataMap.getOrDefault("福利方案名称", "").toString();
|
||||
|
|
|
|||
|
|
@ -45,4 +45,6 @@ public class InsuranceExportParam extends BaseQueryParam {
|
|||
private List<Long> taxAgents;
|
||||
|
||||
private String workcode;
|
||||
private List<Long> departmentIds;
|
||||
private List<Long> subCompanyIds;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -723,6 +723,7 @@ public class TaxDeclarationBO {
|
|||
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()
|
||||
.map(SalaryAcctResultPO::getResultValue)
|
||||
.filter(Objects::nonNull)
|
||||
.findFirst().orElse("");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
||||
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
|
||||
where e.status not in (7)
|
||||
<include refid="paramSql"/>
|
||||
|
||||
<!-- 排序 -->
|
||||
<if test="param.orderRule != null">
|
||||
|
|
@ -51,6 +52,7 @@
|
|||
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
||||
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
|
||||
where e.status not in (7)
|
||||
<include refid="paramSql"/>
|
||||
|
||||
<!-- 排序 -->
|
||||
<if test="param.orderRule != null">
|
||||
|
|
@ -79,6 +81,7 @@
|
|||
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
||||
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
|
||||
where e.status not in (7)
|
||||
<include refid="paramSql"/>
|
||||
|
||||
<!-- 排序 -->
|
||||
<if test="param.orderRule != null">
|
||||
|
|
@ -96,6 +99,7 @@
|
|||
LEFT JOIN hrmresource e ON e.ID = a.employee_id
|
||||
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
||||
where e.status not in (7)
|
||||
<include refid="paramSql"/>
|
||||
|
||||
</select>
|
||||
<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 hrmdepartment d ON d.id = e.departmentid
|
||||
where e.status not in (7)
|
||||
<include refid="paramSql"/>
|
||||
|
||||
</select>
|
||||
<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 hrmdepartment d ON d.id = e.departmentid
|
||||
where e.status not in (7)
|
||||
<include refid="paramSql"/>
|
||||
|
||||
</select>
|
||||
|
||||
|
|
@ -147,6 +153,7 @@
|
|||
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
||||
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
|
||||
where e.status not in (7)
|
||||
<include refid="paramSql"/>
|
||||
|
||||
<!-- 排序 -->
|
||||
<if test="param.orderRule != null">
|
||||
|
|
@ -176,6 +183,7 @@
|
|||
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
||||
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
|
||||
where e.status not in (7)
|
||||
<include refid="paramSql"/>
|
||||
|
||||
<!-- 排序 -->
|
||||
<if test="param.orderRule != null">
|
||||
|
|
@ -205,6 +213,7 @@
|
|||
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
|
||||
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
|
||||
where e.status not in (7)
|
||||
<include refid="paramSql"/>
|
||||
|
||||
<!-- 排序 -->
|
||||
<if test="param.orderRule != null">
|
||||
|
|
@ -233,6 +242,7 @@
|
|||
LEFT JOIN hrmdepartment d ON d.id = e.department_id
|
||||
LEFT JOIN hrmsubcompany c ON c.id = e.subcompany_id
|
||||
where e.status not in (7)
|
||||
<include refid="extParamSql"/>
|
||||
<!-- 排序 -->
|
||||
</select>
|
||||
<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 hrmsubcompany c ON c.id = e.subcompany_id
|
||||
where e.status not in (7)
|
||||
<include refid="extParamSql"/>
|
||||
<!-- 排序 -->
|
||||
</select>
|
||||
<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 hrmsubcompany c ON c.id = e.subcompany_id
|
||||
where e.status not in (7)
|
||||
<include refid="extParamSql"/>
|
||||
<!-- 排序 -->
|
||||
</select>
|
||||
|
||||
|
|
@ -293,6 +305,7 @@
|
|||
LEFT JOIN hrsa_external_employee e ON e.ID = a.employee_id
|
||||
LEFT JOIN hrmdepartment d ON d.id = e.department_id
|
||||
where e.status not in (7)
|
||||
<include refid="extParamSql"/>
|
||||
</select>
|
||||
<select id="exportExtExcelAccount" resultType="com.engine.salary.entity.siexport.po.ExcelAccountExportPO" databaseId="oracle">
|
||||
SELECT
|
||||
|
|
@ -305,6 +318,7 @@
|
|||
LEFT JOIN hrsa_external_employee e ON e.ID = a.employee_id
|
||||
LEFT JOIN hrmdepartment d ON d.id = e.department_id
|
||||
where e.status not in (7)
|
||||
<include refid="extParamSql"/>
|
||||
</select>
|
||||
<select id="exportExtExcelAccount" resultType="com.engine.salary.entity.siexport.po.ExcelAccountExportPO" databaseId="sqlserver">
|
||||
SELECT
|
||||
|
|
@ -317,5 +331,113 @@
|
|||
LEFT JOIN hrsa_external_employee e ON e.ID = a.employee_id
|
||||
LEFT JOIN hrmdepartment d ON d.id = e.department_id
|
||||
where e.status not in (7)
|
||||
<include refid="extParamSql"/>
|
||||
</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>
|
||||
|
|
|
|||
|
|
@ -620,9 +620,7 @@
|
|||
</trim>
|
||||
<trim prefix="pay_end_date =case" suffix="end,">
|
||||
<foreach collection="collection" item="item" index="index">
|
||||
<if test="item.payEndDate!=null">
|
||||
when id=#{item.id} then #{item.payEndDate}
|
||||
</if>
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="update_time =case" suffix="end,">
|
||||
|
|
@ -650,9 +648,7 @@
|
|||
<if test="item.payStartDate != null">
|
||||
pay_start_date=#{item.payStartDate},
|
||||
</if>
|
||||
<if test="item.payEndDate != null">
|
||||
pay_end_date=#{item.payEndDate},
|
||||
</if>
|
||||
</set>
|
||||
WHERE id = #{item.id} AND delete_type = 0
|
||||
|
||||
|
|
|
|||
|
|
@ -632,7 +632,7 @@
|
|||
<if test="param.startSalaryMonth != null">
|
||||
AND t1.salary_month >= #{param.startSalaryMonth}
|
||||
</if>
|
||||
ORDER BY t1.id DESC
|
||||
ORDER BY t1.salary_month DESC
|
||||
</select>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -377,7 +377,7 @@
|
|||
WHERE
|
||||
1=1
|
||||
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>
|
||||
<if test="param.orderRule != null">
|
||||
ORDER BY ${param.orderRule.orderRule} ${param.orderRule.ascOrDesc}
|
||||
|
|
|
|||
|
|
@ -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.salarysob.po.SalarySobPO;
|
||||
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.enums.UserStatusEnum;
|
||||
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.AuthServiceImpl;
|
||||
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.SalaryDateUtil;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
|
|
@ -49,6 +50,8 @@ import weaver.hrm.User;
|
|||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.engine.salary.sys.constant.SalarySysConstant.REPORT_ORGANIZATIN_TYPE;
|
||||
|
||||
/**
|
||||
* 薪酬统计员工明细
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
|
|
@ -103,6 +106,11 @@ public class SalaryStatisticsEmployeeServiceImpl extends Service implements Sala
|
|||
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
|
||||
public PageInfo<SalaryStatisticsEmployeeListDTO> listPage(SalaryStatisticsEmployeeQueryParam queryParam) {
|
||||
List<SalaryStatisticsEmployeeListDTO> list = Collections.emptyList();
|
||||
|
|
@ -262,13 +270,21 @@ public class SalaryStatisticsEmployeeServiceImpl extends Service implements Sala
|
|||
map.put("salarySob", SalarySobMap.get(se.getSalarySobId()));
|
||||
map.put("acctTimes", salaryAcctRecordMap.get(se.getSalaryAcctRecordId()));
|
||||
map.put("userName", Util.null2String(emp.getUsername()));
|
||||
map.put("workCode", Util.null2String(emp.getWorkcode()));
|
||||
map.put("idNo", Util.null2String(emp.getIdNo()));
|
||||
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));
|
||||
map.put("workCode", Util.null2String(emp.getWorkcode()));
|
||||
map.put("idNo", Util.null2String(emp.getIdNo()));
|
||||
map.put("companystartdate", Util.null2String(emp.getCompanystartdate()));
|
||||
}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()));
|
||||
// map.put("incomeCategory", Objects.isNull(incomeCategoryEnum) ? "" : SalaryI18nUtil.getI18nLabel(incomeCategoryEnum.getLabelId(), incomeCategoryEnum.getDefaultLabel()));
|
||||
|
|
|
|||
|
|
@ -525,7 +525,7 @@ public class SalaryStatisticsReportServiceImpl extends Service implements Salary
|
|||
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);
|
||||
|
||||
// 获取此分页的核算人员
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.engine.salary.service.auth;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.hrmelog.entity.dto.LoggerContext;
|
||||
|
|
@ -63,6 +64,12 @@ public class AuthRoleServiceImpl extends Service implements AuthRoleService {
|
|||
public PageInfo<AuthRoleDTO> roleList(AuthRoleListQueryParam 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();
|
||||
|
||||
List<AuthRoleDTO> list = SalaryPageUtil.subList(param.getCurrent(), param.getPageSize(), authRolePOS)
|
||||
|
|
|
|||
|
|
@ -519,7 +519,7 @@ public class AttendQuoteDataServiceImpl extends Service implements AttendQuoteDa
|
|||
List<Map<String, Object>> attendQuoteSyncData = new ArrayList<>();
|
||||
Attend4Salary attend4Salary = new Attend4Salary();
|
||||
try {
|
||||
int partSize = 500;
|
||||
int partSize = 100;
|
||||
List<List<Long>> partition = Lists.partition(employeeIds, partSize);
|
||||
for (List<Long> part : partition) {
|
||||
attend4Salary.setBeginDate(attendCycleRange.getFromDate());
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ public class AttendQuoteFieldSettingServiceImpl extends Service implements Atten
|
|||
@Override
|
||||
public List<AttendQuoteFieldSettingListDTO> list(AttendQuoteFieldSettingQueryParam queryParam) {
|
||||
//同步字段
|
||||
getAttendQuoteFieldService(user).syncAttendFields();
|
||||
// getAttendQuoteFieldService(user).syncAttendFields();
|
||||
// 获取字段设置
|
||||
List<AttendQuoteFieldSettingPO> list = biz.getAttendQuoteFieldSetting(queryParam.getSourceType());
|
||||
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ public class RecordsBuildServiceImpl extends Service implements RecordsBuildServ
|
|||
Map<Long, DataCollectionEmployee> collect = employeeByIds.stream().collect(Collectors.toMap(DataCollectionEmployee::getEmployeeId, Function.identity()));
|
||||
list.forEach(item -> {
|
||||
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("employeeId", item.getEmployeeId());
|
||||
record.put("billMonth", item.getBillMonth());
|
||||
|
|
|
|||
|
|
@ -1666,7 +1666,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
// Long taxAgentId = 0L;
|
||||
|
||||
List<InsuranceAccountDetailPO> list = new ArrayList<>();
|
||||
|
||||
String username = (String) map.getOrDefault("姓名", "");
|
||||
String billMonth = (String) map.getOrDefault("账单月份", "");
|
||||
String taxAgentName = (String) map.getOrDefault("个税扣缴义务人", "");
|
||||
String supplementaryMonth = (String) map.getOrDefault("补缴月份", "");
|
||||
|
|
@ -1770,11 +1770,11 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
//校验补缴人员是否存在福利档案基础信息,并且runStatus处于正在缴纳或者待减员
|
||||
InsuranceArchivesBaseInfoPO insuranceBaseInfo = getInsuranceBaseInfoMapper().getOneByEmployeeIdAndPayOrg(paymentOrganization, employeeId);
|
||||
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));
|
||||
if (!empIdsInPayMonthRange.contains(employeeId)) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(99920, "无核算人员"));
|
||||
throw new SalaryRunTimeException(username + SalaryI18nUtil.getI18nLabel(99920, "无核算人员"));
|
||||
}
|
||||
DataCollectionEmployee employee = getSalaryEmployeeService(user).getEmployeeById(employeeId);
|
||||
// 封装InsuranceAccountDetailPO
|
||||
|
|
|
|||
|
|
@ -387,11 +387,15 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
|
|||
&& (projects.contains(ProjectTypeEnum.MEDICAL_INSURANCE.getValue()))) {
|
||||
if (socialSchemePO != null && (StringUtils.isNotBlank(socialSchemePO.getSocialPaymentBaseString()) || StringUtils.isNotBlank(socialSchemePO.getSocialPaymentComBaseString()))) {
|
||||
Map<String, String> socialMap = JSON.parseObject(socialSchemePO.getSocialPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
if(socialMap!=null){
|
||||
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());
|
||||
if(socialComMap!=null){
|
||||
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<>();
|
||||
socialIds.addAll(socialMap == 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()))) {
|
||||
if (socialSchemePO != null && (StringUtils.isNotBlank(socialSchemePO.getSocialPaymentBaseString()) || StringUtils.isNotBlank(socialSchemePO.getSocialPaymentComBaseString()))) {
|
||||
Map<String, String> socialMap = JSON.parseObject(socialSchemePO.getSocialPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
if (socialMap != null) {
|
||||
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());
|
||||
if (socialComMap != null) {
|
||||
socialComMap = socialComMap.entrySet().stream().filter(e -> "9001".equals(e.getKey()))
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
||||
}
|
||||
List<String> socialIds = new ArrayList<>();
|
||||
socialIds.addAll(socialMap == null ? Collections.emptyList() : socialMap.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()))) {
|
||||
if (socialSchemePO != null && (StringUtils.isNotBlank(socialSchemePO.getSocialPaymentBaseString()) || StringUtils.isNotBlank(socialSchemePO.getSocialPaymentComBaseString()))) {
|
||||
Map<String, String> socialMap = JSON.parseObject(socialSchemePO.getSocialPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
if(socialMap!=null){
|
||||
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());
|
||||
if(socialComMap !=null){
|
||||
socialComMap = socialComMap.entrySet().stream().filter(e -> "9002".equals(e.getKey()))
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
||||
}
|
||||
List<String> socialIds = new ArrayList<>();
|
||||
socialIds.addAll(socialMap == null ? Collections.emptyList() : socialMap.keySet());
|
||||
socialIds.addAll(socialComMap == null ? Collections.emptyList() : socialComMap.keySet());
|
||||
|
|
|
|||
|
|
@ -2473,6 +2473,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
* @param employeeId
|
||||
*/
|
||||
public String update(InsuranceSchemeReqParam updateParam, long employeeId) {
|
||||
log.info("福利方案更新参数:{}", updateParam);
|
||||
//查询是否存在福利方案
|
||||
InsuranceSchemePO insuranceSchemePO = getById(updateParam.getInsuranceScheme().getId());
|
||||
if (Objects.isNull(insuranceSchemePO)) {
|
||||
|
|
@ -2506,6 +2507,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
//更新福利方案主表
|
||||
InsuranceSchemePO insuranceSchemePO1 = InsuranceSchemeBO.buildInsuranceSchemePO(insuranceSchemePO, updateParam.getInsuranceScheme());
|
||||
getInsuranceSchemeMapper().update(insuranceSchemePO1);
|
||||
log.info("福利方案更新主表:{}", insuranceSchemePO1);
|
||||
//记录主表操作日志
|
||||
loggerContext.setNewValues(insuranceSchemePO1);
|
||||
SalaryElogConfig.siSchemeLoggerTemplate.write(loggerContext);
|
||||
|
|
@ -2529,6 +2531,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
//更新福利方案明细表 先删后插
|
||||
getInsuranceSchemeDetailMapper().batchDeleteByPrimaryIds(Collections.singleton(updateParam.getInsuranceScheme().getId()));
|
||||
//更新明细表
|
||||
log.info("福利方案更新明细表:{}", insuranceSchemeDetailPOS);
|
||||
encryptUtil.encryptList(insuranceSchemeDetailPOS, InsuranceSchemeDetailPO.class);
|
||||
insuranceSchemeDetailPOS.forEach(getInsuranceSchemeDetailMapper()::insert);
|
||||
|
||||
|
|
|
|||
|
|
@ -1439,7 +1439,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
loggerContext.setOperateType(OperateTypeEnum.EXCEL_IMPORT.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "导入薪资核算数据"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "导入薪资核算数据 ") + targetName);
|
||||
loggerContext.setOldValueList(list4log);
|
||||
loggerContext.setNewValueList(list4log);
|
||||
SalaryElogConfig.salaryAcctRecordLoggerTemplate.write(loggerContext);
|
||||
|
||||
// //报表
|
||||
|
|
|
|||
|
|
@ -638,9 +638,9 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe
|
|||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(98819, "薪资核算结果还未归档,可直接核算"));
|
||||
}
|
||||
// 税款所在年的日期范围(第一天~最后一天)
|
||||
LocalDateRange yearRange = SalaryDateUtil.localDate2YearRange(salaryAcctRecordPO.getSalaryMonth());
|
||||
LocalDateRange yearRange = SalaryDateUtil.localDate2YearRange(salaryAcctRecordPO.getTaxCycle());
|
||||
if (Objects.isNull(yearRange)) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(84026, "薪资所属月为空"));
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(84026, "税款所属期为空"));
|
||||
}
|
||||
// 查询税款所在年的该个税扣缴义务人所有薪资核算记录
|
||||
// 获取账套所属个税扣缴义务人的核算记录
|
||||
|
|
@ -657,13 +657,13 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe
|
|||
if (!taxDeclarationFunctionEnum.getValue().equals(TaxDeclarationFunctionEnum.CLOSURE.getValue())) {
|
||||
// 如果已经存在之后月份的薪资核算记录了,就不允许重新核算本月了
|
||||
SalaryAcctRecordPO afterSalaryAcctRecordPO = selfSalaryAcctRecordPOS.stream()
|
||||
.filter(po -> po.getSalaryMonth().compareTo(salaryAcctRecordPO.getSalaryMonth()) > 0)
|
||||
.filter(po -> po.getTaxCycle().compareTo(salaryAcctRecordPO.getTaxCycle()) > 0)
|
||||
.findAny()
|
||||
.orElse(null);
|
||||
if (Objects.nonNull(afterSalaryAcctRecordPO)) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(105826, "已经存在{0}的薪资核算记录了,不能重新核算{1}的薪资了")
|
||||
.replace("{0}", SalaryDateUtil.localDate2YearMonth(afterSalaryAcctRecordPO.getSalaryMonth()).toString())
|
||||
.replace("{1}", SalaryDateUtil.localDate2YearMonth(salaryAcctRecordPO.getSalaryMonth()).toString()));
|
||||
.replace("{0}", SalaryDateUtil.localDate2YearMonth(afterSalaryAcctRecordPO.getTaxCycle()).toString())
|
||||
.replace("{1}", SalaryDateUtil.localDate2YearMonth(salaryAcctRecordPO.getTaxCycle()).toString()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -326,14 +326,25 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
|
|||
if (CollectionUtils.isNotEmpty(otherConditions)) {
|
||||
List<Long> items = SalaryEntityUtil.properties(otherConditions, SalaryAcctResultQueryParam.OtherCondition::getItemId, Collectors.toList());
|
||||
List<SalaryAcctResultPO> list = listBySalaryAcctRecordIdsAndSalaryItemIds(Collections.singletonList(queryParam.getSalaryAcctRecordId()), items);
|
||||
Map<Long, List<SalaryAcctResultPO>> acctEmpResultsMap = SalaryEntityUtil.group2Map(list, SalaryAcctResultPO::getSalaryAcctEmpId);
|
||||
Set<Long> removeAcctEmpIds = new HashSet<>();
|
||||
for (Long acctEmpId : acctEmpResultsMap.keySet()) {
|
||||
List<SalaryAcctResultPO> acctEmpResults = acctEmpResultsMap.get(acctEmpId);
|
||||
//如果有一个条件不成立就删除
|
||||
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();
|
||||
list = list.stream().filter(a -> Objects.equals(a.getSalaryItemId(), itemId)).filter(a -> filter.filter(params).test(a.getResultValue())).collect(Collectors.toList());
|
||||
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)) {
|
||||
//条件不满足直接返回空列表
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
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);
|
||||
if (CollectionUtils.isNotEmpty(salarySobExtRangePOS)) {
|
||||
List<Long> ids = SalaryEntityUtil.properties(salarySobExtRangePOS, SalarySobExtRangePO::getTargetId, Collectors.toList());
|
||||
|
|
@ -418,10 +419,9 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
|
|||
|
||||
result.addAll(employBiz.listByVirtualParams(virtualParams));
|
||||
|
||||
for (SalarySobRangeEmpQueryParam param:includeQueryParams) {
|
||||
if(param.getTargetType().equals(TargetTypeEnum.SQL.name())){
|
||||
List<Long> empIds = new ArrayList<>();
|
||||
includeQueryParams.stream()
|
||||
.filter(param -> param.getTargetType().equals(TargetTypeEnum.SQL.name()))
|
||||
.forEach(param -> {
|
||||
String sql = param.getTarget();
|
||||
RecordSet rs = new RecordSet();
|
||||
if (rs.execute(sql)) {
|
||||
|
|
@ -429,9 +429,14 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
|
|||
empIds.add((long) rs.getInt("id"));
|
||||
}
|
||||
}
|
||||
});
|
||||
List<DataCollectionEmployee> employees = getSalaryEmployeeService(user).getEmployeeByIdsAll(empIds);
|
||||
result.addAll(employees);
|
||||
if(CollUtil.isNotEmpty(empIds)){
|
||||
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去重
|
||||
result = result.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparingLong(DataCollectionEmployee::getEmployeeId))), ArrayList::new));
|
||||
|
|
|
|||
|
|
@ -135,6 +135,15 @@ public class SalaryEntityUtil {
|
|||
.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) {
|
||||
if (CollectionUtils.isEmpty(objs)) {
|
||||
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.exception.SalaryRunTimeException;
|
||||
import com.engine.salary.util.db.IdGenerator;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.general.BaseBean;
|
||||
|
|
@ -23,6 +24,7 @@ import java.time.LocalDateTime;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
public class SalaryTokenUtil {
|
||||
|
||||
/**
|
||||
|
|
@ -99,15 +101,18 @@ public class SalaryTokenUtil {
|
|||
// 获取appid的id
|
||||
String appidId = baseBean.getPropValue("hrmSalaryBillToken", "appid_id");
|
||||
if (StringUtils.isBlank(appidId)) {
|
||||
resultMap.put("msg", "appid_id为空");
|
||||
return resultMap;
|
||||
}
|
||||
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
|
||||
String appid ="";
|
||||
if (rs.next() && StringUtils.isNotEmpty(rs.getString("APPID"))) {
|
||||
appid = rs.getString("APPID");
|
||||
} else {
|
||||
resultMap.put("msg", "APPID为空,sql:"+appidSql);
|
||||
return resultMap;
|
||||
}
|
||||
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("cpk", cpk);
|
||||
// 调用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>>() {});
|
||||
log.info("GetToken regist url {} ,heads {}, data: {}",url ,heads, data);
|
||||
// ECOLOGY返回的系统公钥
|
||||
String spk = (String) (datas.get("spk"));
|
||||
RSA rsa = new RSA();
|
||||
// 对秘钥进行加密传输,防止篡改数据
|
||||
secret = rsa.encrypt(null, (String) (datas.get("secrit")), null, "utf-8", spk, false);
|
||||
// secret存库
|
||||
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')",
|
||||
String date = "'"+SalaryDateUtil.getFormatLocalDateTime(LocalDateTime.now())+"'";
|
||||
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);
|
||||
rs.execute(sql);
|
||||
log.info("GetToken regist secret , sql: {}", sql);
|
||||
// 保存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);
|
||||
rs.execute(sql);
|
||||
log.info("GetToken regist spk , sql: {}", sql);
|
||||
}
|
||||
//封装参数到请求头
|
||||
heads.put("appid", appid);
|
||||
heads.put("secret", secret);
|
||||
//调用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进行加密生成的密文
|
||||
sql= " SELECT conf_value FROM hrsa_salary_sys_conf t WHERE delete_type = 0 AND conf_key = 'SALARY_TOKEN_SPK'";
|
||||
rs.execute(sql);
|
||||
|
|
|
|||
|
|
@ -112,8 +112,14 @@ public class SIExportController {
|
|||
@Path("/common/export")
|
||||
@Produces(MediaType.APPLICATION_OCTET_STREAM)
|
||||
public Response exportAccount(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
||||
@QueryParam("billMonth") String billMonth,@QueryParam("paymentOrganization") String paymentOrganization) {
|
||||
InsuranceExportParam param = InsuranceExportParam.builder().billMonth(billMonth).paymentOrganization(paymentOrganization).build();
|
||||
@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).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);
|
||||
XSSFWorkbook workbook = getSIExportWrapper(user).exportAccount(PaymentStatusEnum.COMMON.getValue(),param);
|
||||
String time = LocalDate.now().toString();
|
||||
|
|
|
|||
|
|
@ -485,7 +485,7 @@ public class SalaryBillController {
|
|||
@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, Map<String, Object>>(user).run(getSalarySendWrapper(user)::batGrant, queryParam);
|
||||
return new ResponseResult<SalarySendBatParam, String>(user).run(getSalarySendWrapper(user)::batGrant, queryParam);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -499,7 +499,7 @@ public class SalaryBillController {
|
|||
@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, Map<String, Object>>(user).run(getSalarySendWrapper(user)::batWithdraw, queryParam);
|
||||
return new ResponseResult<SalarySendBatParam, String>(user).run(getSalarySendWrapper(user)::batWithdraw, queryParam);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -117,9 +117,9 @@ public class SalarySendWrapper extends Service implements SalarySendWrapperProxy
|
|||
|
||||
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);
|
||||
}else{
|
||||
} else {
|
||||
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.setTemplateId(salaryTemplatePO.getId());
|
||||
if ((salaryTemplatePO.getAckFeedbackStatus() != null && salaryTemplatePO.getAckFeedbackStatus() == 1) ||
|
||||
(salaryTemplatePO.getFeedbackStatus() != null && salaryTemplatePO.getFeedbackStatus() == 1) ) {
|
||||
(salaryTemplatePO.getFeedbackStatus() != null && salaryTemplatePO.getFeedbackStatus() == 1)) {
|
||||
e.setAckFeedbackStatus(1);
|
||||
} else {
|
||||
e.setAckFeedbackStatus(0);
|
||||
|
|
@ -688,6 +688,7 @@ public class SalarySendWrapper extends Service implements SalarySendWrapperProxy
|
|||
|
||||
/**
|
||||
* 发送短信验证码
|
||||
*
|
||||
* @param param 短信验证码发送参数
|
||||
*/
|
||||
public void sendMobileCode(SMSCodeSendParam param) {
|
||||
|
|
@ -696,6 +697,7 @@ public class SalarySendWrapper extends Service implements SalarySendWrapperProxy
|
|||
|
||||
/**
|
||||
* 校验短信验证码
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -706,7 +708,7 @@ public class SalarySendWrapper extends Service implements SalarySendWrapperProxy
|
|||
public PayrollCheckTypeEnum payrollCheckType() {
|
||||
SalarySysConfPO conf = getSalarySysConfService(user).getOneByCode(SalarySysConstant.SALARY_PAYROLL_CHECK_TYPE);
|
||||
|
||||
if(conf == null){
|
||||
if (conf == null) {
|
||||
return PayrollCheckTypeEnum.PWD;
|
||||
}
|
||||
|
||||
|
|
@ -714,14 +716,14 @@ public class SalarySendWrapper extends Service implements SalarySendWrapperProxy
|
|||
}
|
||||
|
||||
public void confirmSalaryBill(Long salaryInfoId) {
|
||||
if(ObjectUtil.isNull(salaryInfoId)){
|
||||
if (ObjectUtil.isNull(salaryInfoId)) {
|
||||
throw new SalaryRunTimeException("工资单id不能为空!");
|
||||
}
|
||||
getSalaryBillService(user).confirmSalaryBill(salaryInfoId);
|
||||
}
|
||||
|
||||
public void feedBackSalaryBill(Long salaryInfoId) {
|
||||
if(ObjectUtil.isNull(salaryInfoId)){
|
||||
if (ObjectUtil.isNull(salaryInfoId)) {
|
||||
throw new SalaryRunTimeException("工资单id不能为空!");
|
||||
}
|
||||
getSalaryBillService(user).feedBackSalaryBill(salaryInfoId);
|
||||
|
|
@ -740,26 +742,48 @@ public class SalarySendWrapper extends Service implements SalarySendWrapperProxy
|
|||
}
|
||||
|
||||
|
||||
public void batGrant(SalarySendBatParam param) {
|
||||
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";
|
||||
}
|
||||
}
|
||||
public void batWithdraw(SalarySendBatParam param) {
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue