Merge branch 'release/3.0.2.2504.01' into custom/易迪希医药科技(嘉兴)有限公司
This commit is contained in:
commit
2ad7a1229e
|
|
@ -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) ,
|
||||
|
|
|
|||
|
|
@ -46,11 +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;
|
||||
update hrsa_salary_acct_emp set delete_type=3 where delete_type=0;
|
||||
update hrsa_salary_acct_result set delete_type=3 where delete_type=0;
|
||||
update hrsa_salary_send set delete_type=3 where delete_type=0;
|
||||
update hrsa_salary_send_info set delete_type=3 where delete_type=0;
|
||||
-- 删除核算记录
|
||||
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
|
||||
|
|
@ -7,4 +9,13 @@ where tax_agent_id =扣缴义务人id and delete_type = 0)
|
|||
|
||||
|
||||
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<>();
|
||||
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();
|
||||
|
|
|
|||
|
|
@ -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,14 +270,22 @@ 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("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()));
|
||||
|
||||
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()));
|
||||
// map.put("incomeCategory", Objects.isNull(incomeCategoryEnum) ? "" : SalaryI18nUtil.getI18nLabel(incomeCategoryEnum.getLabelId(), incomeCategoryEnum.getDefaultLabel()));
|
||||
list.add(map);
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
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());
|
||||
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();
|
||||
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,20 +419,24 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
|
|||
|
||||
result.addAll(employBiz.listByVirtualParams(virtualParams));
|
||||
|
||||
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)) {
|
||||
while (rs.next()) {
|
||||
empIds.add((long) rs.getInt("id"));
|
||||
}
|
||||
for (SalarySobRangeEmpQueryParam param:includeQueryParams) {
|
||||
if(param.getTargetType().equals(TargetTypeEnum.SQL.name())){
|
||||
List<Long> empIds = new ArrayList<>();
|
||||
String sql = param.getTarget();
|
||||
RecordSet rs = new RecordSet();
|
||||
if (rs.execute(sql)) {
|
||||
while (rs.next()) {
|
||||
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));
|
||||
|
|
|
|||
Loading…
Reference in New Issue