Merge branch 'release/2.12.1.2403.02' into custom/上海港湾-多语言
# Conflicts: # src/com/engine/salary/report/service/impl/SalaryStatisticsPushServiceImpl.java # src/com/engine/salary/report/wrapper/SalaryStatisticsEmployeeWrapper.java # src/com/engine/salary/report/wrapper/SalaryStatisticsReportWrapper.java # src/com/engine/salary/service/impl/SIAccountServiceImpl.java # src/com/engine/salary/service/impl/SIRepairServiceImpl.java # src/com/engine/salary/service/impl/SalaryBillServiceImpl.java # src/com/engine/salary/service/impl/SalarySendServiceImpl.java # src/com/engine/salary/wrapper/SalaryArchiveItemWrapper.java
This commit is contained in:
commit
0bbdfd7ab2
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.biz;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.TypeReference;
|
||||
import com.api.formmode.mybatis.util.SqlProxyHandle;
|
||||
|
|
@ -44,17 +45,16 @@ import com.engine.salary.util.SalaryAssert;
|
|||
import com.engine.salary.util.SalaryDateUtil;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.db.IdGenerator;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.engine.salary.util.page.SalaryPageUtil;
|
||||
import com.engine.salary.util.valid.ValidUtil;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.wbi.util.StringUtil;
|
||||
import com.engine.salary.util.db.IdGenerator;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang.math.NumberUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import weaver.general.Util;
|
||||
|
|
@ -677,7 +677,7 @@ public class SIAccountBiz extends Service {
|
|||
needArchivesPerson.stream().forEach(e -> {
|
||||
InsuranceSchemeDetailPO po = otherPerson.get(e);
|
||||
BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100"));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(archivesPerson) || StringUtils.isBlank(archivesPerson.get(String.valueOf(e)))) ? "0" : archivesPerson.get(String.valueOf(e)));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtil.isEmpty(archivesPerson) || StringUtils.isBlank(archivesPerson.get(String.valueOf(e)))) ? "0" : archivesPerson.get(String.valueOf(e)));
|
||||
BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost());
|
||||
Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum();
|
||||
// BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
|
|
@ -754,7 +754,7 @@ public class SIAccountBiz extends Service {
|
|||
needArchivesCom.stream().forEach(e -> {
|
||||
InsuranceSchemeDetailPO po = otherCom.get(e);
|
||||
BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100"));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(finalArchivesCom) || StringUtils.isBlank(finalArchivesCom.get(String.valueOf(e)))) ? "0" : finalArchivesCom.get(String.valueOf(e)));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtil.isEmpty(finalArchivesCom) || StringUtils.isBlank(finalArchivesCom.get(String.valueOf(e)))) ? "0" : finalArchivesCom.get(String.valueOf(e)));
|
||||
BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost());
|
||||
Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum();
|
||||
// BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
|
|
@ -844,7 +844,7 @@ public class SIAccountBiz extends Service {
|
|||
needArchivesPerson.stream().forEach(e -> {
|
||||
InsuranceSchemeDetailPO po = fundperson.get(e);
|
||||
BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100"));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(archivesPerson) || StringUtils.isBlank(archivesPerson.get(String.valueOf(e)))) ? "0" : archivesPerson.get(String.valueOf(e)));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtil.isEmpty(archivesPerson) || StringUtils.isBlank(archivesPerson.get(String.valueOf(e)))) ? "0" : archivesPerson.get(String.valueOf(e)));
|
||||
BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost());
|
||||
Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum();
|
||||
// BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
|
|
@ -920,7 +920,7 @@ public class SIAccountBiz extends Service {
|
|||
needArchivesCom.stream().forEach(e -> {
|
||||
InsuranceSchemeDetailPO po = fundCom.get(e);
|
||||
BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100"));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(finalArchivesCom) || StringUtils.isBlank(finalArchivesCom.get(String.valueOf(e)))) ? "0" : finalArchivesCom.get(String.valueOf(e)));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtil.isEmpty(finalArchivesCom) || StringUtils.isBlank(finalArchivesCom.get(String.valueOf(e)))) ? "0" : finalArchivesCom.get(String.valueOf(e)));
|
||||
BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost());
|
||||
Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum();
|
||||
// BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
|
|
@ -1013,7 +1013,7 @@ public class SIAccountBiz extends Service {
|
|||
needArchivesPerson.forEach(e -> {
|
||||
InsuranceSchemeDetailPO po = schemeperson.get(e);
|
||||
BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100"));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(archivesPerson) || StringUtils.isBlank(archivesPerson.get(String.valueOf(e)))) ? "0" : archivesPerson.get(String.valueOf(e)));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtil.isEmpty(archivesPerson) || StringUtils.isBlank(archivesPerson.get(String.valueOf(e)))) ? "0" : archivesPerson.get(String.valueOf(e)));
|
||||
BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost());
|
||||
Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum();
|
||||
// BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
|
|
@ -1089,7 +1089,7 @@ public class SIAccountBiz extends Service {
|
|||
needArchivesCom.stream().forEach(e -> {
|
||||
InsuranceSchemeDetailPO po = schemeCom.get(e);
|
||||
BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100"));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(finalArchivesCom) || StringUtils.isBlank(finalArchivesCom.get(String.valueOf(e)))) ? "0" : finalArchivesCom.get(String.valueOf(e)));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtil.isEmpty(finalArchivesCom) || StringUtils.isBlank(finalArchivesCom.get(String.valueOf(e)))) ? "0" : finalArchivesCom.get(String.valueOf(e)));
|
||||
BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost());
|
||||
Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum();
|
||||
// BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
|
|
@ -1595,7 +1595,7 @@ public class SIAccountBiz extends Service {
|
|||
needArchivesPerson.stream().forEach(e -> {
|
||||
InsuranceSchemeDetailPO po = otherPerson.get(e);
|
||||
BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100"));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(archivesPerson) || StringUtils.isBlank(archivesPerson.get(String.valueOf(e)))) ? "0" : archivesPerson.get(String.valueOf(e)));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtil.isEmpty(archivesPerson) || StringUtils.isBlank(archivesPerson.get(String.valueOf(e)))) ? "0" : archivesPerson.get(String.valueOf(e)));
|
||||
BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost());
|
||||
Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum();
|
||||
// BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
|
|
@ -1664,7 +1664,7 @@ public class SIAccountBiz extends Service {
|
|||
needArchivesCom.stream().forEach(e -> {
|
||||
InsuranceSchemeDetailPO po = otherCom.get(e);
|
||||
BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100"));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(finalArchivesCom) || StringUtils.isBlank(finalArchivesCom.get(String.valueOf(e)))) ? "0" : finalArchivesCom.get(String.valueOf(e)));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtil.isEmpty(finalArchivesCom) || StringUtils.isBlank(finalArchivesCom.get(String.valueOf(e)))) ? "0" : finalArchivesCom.get(String.valueOf(e)));
|
||||
BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost());
|
||||
Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum();
|
||||
// BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
|
|
@ -1745,7 +1745,7 @@ public class SIAccountBiz extends Service {
|
|||
needArchivesPerson.stream().forEach(e -> {
|
||||
InsuranceSchemeDetailPO po = fundperson.get(e);
|
||||
BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100"));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(archivesPerson) || StringUtils.isBlank(archivesPerson.get(String.valueOf(e)))) ? "0" : archivesPerson.get(String.valueOf(e)));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtil.isEmpty(archivesPerson) || StringUtils.isBlank(archivesPerson.get(String.valueOf(e)))) ? "0" : archivesPerson.get(String.valueOf(e)));
|
||||
BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost());
|
||||
Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum();
|
||||
// BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
|
|
@ -1813,7 +1813,7 @@ public class SIAccountBiz extends Service {
|
|||
needArchivesCom.stream().forEach(e -> {
|
||||
InsuranceSchemeDetailPO po = fundCom.get(e);
|
||||
BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100"));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(finalArchivesCom) || StringUtils.isBlank(finalArchivesCom.get(String.valueOf(e)))) ? "0" : finalArchivesCom.get(String.valueOf(e)));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtil.isEmpty(finalArchivesCom) || StringUtils.isBlank(finalArchivesCom.get(String.valueOf(e)))) ? "0" : finalArchivesCom.get(String.valueOf(e)));
|
||||
BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost());
|
||||
Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum();
|
||||
// BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
|
|
@ -1898,7 +1898,7 @@ public class SIAccountBiz extends Service {
|
|||
needArchivesPerson.forEach(e -> {
|
||||
InsuranceSchemeDetailPO po = schemeperson.get(e);
|
||||
BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100"));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(archivesPerson) || StringUtils.isBlank(archivesPerson.get(String.valueOf(e)))) ? "0" : archivesPerson.get(String.valueOf(e)));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtil.isEmpty(archivesPerson) || StringUtils.isBlank(archivesPerson.get(String.valueOf(e)))) ? "0" : archivesPerson.get(String.valueOf(e)));
|
||||
BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost());
|
||||
Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum();
|
||||
// BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
|
|
@ -1967,7 +1967,7 @@ public class SIAccountBiz extends Service {
|
|||
needArchivesCom.stream().forEach(e -> {
|
||||
InsuranceSchemeDetailPO po = schemeCom.get(e);
|
||||
BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100"));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(finalArchivesCom) || StringUtils.isBlank(finalArchivesCom.get(String.valueOf(e)))) ? "0" : finalArchivesCom.get(String.valueOf(e)));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtil.isEmpty(finalArchivesCom) || StringUtils.isBlank(finalArchivesCom.get(String.valueOf(e)))) ? "0" : finalArchivesCom.get(String.valueOf(e)));
|
||||
BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost());
|
||||
Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum();
|
||||
// BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
|
|
@ -2055,7 +2055,7 @@ public class SIAccountBiz extends Service {
|
|||
InsuranceSchemeDetailPO po = schemeperson.get(e);
|
||||
BigDecimal paymentProportion = new BigDecimal(po.getPaymentProportion()).divide(new BigDecimal("100"));
|
||||
// BigDecimal paymentNum = new BigDecimal(archivesPerson.get(String.valueOf(e)));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(archivesPerson) || StringUtils.isBlank(archivesPerson.get(String.valueOf(e)))) ? "0" : archivesPerson.get(String.valueOf(e)));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtil.isEmpty(archivesPerson) || StringUtils.isBlank(archivesPerson.get(String.valueOf(e)))) ? "0" : archivesPerson.get(String.valueOf(e)));
|
||||
BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost());
|
||||
Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum();
|
||||
// BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
|
|
@ -2126,7 +2126,7 @@ public class SIAccountBiz extends Service {
|
|||
InsuranceSchemeDetailPO po = schemeCom.get(e);
|
||||
BigDecimal paymentProportion = new BigDecimal(po.getPaymentProportion()).divide(new BigDecimal("100"));
|
||||
// BigDecimal paymentNum = SalaryEntityUtil.string2BigDecimalDefault0(archivesCom.get(String.valueOf(e)));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(archivesCom) || StringUtils.isBlank(archivesCom.get(String.valueOf(e)))) ? "0" : archivesCom.get(String.valueOf(e)));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtil.isEmpty(archivesCom) || StringUtils.isBlank(archivesCom.get(String.valueOf(e)))) ? "0" : archivesCom.get(String.valueOf(e)));
|
||||
BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost());
|
||||
Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum();
|
||||
// BigDecimal result = SalaryEntityUtil.carryRule(newScale, po.getRententionRule(), paymentNum.multiply(paymentProportion).add(fixedCost));
|
||||
|
|
|
|||
|
|
@ -183,6 +183,8 @@ public class ExtEmpPO {
|
|||
private String tenantKey;
|
||||
|
||||
private Collection<Long> ids;
|
||||
private Collection<Long> subcompanyIds;
|
||||
private Collection<Long> departmentIds;
|
||||
|
||||
|
||||
private String departmentOrgName;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.entity.salaryacct.bo;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.engine.salary.annotation.SalaryFormulaVar;
|
||||
import com.engine.salary.component.WeaTableColumnGroup;
|
||||
import com.engine.salary.constant.SalaryDefaultTenantConstant;
|
||||
|
|
@ -27,7 +28,6 @@ import com.engine.salary.util.page.SalaryPageUtil;
|
|||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
|
|
@ -645,7 +645,7 @@ public class SalaryAcctResultBO {
|
|||
List<SalaryAcctResultSaveParam.SalaryAcctResultDetailItemParam> items,
|
||||
SalaryAcctEmployeePO salaryAcctEmployee,
|
||||
Long employeeId) {
|
||||
if (CollectionUtils.isEmpty(items) || ObjectUtils.isEmpty(salaryAcctEmployee)) {
|
||||
if (CollectionUtils.isEmpty(items) || ObjectUtil.isEmpty(salaryAcctEmployee)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
Date now = new Date();
|
||||
|
|
|
|||
|
|
@ -150,4 +150,12 @@ public interface EmployMapper {
|
|||
* @return
|
||||
*/
|
||||
List<DataCollectionEmployee> listVirtualEmpByVirtualSubCompanyIds(@Param("virtualSubCompanyIds") List<Long> virtualSubCompanyIds);
|
||||
|
||||
/**
|
||||
* 根据分部、部门获取查询
|
||||
* @param subCompanyIds
|
||||
* @param departmentIds
|
||||
* @return
|
||||
*/
|
||||
List<DataCollectionEmployee> listBySubCompanyOrDepartment(@Param("subCompanyIds") List<Long> subCompanyIds, @Param("departmentIds") List<Long> departmentIds);
|
||||
}
|
||||
|
|
@ -521,6 +521,36 @@
|
|||
)
|
||||
</if>
|
||||
</select>
|
||||
<select id="listBySubCompanyOrDepartment"
|
||||
resultType="com.engine.salary.entity.datacollection.DataCollectionEmployee">
|
||||
select e.id as employeeId,
|
||||
e.lastname as username,
|
||||
e.status as status,
|
||||
e.certificatenum as idNo,
|
||||
e.workcode as workcode,
|
||||
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
|
||||
left join hrmdepartment d on e.departmentid = d.id
|
||||
left join hrmjobtitles c on e.jobtitle = c.id
|
||||
WHERE e.status not in (7) and (e.accounttype is null or e.accounttype = 0)
|
||||
<if test="subCompanyIds != null and subCompanyIds.size()>0">
|
||||
AND e.subcompanyid1 IN
|
||||
<foreach collection="subCompanyIds" open="(" item="subCompanyId" separator="," close=")">
|
||||
#{subCompanyId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="departmentIds != null and departmentIds.size()>0">
|
||||
AND d.id IN
|
||||
<foreach collection="departmentIds" open="(" item="departmentId" separator="," close=")">
|
||||
#{departmentId}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="listByManagerId" resultType="com.engine.salary.entity.datacollection.DataCollectionEmployee">
|
||||
select id as employeeId, managerstr, lastname as username from HrmResource hrm
|
||||
|
|
|
|||
|
|
@ -86,4 +86,7 @@ public interface ExternalEmployeeMapper {
|
|||
* @return
|
||||
*/
|
||||
Collection<DataCollectionEmployee> listAllForReport();
|
||||
|
||||
|
||||
List<DataCollectionEmployee> listSomeDataCollectionEmployee(ExtEmpPO po);
|
||||
}
|
||||
|
|
@ -168,6 +168,18 @@
|
|||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="subcompanyIds != null and subcompanyIds.size()>0">
|
||||
AND subcompany_id IN
|
||||
<foreach collection="subcompanyIds" open="(" item="subcompanyId" separator="," close=")">
|
||||
#{subcompanyId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="departmentIds != null and departmentIds.size()>0">
|
||||
AND department_id IN
|
||||
<foreach collection="departmentIds" open="(" item="departmentId" separator="," close=")">
|
||||
#{departmentId}
|
||||
</foreach>
|
||||
</if>
|
||||
ORDER BY id DESC
|
||||
</select>
|
||||
<select id="listByParams" resultType="com.engine.salary.entity.datacollection.DataCollectionEmployee">
|
||||
|
|
@ -291,6 +303,129 @@
|
|||
from hrsa_external_employee e
|
||||
left join hrmdepartment d on e.department_id = d.id
|
||||
</select>
|
||||
<select id="listSomeDataCollectionEmployee"
|
||||
resultType="com.engine.salary.entity.datacollection.DataCollectionEmployee">
|
||||
SELECT
|
||||
e.id as employeeId,
|
||||
e.username as username,
|
||||
d.departmentname as departmentName,
|
||||
d.id as departmentId,
|
||||
sc.SUBCOMPANYNAME as subcompanyName,
|
||||
c.jobtitlename as jobtitleName,
|
||||
c.id as jobtitleId,
|
||||
e.companystartdate as companystartdate,
|
||||
e.mobile as mobile,
|
||||
e.status as status,
|
||||
e.workcode as workcode,
|
||||
e.sex as sex,
|
||||
e.email as email,
|
||||
e.telephone as telephone,
|
||||
e.jobcall as jobcall,
|
||||
e.birthday as birthday,
|
||||
c.id as jobtitleId
|
||||
from hrsa_external_employee e
|
||||
left join hrmdepartment d on e.department_id = d.id
|
||||
left join hrmjobtitles c on e.jobtitle_id = c.id
|
||||
left join HrmSubCompany sc on e.SUBCOMPANY_ID=sc.id
|
||||
WHERE e.delete_type = 0
|
||||
<if test="id != null">
|
||||
AND e.id = #{id}
|
||||
</if>
|
||||
<if test="username != null and username!=''">
|
||||
AND e.username = #{username}
|
||||
</if>
|
||||
<if test="departmentName != null">
|
||||
AND e.department_name = #{departmentName}
|
||||
</if>
|
||||
<if test="departmentId != null">
|
||||
AND e.department_id = #{departmentId}
|
||||
</if>
|
||||
<if test="subcompanyName != null">
|
||||
AND e.subcompany_name = #{subcompanyName}
|
||||
</if>
|
||||
<if test="subcompanyId != null">
|
||||
AND e.subcompany_id = #{subcompanyId}
|
||||
</if>
|
||||
<if test="jobtitleName != null">
|
||||
AND e.jobtitle_name = #{jobtitleName}
|
||||
</if>
|
||||
<if test="jobtitleId != null">
|
||||
AND e.jobtitle_id = #{jobtitleId}
|
||||
</if>
|
||||
<if test="companystartdate != null">
|
||||
AND e.companystartdate = #{companystartdate}
|
||||
</if>
|
||||
<if test="mobile != null">
|
||||
AND e.mobile = #{mobile}
|
||||
</if>
|
||||
<if test="status != null">
|
||||
AND e.status = #{status}
|
||||
</if>
|
||||
<if test="workcode != null">
|
||||
AND e.workcode = #{workcode}
|
||||
</if>
|
||||
<if test="sex != null">
|
||||
AND e.sex = #{sex}
|
||||
</if>
|
||||
<if test="email != null">
|
||||
AND e.email = #{email}
|
||||
</if>
|
||||
<if test="telephone != null">
|
||||
AND e.telephone = #{telephone}
|
||||
</if>
|
||||
<if test="jobcall != null">
|
||||
AND e.jobcall = #{jobcall}
|
||||
</if>
|
||||
<if test="birthday != null">
|
||||
AND e.birthday = #{birthday}
|
||||
</if>
|
||||
<if test="idNo != null">
|
||||
AND e.id_no = #{idNo}
|
||||
</if>
|
||||
<if test="bankCardNum != null">
|
||||
AND e.bank_card_num = #{bankCardNum}
|
||||
</if>
|
||||
<if test="bankName != null">
|
||||
AND e.bank_name = #{bankName}
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
AND e.delete_type = #{deleteType}
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
AND e.creator = #{creator}
|
||||
</if>
|
||||
<if test="modifier != null">
|
||||
AND e.modifier = #{modifier}
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
AND e.create_time = #{createTime}
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
AND e.update_time = #{updateTime}
|
||||
</if>
|
||||
<if test="tenantKey != null">
|
||||
AND e.tenant_key = #{tenantKey}
|
||||
</if>
|
||||
<if test="ids != null and ids.size()>0">
|
||||
AND e.id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="subcompanyIds != null and subcompanyIds.size()>0">
|
||||
AND e.subcompany_id IN
|
||||
<foreach collection="subcompanyIds" open="(" item="subcompanyId" separator="," close=")">
|
||||
#{subcompanyId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="departmentIds != null and departmentIds.size()>0">
|
||||
AND e.department_id IN
|
||||
<foreach collection="departmentIds" open="(" item="departmentId" separator="," close=")">
|
||||
#{departmentId}
|
||||
</foreach>
|
||||
</if>
|
||||
ORDER BY e.id DESC
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 插入不为NULL的字段 -->
|
||||
|
|
|
|||
|
|
@ -129,7 +129,9 @@ public class SalaryStatisticsReportBO {
|
|||
}
|
||||
// param.setGrade(((List<Map>) JSON.parseArray(po.getGradeSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList()));
|
||||
// param.setPosition(((List<Map>) JSON.parseArray(po.getPositionSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList()));
|
||||
// param.setStatus(((List<Map>) JSON.parseArray(po.getStatusSetting(), Map.class)).stream().map(m -> m.get(key).toString()).collect(Collectors.toList()));
|
||||
if (po.getStatusSetting() != null) {
|
||||
param.setStatus(((List<Map>) JSON.parseArray(po.getStatusSetting(), Map.class)).stream().map(m -> m.get(key).toString()).collect(Collectors.toList()));
|
||||
}
|
||||
if (po.getEmployeeSetting() != null) {
|
||||
param.setEmployee(((List<Map>) JSON.parseArray(po.getEmployeeSetting(), Map.class)).stream().map(m -> Long.valueOf(m.get(key).toString())).collect(Collectors.toList()));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package com.engine.salary.report.entity.param;
|
||||
|
||||
import com.engine.salary.common.BaseQueryParam;
|
||||
import com.engine.salary.enums.salaryaccounting.EmployeeTypeEnum;
|
||||
import com.engine.salary.report.enums.EmployeeTypeEnum;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
|
@ -24,7 +24,6 @@ import java.util.List;
|
|||
@AllArgsConstructor
|
||||
//"薪酬统计员工明细查询参数")
|
||||
public class SalaryStatisticsEmployeeQueryParam extends BaseQueryParam {
|
||||
|
||||
//关键字")
|
||||
private String keyword;
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,50 @@
|
|||
package com.engine.salary.report.entity.param;
|
||||
|
||||
import com.engine.salary.common.BaseQueryParam;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Harryxzy
|
||||
* @ClassName f
|
||||
* @date 2024/03/25 9:56
|
||||
* @description
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
//"薪酬统计员工明细查询参数")
|
||||
public class SalaryStatisticsEmployeeSalaryQueryParam extends BaseQueryParam {
|
||||
|
||||
// 关键字
|
||||
private String keyword;
|
||||
|
||||
// 起始年月
|
||||
private String startDateStr;
|
||||
private Date startDate;
|
||||
|
||||
// 结束年月
|
||||
private String endDateStr;
|
||||
private Date endDate;
|
||||
|
||||
// 个税扣缴义务人id
|
||||
private List<Long> taxAgentIds;
|
||||
|
||||
// 分部id
|
||||
private List<Long> subCompanyIds;
|
||||
|
||||
// 部门id
|
||||
private List<Long> departmentIds;
|
||||
|
||||
// 是否是导出
|
||||
private boolean isExport;
|
||||
|
||||
// 部分导出id
|
||||
private List<Long> ids;
|
||||
}
|
||||
|
|
@ -1,9 +1,11 @@
|
|||
package com.engine.salary.report.service;
|
||||
|
||||
import com.engine.salary.entity.salaryacct.po.SalaryAcctEmployeePO;
|
||||
import com.engine.salary.report.entity.dto.SalaryStatisticsEmployeeDetailResultDTO;
|
||||
import com.engine.salary.report.entity.dto.SalaryStatisticsEmployeeListDTO;
|
||||
import com.engine.salary.report.entity.param.SalaryStatisticsEmployeeDetailQueryParam;
|
||||
import com.engine.salary.report.entity.param.SalaryStatisticsEmployeeQueryParam;
|
||||
import com.engine.salary.report.entity.param.SalaryStatisticsEmployeeSalaryQueryParam;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -44,6 +46,10 @@ public interface SalaryStatisticsEmployeeService {
|
|||
*/
|
||||
List<Map<String, Object>> listDetailPage(SalaryStatisticsEmployeeDetailResultDTO salaryStatisticsEmployeeDetailResult, SalaryStatisticsEmployeeDetailQueryParam queryParam);
|
||||
|
||||
PageInfo<SalaryAcctEmployeePO> listSalaryAcctEmp(SalaryStatisticsEmployeeSalaryQueryParam queryParam);
|
||||
|
||||
SalaryStatisticsEmployeeDetailResultDTO getDetailSalaryAcctResultByAcctEmp(List<SalaryAcctEmployeePO> salaryAcctEmployeeList);
|
||||
|
||||
/**
|
||||
* 导出员工详情列表
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.report.service.impl;
|
||||
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
|
|
@ -11,6 +12,7 @@ import com.engine.salary.entity.salarysob.po.SalarySobPO;
|
|||
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
|
||||
import com.engine.salary.enums.UserStatusEnum;
|
||||
import com.engine.salary.enums.datacollection.UseEmployeeTypeEnum;
|
||||
import com.engine.salary.enums.salarysob.SalaryEmployeeStatusEnum;
|
||||
import com.engine.salary.mapper.salaryacct.SalaryAcctEmployeeMapper;
|
||||
import com.engine.salary.report.common.constant.SalaryConstant;
|
||||
import com.engine.salary.report.entity.bo.SalaryStatisticsEmployeeBO;
|
||||
|
|
@ -18,6 +20,7 @@ import com.engine.salary.report.entity.dto.SalaryStatisticsEmployeeDetailResultD
|
|||
import com.engine.salary.report.entity.dto.SalaryStatisticsEmployeeListDTO;
|
||||
import com.engine.salary.report.entity.param.SalaryStatisticsEmployeeDetailQueryParam;
|
||||
import com.engine.salary.report.entity.param.SalaryStatisticsEmployeeQueryParam;
|
||||
import com.engine.salary.report.entity.param.SalaryStatisticsEmployeeSalaryQueryParam;
|
||||
import com.engine.salary.report.service.SalaryStatisticsEmployeeService;
|
||||
import com.engine.salary.service.*;
|
||||
import com.engine.salary.service.impl.*;
|
||||
|
|
@ -31,6 +34,7 @@ import com.engine.salary.util.page.SalaryPageUtil;
|
|||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Sets;
|
||||
import com.wbi.util.Util;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
|
@ -259,7 +263,9 @@ public class SalaryStatisticsEmployeeServiceImpl extends Service implements Sala
|
|||
acctResultValueMap.put(k, map);
|
||||
});
|
||||
|
||||
|
||||
// 获取人员信息
|
||||
List<DataCollectionEmployee> employeeList = getSalaryEmployeeService(user).listByIds(salaryStatisticsEmployeeDetailResult.getSalaryAcctEmployeeList().stream().map(SalaryAcctEmployeePO::getEmployeeId).distinct().collect(Collectors.toList()));
|
||||
Map<Long, DataCollectionEmployee> empMap = SalaryEntityUtil.convert2Map(employeeList, DataCollectionEmployee::getEmployeeId);
|
||||
List<Map<String, Object>> list = Lists.newArrayList();
|
||||
Map<String, Object> map;
|
||||
for (SalaryAcctEmployeePO se : salaryStatisticsEmployeeDetailResult.getSalaryAcctEmployeeList()) {
|
||||
|
|
@ -269,11 +275,19 @@ public class SalaryStatisticsEmployeeServiceImpl extends Service implements Sala
|
|||
resultValueMap.forEach((k, v) -> {
|
||||
finalMap.put(k + SalaryConstant.DYNAMIC_SUFFIX, v);
|
||||
});
|
||||
DataCollectionEmployee emp = empMap.getOrDefault(se.getEmployeeId(), DataCollectionEmployee.builder().build());
|
||||
map.put("id", se.getId().toString());
|
||||
map.put("salaryMonth", SalaryDateUtil.getFormatYearMonth(se.getSalaryMonth()));
|
||||
map.put("taxAgent", taxAgentMap.get(se.getTaxAgentId()));
|
||||
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()));
|
||||
|
||||
// IncomeCategoryEnum incomeCategoryEnum = IncomeCategoryEnum.parseByValue(Integer.parseInt(se.getIncomeCategory()));
|
||||
// map.put("incomeCategory", Objects.isNull(incomeCategoryEnum) ? "" : SalaryI18nUtil.getI18nLabel(incomeCategoryEnum.getLabelId(), incomeCategoryEnum.getDefaultLabel()));
|
||||
list.add(map);
|
||||
|
|
@ -281,7 +295,92 @@ public class SalaryStatisticsEmployeeServiceImpl extends Service implements Sala
|
|||
return list;
|
||||
}
|
||||
|
||||
// @Override
|
||||
@Override
|
||||
public PageInfo<SalaryAcctEmployeePO> listSalaryAcctEmp(SalaryStatisticsEmployeeSalaryQueryParam queryParam) {
|
||||
List<SalaryStatisticsEmployeeListDTO> list = Collections.emptyList();
|
||||
PageInfo<SalaryStatisticsEmployeeListDTO> page = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), list, SalaryStatisticsEmployeeListDTO.class);
|
||||
|
||||
// 1.分权处理, 首先获取个税扣缴义务人参数
|
||||
Collection<TaxAgentPO> taxAgentViews = getTaxAgentService(user).listAllTaxAgents((long) user.getUID());
|
||||
List<Long> taxAgentIds = Objects.isNull(taxAgentViews) ? Lists.newArrayList() : taxAgentViews.stream().map(TaxAgentPO::getId).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(queryParam.getTaxAgentIds())) {
|
||||
taxAgentIds = taxAgentIds.stream().filter(queryParam.getTaxAgentIds()::contains).collect(Collectors.toList());
|
||||
}
|
||||
if (CollectionUtils.isEmpty(taxAgentIds)) {
|
||||
return new PageInfo<>();
|
||||
}
|
||||
|
||||
// 2.年月参数处理,注意:薪资所属月居然是用字符串存储的,无法通过sql between处理
|
||||
List<Date> dataParam = new ArrayList<>();
|
||||
if (StringUtils.isNotBlank(queryParam.getStartDateStr())) {
|
||||
dataParam.add(SalaryDateUtil.dateStrToLocalTime(queryParam.getStartDateStr()+ "-01 00:00:00"));
|
||||
}
|
||||
if (StringUtils.isNotBlank(queryParam.getEndDateStr())) {
|
||||
dataParam.add(SalaryDateUtil.dateStrToLocalTime(queryParam.getEndDateStr()+ "-01 00:00:00"));
|
||||
}
|
||||
Set<Date> salaryMonths = SalaryStatisticsEmployeeBO.getSalaryMonths(null, dataParam)
|
||||
.stream()
|
||||
.map(SalaryDateUtil::dateStrToLocalYearMonth)
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
// 查询薪资核算人员
|
||||
List<SalaryAcctEmployeePO> salaryAcctEmployeeList = getSalaryAcctEmployeeService(user).listByTaxAgentAndSalaryMonth(taxAgentIds, salaryMonths);
|
||||
if (CollectionUtils.isNotEmpty(queryParam.getSubCompanyIds()) || CollectionUtils.isNotEmpty(queryParam.getDepartmentIds()) || StringUtils.isNotBlank(queryParam.getKeyword())) {
|
||||
// 根据分部、部门筛选
|
||||
List<DataCollectionEmployee> employeeList = getSalaryEmployeeService(user).listBySubCompanyOrDepartment(queryParam.getSubCompanyIds(), queryParam.getDepartmentIds());
|
||||
// 根据关键词过滤
|
||||
if(StringUtils.isNotBlank(queryParam.getKeyword())) {
|
||||
employeeList = employeeList.stream()
|
||||
.filter(e -> (e.getUsername().contains(queryParam.getKeyword()) || (StringUtils.isNotEmpty(e.getWorkcode()) && e.getWorkcode().contains(queryParam.getKeyword()))))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
List<Long> employeeIds = employeeList.stream().map(DataCollectionEmployee::getEmployeeId).collect(Collectors.toList());
|
||||
salaryAcctEmployeeList = salaryAcctEmployeeList.stream().filter( acctEmp -> employeeIds.contains(acctEmp.getEmployeeId())).collect(Collectors.toList());
|
||||
}
|
||||
if (CollectionUtils.isEmpty(salaryAcctEmployeeList)) {
|
||||
return new PageInfo<>();
|
||||
}
|
||||
|
||||
// 分页
|
||||
if (CollectionUtils.isNotEmpty(queryParam.getIds())) {
|
||||
salaryAcctEmployeeList = salaryAcctEmployeeList.stream().filter(emp -> queryParam.getIds().contains(emp.getId())).collect(Collectors.toList());
|
||||
}
|
||||
salaryAcctEmployeeList = salaryAcctEmployeeList.stream().sorted(Comparator.comparing(SalaryAcctEmployeePO::getSalaryMonth)).collect(Collectors.toList());
|
||||
Collections.reverse(salaryAcctEmployeeList);
|
||||
PageInfo<SalaryAcctEmployeePO> SalaryAcctEmployeePageInfo = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), salaryAcctEmployeeList);
|
||||
if (queryParam.isExport()) {
|
||||
SalaryAcctEmployeePageInfo.setList(salaryAcctEmployeeList);
|
||||
}
|
||||
return SalaryAcctEmployeePageInfo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SalaryStatisticsEmployeeDetailResultDTO getDetailSalaryAcctResultByAcctEmp(List<SalaryAcctEmployeePO> salaryAcctEmployeeList) {
|
||||
if (CollectionUtils.isEmpty(salaryAcctEmployeeList)) {
|
||||
return SalaryStatisticsEmployeeDetailResultDTO.builder()
|
||||
.salaryAcctEmployeeList(Collections.emptyList())
|
||||
.salaryAcctResultValueList(Collections.emptyList())
|
||||
.salaryItemList(Collections.emptyList())
|
||||
.build();
|
||||
}
|
||||
|
||||
// 获取核算结果数据
|
||||
List<Long> salaryAcctEmployeeIds = salaryAcctEmployeeList.stream().map(SalaryAcctEmployeePO::getId).collect(Collectors.toList());
|
||||
List<SalaryAcctResultPO> salaryAcctResultValues = getSalaryAcctResultService(user).listBySalaryAcctEmployeeIds(salaryAcctEmployeeIds);
|
||||
|
||||
// 3.获取薪资项目
|
||||
List<Long> salaryItemIds = salaryAcctResultValues.stream().map(SalaryAcctResultPO::getSalaryItemId).distinct().collect(Collectors.toList());
|
||||
List<SalaryItemPO> salaryItemList = CollectionUtils.isEmpty(salaryItemIds) ? Lists.newArrayList() : getSalaryItemService(user).listByIds(salaryItemIds);
|
||||
|
||||
return SalaryStatisticsEmployeeDetailResultDTO.builder()
|
||||
.salaryAcctEmployeeList(salaryAcctEmployeeList)
|
||||
.salaryAcctResultValueList(salaryAcctResultValues)
|
||||
.salaryItemList(salaryItemList)
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
// @Override
|
||||
// public void exportDetailList(Map<String, Object> map, SalaryStatisticsEmployeeDetailQueryParam queryParam) {
|
||||
// DataCollectionEmployee employee = getSalaryEmployeeService(user).getEmployeeById(queryParam.getEmployeeId());
|
||||
// // 获取核算数据
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.report.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.mapper.report.salaryStatisticsPushDetailMapper;
|
||||
import com.engine.salary.report.entity.po.SalaryStatisticsPushDetailPO;
|
||||
|
|
@ -7,7 +8,6 @@ import com.engine.salary.report.service.SalaryStatisticsPushDetailService;
|
|||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -84,7 +84,7 @@ public class SalaryStatisticsPushDetailServiceImpl extends Service implements Sa
|
|||
* @param
|
||||
*/
|
||||
public List<SalaryStatisticsPushDetailPO> queryPushDetailPOByBatchIdAndEmpIds(Long batchId, List<Long> sharedBy) {
|
||||
if (CollectionUtils.isEmpty(sharedBy) || ObjectUtils.isEmpty(batchId)) {
|
||||
if (CollectionUtils.isEmpty(sharedBy) || ObjectUtil.isEmpty(batchId)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
List<List<Long>> partition = Lists.partition(sharedBy, 999);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.report.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.common.BaseQueryParam;
|
||||
|
|
@ -28,13 +29,12 @@ import com.engine.salary.service.impl.TaxAgentServiceImpl;
|
|||
import com.engine.salary.util.SalaryDateUtil;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.db.IdGenerator;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.engine.salary.util.page.SalaryPageUtil;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.engine.salary.util.db.IdGenerator;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.hrm.User;
|
||||
|
||||
|
|
@ -231,7 +231,7 @@ public class SalaryStatisticsPushServiceImpl extends Service implements SalarySt
|
|||
@Override
|
||||
public void cancel(Long id) {
|
||||
SalaryStatisticsPushDetailPO detailPO = getSalaryStatisticsPushDetailService(user).getById(id);
|
||||
if (ObjectUtils.isEmpty(detailPO)) {
|
||||
if (ObjectUtil.isEmpty(detailPO)) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(user.getLanguage(), 542148, "数据不存在"));
|
||||
}
|
||||
cancelSingle(detailPO);
|
||||
|
|
|
|||
|
|
@ -4,10 +4,13 @@ import com.engine.common.util.ServiceUtil;
|
|||
import com.engine.salary.report.entity.dto.SalaryStatisticsEmployeeListDTO;
|
||||
import com.engine.salary.report.entity.param.SalaryStatisticsEmployeeDetailQueryParam;
|
||||
import com.engine.salary.report.entity.param.SalaryStatisticsEmployeeQueryParam;
|
||||
import com.engine.salary.report.entity.param.SalaryStatisticsEmployeeSalaryQueryParam;
|
||||
import com.engine.salary.report.wrapper.SalaryStatisticsEmployeeWrapper;
|
||||
import com.engine.salary.util.ResponseResult;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import weaver.hrm.HrmUserVarify;
|
||||
import weaver.hrm.User;
|
||||
|
||||
|
|
@ -18,8 +21,14 @@ import javax.ws.rs.Path;
|
|||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.StreamingOutput;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 薪酬统计员工明细
|
||||
* <p>Copyright: Copyright (c) 2022</p>
|
||||
|
|
@ -28,6 +37,7 @@ import java.util.Map;
|
|||
* @author qiantao
|
||||
* @version 1.0
|
||||
**/
|
||||
@Slf4j
|
||||
public class SalaryStatisticsEmployeeController {
|
||||
|
||||
private SalaryStatisticsEmployeeWrapper getSalaryStatisticsEmployeeWrapper(User user) {
|
||||
|
|
@ -62,6 +72,69 @@ public class SalaryStatisticsEmployeeController {
|
|||
return new ResponseResult<SalaryStatisticsEmployeeDetailQueryParam, Map<String, Object>>(user).run(getSalaryStatisticsEmployeeWrapper(user)::detailList, queryParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 员工薪资列表
|
||||
*
|
||||
* @param queryParam
|
||||
* @return
|
||||
*/
|
||||
@POST
|
||||
@Path("/salaryList")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String salaryList(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryStatisticsEmployeeSalaryQueryParam queryParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<SalaryStatisticsEmployeeSalaryQueryParam, Map<String, Object>>(user).run(getSalaryStatisticsEmployeeWrapper(user)::salaryList, queryParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 员工薪资列表合计行
|
||||
*
|
||||
* @param queryParam
|
||||
* @return
|
||||
*/
|
||||
@POST
|
||||
@Path("/salaryListSum")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String salaryListSum(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryStatisticsEmployeeSalaryQueryParam queryParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<SalaryStatisticsEmployeeSalaryQueryParam, Map<String, Object>>(user).run(getSalaryStatisticsEmployeeWrapper(user)::salaryListSum, queryParam);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出员工薪资列表
|
||||
*
|
||||
* @param queryParam
|
||||
* @return
|
||||
*/
|
||||
@POST
|
||||
@Path("/exportSalaryList")
|
||||
@Produces(MediaType.APPLICATION_OCTET_STREAM)
|
||||
public Response exportSalaryList(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryStatisticsEmployeeSalaryQueryParam queryParam) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
XSSFWorkbook workbook = getSalaryStatisticsEmployeeWrapper(user).exportSalaryList(queryParam);
|
||||
|
||||
String fileName = "薪资明细" + LocalDate.now();
|
||||
|
||||
try {
|
||||
fileName = URLEncoder.encode(fileName + ".xlsx", "UTF-8");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
|
||||
StreamingOutput output = outputStream -> {
|
||||
workbook.write(outputStream);
|
||||
outputStream.flush();
|
||||
};
|
||||
response.setContentType("application/octet-stream");
|
||||
return Response.ok(output).header("Content-disposition", "attachment;filename=" + fileName).header("Cache-Control", "no-cache").build();
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("薪资明细导出异常", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 导出员工详情列表
|
||||
// *
|
||||
|
|
|
|||
|
|
@ -199,9 +199,36 @@ public class SalaryStatisticsReportController {
|
|||
*/
|
||||
@POST
|
||||
@Path("/getDataPerspective")
|
||||
@Produces(MediaType.APPLICATION_OCTET_STREAM)
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String getDataPerspective(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryStatisticsDataPerspectiveQueryParam param) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<SalaryStatisticsDataPerspectiveQueryParam, Map<String, Object>>(user).run(getSalaryStatisticsReportWrapper(user)::getDataPerspective, param);
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/exportDataPerspective")
|
||||
@Produces(MediaType.APPLICATION_OCTET_STREAM)
|
||||
public Response exportDataPerspective(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryStatisticsDataPerspectiveQueryParam param) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> map = getSalaryStatisticsReportWrapper(user).exportDataPerspective(param);
|
||||
XSSFWorkbook workbook = (XSSFWorkbook) map.get("workbook");
|
||||
String time = LocalDate.now().toString();
|
||||
String fileName = map.get("fileName") + "-" + time;
|
||||
try {
|
||||
fileName = URLEncoder.encode(fileName + ".xlsx", "UTF-8");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
StreamingOutput output = outputStream -> {
|
||||
workbook.write(outputStream);
|
||||
outputStream.flush();
|
||||
};
|
||||
response.setContentType("application/octet-stream");
|
||||
return Response.ok(output).header("Content-disposition", "attachment;filename=" + fileName).header("Cache-Control", "no-cache").build();
|
||||
} catch (Exception e) {
|
||||
log.error("报表明细内容导出异常", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
package com.engine.salary.report.wrapper;
|
||||
|
||||
import com.cloudstore.eccom.constant.WeaBoolAttr;
|
||||
import com.cloudstore.eccom.pc.table.WeaTable;
|
||||
import com.cloudstore.eccom.pc.table.WeaTableColumn;
|
||||
import com.cloudstore.eccom.result.WeaResultMsg;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.component.SalaryWeaTable;
|
||||
import com.engine.salary.entity.salaryacct.po.SalaryAcctEmployeePO;
|
||||
import com.engine.salary.entity.salaryarchive.dto.SalaryArchiveListDTO;
|
||||
import com.engine.salary.entity.salaryitem.po.SalaryItemPO;
|
||||
import com.engine.salary.report.common.constant.SalaryConstant;
|
||||
|
|
@ -14,10 +16,12 @@ import com.engine.salary.report.entity.dto.SalaryStatisticsEmployeeDetailResultD
|
|||
import com.engine.salary.report.entity.dto.SalaryStatisticsEmployeeListDTO;
|
||||
import com.engine.salary.report.entity.param.SalaryStatisticsEmployeeDetailQueryParam;
|
||||
import com.engine.salary.report.entity.param.SalaryStatisticsEmployeeQueryParam;
|
||||
import com.engine.salary.report.entity.param.SalaryStatisticsEmployeeSalaryQueryParam;
|
||||
import com.engine.salary.report.service.SalaryStatisticsEmployeeService;
|
||||
import com.engine.salary.report.service.impl.SalaryStatisticsEmployeeServiceImpl;
|
||||
import com.engine.salary.report.util.ReportDataUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.excel.ExcelUtilPlus;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.engine.salary.util.page.SalaryPageUtil;
|
||||
import com.google.common.collect.Maps;
|
||||
|
|
@ -25,6 +29,9 @@ import org.apache.commons.collections4.CollectionUtils;
|
|||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
import weaver.general.Util;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import weaver.general.PageIdConst;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
|
@ -32,6 +39,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 薪酬统计员工明细
|
||||
|
|
@ -88,7 +96,7 @@ public class SalaryStatisticsEmployeeWrapper extends Service {
|
|||
PageInfo<Map<String, Object>> pageInfo = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(), records);
|
||||
|
||||
// 列表columns
|
||||
List<WeaTableColumn> weaTableColumns = buildDetailTableColumns(salaryStatisticsEmployeeDetailResult);
|
||||
List<WeaTableColumn> weaTableColumns = buildDetailTableColumns(salaryStatisticsEmployeeDetailResult, false);
|
||||
|
||||
SalaryWeaTable<SalaryArchiveListDTO> table = new SalaryWeaTable<SalaryArchiveListDTO>(user, SalaryStatisticsEmployeeDetailResultDTO.class);
|
||||
table.setColumns(weaTableColumns);
|
||||
|
|
@ -106,12 +114,20 @@ public class SalaryStatisticsEmployeeWrapper extends Service {
|
|||
return resultMap;
|
||||
}
|
||||
|
||||
private List<WeaTableColumn> buildDetailTableColumns(SalaryStatisticsEmployeeDetailResultDTO salaryStatisticsEmployeeDetailResult) {
|
||||
private List<WeaTableColumn> buildDetailTableColumns(SalaryStatisticsEmployeeDetailResultDTO salaryStatisticsEmployeeDetailResult, boolean isSalaryList) {
|
||||
// 表格表头
|
||||
List<WeaTableColumn> columns = new ArrayList<>();
|
||||
columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(user.getLanguage(),542604, "薪资所属月"), "salaryMonth"));
|
||||
columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(user.getLanguage(),537996, "个税扣缴义务人"), "taxAgent"));
|
||||
columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(user.getLanguage(),24427, "账套"), "salarySob"));
|
||||
if (isSalaryList) {
|
||||
columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(0, "姓名"), "userName"));
|
||||
columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(0, "分部"), "subCompany"));
|
||||
columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(0, "部门"), "department"));
|
||||
columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(0, "岗位"), "jobTitle"));
|
||||
columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(0, "员工状态"), "status"));
|
||||
columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(0, "工号"), "workCode"));
|
||||
}
|
||||
columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(user.getLanguage(),26755, "次数"), "acctTimes").setDisplay(WeaBoolAttr.FALSE));
|
||||
// columns.add(new WeaTableColumn("100px",SalaryI18nUtil.getI18nLabel(user.getLanguage(),542345, "收入所得项目"), "incomeCategory"));
|
||||
salaryStatisticsEmployeeDetailResult.getSalaryItemList().forEach(item -> {
|
||||
|
|
@ -125,6 +141,142 @@ public class SalaryStatisticsEmployeeWrapper extends Service {
|
|||
return columns;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取员工发薪明细列表
|
||||
* @param queryParam
|
||||
*/
|
||||
public Map<String, Object> salaryList(SalaryStatisticsEmployeeSalaryQueryParam queryParam) {
|
||||
Map<String, Object> resultMap = Maps.newHashMap();
|
||||
if (StringUtils.isBlank(queryParam.getStartDateStr()) || StringUtils.isBlank(queryParam.getEndDateStr())) {
|
||||
return resultMap;
|
||||
}
|
||||
// 获取发薪人员
|
||||
PageInfo<SalaryAcctEmployeePO> salaryAcctEmployeePageInfo = getSalaryStatisticsEmployeeService(user).listSalaryAcctEmp(queryParam);
|
||||
// 获取薪资核算结果
|
||||
SalaryStatisticsEmployeeDetailResultDTO salaryStatisticsEmployeeDetailResult = getSalaryStatisticsEmployeeService(user).getDetailSalaryAcctResultByAcctEmp(salaryAcctEmployeePageInfo.getList());
|
||||
List<Map<String, Object>> records = getSalaryStatisticsEmployeeService(user).listDetailPage(salaryStatisticsEmployeeDetailResult, null);
|
||||
|
||||
Map<String, Object> countResultMap = Maps.newHashMap();
|
||||
if (CollectionUtils.isNotEmpty(records)) {
|
||||
List<SalaryItemPO> salaryItems = salaryStatisticsEmployeeDetailResult.getSalaryItemList();
|
||||
for (SalaryItemPO item : salaryItems) {
|
||||
BigDecimal sumBigDecimal = new BigDecimal(SalaryStatisticsReportBO.ZERO);
|
||||
String itemKey = item.getId() + SalaryConstant.DYNAMIC_SUFFIX;
|
||||
for (Map<String, Object> record : records) {
|
||||
if (record.containsKey(itemKey)) {
|
||||
if (Objects.nonNull(record.get(itemKey)) && StringUtils.isNotEmpty(record.get(itemKey).toString()) && NumberUtils.isCreatable(record.get(itemKey).toString())) {
|
||||
sumBigDecimal = sumBigDecimal.add(new BigDecimal(record.get(itemKey).toString()));
|
||||
record.put(itemKey, ReportDataUtil.thousandthConvert(record.get(itemKey).toString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
// 薪资项目合计
|
||||
if (queryParam.isExport()) {
|
||||
countResultMap.put(itemKey, ReportDataUtil.thousandthConvert(sumBigDecimal.toString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
PageInfo<Map<String, Object>> pageInfo = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize());
|
||||
pageInfo.setList(records);
|
||||
if (queryParam.isExport()) {
|
||||
pageInfo.setList(records);
|
||||
}
|
||||
pageInfo.setTotal(salaryAcctEmployeePageInfo.getTotal());
|
||||
|
||||
// 列表columns
|
||||
List<WeaTableColumn> weaTableColumns = buildDetailTableColumns(salaryStatisticsEmployeeDetailResult, true);
|
||||
|
||||
// 结果
|
||||
if (queryParam.isExport()) {
|
||||
resultMap.put("columns", weaTableColumns);
|
||||
resultMap.put("salaryItems",salaryStatisticsEmployeeDetailResult.getSalaryItemList());
|
||||
resultMap.put("countResult", countResultMap);
|
||||
} else {
|
||||
WeaTable table = new WeaTable();
|
||||
String pageId = "b72ed4bb-725e-45de-aea1-4eb4c9184af7";
|
||||
table.setPageID(pageId);
|
||||
table.setPageUID(pageId + user.getUID());
|
||||
table.setPagesize(PageIdConst.getPageSize(pageId, user.getUID()));
|
||||
table.setBackfields("");
|
||||
table.setColumns(weaTableColumns);
|
||||
|
||||
WeaResultMsg result = new WeaResultMsg(false);
|
||||
result.putAll(table.makeDataResult());
|
||||
result.success();
|
||||
resultMap.put("dataKey", result.getResultMap());
|
||||
}
|
||||
resultMap.put("pageInfo", pageInfo);
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取员工发薪明细列表
|
||||
* @param queryParam
|
||||
*/
|
||||
public Map<String, Object> salaryListSum(SalaryStatisticsEmployeeSalaryQueryParam queryParam) {
|
||||
Map<String, Object> resultMap = Maps.newHashMap();
|
||||
if (StringUtils.isBlank(queryParam.getStartDateStr()) || StringUtils.isBlank(queryParam.getEndDateStr())) {
|
||||
return resultMap;
|
||||
}
|
||||
queryParam.setExport(true);
|
||||
// 获取发薪人员
|
||||
PageInfo<SalaryAcctEmployeePO> salaryAcctEmployeePageInfo = getSalaryStatisticsEmployeeService(user).listSalaryAcctEmp(queryParam);
|
||||
// 获取薪资核算结果
|
||||
SalaryStatisticsEmployeeDetailResultDTO salaryStatisticsEmployeeDetailResult = getSalaryStatisticsEmployeeService(user).getDetailSalaryAcctResultByAcctEmp(salaryAcctEmployeePageInfo.getList());
|
||||
List<Map<String, Object>> records = getSalaryStatisticsEmployeeService(user).listDetailPage(salaryStatisticsEmployeeDetailResult, null);
|
||||
|
||||
Map<String, Object> sumResultMap = Maps.newHashMap();
|
||||
if (CollectionUtils.isNotEmpty(records)) {
|
||||
List<SalaryItemPO> salaryItems = salaryStatisticsEmployeeDetailResult.getSalaryItemList();
|
||||
for (SalaryItemPO item : salaryItems) {
|
||||
BigDecimal sumBigDecimal = new BigDecimal(SalaryStatisticsReportBO.ZERO);
|
||||
String itemKey = item.getId() + SalaryConstant.DYNAMIC_SUFFIX;
|
||||
for (Map<String, Object> record : records) {
|
||||
if (record.containsKey(itemKey)) {
|
||||
if (Objects.nonNull(record.get(itemKey)) && StringUtils.isNotEmpty(record.get(itemKey).toString()) && NumberUtils.isCreatable(record.get(itemKey).toString())) {
|
||||
sumBigDecimal = sumBigDecimal.add(new BigDecimal(record.get(itemKey).toString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
// 薪资项目合计
|
||||
sumResultMap.put(itemKey, ReportDataUtil.thousandthConvert(sumBigDecimal.toString()));
|
||||
}
|
||||
}
|
||||
resultMap.put("sumRow", sumResultMap);
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
public XSSFWorkbook exportSalaryList(SalaryStatisticsEmployeeSalaryQueryParam queryParam) {
|
||||
queryParam.setCurrent(1);
|
||||
queryParam.setExport(true);
|
||||
Map<String, Object> resultMap = salaryList(queryParam);
|
||||
List<WeaTableColumn> columns = (List<WeaTableColumn>)resultMap.get("columns");
|
||||
List<SalaryItemPO> salaryItemList = ((List<SalaryItemPO>)resultMap.get("salaryItems"));
|
||||
List<Map<String, Object>> resultList = ((PageInfo<Map<String, Object>>) resultMap.get("pageInfo")).getList();
|
||||
Map<String, Object> countResult = (Map<String, Object>)resultMap.get("countResult");
|
||||
|
||||
List<List<Object>> rowList = new ArrayList<>();
|
||||
// 表头
|
||||
rowList.add(columns.stream().map(WeaTableColumn::getText).collect(Collectors.toList()));
|
||||
// 数据
|
||||
for (Map<String, Object> valueMap : resultList) {
|
||||
List<Object> list = new ArrayList<>();
|
||||
for (WeaTableColumn column : columns) {
|
||||
list.add(Util.null2String(valueMap.get(column.getColumn())));
|
||||
}
|
||||
rowList.add(list);
|
||||
}
|
||||
// 合计
|
||||
List<Object> sumRow = new ArrayList<>();
|
||||
sumRow.add("总计");
|
||||
for (int i=1; i<columns.size(); i++) {
|
||||
sumRow.add(Util.null2String(countResult.get(columns.get(i).getColumn())));
|
||||
}
|
||||
rowList.add(sumRow);
|
||||
|
||||
return ExcelUtilPlus.genWorkbookV2(rowList,"薪资明细",true);
|
||||
}
|
||||
|
||||
// public Map<String, Object> exportDetailList(SalaryStatisticsEmployeeDetailQueryParam queryParam) {
|
||||
// SalaryAssert.notNull(queryParam.getEmployeeId(), SalaryI18nUtil.getI18nLabel(currentTenantKey, currentEmployeeId, 544325, "人员id不能为空"));
|
||||
// // 构建异步导出参数
|
||||
|
|
|
|||
|
|
@ -7,13 +7,14 @@ import com.cloudstore.eccom.pc.table.WeaTableColumn;
|
|||
import com.cloudstore.eccom.result.WeaResultMsg;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.hrmelog.entity.dto.LoggerContext;
|
||||
import com.engine.salary.cache.SalaryCacheKey;
|
||||
import com.engine.salary.component.WeaFormOption;
|
||||
import com.engine.salary.component.WeaTableColumnGroup;
|
||||
import com.engine.salary.config.SalaryElogConfig;
|
||||
import com.engine.hrmelog.entity.dto.LoggerContext;
|
||||
import com.engine.salary.entity.salaryitem.po.SalaryItemPO;
|
||||
import com.engine.salary.enums.OperateTypeEnum;
|
||||
import com.engine.salary.enums.salaryitem.SalaryDataTypeEnum;
|
||||
import com.engine.salary.exception.SalaryRunTimeException;
|
||||
import com.engine.salary.report.common.constant.SalaryConstant;
|
||||
import com.engine.salary.report.entity.bo.SalaryStatisticsReportBO;
|
||||
|
|
@ -41,6 +42,7 @@ import weaver.general.Util;
|
|||
import weaver.hrm.User;
|
||||
import weaver.wechat.util.Utils;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
|
@ -498,6 +500,74 @@ public class SalaryStatisticsReportWrapper extends Service {
|
|||
return resultMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取报表透视数据
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> exportDataPerspective(SalaryStatisticsDataPerspectiveQueryParam param) {
|
||||
if (param.getId() == null || param.getDimensionId() == null) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(84026, "参数错误"));
|
||||
}
|
||||
SalaryStatisticsReportPO po = this.getSalaryStatisticsReportService(user).getById(param.getId());
|
||||
if (po == null) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(161845, "薪酬统计报表不存在"));
|
||||
}
|
||||
SalaryStatisticsDimensionPO dimension = getSalaryStatisticsDimensionService(user).getById(param.getDimensionId());
|
||||
if (dimension == null) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(161300, "统计维度不存在"));
|
||||
}
|
||||
// 校验报表权限,如果是被分享报表修改User
|
||||
sharedReportCheck(param.isShare(), po);
|
||||
// 查询自定义统计项目中所有薪资项目id
|
||||
List<SalaryStatisticsItemPO> salaryStatisticsItemPOS = getSalaryStatisticsItemService(user).listByStatisticsReportId(param.getId());
|
||||
List<Long> salaryItemIds = salaryStatisticsItemPOS.stream().filter(item -> StringUtils.isNotBlank(item.getItemValue())).map(p -> p.getItemValue().split(","))
|
||||
.flatMap(Arrays::stream).map(Long::valueOf).collect(Collectors.toList());
|
||||
|
||||
param.setCurrent(1);
|
||||
param.setPageSize(1000000000);
|
||||
PageInfo<Map<String, Object>> pageInfo = getSalaryStatisticsReportService(user).buildDataPerspectiveRecords(param, po, dimension, salaryStatisticsItemPOS);
|
||||
|
||||
|
||||
List<List<Object>> resultList = new ArrayList<>();
|
||||
|
||||
List<SalaryItemPO> itemList = getSalaryItemService(user).listByIds(salaryItemIds);
|
||||
// 表格表头
|
||||
List<WeaTableColumn> weaTableColumns = buildDataPerspectiveTableColumns(itemList);
|
||||
List<Object> columns = new ArrayList<>();
|
||||
for (WeaTableColumn column : weaTableColumns) {
|
||||
columns.add(column.getText());
|
||||
}
|
||||
resultList.add(columns);
|
||||
|
||||
List<Map<String, Object>> list = pageInfo.getList();
|
||||
for (Map<String, Object> resultMap : list) {
|
||||
List<Object> row = new ArrayList<>();
|
||||
for (WeaTableColumn column : weaTableColumns) {
|
||||
try {
|
||||
if (StringUtils.isNotBlank(column.getOtherpara()) && column.getOtherpara().equals(SalaryDataTypeEnum.NUMBER.getValue())) {
|
||||
// 数值
|
||||
row.add(new BigDecimal(resultMap.get(column.getColumn()).toString()));
|
||||
} else {
|
||||
row.add(Utils.null2String(resultMap.get(column.getColumn())));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
row.add(Utils.null2String(resultMap.get(column.getColumn())));
|
||||
}
|
||||
}
|
||||
resultList.add(row);
|
||||
}
|
||||
|
||||
String sheetName = SalaryI18nUtil.getI18nLabel(179263, "薪酬统计报表明细") + "-" + dimension.getDimName();
|
||||
XSSFWorkbook book = ExcelUtilPlus.genWorkbookV2(resultList, sheetName);
|
||||
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("workbook", book);
|
||||
map.put("fileName", sheetName);
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 权限校验
|
||||
*
|
||||
|
|
@ -536,7 +606,9 @@ public class SalaryStatisticsReportWrapper extends Service {
|
|||
String name;
|
||||
//20231113逻辑变更,对福利险种、薪资项目、薪资项目分组的名称舍弃基于labelId的多语言适配逻辑,直接以多语言命名方式设置name
|
||||
name = Util.formatMultiLang(item.getName(), String.valueOf(user.getLanguage()));
|
||||
columns.add(new WeaTableColumn("100px", name, item.getId() + SalaryConstant.DYNAMIC_SUFFIX));
|
||||
WeaTableColumn weaTableColumn = new WeaTableColumn("100px", name, item.getId() + SalaryConstant.DYNAMIC_SUFFIX);
|
||||
weaTableColumn.setOtherpara(item.getDataType());
|
||||
columns.add(weaTableColumn);
|
||||
});
|
||||
return columns;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,4 +54,6 @@ public interface ExtEmpService {
|
|||
Map<String, Object> previewImportExtEmp(ExtEmpImportParam param);
|
||||
|
||||
Map<String, Object> importExtEmp(ExtEmpImportParam param);
|
||||
|
||||
List<DataCollectionEmployee> listBySubCompanyOrDepartment(List<Long> subCompanyIds, List<Long> departmentIds);
|
||||
}
|
||||
|
|
@ -159,4 +159,12 @@ public interface SalaryEmployeeService {
|
|||
* @param virtualSubCompanyIds
|
||||
*/
|
||||
List<DataCollectionEmployee> getVirtualEmpByVirtualSubCompanyIds(List<Long> virtualSubCompanyIds);
|
||||
|
||||
/**
|
||||
* 根据部门或者分部查询人员
|
||||
* @param subCompanyIds
|
||||
* @param departmentIds
|
||||
* @return
|
||||
*/
|
||||
List<DataCollectionEmployee> listBySubCompanyOrDepartment(List<Long> subCompanyIds, List<Long> departmentIds);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -618,4 +618,9 @@ public class ExtEmpServiceImpl extends Service implements ExtEmpService {
|
|||
resultPo.setModifier((long) user.getUID());
|
||||
return resultPo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DataCollectionEmployee> listBySubCompanyOrDepartment(List<Long> subCompanyIds, List<Long> departmentIds) {
|
||||
return getExternalEmployeeMapper().listSomeDataCollectionEmployee(ExtEmpPO.builder().subcompanyIds(subCompanyIds).departmentIds(departmentIds).build());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.engine.salary.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.TypeReference;
|
||||
import com.api.browser.bean.SearchConditionGroup;
|
||||
|
|
@ -11,12 +12,12 @@ import com.cloudstore.eccom.pc.table.*;
|
|||
import com.cloudstore.eccom.result.WeaResultMsg;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.biz.*;
|
||||
import com.engine.hrmelog.entity.dto.LoggerContext;
|
||||
import com.engine.salary.biz.TaxAgentBiz;
|
||||
import com.engine.salary.cache.SalaryCacheKey;
|
||||
import com.engine.salary.component.SalaryWeaTable;
|
||||
import com.engine.salary.config.SalaryElogConfig;
|
||||
import com.engine.salary.constant.SalaryDefaultTenantConstant;
|
||||
import com.engine.hrmelog.entity.dto.LoggerContext;
|
||||
import com.engine.salary.constant.SalaryItemConstant;
|
||||
import com.engine.salary.encrypt.EncryptUtil;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
|
|
@ -58,6 +59,7 @@ import com.engine.salary.sys.enums.SalaryAcctEmployeeRuleEnum;
|
|||
import com.engine.salary.sys.service.SalarySysConfService;
|
||||
import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl;
|
||||
import com.engine.salary.util.*;
|
||||
import com.engine.salary.util.db.IdGenerator;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import com.engine.salary.util.excel.ExcelParseHelper;
|
||||
import com.engine.salary.util.excel.ExcelSupport;
|
||||
|
|
@ -71,12 +73,10 @@ import com.engine.salary.wrapper.SalaryFormulaWrapper;
|
|||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.mzlion.core.utils.BeanUtils;
|
||||
import com.engine.salary.util.db.IdGenerator;
|
||||
import com.wbi.util.StringUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang.math.NumberUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.ss.usermodel.Sheet;
|
||||
import org.apache.poi.util.IOUtils;
|
||||
|
|
@ -1704,6 +1704,8 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
}
|
||||
//存储待更新的InsuranceAccountDetailPO数据
|
||||
List<InsuranceAccountDetailPO> updateInsuranceAccountDetailList = new ArrayList<>();
|
||||
//存储待新增的InsuranceAccountDetailPO数据
|
||||
List<InsuranceAccountDetailPO> insertInsuranceAccountDetailList = new ArrayList<>();
|
||||
//遍历excel表具体数据
|
||||
for (int i = 0; i < data.size(); i++) {
|
||||
|
||||
|
|
@ -1811,10 +1813,52 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
}
|
||||
|
||||
if (list.isEmpty()) {
|
||||
isError = true;
|
||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
errorMessageMap.put("message", row + SalaryI18nUtil.getI18nLabel(user.getLanguage(),542453, "本次福利核算不包含该人员"));
|
||||
excelComments.add(errorMessageMap);
|
||||
if (headers.contains("补缴月份")) {
|
||||
// 如果是补缴列表没有,则新增
|
||||
if (supplementaryMonth.substring(0, 7).equals(billMonth.substring(0, 7))) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(100481, "当前月走正常缴纳"));
|
||||
}
|
||||
//校验补缴人员是否存在福利档案基础信息,并且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, "补缴人员中存在未设置福利档案人员或相关人员不在福利在缴人员中,不可新建补缴信息!"));
|
||||
}
|
||||
List<Long> empIdsInPayMonthRange = listCanPayEmpIds(paymentOrganization, billMonth.substring(0, 7));
|
||||
if (!empIdsInPayMonthRange.contains(employeeId)) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(99920, "无核算人员"));
|
||||
}
|
||||
// 封装InsuranceAccountDetailPO
|
||||
Date now = new Date();
|
||||
InsuranceAccountDetailPO insuranceAccountDetailPO = new InsuranceAccountDetailPO();
|
||||
insuranceAccountDetailPO.setBillStatus(0);
|
||||
insuranceAccountDetailPO.setEmployeeId(employeeId);
|
||||
insuranceAccountDetailPO.setPaymentOrganization(paymentOrganization);
|
||||
insuranceAccountDetailPO.setPaymentStatus(1);
|
||||
insuranceAccountDetailPO.setResourceFrom(0);
|
||||
insuranceAccountDetailPO.setSupplementaryProjects("0,1,2,3,4,5");
|
||||
insuranceAccountDetailPO.setSocialPayOrg(paymentOrganization);
|
||||
insuranceAccountDetailPO.setFundPayOrg(paymentOrganization);
|
||||
insuranceAccountDetailPO.setOtherPayOrg(paymentOrganization);
|
||||
insuranceAccountDetailPO.setCreator(Long.valueOf(user.getUID()));
|
||||
insuranceAccountDetailPO.setCreateTime(now);
|
||||
insuranceAccountDetailPO.setUpdateTime(now);
|
||||
insuranceAccountDetailPO.setTenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY);
|
||||
insuranceAccountDetailPO.setDeleteType(0);
|
||||
InsuranceAccountDetailPO insertPO = handleInsuranceAccountDetail4AddSupplementary(insuranceAccountDetailPO, map);
|
||||
if(!checkBalancePayInsurance(insertPO)) {
|
||||
isError = true;
|
||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
errorMessageMap.put("message", row + SalaryI18nUtil.getI18nLabel(0, "导入数据中存在福利档案中未设置的福利项缴纳数值!"));
|
||||
excelComments.add(errorMessageMap);
|
||||
} else {
|
||||
insertInsuranceAccountDetailList.add(insertPO);
|
||||
}
|
||||
} else {
|
||||
isError = true;
|
||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
errorMessageMap.put("message", row + SalaryI18nUtil.getI18nLabel(user.getLanguage(),542453, "本次福利核算不包含该人员"));
|
||||
excelComments.add(errorMessageMap);
|
||||
}
|
||||
} else if (list.size() > 1) {
|
||||
isError = true;
|
||||
Map<String, String> errorMessageMap = Maps.newHashMap();
|
||||
|
|
@ -1848,13 +1892,20 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
}
|
||||
//将待更新列表加密
|
||||
encryptUtil.encryptList(updateInsuranceAccountDetailList, InsuranceAccountDetailPO.class, user);
|
||||
// 将待插入列表加密
|
||||
encryptUtil.encryptList(insertInsuranceAccountDetailList, InsuranceAccountDetailPO.class, user);
|
||||
//更新
|
||||
for(InsuranceAccountDetailPO po : updateInsuranceAccountDetailList) {
|
||||
// getSiAccountBiz(user).updateByEmployeeIdAndBillMonth(po);
|
||||
updateByEmployeeIdAndBillMonth(po);
|
||||
}
|
||||
// 插入
|
||||
if (CollectionUtils.isNotEmpty(insertInsuranceAccountDetailList)) {
|
||||
getInsuranceAccountDetailMapper().batchSaveAccountDetails(insertInsuranceAccountDetailList);
|
||||
}
|
||||
|
||||
//刷新hrsa_bill_batch中数据统计信息
|
||||
updateInsuranceAccountDetailList.addAll(insertInsuranceAccountDetailList);
|
||||
if (updateInsuranceAccountDetailList.size() > 0) {
|
||||
refreshBillBatch(updateInsuranceAccountDetailList.get(0).getPaymentOrganization(), updateInsuranceAccountDetailList.get(0).getBillMonth());
|
||||
//记录操作日志
|
||||
|
|
@ -2292,6 +2343,213 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
return insuranceAccountDetailPO;
|
||||
}
|
||||
|
||||
private InsuranceAccountDetailPO handleInsuranceAccountDetail4AddSupplementary(InsuranceAccountDetailPO po, Map<String, Object> baseMap) {
|
||||
|
||||
//组装json数据,格式Map<String, Object>
|
||||
Map<String, String> socialPerMap = new HashMap<>();
|
||||
Map<String, String> fundPerMap = new HashMap<>();
|
||||
Map<String, String> otherPerMap = new HashMap<>();
|
||||
Map<String, String> socialComMap = new HashMap<>();
|
||||
Map<String, String> fundComMap = new HashMap<>();
|
||||
Map<String, String> otherComMap = new HashMap<>();
|
||||
|
||||
//筛选出福利核算项
|
||||
Map<String, Object> toDealMap =
|
||||
baseMap.entrySet().stream()
|
||||
.filter(map -> !"姓名".equals(map.getKey())
|
||||
&& !"部门".equals(map.getKey())
|
||||
&& !"手机号".equals(map.getKey())
|
||||
&& !"个税扣缴义务人".equals(map.getKey())
|
||||
&& !"账单月份".equals(map.getKey()))
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
||||
|
||||
for(Map.Entry<String, Object> entry : toDealMap.entrySet()) {
|
||||
//判断元素是否属于福利类
|
||||
String keyName = entry.getKey();
|
||||
//获取元素名后缀,方便之后判断“个人”或“单位”
|
||||
String payScope = keyName.substring(keyName.length() - 2);
|
||||
//获取福利类型
|
||||
Integer welfareType;
|
||||
// List<ICategoryPO> categoryPOList = siCategoryBiz.listByName(entry.getKey().substring(0, keyName.length() - 2));
|
||||
List<ICategoryPO> categoryPOList = getSICategoryService(user).listByName(entry.getKey().substring(0, keyName.length() - 2));
|
||||
if (categoryPOList.size() == 1) {
|
||||
ICategoryPO iCategoryPO = categoryPOList.get(0);
|
||||
welfareType = iCategoryPO.getWelfareType();
|
||||
|
||||
if ("个人".equals(payScope)) {
|
||||
switch (welfareType) {
|
||||
case 1:
|
||||
socialPerMap.put(iCategoryPO.getId().toString(), entry.getValue().toString());
|
||||
break;
|
||||
case 2:
|
||||
fundPerMap.put(iCategoryPO.getId().toString(), entry.getValue().toString());
|
||||
break;
|
||||
case 3:
|
||||
otherPerMap.put(iCategoryPO.getId().toString(), entry.getValue().toString());
|
||||
break;
|
||||
default:
|
||||
throw new SalaryRunTimeException("福利类型不存在");
|
||||
}
|
||||
} else if ("单位".equals(payScope)) {
|
||||
switch (welfareType) {
|
||||
case 1:
|
||||
socialComMap.put(iCategoryPO.getId().toString(), entry.getValue().toString());
|
||||
break;
|
||||
case 2:
|
||||
fundComMap.put(iCategoryPO.getId().toString(), entry.getValue().toString());
|
||||
break;
|
||||
case 3:
|
||||
otherComMap.put(iCategoryPO.getId().toString(), entry.getValue().toString());
|
||||
break;
|
||||
default:
|
||||
throw new SalaryRunTimeException("福利类型不存在");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//组装新的insuranceAccountDetailPO对象数据
|
||||
if (!socialPerMap.isEmpty()) {
|
||||
//对比新旧json中数据,并输出最终json
|
||||
checkJsonMap(socialPerMap, null);
|
||||
po.setSocialPerJson(JSON.toJSONString(socialPerMap));
|
||||
}
|
||||
|
||||
if (!socialComMap.isEmpty()) {
|
||||
checkJsonMap(socialComMap, null);
|
||||
po.setSocialComJson(JSON.toJSONString(socialComMap));
|
||||
}
|
||||
|
||||
if (!fundPerMap.isEmpty()) {
|
||||
checkJsonMap(fundPerMap, null);
|
||||
po.setFundPerJson(JSON.toJSONString(fundPerMap));
|
||||
}
|
||||
|
||||
if (!fundComMap.isEmpty()) {
|
||||
checkJsonMap(fundComMap, null);
|
||||
po.setFundComJson(JSON.toJSONString(fundComMap));
|
||||
}
|
||||
|
||||
if (!otherPerMap.isEmpty()) {
|
||||
checkJsonMap(otherPerMap, null);
|
||||
po.setOtherPerJson(JSON.toJSONString(otherPerMap));
|
||||
}
|
||||
|
||||
if (!otherComMap.isEmpty()) {
|
||||
checkJsonMap(otherComMap, null);
|
||||
po.setOtherComJson(JSON.toJSONString(otherComMap));
|
||||
}
|
||||
|
||||
|
||||
if (!StringUtils.isEmpty(baseMap.getOrDefault("社保个人合计", "").toString())) {
|
||||
po.setSocialPerSum(baseMap.get("社保个人合计").toString());
|
||||
} else if (!socialPerMap.isEmpty()) {
|
||||
po.setSocialPerSum(sumOfMapValue(socialPerMap));
|
||||
} else {
|
||||
po.setSocialPerSum("0");
|
||||
}
|
||||
|
||||
if (!StringUtils.isEmpty(baseMap.getOrDefault("公积金个人合计", "").toString())) {
|
||||
po.setFundPerSum(baseMap.get("公积金个人合计").toString());
|
||||
} else if (!fundPerMap.isEmpty()) {
|
||||
po.setFundPerSum(sumOfMapValue(fundPerMap));
|
||||
} else {
|
||||
po.setFundPerSum("0");
|
||||
}
|
||||
|
||||
if (!StringUtils.isEmpty(baseMap.getOrDefault("其他福利个人合计", "").toString())) {
|
||||
po.setOtherPerSum(baseMap.get("其他福利个人合计").toString());
|
||||
} else if (!otherPerMap.isEmpty()) {
|
||||
po.setOtherPerSum(sumOfMapValue(otherPerMap));
|
||||
} else {
|
||||
po.setOtherPerSum("0");
|
||||
}
|
||||
|
||||
if (!StringUtils.isEmpty(baseMap.getOrDefault("个人合计", "").toString())) {
|
||||
po.setPerSum(baseMap.get("个人合计").toString());
|
||||
} else {
|
||||
po.setPerSum(new BigDecimal(po.getSocialPerSum() == null ? "0" : po.getSocialPerSum())
|
||||
.add(new BigDecimal(po.getFundPerSum() == null ? "0" : po.getFundPerSum()))
|
||||
.add(new BigDecimal(po.getOtherPerSum() == null ? "0" : po.getOtherPerSum())).toString());
|
||||
}
|
||||
|
||||
if (!StringUtils.isEmpty(baseMap.getOrDefault("社保单位合计", "").toString())) {
|
||||
po.setSocialComSum(baseMap.get("社保单位合计").toString());
|
||||
} else if (!socialComMap.isEmpty()) {
|
||||
po.setSocialComSum(sumOfMapValue(socialComMap));
|
||||
} else {
|
||||
po.setSocialComSum("0");
|
||||
}
|
||||
|
||||
if (!StringUtils.isEmpty(baseMap.getOrDefault("公积金单位合计", "").toString())) {
|
||||
po.setFundComSum(baseMap.get("公积金单位合计").toString());
|
||||
} else if (!fundComMap.isEmpty()) {
|
||||
po.setFundComSum(sumOfMapValue(fundComMap));
|
||||
} else {
|
||||
po.setFundComSum("0");
|
||||
}
|
||||
|
||||
if (!StringUtils.isEmpty(baseMap.getOrDefault("其他福利单位合计", "").toString())) {
|
||||
po.setOtherComSum(baseMap.get("其他福利单位合计").toString());
|
||||
} else if (!otherComMap.isEmpty()) {
|
||||
po.setOtherComSum(sumOfMapValue(otherComMap));
|
||||
} else {
|
||||
po.setOtherComSum("0");
|
||||
}
|
||||
|
||||
|
||||
if (!StringUtils.isEmpty(baseMap.getOrDefault("单位合计", "").toString())) {
|
||||
po.setComSum(baseMap.get("单位合计").toString());
|
||||
} else {
|
||||
po.setComSum(new BigDecimal(po.getSocialComSum() == null ? "0" : po.getSocialComSum())
|
||||
.add(new BigDecimal(po.getFundComSum() == null ? "0" : po.getFundComSum()))
|
||||
.add(new BigDecimal(po.getOtherComSum() == null ? "0" : po.getOtherComSum())).toString());
|
||||
}
|
||||
|
||||
if (!StringUtils.isEmpty(baseMap.getOrDefault("账单月份", "").toString())) {
|
||||
po.setBillMonth(baseMap.get("账单月份").toString().substring(0, 7));
|
||||
}
|
||||
|
||||
if (!StringUtils.isEmpty(baseMap.getOrDefault("社保合计", "").toString())) {
|
||||
po.setSocialSum(baseMap.get("社保合计").toString());
|
||||
} else {
|
||||
po.setSocialSum(new BigDecimal(po.getSocialComSum() == null ? "0" : po.getSocialComSum())
|
||||
.add(new BigDecimal(po.getSocialPerSum() == null ? "0" : po.getSocialPerSum()))
|
||||
.toString());
|
||||
}
|
||||
if (!StringUtils.isEmpty(baseMap.getOrDefault("公积金合计", "").toString())) {
|
||||
po.setFundSum(baseMap.get("公积金合计").toString());
|
||||
} else {
|
||||
po.setFundSum(new BigDecimal(po.getFundComSum() == null ? "0" : po.getFundComSum())
|
||||
.add(new BigDecimal(po.getFundPerSum() == null ? "0" : po.getFundPerSum()))
|
||||
.toString());
|
||||
}
|
||||
if (!StringUtils.isEmpty(baseMap.getOrDefault("其他福利合计", "").toString())) {
|
||||
po.setOtherSum(baseMap.get("其他福利合计").toString());
|
||||
} else {
|
||||
po.setOtherSum(new BigDecimal(po.getOtherComSum() == null ? "0" : po.getOtherComSum())
|
||||
.add(new BigDecimal(po.getOtherPerSum() == null ? "0" : po.getOtherPerSum()))
|
||||
.toString());
|
||||
}
|
||||
if (!StringUtils.isEmpty(baseMap.getOrDefault("合计", "").toString())) {
|
||||
po.setTotal(baseMap.get("合计").toString());
|
||||
} else {
|
||||
po.setTotal(new BigDecimal(po.getPerSum() == null ? "0" : po.getPerSum())
|
||||
.add(new BigDecimal(po.getComSum() == null ? "0" : po.getComSum()))
|
||||
.toString());
|
||||
}
|
||||
|
||||
//如果导入的时补缴数据,还会包含补缴月份
|
||||
if (!StringUtils.isEmpty(baseMap.getOrDefault("补缴月份", "").toString())) {
|
||||
po.setSupplementaryMonth(baseMap.get("补缴月份").toString().substring(0, 7));
|
||||
}
|
||||
|
||||
po.setUpdateTime(new Date());
|
||||
|
||||
return po;
|
||||
}
|
||||
|
||||
/**
|
||||
* map中value值求和
|
||||
*/
|
||||
|
|
@ -4860,7 +5118,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
needArchivesPerson.stream().forEach(e -> {
|
||||
InsuranceSchemeDetailPO po = otherPerson.get(e);
|
||||
BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100"));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(archivesPerson) || StringUtils.isBlank(archivesPerson.get(String.valueOf(e)))) ? "0" : archivesPerson.get(String.valueOf(e)));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtil.isEmpty(archivesPerson) || StringUtils.isBlank(archivesPerson.get(String.valueOf(e)))) ? "0" : archivesPerson.get(String.valueOf(e)));
|
||||
BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost());
|
||||
Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum();
|
||||
BigDecimal result = new BigDecimal("0");
|
||||
|
|
@ -4935,7 +5193,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
needArchivesCom.stream().forEach(e -> {
|
||||
InsuranceSchemeDetailPO po = otherCom.get(e);
|
||||
BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100"));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(finalArchivesCom) || StringUtils.isBlank(finalArchivesCom.get(String.valueOf(e)))) ? "0" : finalArchivesCom.get(String.valueOf(e)));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtil.isEmpty(finalArchivesCom) || StringUtils.isBlank(finalArchivesCom.get(String.valueOf(e)))) ? "0" : finalArchivesCom.get(String.valueOf(e)));
|
||||
BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost());
|
||||
Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum();
|
||||
BigDecimal result = new BigDecimal("0");
|
||||
|
|
@ -5025,7 +5283,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
needArchivesPerson.stream().forEach(e -> {
|
||||
InsuranceSchemeDetailPO po = fundperson.get(e);
|
||||
BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100"));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(archivesPerson) || StringUtils.isBlank(archivesPerson.get(String.valueOf(e)))) ? "0" : archivesPerson.get(String.valueOf(e)));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtil.isEmpty(archivesPerson) || StringUtils.isBlank(archivesPerson.get(String.valueOf(e)))) ? "0" : archivesPerson.get(String.valueOf(e)));
|
||||
BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost());
|
||||
Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum();
|
||||
BigDecimal result = new BigDecimal("0");
|
||||
|
|
@ -5099,7 +5357,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
needArchivesCom.stream().forEach(e -> {
|
||||
InsuranceSchemeDetailPO po = fundCom.get(e);
|
||||
BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100"));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(finalArchivesCom) || StringUtils.isBlank(finalArchivesCom.get(String.valueOf(e)))) ? "0" : finalArchivesCom.get(String.valueOf(e)));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtil.isEmpty(finalArchivesCom) || StringUtils.isBlank(finalArchivesCom.get(String.valueOf(e)))) ? "0" : finalArchivesCom.get(String.valueOf(e)));
|
||||
BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost());
|
||||
Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum();
|
||||
BigDecimal result = new BigDecimal("0");
|
||||
|
|
@ -5191,7 +5449,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
needArchivesPerson.forEach(e -> {
|
||||
InsuranceSchemeDetailPO po = schemeperson.get(e);
|
||||
BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100"));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(archivesPerson) || StringUtils.isBlank(archivesPerson.get(String.valueOf(e)))) ? "0" : archivesPerson.get(String.valueOf(e)));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtil.isEmpty(archivesPerson) || StringUtils.isBlank(archivesPerson.get(String.valueOf(e)))) ? "0" : archivesPerson.get(String.valueOf(e)));
|
||||
BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost());
|
||||
Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum();
|
||||
BigDecimal result = new BigDecimal("0");
|
||||
|
|
@ -5264,7 +5522,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
needArchivesCom.stream().forEach(e -> {
|
||||
InsuranceSchemeDetailPO po = schemeCom.get(e);
|
||||
BigDecimal paymentProportion = new BigDecimal(StringUtils.isBlank(po.getPaymentProportion()) ? "0" : po.getPaymentProportion()).divide(new BigDecimal("100"));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(finalArchivesCom) || StringUtils.isBlank(finalArchivesCom.get(String.valueOf(e)))) ? "0" : finalArchivesCom.get(String.valueOf(e)));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtil.isEmpty(finalArchivesCom) || StringUtils.isBlank(finalArchivesCom.get(String.valueOf(e)))) ? "0" : finalArchivesCom.get(String.valueOf(e)));
|
||||
BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost());
|
||||
Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum();
|
||||
BigDecimal result = new BigDecimal("0");
|
||||
|
|
@ -6003,7 +6261,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
needArchivesPerson.forEach(e -> {
|
||||
InsuranceSchemeDetailPO po = schemeperson.get(e);
|
||||
BigDecimal paymentProportion = new BigDecimal(po.getPaymentProportion()).divide(new BigDecimal("100"));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(archivesPerson) || StringUtils.isBlank(archivesPerson.get(String.valueOf(e)))) ? "0" : archivesPerson.get(String.valueOf(e)));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtil.isEmpty(archivesPerson) || StringUtils.isBlank(archivesPerson.get(String.valueOf(e)))) ? "0" : archivesPerson.get(String.valueOf(e)));
|
||||
BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost());
|
||||
Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum();
|
||||
BigDecimal result = new BigDecimal("0");
|
||||
|
|
@ -6063,7 +6321,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
|
|||
needArchivesCom.forEach(e -> {
|
||||
InsuranceSchemeDetailPO po = schemeCom.get(e);
|
||||
BigDecimal paymentProportion = new BigDecimal(po.getPaymentProportion()).divide(new BigDecimal("100"));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtils.isEmpty(archivesCom) || StringUtils.isBlank(archivesCom.get(String.valueOf(e)))) ? "0" : archivesCom.get(String.valueOf(e)));
|
||||
BigDecimal paymentNum = new BigDecimal((ObjectUtil.isEmpty(archivesCom) || StringUtils.isBlank(archivesCom.get(String.valueOf(e)))) ? "0" : archivesCom.get(String.valueOf(e)));
|
||||
BigDecimal fixedCost = StringUtils.isBlank(po.getFixedCost()) ? new BigDecimal("0") : new BigDecimal(po.getFixedCost());
|
||||
Integer newScale = po.getValidNum() == null ? 0 : po.getValidNum();
|
||||
BigDecimal result = new BigDecimal("0");
|
||||
|
|
|
|||
|
|
@ -3,10 +3,12 @@ package com.engine.salary.service.impl;
|
|||
import com.alibaba.fastjson.JSON;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.salary.encrypt.EncryptUtil;
|
||||
import com.engine.salary.entity.siaccount.param.SaveSupplementaryAccountParam;
|
||||
import com.engine.salary.entity.siaccount.param.SupplementAccountBaseParam;
|
||||
import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO;
|
||||
import com.engine.salary.entity.siarchives.po.*;
|
||||
import com.engine.salary.entity.siarchives.po.InsuranceArchivesEmployeePO;
|
||||
import com.engine.salary.entity.siarchives.po.InsuranceArchivesFundSchemePO;
|
||||
import com.engine.salary.entity.siarchives.po.InsuranceArchivesOtherSchemePO;
|
||||
import com.engine.salary.entity.siarchives.po.InsuranceArchivesSocialSchemePO;
|
||||
import com.engine.salary.entity.sicategory.po.ICategoryPO;
|
||||
import com.engine.salary.entity.sischeme.po.InsuranceSchemeDetailPO;
|
||||
import com.engine.salary.enums.siaccount.ProjectTypeEnum;
|
||||
|
|
@ -24,10 +26,12 @@ import com.engine.salary.service.SIRepairService;
|
|||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import com.google.common.collect.Maps;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
|
|
@ -232,10 +236,10 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
|
|||
//查询该福利方案下开启缴纳的福利项
|
||||
List<String> insuranceIdAndScopeList = payInsuranceIdAndScopeList(socialSchemePO.getSocialSchemeId());
|
||||
socialMap.forEach((k, v) -> {
|
||||
String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) == 1
|
||||
String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1
|
||||
? SalaryI18nUtil.getI18nLabel(user.getLanguage(),538967, "社保")
|
||||
: (welfareTypeMap.get(Long.valueOf(k)) == 2 ? SalaryI18nUtil.getI18nLabel(user.getLanguage(),538969, "公积金") : SalaryI18nUtil.getI18nLabel(user.getLanguage(),542518, "企业年金及其它福利") );
|
||||
String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" );
|
||||
: (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? SalaryI18nUtil.getI18nLabel(user.getLanguage(),538969, "公积金") : SalaryI18nUtil.getI18nLabel(user.getLanguage(),542518, "企业年金及其它福利") );
|
||||
String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" );
|
||||
if (insuranceIdAndScopeList.contains(k + "-" + PaymentScopeEnum.SCOPE_COMPANY.getValue())) {
|
||||
Map<String, String> comMap = new HashMap<>();
|
||||
comMap.put("title", welfareTypeName);
|
||||
|
|
@ -264,10 +268,10 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
|
|||
//查询该福利方案下开启缴纳的福利项
|
||||
List<String> insuranceIdAndScopeList = payInsuranceIdAndScopeList(fundSchemePO.getFundSchemeId());
|
||||
fundMap.forEach((k, v) -> {
|
||||
String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) == 1
|
||||
String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1
|
||||
? SalaryI18nUtil.getI18nLabel(user.getLanguage(),538967, "社保")
|
||||
: (welfareTypeMap.get(Long.valueOf(k)) == 2 ? SalaryI18nUtil.getI18nLabel(user.getLanguage(),538969, "公积金") : SalaryI18nUtil.getI18nLabel(user.getLanguage(),542518, "企业年金及其它福利") );
|
||||
String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" );
|
||||
: (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? SalaryI18nUtil.getI18nLabel(user.getLanguage(),538969, "公积金") : SalaryI18nUtil.getI18nLabel(user.getLanguage(),542518, "企业年金及其它福利") );
|
||||
String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" );
|
||||
if (insuranceIdAndScopeList.contains(k + "-" + PaymentScopeEnum.SCOPE_COMPANY.getValue())) {
|
||||
Map<String, String> comMap = new HashMap<>();
|
||||
comMap.put("title", welfareTypeName);
|
||||
|
|
@ -330,10 +334,10 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
|
|||
//查询该福利方案下开启缴纳的福利项
|
||||
List<String> insuranceIdAndScopeList = payInsuranceIdAndScopeList(socialSchemePO.getSocialSchemeId());
|
||||
socialMap.forEach((k, v) -> {
|
||||
String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) == 1
|
||||
String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1
|
||||
? SalaryI18nUtil.getI18nLabel(user.getLanguage(),538967, "社保")
|
||||
: (welfareTypeMap.get(Long.valueOf(k)) == 2 ? SalaryI18nUtil.getI18nLabel(user.getLanguage(),538969, "公积金") : SalaryI18nUtil.getI18nLabel(user.getLanguage(),542518, "企业年金及其它福利") );
|
||||
String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" );
|
||||
: (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? SalaryI18nUtil.getI18nLabel(user.getLanguage(),538969, "公积金") : SalaryI18nUtil.getI18nLabel(user.getLanguage(),542518, "企业年金及其它福利") );
|
||||
String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" );
|
||||
if (insuranceIdAndScopeList.contains(k + "-" + PaymentScopeEnum.SCOPE_COMPANY.getValue())) {
|
||||
Map<String, String> comMap = new HashMap<>();
|
||||
comMap.put("title", welfareTypeName);
|
||||
|
|
@ -368,10 +372,10 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
|
|||
//查询该福利方案下开启缴纳的福利项
|
||||
List<String> insuranceIdAndScopeList = payInsuranceIdAndScopeList(socialSchemePO.getSocialSchemeId());
|
||||
socialMap.forEach((k, v) -> {
|
||||
String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) == 1
|
||||
String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1
|
||||
? SalaryI18nUtil.getI18nLabel(user.getLanguage(),538967, "社保")
|
||||
: (welfareTypeMap.get(Long.valueOf(k)) == 2 ? SalaryI18nUtil.getI18nLabel(user.getLanguage(),538969, "公积金") : SalaryI18nUtil.getI18nLabel(user.getLanguage(),542518, "企业年金及其它福利") );
|
||||
String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" );
|
||||
: (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? SalaryI18nUtil.getI18nLabel(user.getLanguage(),538969, "公积金") : SalaryI18nUtil.getI18nLabel(user.getLanguage(),542518, "企业年金及其它福利") );
|
||||
String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" );
|
||||
if (insuranceIdAndScopeList.contains(k + "-" + PaymentScopeEnum.SCOPE_COMPANY.getValue())) {
|
||||
Map<String, String> comMap = new HashMap<>();
|
||||
comMap.put("title", welfareTypeName);
|
||||
|
|
@ -406,10 +410,10 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
|
|||
//查询该福利方案下开启缴纳的福利项
|
||||
List<String> insuranceIdAndScopeList = payInsuranceIdAndScopeList(socialSchemePO.getSocialSchemeId());
|
||||
socialMap.forEach((k, v) -> {
|
||||
String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) == 1
|
||||
String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1
|
||||
? SalaryI18nUtil.getI18nLabel(user.getLanguage(),538967, "社保")
|
||||
: (welfareTypeMap.get(Long.valueOf(k)) == 2 ? SalaryI18nUtil.getI18nLabel(user.getLanguage(),538969, "公积金") : SalaryI18nUtil.getI18nLabel(user.getLanguage(),542518, "企业年金及其它福利") );
|
||||
String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" );
|
||||
: (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? SalaryI18nUtil.getI18nLabel(user.getLanguage(),538969, "公积金") : SalaryI18nUtil.getI18nLabel(user.getLanguage(),542518, "企业年金及其它福利") );
|
||||
String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" );
|
||||
if (insuranceIdAndScopeList.contains(k + "-" + PaymentScopeEnum.SCOPE_COMPANY.getValue())) {
|
||||
Map<String, String> comMap = new HashMap<>();
|
||||
comMap.put("title", welfareTypeName);
|
||||
|
|
@ -444,10 +448,10 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
|
|||
//查询该福利方案下开启缴纳的福利项
|
||||
List<String> insuranceIdAndScopeList = payInsuranceIdAndScopeList(socialSchemePO.getSocialSchemeId());
|
||||
socialMap.forEach((k, v) -> {
|
||||
String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) == 1
|
||||
String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1
|
||||
? SalaryI18nUtil.getI18nLabel(user.getLanguage(),538967, "社保")
|
||||
: (welfareTypeMap.get(Long.valueOf(k)) == 2 ? SalaryI18nUtil.getI18nLabel(user.getLanguage(),538969, "公积金") : SalaryI18nUtil.getI18nLabel(user.getLanguage(),542518, "企业年金及其它福利") );
|
||||
String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" );
|
||||
: (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? SalaryI18nUtil.getI18nLabel(user.getLanguage(),538969, "公积金") : SalaryI18nUtil.getI18nLabel(user.getLanguage(),542518, "企业年金及其它福利") );
|
||||
String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" );
|
||||
if (insuranceIdAndScopeList.contains(k + "-" + PaymentScopeEnum.SCOPE_COMPANY.getValue())) {
|
||||
Map<String, String> comMap = new HashMap<>();
|
||||
comMap.put("title", welfareTypeName);
|
||||
|
|
@ -478,10 +482,10 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
|
|||
//查询该福利方案下开启缴纳的福利项
|
||||
List<String> insuranceIdAndScopeList = payInsuranceIdAndScopeList(fundSchemePO.getFundSchemeId());
|
||||
fundMap.forEach((k, v) -> {
|
||||
String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) == 1
|
||||
String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1
|
||||
? SalaryI18nUtil.getI18nLabel(user.getLanguage(),538967, "社保")
|
||||
: (welfareTypeMap.get(Long.valueOf(k)) == 2 ? SalaryI18nUtil.getI18nLabel(user.getLanguage(),538969, "公积金") : SalaryI18nUtil.getI18nLabel(user.getLanguage(),542518, "企业年金及其它福利") );
|
||||
String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" );
|
||||
: (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? SalaryI18nUtil.getI18nLabel(user.getLanguage(),538969, "公积金") : SalaryI18nUtil.getI18nLabel(user.getLanguage(),542518, "企业年金及其它福利") );
|
||||
String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" );
|
||||
if (insuranceIdAndScopeList.contains(k + "-" + PaymentScopeEnum.SCOPE_COMPANY.getValue())) {
|
||||
Map<String, String> comMap = new HashMap<>();
|
||||
comMap.put("title", welfareTypeName);
|
||||
|
|
@ -512,10 +516,10 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
|
|||
//查询该福利方案下开启缴纳的福利项
|
||||
List<String> insuranceIdAndScopeList = payInsuranceIdAndScopeList(otherSchemePO.getOtherSchemeId());
|
||||
otherMap.forEach((k, v) -> {
|
||||
String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) == 1
|
||||
String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1
|
||||
? SalaryI18nUtil.getI18nLabel(user.getLanguage(),538967, "社保")
|
||||
: (welfareTypeMap.get(Long.valueOf(k)) == 2 ? SalaryI18nUtil.getI18nLabel(user.getLanguage(),538969, "公积金") : SalaryI18nUtil.getI18nLabel(user.getLanguage(),542518, "企业年金及其它福利") );
|
||||
String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" );
|
||||
: (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? SalaryI18nUtil.getI18nLabel(user.getLanguage(),538969, "公积金") : SalaryI18nUtil.getI18nLabel(user.getLanguage(),542518, "企业年金及其它福利") );
|
||||
String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" );
|
||||
if (insuranceIdAndScopeList.contains(k + "-" + PaymentScopeEnum.SCOPE_COMPANY.getValue())) {
|
||||
Map<String, String> comMap = new HashMap<>();
|
||||
comMap.put("title", welfareTypeName);
|
||||
|
|
|
|||
|
|
@ -697,19 +697,19 @@ public class SalaryAcctEmployeeServiceImpl extends Service implements SalaryAcct
|
|||
// }
|
||||
// list = list.stream().filter(po -> employeeIdsByPostionFilter.contains(po.getEmployeeId())).collect(Collectors.toList());
|
||||
// }
|
||||
// // 人事状态过滤
|
||||
// if (CollectionUtils.isNotEmpty(param.getStatus())) {
|
||||
// Set<Long> employeeIdsByStatus = new HashSet<>();
|
||||
// simpleEmployeeList.forEach(simpleEmployee -> {
|
||||
// if (simpleEmployee.getStatus() != null && param.getStatus().contains(simpleEmployee.getPersonnelStatus())) {
|
||||
// employeeIdsByStatus.add(simpleEmployee.getEmployeeId());
|
||||
// }
|
||||
// });
|
||||
// if (CollectionUtils.isEmpty(employeeIdsByStatus)) {
|
||||
// return Lists.newArrayList();
|
||||
// }
|
||||
// list = list.stream().filter(po -> employeeIdsByStatus.contains(po.getEmployeeId())).collect(Collectors.toList());
|
||||
// }
|
||||
// 人事状态过滤
|
||||
if (CollectionUtils.isNotEmpty(param.getStatus())) {
|
||||
Set<Long> employeeIdsByStatus = new HashSet<>();
|
||||
employeeList.forEach(simpleEmployee -> {
|
||||
if (simpleEmployee.getStatus() != null && param.getStatus().contains(simpleEmployee.getStatus())) {
|
||||
employeeIdsByStatus.add(simpleEmployee.getEmployeeId());
|
||||
}
|
||||
});
|
||||
if (CollectionUtils.isEmpty(employeeIdsByStatus)) {
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
list = list.stream().filter(po -> employeeIdsByStatus.contains(po.getEmployeeId())).collect(Collectors.toList());
|
||||
}
|
||||
// 入职日期
|
||||
if (CollectionUtils.isNotEmpty(param.getHiredate())) {
|
||||
Set<Long> employeeIdsByHiredate = new HashSet<>();
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ import com.wbi.util.Util;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.collections4.ListUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
import org.apache.poi.ss.usermodel.Sheet;
|
||||
|
|
@ -459,7 +459,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
List<WeaTableColumnGroup> columnList = SalaryAcctResultBO.buildTableColumns(salarySobItemAggregateDTO, ListUtils.emptyIfNull(salaryAcctRecordPO.getLockSalaryItemIds()));
|
||||
// 获取固定列头数
|
||||
SalarySysConfPO salaryAcctFixedColumns = getSalarySysConfMapper().getOneByCode(SALARY_ACCT_FIXED_COLUMNS);
|
||||
if (ObjectUtils.isNotEmpty(salaryAcctFixedColumns)) {
|
||||
if (salaryAcctFixedColumns != null) {
|
||||
int fixedNum = NumberUtils.isCreatable(salaryAcctFixedColumns.getConfValue()) ? Integer.valueOf(salaryAcctFixedColumns.getConfValue()) : 3;
|
||||
if (fixedNum == 0) {
|
||||
fixedNum = 3;
|
||||
|
|
|
|||
|
|
@ -3,12 +3,11 @@ package com.engine.salary.service.impl;
|
|||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.hrmelog.entity.dto.LoggerContext;
|
||||
import com.engine.salary.cache.SalaryCacheKey;
|
||||
import com.engine.salary.common.LocalDateRange;
|
||||
import com.engine.salary.config.SalaryElogConfig;
|
||||
import com.engine.salary.constant.SalaryDefaultTenantConstant;
|
||||
import com.engine.hrmelog.entity.dto.LoggerContext;
|
||||
import com.engine.hrmelog.util.LoggerTemplate;
|
||||
import com.engine.salary.encrypt.EncryptUtil;
|
||||
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
|
||||
import com.engine.salary.entity.datacollection.dto.AttendQuoteFieldListDTO;
|
||||
|
|
@ -49,6 +48,7 @@ import com.engine.salary.sys.service.impl.SalarySysConfServiceImpl;
|
|||
import com.engine.salary.util.SalaryDateUtil;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
import com.engine.salary.util.db.IdGenerator;
|
||||
import com.engine.salary.util.db.MapperProxyFactory;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.engine.salary.util.page.SalaryPageUtil;
|
||||
|
|
@ -59,11 +59,9 @@ import com.google.common.collect.Sets;
|
|||
import com.weaver.util.threadPool.ThreadPoolUtil;
|
||||
import com.weaver.util.threadPool.constant.ModulePoolEnum;
|
||||
import com.weaver.util.threadPool.entity.LocalRunnable;
|
||||
import com.engine.salary.util.db.IdGenerator;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.collections4.MapUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
|
||||
|
|
@ -1143,7 +1141,7 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
|
|||
ValidUtil.doValidator(param);
|
||||
|
||||
SalaryAcctRecordPO salaryAcctRecordPO = getSalaryAcctRecordService(user).getById(param.getSalaryAcctRecordId());
|
||||
if (ObjectUtils.isEmpty(salaryAcctRecordPO)) {
|
||||
if (salaryAcctRecordPO == null) {
|
||||
throw new SalaryRunTimeException("薪资核算记录不存在,或已被删除");
|
||||
}
|
||||
List<SalarySobItemPO> salarySobItemPOS = getSalarySobItemService(user).listBySalarySobId(salaryAcctRecordPO.getSalarySobId());
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ import com.weaver.util.threadPool.entity.LocalRunnable;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
import weaver.hrm.User;
|
||||
|
|
@ -463,7 +463,7 @@ public class SalaryBillServiceImpl extends Service implements SalaryBillService
|
|||
@Override
|
||||
public void confirmSalaryBill(Long salaryInfoId) {
|
||||
SalarySendInfoPO sendInfoPO = getSalarySendInfoMapper().getById(salaryInfoId);
|
||||
if(ObjectUtils.isEmpty(sendInfoPO)){
|
||||
if(sendInfoPO == null){
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(user.getLanguage(),544321, "工资单不存在或已被删除"));
|
||||
}
|
||||
sendInfoPO.setBillConfirmStatus(BillConfimStatusEnum.CONFIRMED.getValue());
|
||||
|
|
@ -474,7 +474,7 @@ public class SalaryBillServiceImpl extends Service implements SalaryBillService
|
|||
@Override
|
||||
public void feedBackSalaryBill(Long salaryInfoId) {
|
||||
SalarySendInfoPO sendInfoPO = getSalarySendInfoMapper().getById(salaryInfoId);
|
||||
if(ObjectUtils.isEmpty(sendInfoPO)){
|
||||
if(sendInfoPO == null){
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(user.getLanguage(),544321, "工资单不存在或已被删除"));
|
||||
}
|
||||
sendInfoPO.setBillConfirmStatus(BillConfimStatusEnum.FEEDBACK.getValue());
|
||||
|
|
@ -767,8 +767,8 @@ public class SalaryBillServiceImpl extends Service implements SalaryBillService
|
|||
loggerContext.setTargetId(String.valueOf(salarySend.getId()));
|
||||
loggerContext.setTargetName(SalaryDateUtil.getFormatYearMonth(salarySend.getSalaryMonth()) + "-" + (salarySob == null ? "" : salarySob.getName()));
|
||||
loggerContext.setOperateType(OperateTypeEnum.UPDATE.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0,"工资单发放"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0,"工资单发放"));
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "工资单发放"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "工资单发放"));
|
||||
loggerContext.setOldValues(salarySend);
|
||||
loggerContext.setNewValues(salarySendNew);
|
||||
loggerContext.setOperator(user.getUID() + StringUtils.EMPTY);
|
||||
|
|
|
|||
|
|
@ -55,6 +55,10 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
|
|||
|
||||
private EmployBiz employBiz = new EmployBiz();
|
||||
|
||||
private EmployMapper getEmployMapper() {
|
||||
return SqlProxyHandle.getProxy(EmployMapper.class);
|
||||
}
|
||||
|
||||
private SalarySobRangeService getSalarySobRangeService(User user) {
|
||||
return ServiceUtil.getService(SalarySobRangeServiceImpl.class, user);
|
||||
}
|
||||
|
|
@ -63,10 +67,6 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
|
|||
return SqlProxyHandle.getProxy(SalarySysConfMapper.class);
|
||||
}
|
||||
|
||||
private EmployMapper getEmployMapper() {
|
||||
return SqlProxyHandle.getProxy(EmployMapper.class);
|
||||
}
|
||||
|
||||
|
||||
private ExpandFieldSettingsMapper getExpandFieldSettingsMapper() {
|
||||
return SqlProxyHandle.getProxy(ExpandFieldSettingsMapper.class);
|
||||
|
|
@ -505,4 +505,14 @@ public class SalaryEmployeeServiceImpl extends Service implements SalaryEmployee
|
|||
}
|
||||
return getEmployMapper().listVirtualEmpByVirtualSubCompanyIds(virtualSubCompanyIds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DataCollectionEmployee> listBySubCompanyOrDepartment(List<Long> subCompanyIds, List<Long> departmentIds) {
|
||||
List<DataCollectionEmployee> employeeList = new ArrayList<>();
|
||||
employeeList.addAll(getEmployMapper().listBySubCompanyOrDepartment(subCompanyIds, departmentIds));
|
||||
if (openExtEmp) {
|
||||
employeeList.addAll(getExtEmpService(user).listBySubCompanyOrDepartment(subCompanyIds, departmentIds));
|
||||
}
|
||||
return SalaryI18nUtil.i18nList(employeeList);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -508,7 +508,7 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
|
|||
|
||||
// 获取默认模板信息
|
||||
SalarySendPO salarySendPO = getSalarySendMapper().getById(salarySendInfo.getSalarySendId());
|
||||
if(ObjectUtils.isEmpty(salarySendPO)){
|
||||
if(salarySendPO == null){
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(user.getLanguage(),544320, "工资单不存在"));
|
||||
}
|
||||
// 获取、记录首次查看时间
|
||||
|
|
@ -827,7 +827,7 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
|
|||
PageInfo<SalarySendInfoListDTO> pageInfo = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),
|
||||
page, SalarySendInfoListDTO.class, user);
|
||||
SalarySendPO salarySendPO = getSalarySendMapper().getById(queryParam.getSalarySendId());
|
||||
if (ObjectUtils.isEmpty(salarySendPO)){
|
||||
if (salarySendPO == null){
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(user.getLanguage(),544321, "工资单不存在或已被删除"));
|
||||
}
|
||||
List<SalaryTemplatePO> salaryTemplates = getSalaryTemplateService(user).getDefaultTemplates(Collections.singletonList(salarySendPO.getSalarySobId()));
|
||||
|
|
@ -836,7 +836,7 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
|
|||
}
|
||||
Integer ackFeedbackStatus = salaryTemplates.get(0).getAckFeedbackStatus();
|
||||
Integer feedbackStatus = salaryTemplates.get(0).getFeedbackStatus();
|
||||
if ( (ackFeedbackStatus != null && NumberUtils.compare(ackFeedbackStatus, 1) == 0)
|
||||
if ((ackFeedbackStatus != null && NumberUtils.compare(ackFeedbackStatus, 1) == 0)
|
||||
|| (feedbackStatus != null && NumberUtils.compare(feedbackStatus, 1) == 0)) {
|
||||
// 默认为空时,未读未确认
|
||||
pageInfo.getList().stream().forEach(obj -> {
|
||||
|
|
@ -1552,7 +1552,6 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
|
|||
SalaryElogConfig.salarySendLoggerTemplate.write(loggerContext);
|
||||
|
||||
|
||||
|
||||
SalarySendGrantParam grantParam = SalarySendGrantParam.builder().ids(param.getIds()).salarySendId(param.getSalarySendId()).build();
|
||||
|
||||
// 异步发送消息:先修改数据再发消息,避免出错后无法撤回撤回消息
|
||||
|
|
@ -1706,8 +1705,8 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
|
|||
loggerContext.setTargetId(String.valueOf(salarySend.getId()));
|
||||
loggerContext.setTargetName(SalaryDateUtil.getFormatYearMonth(salarySend.getSalaryMonth()) + "-" + (salarySob == null ? "" : salarySob.getName()));
|
||||
loggerContext.setOperateType(OperateTypeEnum.EXCEL_EXPORT.getValue());
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0,"导出工资单"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0,"导出工资单"));
|
||||
loggerContext.setOperateTypeName(SalaryI18nUtil.getI18nLabel(0, "导出工资单"));
|
||||
loggerContext.setOperatedesc(SalaryI18nUtil.getI18nLabel(0, "导出工资单"));
|
||||
loggerContext.setOperator(user.getUID() + StringUtils.EMPTY);
|
||||
loggerContext.setOperatorName(Objects.isNull(user) ? StringUtils.EMPTY : user.getUsername());
|
||||
SalaryElogConfig.salarySendLoggerTemplate.write(loggerContext);
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ import com.engine.salary.util.valid.ValidUtil;
|
|||
import com.google.common.collect.Lists;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.BooleanUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
|
|
@ -210,7 +210,7 @@ public class SalarySobServiceImpl extends Service implements SalarySobService {
|
|||
if (StringUtils.isNotBlank(name)) {
|
||||
build.setName(name);
|
||||
}
|
||||
if (ObjectUtils.isNotEmpty(queryParam.getTaxAgentId())) {
|
||||
if (queryParam.getTaxAgentId() != null) {
|
||||
build.setTaxAgentId(queryParam.getTaxAgentId());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import com.engine.salary.service.impl.SalarySendServiceImpl;
|
|||
import com.engine.salary.service.impl.SalaryTemplateServiceImpl;
|
||||
import com.engine.salary.util.SalaryDateUtil;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
|
||||
import weaver.hrm.User;
|
||||
import weaver.interfaces.schedule.BaseCronJob;
|
||||
|
||||
|
|
@ -59,8 +59,9 @@ public class AutoConfirmSalaryBillCronJob extends BaseCronJob {
|
|||
List<Long> needAutoIds = unConfirmedList.stream().filter(po -> {
|
||||
LocalDateTime sendDateTime = SalaryDateUtil.dateToLocalDateTime(po.getSendTime());
|
||||
Integer autoDays = autoAckDaysMap.get(po.getSalarySendId());
|
||||
if (ObjectUtils.isEmpty(autoDays))
|
||||
if (autoDays == null) {
|
||||
return false;
|
||||
}
|
||||
LocalDateTime autoDateTime = sendDateTime.plus(autoDays, ChronoUnit.DAYS);
|
||||
return !autoDateTime.isAfter(now);
|
||||
}).map(SalarySendInfoPO::getId).collect(Collectors.toList());
|
||||
|
|
|
|||
|
|
@ -87,7 +87,6 @@ public class SalaryArchiveItemWrapper extends Service implements SalaryArchiveIt
|
|||
data.put("adjustReason", adjustReason);
|
||||
data.put("description", description);
|
||||
data.put("adjustReasonList", SalaryArchiveItemAdjustReasonEnum.getList(user));
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
|
|
@ -126,6 +125,7 @@ public class SalaryArchiveItemWrapper extends Service implements SalaryArchiveIt
|
|||
salaryItemMap.put("id", String.valueOf(m.getId()));
|
||||
salaryItemMap.put("content", m.getName());
|
||||
salaryItemMap.put("dataType", m.getDataType());
|
||||
salaryItemMap.put("pattern", m.getPattern());
|
||||
return salaryItemMap;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import com.engine.salary.service.SalarySobItemService;
|
|||
import com.engine.salary.service.impl.SalaryComparisonResultServiceImpl;
|
||||
import com.engine.salary.sys.entity.po.SalarySysConfPO;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
import weaver.hrm.User;
|
||||
|
||||
|
|
@ -64,7 +64,7 @@ public class SalaryComparisonResultWrapper extends Service {
|
|||
List<WeaTableColumnGroup> weaTableColumns = salaryComparisonResultListDTO.getWeaTableColumns();
|
||||
// 获取固定列头数
|
||||
SalarySysConfPO salaryAcctFixedColumns = getSalarySysConfMapper().getOneByCode(SALARY_ACCT_FIXED_COLUMNS);
|
||||
if (ObjectUtils.isNotEmpty(salaryAcctFixedColumns)) {
|
||||
if (salaryAcctFixedColumns != null) {
|
||||
int fixedNum = NumberUtils.isCreatable(salaryAcctFixedColumns.getConfValue()) ? Integer.valueOf(salaryAcctFixedColumns.getConfValue()) : 3;
|
||||
if (fixedNum == 0) {
|
||||
fixedNum = 3;
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@ import com.engine.salary.util.db.MapperProxyFactory;
|
|||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.mzlion.core.utils.BeanUtils;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
import weaver.general.Util;
|
||||
|
|
@ -194,7 +193,7 @@ public class SalaryTemplateWrapper extends Service {
|
|||
salaryTemplateBaseSetDTO.setFeedbackStatus(NumberUtils.compare(po.getFeedbackStatus(), 1) == 0);
|
||||
}
|
||||
|
||||
salaryTemplateBaseSetDTO.setAutoAckDays(ObjectUtils.isEmpty(po.getAutoAckDays()) ? 7 : po.getAutoAckDays());
|
||||
salaryTemplateBaseSetDTO.setAutoAckDays(po.getAutoAckDays() == null ? 7 : po.getAutoAckDays());
|
||||
// 规则赋值 如果为ALL传“” 如果为byRule传薪资项目ID
|
||||
salaryTemplateBaseSetDTO.setReplenishRule(SalaryTemplateReplenishRuleEnum.ALL.getValue().equals(po.getReplenishRule()) ? "" : po.getReplenishRule());
|
||||
// 规则设置赋值
|
||||
|
|
|
|||
Loading…
Reference in New Issue