核算字段

This commit is contained in:
钱涛 2022-04-29 14:17:31 +08:00
parent e445e654de
commit dff9657c3d
10 changed files with 162 additions and 81 deletions

View File

@ -21,32 +21,36 @@ import lombok.NoArgsConstructor;
public class DataCollectionEmployee {
//员工id
@SalaryFormulaVar(defaultLabel ="员工id", labelId = 86184, dataType = "string")
@SalaryFormulaVar(defaultLabel = "员工id", labelId = 86184, dataType = "string")
private Long employeeId;
// 个税扣缴义务人
@SalaryFormulaVar(defaultLabel ="个税扣缴义务人", labelId = 86184, dataType = "string")
private String taxAgentName;
// private String taxAgentName;
// @SalaryFormulaVar(defaultLabel = "个税扣缴义务人", labelId = 86184, dataType = "string")
// private Long taxAgentId;
//姓名
@SalaryFormulaVar(defaultLabel ="姓名", labelId = 85429, dataType = "string")
@SalaryFormulaVar(defaultLabel = "姓名", labelId = 85429, dataType = "string")
private String username;
//部门
@SalaryFormulaVar(defaultLabel ="部门", labelId = 86185, dataType = "string")
@SalaryFormulaVar(defaultLabel = "部门", labelId = 86185, dataType = "string")
private String departmentName;
@SalaryFormulaVar(defaultLabel = "部门ID", labelId = 86185, dataType = "string")
private Long departmentId;
//岗位
@SalaryFormulaVar(defaultLabel ="岗位", labelId = 90633, dataType = "string")
@SalaryFormulaVar(defaultLabel = "岗位", labelId = 90633, dataType = "string")
private String jobtitleName;
@SalaryFormulaVar(defaultLabel = "岗位ID", labelId = 90633, dataType = "string")
private Long jobtitleId;
//入职日期
@SalaryFormulaVar(defaultLabel ="入职日期", labelId = 86319, dataType = "string")
@SalaryFormulaVar(defaultLabel = "入职日期", labelId = 86319, dataType = "string")
private String companystartdate;
//手机号
@SalaryFormulaVar(defaultLabel ="手机", labelId = 98621, dataType = "string")
@SalaryFormulaVar(defaultLabel = "手机", labelId = 98621, dataType = "string")
private String mobile;
//离职日期
@ -56,27 +60,27 @@ public class DataCollectionEmployee {
private String status;
//工号
@SalaryFormulaVar(defaultLabel ="工号", labelId = 98622, dataType = "string")
@SalaryFormulaVar(defaultLabel = "工号", labelId = 98622, dataType = "string")
private String workcode;
//性别
@SalaryFormulaVar(defaultLabel ="性别", labelId = 98622, dataType = "string")
@SalaryFormulaVar(defaultLabel = "性别", labelId = 98622, dataType = "string")
private String sex;
//邮件
@SalaryFormulaVar(defaultLabel ="邮件", labelId = 92919, dataType = "string")
@SalaryFormulaVar(defaultLabel = "邮件", labelId = 92919, dataType = "string")
private String email;
//电话
@SalaryFormulaVar(defaultLabel ="电话", labelId = 98620, dataType = "string")
@SalaryFormulaVar(defaultLabel = "电话", labelId = 98620, dataType = "string")
private String telephone;
//职称
@SalaryFormulaVar(defaultLabel ="职称", labelId = 98623, dataType = "string")
@SalaryFormulaVar(defaultLabel = "职称", labelId = 98623, dataType = "string")
private String jobcall;
//生日
@SalaryFormulaVar(defaultLabel ="出生日期", labelId = 98624, dataType = "string")
@SalaryFormulaVar(defaultLabel = "出生日期", labelId = 98624, dataType = "string")
private String birthday;
//是否是系统管理员

View File

@ -18,6 +18,7 @@ import com.engine.salary.entity.salaryarchive.dto.SalaryArchiveTaxAgentDataDTO;
import com.engine.salary.entity.salaryitem.po.SalaryItemPO;
import com.engine.salary.entity.salarysob.po.SalarySobAdjustRulePO;
import com.engine.salary.enums.salaryformula.SalaryFormulaReferenceEnum;
import com.engine.salary.enums.salaryformula.SalarySQLReferenceEnum;
import com.engine.salary.enums.salarysob.SalarySobAdjustRuleTypeEnum;
import com.engine.salary.util.JsonUtil;
import com.engine.salary.util.SalaryDateUtil;
@ -128,9 +129,14 @@ public class CalculateFormulaVarBO {
handleWelfareData(salaryAcctCalculateBO, resultMap);
// 处理考勤数据
handleAttendQuoteData(salaryAcctCalculateBO, resultMap);
//处理核算人员信息
handleSalaryAcctEmployee(salaryAcctCalculateBO, resultMap);
handleSimpleEmployees(resultMap);
return resultMap;
}
/**
* 处理薪资核算结果
*
@ -427,6 +433,73 @@ public class CalculateFormulaVarBO {
}
}
/**
* 处理核算人员信息
*
* @param salaryAcctCalculateBO
* @param resultMap
*/
private void handleSalaryAcctEmployee(SalaryAcctCalculateBO salaryAcctCalculateBO, Map<String, List<FormulaVarValue>> resultMap) {
List<SalaryAcctEmployeePO> salaryAcctEmployeePOS = salaryAcctCalculateBO.getSalaryAcctEmployeePOS();
// key:employeeId_taxAgentIdvalue:核算人员信息
Map<String, SalaryAcctEmployeePO> salaryAcctEmployeeMap = SalaryEntityUtil.convert2Map(salaryAcctEmployeePOS,
po -> po.getEmployeeId() + "_" + po.getTaxAgentId());
// 核算人员信息可选字段
List<String> fieldNames = Lists.newArrayList();
Field[] declaredFields = SalaryAcctEmployeePO.class.getDeclaredFields();
for (Field declaredField : declaredFields) {
if (declaredField.isAnnotationPresent(SalaryFormulaVar.class)) {
fieldNames.add(declaredField.getName());
}
}
// 填充到返回结果集中
salaryAcctEmployeeMap.forEach((key, po) -> {
List<FormulaVarValue> formulaVarValues = resultMap.computeIfAbsent(key, k -> Lists.newArrayList());
Map<String, String> map = JsonUtil.parseMap(po, String.class);
formulaVarValues.addAll(fieldNames.stream().map(fieldName -> {
String fieldId = SalarySQLReferenceEnum.SALARY_ACCT_EMPLOYEE.getValue()
+ SalaryFormulaFieldConstant.FIELD_ID_SEPARATOR
+ fieldName;
return new FormulaVarValue().setFieldId(fieldId).setFieldValue(map.getOrDefault(fieldName, StringUtils.EMPTY));
}).collect(Collectors.toList()));
});
}
/**
* 处理员工基本信息
*
* @param resultMap
*/
private void handleSimpleEmployees(Map<String, List<FormulaVarValue>> resultMap) {
// key:employeeId_taxAgentIdvalue:员工信息
Map<String, DataCollectionEmployee> employeeMap = SalaryEntityUtil.convert2Map(simpleEmployees,
po -> po.getEmployeeId() + "");
// 核算人员信息可选字段
List<String> fieldNames = Lists.newArrayList();
Field[] declaredFields = DataCollectionEmployee.class.getDeclaredFields();
for (Field declaredField : declaredFields) {
if (declaredField.isAnnotationPresent(SalaryFormulaVar.class)) {
fieldNames.add(declaredField.getName());
}
}
// 填充到返回结果集中
employeeMap.forEach((key, po) -> {
List<FormulaVarValue> formulaVarValues = resultMap.computeIfAbsent(key, k -> Lists.newArrayList());
Map<String, String> map = JsonUtil.parseMap(po, String.class);
formulaVarValues.addAll(fieldNames.stream().map(fieldName -> {
String fieldId = SalarySQLReferenceEnum.EMPLOYEE_INFO.getValue()
+ SalaryFormulaFieldConstant.FIELD_ID_SEPARATOR
+ fieldName;
return new FormulaVarValue().setFieldId(fieldId).setFieldValue(map.getOrDefault(fieldName, StringUtils.EMPTY));
}).collect(Collectors.toList()));
});
}
@Data
@Accessors(chain = true)
public static class FormulaVarValue {

View File

@ -78,9 +78,9 @@ public class SalaryAcctFormulaBO {
.sex(sexName)
.status(simpleEmployee.getStatus())
.departmentName(simpleEmployee.getDepartmentName())
.positionName(simpleEmployee.getJobtitleName())
.gradeName(simpleEmployee.getJobcall())
.hireDate(simpleEmployee.getCompanystartdate())
.jobtitleName(simpleEmployee.getJobtitleName())
.jobcall(simpleEmployee.getJobcall())
.companystartdate(simpleEmployee.getCompanystartdate())
.birthday(simpleEmployee.getBirthday())
.build();
return JsonUtil.parseMap(JsonUtil.toJsonString(formulaEmployee), String.class);

View File

@ -24,43 +24,65 @@ public class SalaryFormulaEmployeeDTO {
@SalaryFormulaVar(defaultLabel = "个税扣缴义务人", labelId = 86184, dataType = "string")
private String taxAgentName;
@SalaryFormulaVar(defaultLabel = "个税扣缴义务人ID", labelId = 86184, dataType = "string")
private String taxAgentId;
@SalaryFormulaVar(defaultLabel = "姓名", labelId = 85429, dataType = "string")
private String username;
@SalaryFormulaVar(defaultLabel = "邮件", labelId = 92919, dataType = "string")
private String email;
//部门
@SalaryFormulaVar(defaultLabel = "部门", labelId = 86185, dataType = "string")
private String departmentName;
@SalaryFormulaVar(defaultLabel = "部门ID", labelId = 86185, dataType = "string")
private Long departmentId;
//岗位
@SalaryFormulaVar(defaultLabel = "岗位", labelId = 90633, dataType = "string")
private String jobtitleName;
@SalaryFormulaVar(defaultLabel = "岗位ID", labelId = 90633, dataType = "string")
private Long jobtitleId;
@SalaryFormulaVar(defaultLabel = "入职日期", labelId = 86319, dataType = "string")
private String companystartdate;
//手机号
@SalaryFormulaVar(defaultLabel = "手机", labelId = 98621, dataType = "string")
private String mobile;
@SalaryFormulaVar(defaultLabel = "电话", labelId = 98620, dataType = "string")
private String telephone;
//离职日期
private String dissmissdate;
//状态
private String status;
//工号
@SalaryFormulaVar(defaultLabel = "工号", labelId = 98622, dataType = "string")
private String workcode;
//性别
@SalaryFormulaVar(defaultLabel = "性别", labelId = 98622, dataType = "string")
private String sex;
// @SalaryFormulaVar(defaultLabel = "证件号码", labelId = 86318, dataType = "string")
// private String idNo;
@SalaryFormulaVar(defaultLabel = "性别", labelId = 98622, dataType = "string")
private String sex;
//邮件
@SalaryFormulaVar(defaultLabel = "邮件", labelId = 92919, dataType = "string")
private String email;
@SalaryFormulaVar(defaultLabel = "状态", labelId = 91075, dataType = "string")
private String status;
@SalaryFormulaVar(defaultLabel = "部门", labelId = 86185, dataType = "string")
private String departmentName;
@SalaryFormulaVar(defaultLabel = "电话", labelId = 98620, dataType = "string")
private String telephone;
@SalaryFormulaVar(defaultLabel = "岗位", labelId = 90633, dataType = "string")
private String positionName;
@SalaryFormulaVar(defaultLabel = "职级", labelId = 98623, dataType = "string")
private String gradeName;
//职称
@SalaryFormulaVar(defaultLabel = "职称", labelId = 98623, dataType = "string")
private String jobcall;
@SalaryFormulaVar(defaultLabel = "入职日期", labelId = 86319, dataType = "string")
private String hireDate;
@SalaryFormulaVar(defaultLabel = "出生日期", labelId = 98624, dataType = "string")
private String birthday;
// //首次参加工作日期", labelId = 98625, dataType = "string")
// private String firstWorkDate;
}

View File

@ -17,7 +17,7 @@ public enum SalaryFormulaReferenceEnum implements BaseEnum<String> {
SALARY_ITEM("salaryItem", "薪资项目", 84960),
// SALARY_ITEM_OF_HISTORY("salaryItemOfHistory", "历史台账薪资项目", 85364),
EMPLOYEE_INFO("employeeInfo", "员工基本信息", 85366),
// EMPLOYEE_INFO("employeeInfo", "员工基本信息", 85366),
SALARY_ARCHIVES("salaryArchives", "薪资档案", 85368),
ATTEND("attend", "考勤引用", 85367),
ADD_UP_SITUATION("addUpSituation", "往期累计情况", 104412),

View File

@ -33,6 +33,7 @@
d.departmentname as departmentName,
d.id as departmentId,
c.jobtitlename as jobtitleName,
c.id as jobtitleId,
e.companystartdate as companystartdate,
e.mobile as mobile,
b.dismissdate as dismissdate
@ -84,6 +85,7 @@
d.departmentname as departmentName,
d.id as departmentId,
c.jobtitlename as jobtitleName,
c.id as jobtitleId,
e.companystartdate as companystartdate,
e.mobile as mobile
from hrmresource e
@ -134,6 +136,7 @@
d.departmentname as departmentName,
d.id as departmentId,
c.jobtitlename as jobtitleName,
c.id as jobtitleId,
e.companystartdate as companystartdate,
e.mobile as mobile,
b.dismissdate as dismissdate

View File

@ -6,11 +6,11 @@ import com.engine.salary.annotation.SalaryFormulaVar;
import com.engine.salary.constant.SalaryFormulaFieldConstant;
import com.engine.salary.entity.datacollection.AddUpDeduction;
import com.engine.salary.entity.datacollection.AddUpSituation;
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
import com.engine.salary.entity.datacollection.dto.AttendQuoteFieldListDTO;
import com.engine.salary.entity.datacollection.param.AttendQuoteFieldQueryParam;
import com.engine.salary.entity.datacollection.po.OtherDeductionPO;
import com.engine.salary.entity.salaryacct.po.SalaryAcctEmployeePO;
import com.engine.salary.entity.salaryformula.dto.SalaryFormulaEmployeeDTO;
import com.engine.salary.entity.salaryformula.dto.SalaryFormulaTaxRateDTO;
import com.engine.salary.entity.salaryformula.po.FormulaVar;
import com.engine.salary.entity.salaryitem.po.SalaryItemPO;
@ -106,7 +106,7 @@ public class RemoteExcelServiceImpl extends Service implements RemoteExcelServic
if (referenceEnum != null) {
switch (referenceEnum) {
case EMPLOYEE_INFO:
vars = convert2FormulaVar(SalaryFormulaEmployeeDTO.class, referenceEnum.getValue() + "");
vars = convert2FormulaVar(DataCollectionEmployee.class, referenceEnum.getValue() + "");
break;
case SALARY_ACCT_EMPLOYEE:
vars = convert2FormulaVar(SalaryAcctEmployeePO.class, referenceEnum.getValue() + "");
@ -133,9 +133,9 @@ public class RemoteExcelServiceImpl extends Service implements RemoteExcelServic
case ADD_UP_DEDUCTIONS:
vars = convert2FormulaVar(AddUpDeduction.class, referenceEnum.getValue() + "");
break;
case EMPLOYEE_INFO:
vars = convert2FormulaVar(SalaryFormulaEmployeeDTO.class, referenceEnum.getValue() + "");
break;
// case EMPLOYEE_INFO:
// vars = convert2FormulaVar(SalaryFormulaEmployeeDTO.class, referenceEnum.getValue() + "");
// break;
case OTHER_DEDUCTION:
vars = convert2FormulaVar(OtherDeductionPO.class, referenceEnum.getValue() + "");
break;
@ -307,9 +307,9 @@ public class RemoteExcelServiceImpl extends Service implements RemoteExcelServic
formulaVar.setName(SalaryI18nUtil.getI18nLabel(annotation.labelId(), annotation.defaultLabel()));
formulaVar.setSource(formId);
formulaVar.setFieldType(annotation.dataType());
if (StringUtils.equals(formId, "" + SalaryFormulaReferenceEnum.EMPLOYEE_INFO.getValue())) {
formulaVar.setSource(DataType.STRING);
}
// if (StringUtils.equals(formId, "" + SalaryFormulaReferenceEnum.EMPLOYEE_INFO.getValue())) {
// formulaVar.setSource(DataType.STRING);
// }
formulaVars.add(formulaVar);
}
return formulaVars;

View File

@ -141,8 +141,7 @@ public class SalaryAcctCalculateServiceImpl extends Service implements SalaryAcc
Map<String, List<SalaryAcctEmployeePO>> otherSalaryAcctEmployeePOMap = SalaryEntityUtil.group2Map(otherSalaryAcctEmployeePOS, salaryAcctEmployeePO -> salaryAcctEmployeePO.getEmployeeId() + "_" + salaryAcctEmployeePO.getTaxAgentId());
// 10转换成公式编辑器中的变量
CalculateFormulaVarBO calculateFormulaVarBO = new CalculateFormulaVarBO(simpleEmployees, salaryArchiveData, addUpSituationPOS, addUpDeductionPOS, otherDeductionPOS,
welfareData, attendQuoteDataDTOS, salaryAcctResultPOS);
CalculateFormulaVarBO calculateFormulaVarBO = new CalculateFormulaVarBO(simpleEmployees, salaryArchiveData, addUpSituationPOS, addUpDeductionPOS, otherDeductionPOS, welfareData, attendQuoteDataDTOS, salaryAcctResultPOS);
Map<String, List<CalculateFormulaVarBO.FormulaVarValue>> formulaVarMap = calculateFormulaVarBO.convert2FormulaVar(salaryAcctCalculateBO);
// 本次薪资核算所用的薪资账套下的薪资项目
@ -155,8 +154,10 @@ public class SalaryAcctCalculateServiceImpl extends Service implements SalaryAcc
List<SalaryAcctResultTempPO> salaryAcctResultTempPOS = Lists.newArrayList();
// 开始核算
for (SalaryAcctEmployeePO salaryAcctEmployeePO : salaryAcctCalculateBO.getSalaryAcctEmployeePOS()) {
// 获取当前薪资核算人员的公式中的变量的值
//1 获取当前薪资核算人员的公式中的变量的值
List<CalculateFormulaVarBO.FormulaVarValue> formulaVarValues = formulaVarMap.get(salaryAcctEmployeePO.getEmployeeId() + "_" + salaryAcctEmployeePO.getTaxAgentId());
//2人员信息
formulaVarValues.addAll(formulaVarMap.get(salaryAcctEmployeePO.getEmployeeId() + ""));
Map<String, String> formulaVarValueMap = SalaryEntityUtil.convert2Map(formulaVarValues, CalculateFormulaVarBO.FormulaVarValue::getFieldId, CalculateFormulaVarBO.FormulaVarValue::getFieldValue);
// 按照计算好的优先级计算薪资项目的值
for (List<Long> salaryItemIds : salaryAcctCalculateBO.getSalaryItemIdWithPriorityList()) {
@ -184,28 +185,20 @@ public class SalaryAcctCalculateServiceImpl extends Service implements SalaryAcc
resultValue = runExpressSQL(expressFormula, formulaVarValueMap, simpleEmployee);
} else {
// 处理取值类型为输入/导入的薪资项目
String key = SalaryFormulaReferenceEnum.SALARY_ITEM.getValue()
+ SalaryFormulaFieldConstant.FIELD_ID_SEPARATOR
+ salaryItemPO.getCode();
String key = SalaryFormulaReferenceEnum.SALARY_ITEM.getValue() + SalaryFormulaFieldConstant.FIELD_ID_SEPARATOR + salaryItemPO.getCode();
resultValue = formulaVarValueMap.getOrDefault(key, StringUtils.EMPTY);
}
// 处理薪资档案
if (Objects.equals(salaryItemPO.getUseInEmployeeSalary(), NumberUtils.INTEGER_ONE)) {
String key = SalaryFormulaReferenceEnum.SALARY_ARCHIVES.getValue()
+ SalaryFormulaFieldConstant.FIELD_ID_SEPARATOR
+ salaryItemPO.getCode();
String key = SalaryFormulaReferenceEnum.SALARY_ARCHIVES.getValue() + SalaryFormulaFieldConstant.FIELD_ID_SEPARATOR + salaryItemPO.getCode();
resultValue = formulaVarValueMap.getOrDefault(key, StringUtils.EMPTY);
}
// 处理合并计税
resultValue = handleConsolidatedTax(resultValue, salaryItemPO, salaryAcctCalculateBO,
otherSalaryAcctEmployeePOMap.get(salaryAcctEmployeePO.getEmployeeId() + "_" + salaryAcctEmployeePO.getTaxAgentId()),
otherSalaryAcctResultPOMap.get(salaryAcctEmployeePO.getEmployeeId() + "_" + salaryAcctEmployeePO.getTaxAgentId()));
resultValue = handleConsolidatedTax(resultValue, salaryItemPO, salaryAcctCalculateBO, otherSalaryAcctEmployeePOMap.get(salaryAcctEmployeePO.getEmployeeId() + "_" + salaryAcctEmployeePO.getTaxAgentId()), otherSalaryAcctResultPOMap.get(salaryAcctEmployeePO.getEmployeeId() + "_" + salaryAcctEmployeePO.getTaxAgentId()));
// 处理小数点
resultValue = SalaryAcctFormulaBO.roundResultValue(resultValue, salaryItemPO);
// 将已经计算过的薪资项目的值转换成公式变量的值添加到集合中
String key = SalaryFormulaReferenceEnum.SALARY_ITEM.getValue()
+ SalaryFormulaFieldConstant.FIELD_ID_SEPARATOR
+ salaryItemPO.getCode();
String key = SalaryFormulaReferenceEnum.SALARY_ITEM.getValue() + SalaryFormulaFieldConstant.FIELD_ID_SEPARATOR + salaryItemPO.getCode();
formulaVarValueMap.put(key, resultValue);
// 值保存薪资账套下的薪资项目的核算结果
@ -213,19 +206,7 @@ public class SalaryAcctCalculateServiceImpl extends Service implements SalaryAcc
// 转换成薪资核算结果po
SalaryAcctResultTempPO salaryAcctResultTempPO = new SalaryAcctResultTempPO()
// .setId(IdGenerator.generate())
.setSalaryAcctRecordId(salaryAcctEmployeePO.getSalaryAcctRecordId())
.setSalaryAcctEmpId(salaryAcctEmployeePO.getId())
.setEmployeeId(salaryAcctEmployeePO.getEmployeeId())
.setTaxAgentId(salaryAcctEmployeePO.getTaxAgentId())
.setSalarySobId(salaryAcctEmployeePO.getSalarySobId())
.setSalaryItemId(salaryItemPO.getId())
.setResultValue(resultValue)
.setCalculateKey(salaryAcctCalculateBO.getCalculateKey())
.setCreator((long) user.getUID())
.setCreateTime(now)
.setUpdateTime(now)
.setTenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY)
.setDeleteType(0);
.setSalaryAcctRecordId(salaryAcctEmployeePO.getSalaryAcctRecordId()).setSalaryAcctEmpId(salaryAcctEmployeePO.getId()).setEmployeeId(salaryAcctEmployeePO.getEmployeeId()).setTaxAgentId(salaryAcctEmployeePO.getTaxAgentId()).setSalarySobId(salaryAcctEmployeePO.getSalarySobId()).setSalaryItemId(salaryItemPO.getId()).setResultValue(resultValue).setCalculateKey(salaryAcctCalculateBO.getCalculateKey()).setCreator((long) user.getUID()).setCreateTime(now).setUpdateTime(now).setTenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY).setDeleteType(0);
salaryAcctResultTempPOS.add(salaryAcctResultTempPO);
}
}
@ -314,9 +295,7 @@ public class SalaryAcctCalculateServiceImpl extends Service implements SalaryAcc
}
// 相同税款所属期内其他薪资核算记录
Set<Long> otherSalaryAcctRecordIds = SalaryEntityUtil.properties(otherSalaryAcctEmployeePOS, SalaryAcctEmployeePO::getSalaryAcctRecordId);
List<SalaryAcctRecordPO> otherSalaryAcctRecordPOS = salaryAcctCalculateBO.getOtherSalaryAcctRecordPOS().stream()
.filter(e -> otherSalaryAcctRecordIds.contains(e.getId()))
.collect(Collectors.toList());
List<SalaryAcctRecordPO> otherSalaryAcctRecordPOS = salaryAcctCalculateBO.getOtherSalaryAcctRecordPOS().stream().filter(e -> otherSalaryAcctRecordIds.contains(e.getId())).collect(Collectors.toList());
// 相同税款所属期内同一个个税扣缴义务人下的同一个人存在多次工资薪金类型的薪资核算记录那么只有最早创建的薪资核算记录可以扣减如下数据减除费用专项扣除专项附加扣除其他扣除
// 根据薪资核算记录的创建时间判断是否需要做合并计税处理
boolean needConsolidatedTax = otherSalaryAcctRecordPOS.stream().anyMatch(salaryAcctRecordPO -> salaryAcctCalculateBO.getSalaryAcctRecordPO().getCreateTime().compareTo(salaryAcctRecordPO.getCreateTime()) > 0);

View File

@ -472,11 +472,11 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
.birthday(simpleEmployee.getBirthday())
.departmentName(simpleEmployee.getDepartmentName() )
.email(StringUtils.isEmpty(simpleEmployee.getEmail()) ? "" : simpleEmployee.getEmail())
.gradeName(simpleEmployee.getJobcall())
.hireDate(simpleEmployee.getCompanystartdate())
.sex(simpleEmployee.getSex() == "0" ? "" : "")
.jobcall(simpleEmployee.getJobcall())
.companystartdate(simpleEmployee.getCompanystartdate())
.sex("0".equals(simpleEmployee.getSex()) ? "" : "")
.mobile(StringUtils.isEmpty(simpleEmployee.getMobile()) ? "" : simpleEmployee.getMobile())
.positionName(simpleEmployee.getJobtitleName())
.jobtitleName(simpleEmployee.getJobtitleName())
.status(simpleEmployee.getStatus() == null ? "" : simpleEmployee.getStatus())
.telephone(StringUtils.isEmpty(simpleEmployee.getTelephone()) ? "" : simpleEmployee.getTelephone())
.username(StringUtils.isEmpty(simpleEmployee.getUsername()) ? "" : simpleEmployee.getUsername())

View File

@ -3,8 +3,8 @@ package com.engine.salary.wrapper;
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.salary.annotation.SalaryFormulaVar;
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
import com.engine.salary.entity.salaryformula.ExpressFormula;
import com.engine.salary.entity.salaryformula.dto.SalaryFormulaEmployeeDTO;
import com.engine.salary.entity.salaryitem.bo.SalaryItemBO;
import com.engine.salary.entity.salaryitem.dto.SalaryItemListDTO;
import com.engine.salary.entity.salaryitem.param.SalaryItemSearchParam;
@ -156,7 +156,7 @@ public class SalarySobItemWrapper extends Service {
* @return
*/
public Collection<Map<String, String>> empFieldList() {
Field[] declaredFields = DataCollectionEmployee.class.getDeclaredFields();
Field[] declaredFields = SalaryFormulaEmployeeDTO.class.getDeclaredFields();
Map<String, String> empFieldMap = Maps.newHashMapWithExpectedSize(declaredFields.length);
List<Map<String, String>> list = new ArrayList();
for (Field declaredField : declaredFields) {