Merge branch 'release/2.12.1.2403.02' into release/个税版本

This commit is contained in:
Harryxzy 2024-04-08 15:53:13 +08:00
commit a9dd2c2cb3
30 changed files with 890 additions and 67 deletions

View File

@ -0,0 +1,13 @@
CREATE TABLE hrsa_acct_result_template (
id NUMBER(38,0) primary key ,
template_name varchar(255),
salary_sob_id NUMBER(38,0) ,
salary_item_ids varchar(4000),
creator NUMBER(38,0),
update_time DATE default sysdate,
create_time DATE default sysdate,
delete_type NUMBER,
tenant_key varchar(20)
);
/

View File

@ -0,0 +1,13 @@
CREATE TABLE hrsa_acct_result_template (
id NUMBER(38,0) primary key ,
template_name varchar(255),
salary_sob_id NUMBER(38,0) ,
salary_item_ids varchar(4000),
creator NUMBER(38,0),
update_time DATE default sysdate,
create_time DATE default sysdate,
delete_type NUMBER,
tenant_key varchar(20)
);
/

View File

@ -0,0 +1,13 @@
CREATE TABLE hrsa_acct_result_template (
id NUMBER(38,0) primary key ,
template_name varchar(255),
salary_sob_id NUMBER(38,0) ,
salary_item_ids varchar(4000),
creator NUMBER(38,0),
update_time DATE default sysdate,
create_time DATE default sysdate,
delete_type NUMBER,
tenant_key varchar(20)
);
/

View File

@ -0,0 +1,12 @@
CREATE table hrsa_acct_result_template (
id bigint NOT NULL,
template_name varchar(255) NULL DEFAULT NULL,
salary_sob_id bigint NULL DEFAULT NULL ,
salary_item_ids varchar(4000) NULL DEFAULT NULL ,
creator bigint NULL DEFAULT NULL,
update_time datetime NULL DEFAULT NULL,
create_time datetime NULL DEFAULT NULL,
delete_type int NULL DEFAULT NULL,
tenant_key varchar(20) NULL DEFAULT NULL,
PRIMARY KEY (id)
);

View File

@ -0,0 +1,12 @@
CREATE TABLE hrsa_acct_result_template (
id NUMBER(38,0) primary key ,
template_name varchar(255),
salary_sob_id NUMBER(38,0) ,
salary_item_ids varchar(4000),
creator NUMBER(38,0),
update_time DATE default sysdate,
create_time DATE default sysdate,
delete_type NUMBER,
tenant_key varchar(20)
)
/

View File

@ -0,0 +1,11 @@
CREATE table hrsa_acct_result_template (
id bigint primary key,
template_name varchar(255),
salary_sob_id bigint ,
salary_item_ids varchar(4000) ,
creator bigint,
update_time timestamp default now(),
create_time timestamp default now(),
delete_type int default 0,
tenant_key varchar(10)
);

View File

@ -0,0 +1,13 @@
CREATE TABLE hrsa_acct_result_template (
id bigint NOT NULL,
template_name varchar(255) NULL DEFAULT NULL,
salary_sob_id bigint NULL DEFAULT NULL ,
salary_item_ids varchar(4000) NULL DEFAULT NULL ,
creator bigint NULL DEFAULT NULL,
update_time datetime NULL DEFAULT NULL,
create_time datetime NULL DEFAULT NULL,
delete_type int NULL DEFAULT NULL,
tenant_key varchar(20) NULL DEFAULT NULL,
PRIMARY KEY (id)
)
GO

View File

@ -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.hrm.User;
@ -676,7 +676,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));
@ -753,7 +753,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));
@ -843,7 +843,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));
@ -919,7 +919,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));
@ -1012,7 +1012,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));
@ -1088,7 +1088,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));
@ -1594,7 +1594,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));
@ -1663,7 +1663,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));
@ -1744,7 +1744,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));
@ -1812,7 +1812,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));
@ -1897,7 +1897,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));
@ -1966,7 +1966,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));
@ -2054,7 +2054,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));
@ -2125,7 +2125,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));

View File

@ -129,8 +129,7 @@ public class SalaryArchiveItemBiz {
List<Long> archiveIdList = salaryArchiveItemNews.stream().map(SalaryArchiveItemPO::getSalaryArchiveId).distinct().collect(Collectors.toList());
List<Long> itemIdList = salaryArchiveItemNews.stream().map(SalaryArchiveItemPO::getSalaryItemId).distinct().collect(Collectors.toList());
// 查出保存的id
List<SalaryArchiveItemPO> savePO = mapper.listByParam(SalaryArchiveItemQueryParam.builder().salaryArchivesIds(archiveIdList).salaryItemIds(itemIdList).build());
encryptUtil.decryptList(savePO, SalaryArchiveItemPO.class);
List<SalaryArchiveItemPO> savePO = getIneffectiveSalaryItems(SalaryArchiveItemQueryParam.builder().salaryArchivesIds(archiveIdList).salaryItemIds(itemIdList).build());
Map<String, SalaryArchiveItemPO> saveMap = SalaryEntityUtil.convert2Map(savePO, p -> p.getSalaryArchiveId() + p.getSalaryItemId() + SalaryDateUtil.getFormatDate(p.getEffectiveTime()));
String operateName = SalaryI18nUtil.getI18nLabel(0, "新增调薪记录");
salaryArchiveItemNews.forEach(e -> {

View File

@ -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;
@ -624,7 +624,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();

View File

@ -0,0 +1,44 @@
package com.engine.salary.entity.salaryacct.dto;
import com.engine.salary.annotation.TableTitle;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @ClassName SalaryAcctResultTemplatePO
* @author Harryxzy
* @date 2024/3/26 15:08
* @description 薪资核算导出模板
*/
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Data
public class SalaryAcctResultTemplateDTO {
/**
* 主键id
*/
private Long id;
/**
* 模板名称
*/
@TableTitle(title ="模板名称",key = "templateName",dataIndex = "templateName")
private String templateName;
/**
* 薪资账套id
*/
private Long salarySobId;
/**
* 薪资项目id
*/
private String salaryItemIds;
@TableTitle(title ="创建时间",key = "createTime",dataIndex = "createTime")
private String createTime;
}

View File

@ -0,0 +1,48 @@
package com.engine.salary.entity.salaryacct.param;
import com.engine.salary.common.BaseQueryParam;
import com.engine.salary.util.valid.DataCheck;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* @ClassName SalaryAcctResultTemplatePO
* @author Harryxzy
* @date 2024/3/26 15:08
* @description 薪资核算导出模板
*/
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Data
public class SalaryAcctResultTemplateSaveParam extends BaseQueryParam {
/**
* 主键id
*/
private Long id;
private List<Long> ids;
/**
* 薪资账套id
*/
private Long salarySobId;
private Long salaryAcctRecordId;
/**
* 薪资项目id
*/
private List<Long> salaryItemIds;
/**
* 模板名称
*/
@DataCheck(require = true, message= "模板名称不能为空")
private String templateName;
}

View File

@ -0,0 +1,54 @@
package com.engine.salary.entity.salaryacct.po;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Collection;
import java.util.Date;
/**
* @ClassName SalaryAcctResultTemplatePO
* @author Harryxzy
* @date 2024/3/26 15:08
* @description 薪资核算导出模板
*/
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Data
public class SalaryAcctResultTemplatePO {
/**
* 主键id
*/
private Long id;
/**
* 模板名称
*/
private String templateName;
/**
* 薪资账套id
*/
private Long salarySobId;
/**
* 薪资项目id
*/
private String salaryItemIds;
private Long creator;
private Date updateTime;
private Date createTime;
private Integer deleteType;
private String tenantKey;
//主键id集合
private Collection<Long> ids;
}

View File

@ -0,0 +1,66 @@
package com.engine.salary.mapper.salaryacct;
import com.engine.salary.entity.salaryacct.po.SalaryAcctResultTemplatePO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface SalaryAcctResultTemplateMapper {
/**
* 查询所有记录
*
* @return 返回集合没有返回空List
*/
List<SalaryAcctResultTemplatePO> listAll();
/**
* 条件查询
*
* @return 返回集合没有返回空List
*/
List<SalaryAcctResultTemplatePO> listSome(SalaryAcctResultTemplatePO salaryAcctResultTemplate);
/**
* 根据主键查询
*
* @param id 主键
* @return 返回记录没有返回null
*/
SalaryAcctResultTemplatePO getById(Long id);
/**
* 新增忽略null字段
*
* @param salaryAcctResultTemplate 新增的记录
* @return 返回影响行数
*/
int insertIgnoreNull(SalaryAcctResultTemplatePO salaryAcctResultTemplate);
/**
* 修改修改所有字段
*
* @param salaryAcctResultTemplate 修改的记录
* @return 返回影响行数
*/
int update(SalaryAcctResultTemplatePO salaryAcctResultTemplate);
/**
* 修改忽略null字段
*
* @param salaryAcctResultTemplate 修改的记录
* @return 返回影响行数
*/
int updateIgnoreNull(SalaryAcctResultTemplatePO salaryAcctResultTemplate);
/**
* 删除记录
*
* @param id 待删除的记录
* @return 返回影响行数
*/
int deleteById(Long id);
int deleteByIds(@Param("ids") List<Long> ids);
}

View File

@ -0,0 +1,221 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.engine.salary.mapper.salaryacct.SalaryAcctResultTemplateMapper">
<resultMap id="BaseResultMap" type="com.engine.salary.entity.salaryacct.po.SalaryAcctResultTemplatePO">
<result column="create_time" property="createTime" />
<result column="creator" property="creator" />
<result column="delete_type" property="deleteType" />
<result column="id" property="id" />
<result column="salary_item_ids" property="salaryItemIds" />
<result column="salary_sob_id" property="salarySobId" />
<result column="template_name" property="templateName" />
<result column="tenant_key" property="tenantKey" />
<result column="update_time" property="updateTime" />
</resultMap>
<!-- 表字段 -->
<sql id="baseColumns">
t.create_time
, t.creator
, t.delete_type
, t.id
, t.salary_item_ids
, t.salary_sob_id
, t.template_name
, t.tenant_key
, t.update_time
</sql>
<!-- 查询全部 -->
<select id="listAll" resultMap="BaseResultMap">
SELECT
<include refid="baseColumns" />
FROM hrsa_acct_result_template t
WHERE delete_type = 0
</select>
<!-- 根据主键获取单条记录 -->
<select id="getById" resultMap="BaseResultMap" parameterType="Long">
SELECT
<include refid="baseColumns" />
FROM hrsa_acct_result_template t
WHERE id = #{id} AND delete_type = 0
</select>
<!-- 条件查询 -->
<select id="listSome" resultMap="BaseResultMap" parameterType="com.engine.salary.entity.salaryacct.po.SalaryAcctResultTemplatePO">
SELECT
<include refid="baseColumns" />
FROM hrsa_acct_result_template t
WHERE delete_type = 0
<if test="createTime != null">
AND create_time = #{createTime}
</if>
<if test="creator != null">
AND creator = #{creator}
</if>
<if test="deleteType != null">
AND delete_type = #{deleteType}
</if>
<if test="id != null">
AND id = #{id}
</if>
<if test="salaryItemIds != null">
AND salary_item_ids = #{salaryItemIds}
</if>
<if test="salarySobId != null">
AND salary_sob_id = #{salarySobId}
</if>
<if test="templateName != null">
AND template_name = #{templateName}
</if>
<if test="tenantKey != null">
AND tenant_key = #{tenantKey}
</if>
<if test="updateTime != null">
AND update_time = #{updateTime}
</if>
<if test="ids != null and ids.size()>0">
AND id IN
<foreach collection="ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</if>
ORDER BY id DESC
</select>
<!-- 插入不为NULL的字段 -->
<insert id="insertIgnoreNull" parameterType="com.engine.salary.entity.salaryacct.po.SalaryAcctResultTemplatePO">
INSERT INTO hrsa_acct_result_template
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="createTime != null">
create_time,
</if>
<if test="creator != null">
creator,
</if>
<if test="deleteType != null">
delete_type,
</if>
<if test="id != null">
id,
</if>
<if test="salaryItemIds != null">
salary_item_ids,
</if>
<if test="salarySobId != null">
salary_sob_id,
</if>
<if test="templateName != null">
template_name,
</if>
<if test="tenantKey != null">
tenant_key,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
<if test="createTime != null" >
#{createTime},
</if>
<if test="creator != null" >
#{creator},
</if>
<if test="deleteType != null" >
#{deleteType},
</if>
<if test="id != null" >
#{id},
</if>
<if test="salaryItemIds != null" >
#{salaryItemIds},
</if>
<if test="salarySobId != null" >
#{salarySobId},
</if>
<if test="templateName != null" >
#{templateName},
</if>
<if test="tenantKey != null" >
#{tenantKey},
</if>
<if test="updateTime != null" >
#{updateTime},
</if>
</trim>
</insert>
<!-- 更新,更新全部字段 -->
<update id="update" parameterType="com.engine.salary.entity.salaryacct.po.SalaryAcctResultTemplatePO">
UPDATE hrsa_acct_result_template
<set>
create_time=#{createTime},
creator=#{creator},
delete_type=#{deleteType},
salary_item_ids=#{salaryItemIds},
salary_sob_id=#{salarySobId},
template_name=#{templateName},
tenant_key=#{tenantKey},
update_time=#{updateTime},
</set>
WHERE id = #{id} AND delete_type = 0
</update>
<!-- 更新不为NULL的字段 -->
<update id="updateIgnoreNull" parameterType="com.engine.salary.entity.salaryacct.po.SalaryAcctResultTemplatePO">
UPDATE hrsa_acct_result_template
<set>
<if test="createTime != null" >
create_time=#{createTime},
</if>
<if test="creator != null" >
creator=#{creator},
</if>
<if test="deleteType != null" >
delete_type=#{deleteType},
</if>
<if test="salaryItemIds != null" >
salary_item_ids=#{salaryItemIds},
</if>
<if test="salarySobId != null" >
salary_sob_id=#{salarySobId},
</if>
<if test="templateName != null" >
template_name=#{templateName},
</if>
<if test="tenantKey != null" >
tenant_key=#{tenantKey},
</if>
<if test="updateTime != null" >
update_time=#{updateTime},
</if>
</set>
WHERE id = #{id} AND delete_type = 0
</update>
<!-- 根据主键删除记录 -->
<delete id="deleteById" parameterType="com.engine.salary.entity.salaryacct.po.SalaryAcctResultTemplatePO">
UPDATE hrsa_acct_result_template
SET delete_type=1
WHERE id = #{id} AND delete_type = 0
</delete>
<delete id="deleteByIds">
UPDATE hrsa_acct_result_template
SET delete_type=1
WHERE delete_type = 0
<if test="ids != null and ids.size()>0">
AND id IN
<foreach collection="ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</if>
</delete>
</mapper>

View File

@ -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);

View File

@ -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("该明细不存在");
}
cancelSingle(detailPO);

View File

@ -120,6 +120,30 @@ public interface SalaryAcctExcelService {
void cacheExportField(List<Long> salaryItems);
/**
* 保存导出模板
* @param saveParam
*/
void saveExportTemplate(SalaryAcctResultTemplateSaveParam saveParam);
/**
* 删除导出模板
* @param templateIds
*/
void deleteExportTemplate(List<Long> templateIds);
/**
* 获取导出模板详细信息
* @param templateId
*/
Map<String, Object> getExportTemplateForm(Long templateId);
/**
* 根据账套id获取导出模板列表
* @param param
*/
Map<String, Object> exportTemplateList(SalaryAcctResultTemplateSaveParam param);
//
// /**
// * 薪资核算结果校验异常导出

View File

@ -0,0 +1,79 @@
package com.engine.salary.service;
import com.engine.salary.entity.salaryacct.po.SalaryAcctResultTemplatePO;
import java.util.List;
/**
* @author Harryxzy
* @ClassName SalaryAcctResultTemplateService
* @date 2024/03/26 15:28
* @description
*/
public interface SalaryAcctResultTemplateService {
/**
* 查询所有记录
*
* @return 返回集合没有返回空List
*/
List <SalaryAcctResultTemplatePO> listAll();
/**
* 根据主键查询
*
* @param id 主键
* @return 返回记录没有返回null
*/
SalaryAcctResultTemplatePO getById(Long id);
/**
* 新增忽略null字段
*
* @param salaryAcctResultTemplate 新增的记录
* @return 返回影响行数
*/
int insertIgnoreNull(SalaryAcctResultTemplatePO salaryAcctResultTemplate);
/**
* 修改修改所有字段
*
* @param salaryAcctResultTemplate 修改的记录
* @return 返回影响行数
*/
int update(SalaryAcctResultTemplatePO salaryAcctResultTemplate);
/**
* 修改忽略null字段
*
* @param salaryAcctResultTemplate 修改的记录
* @return 返回影响行数
*/
int updateIgnoreNull(SalaryAcctResultTemplatePO salaryAcctResultTemplate);
/**
* 删除记录
*
* @param id 待删除的记录
* @return 返回影响行数
*/
int deleteById(Long id);
/**
* 删除记录
*
* @param ids 待删除的记录
* @return 返回影响行数
*/
int deleteByIds(List<Long> ids);
/**
* 根据账套id获取
* @param salarySobId
* @return
*/
List<SalaryAcctResultTemplatePO> listBySalarySobId(Long salarySobId);
}

View File

@ -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;
@ -5014,7 +5014,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");
@ -5089,7 +5089,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");
@ -5179,7 +5179,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");
@ -5253,7 +5253,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");
@ -5345,7 +5345,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");
@ -5418,7 +5418,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");
@ -6157,7 +6157,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");
@ -6217,7 +6217,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");

View File

@ -4,11 +4,11 @@ import com.api.formmode.mybatis.util.SqlProxyHandle;
import com.cloudstore.dev.api.util.Util_DataCache;
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.hrmelog.entity.dto.LoggerContext;
import com.engine.salary.component.WeaTableColumnGroup;
import com.engine.salary.config.SalaryElogConfig;
import com.engine.salary.constant.SalaryDefaultTenantConstant;
import com.engine.salary.constant.SalaryItemConstant;
import com.engine.hrmelog.entity.dto.LoggerContext;
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
import com.engine.salary.entity.report.po.SalaryAcctResultReportPO;
import com.engine.salary.entity.salaryacct.bo.SalaryAcctEmployeeBO;
@ -16,6 +16,7 @@ import com.engine.salary.entity.salaryacct.bo.SalaryAcctResultBO;
import com.engine.salary.entity.salaryacct.bo.SalaryAcctResultLogBO;
import com.engine.salary.entity.salaryacct.dto.SalaryAccEmployeeListDTO;
import com.engine.salary.entity.salaryacct.dto.SalaryAcctImportFieldDTO;
import com.engine.salary.entity.salaryacct.dto.SalaryAcctResultTemplateDTO;
import com.engine.salary.entity.salaryacct.dto.SalaryComparisonResultListDTO;
import com.engine.salary.entity.salaryacct.param.*;
import com.engine.salary.entity.salaryacct.po.*;
@ -46,6 +47,8 @@ import com.engine.salary.util.db.IdGenerator;
import com.engine.salary.util.excel.ExcelParseHelper;
import com.engine.salary.util.excel.ExcelSupport;
import com.engine.salary.util.excel.ExcelUtilPlus;
import com.engine.salary.util.page.PageInfo;
import com.engine.salary.util.page.SalaryPageUtil;
import com.engine.salary.util.valid.ValidUtil;
import com.engine.salary.wrapper.SalarySobItemWrapper;
import com.google.common.collect.Lists;
@ -55,7 +58,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;
@ -150,6 +153,10 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
return ServiceUtil.getService(SalarySobItemWrapper.class, user);
}
private SalaryAcctResultTemplateService getSalaryAcctResultTemplateService(User user) {
return ServiceUtil.getService(SalaryAcctResultTemplateServiceImpl.class, user);
}
@Override
public XSSFWorkbook exportSalaryAcctEmployee(SalaryAcctEmployeeQueryParam queryParam) {
ValidUtil.doValidator(queryParam);
@ -448,7 +455,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;
@ -1432,6 +1439,90 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
}
/**
* 保存导出模板
* @param saveParam
*/
@Override
public void saveExportTemplate(SalaryAcctResultTemplateSaveParam saveParam) {
ValidUtil.doValidator(saveParam);
Long salaryAcctRecordId = saveParam.getSalaryAcctRecordId();
SalaryAcctRecordPO salaryAcctRecordPO = getSalaryAcctRecordService(user).getById(salaryAcctRecordId);
if (salaryAcctRecordPO == null) {
throw new SalaryRunTimeException("薪资核算记录不存在");
}
saveParam.setSalarySobId(salaryAcctRecordPO.getSalarySobId());
List<SalaryAcctResultTemplatePO> templateBySobId = getSalaryAcctResultTemplateService(user).listBySalarySobId(saveParam.getSalarySobId());
if (saveParam.getId() != null) {
Optional<SalaryAcctResultTemplatePO> saveNameOptional = templateBySobId.stream().filter(po -> po.getTemplateName().equals(saveParam.getTemplateName()) && !po.getId().equals(saveParam.getId())).findFirst();
if (saveNameOptional.isPresent()) {
throw new SalaryRunTimeException("该账套中已经存在同名模板,请重新设置后保存");
}
// 更新
SalaryAcctResultTemplatePO salaryAcctResultTemplatePO = getSalaryAcctResultTemplateService(user).getById(saveParam.getId());
if (salaryAcctResultTemplatePO == null) {
throw new SalaryRunTimeException("模板不存在,或已被删除");
}
salaryAcctResultTemplatePO.setSalaryItemIds(StringUtils.join(saveParam.getSalaryItemIds(), ","));
salaryAcctResultTemplatePO.setTemplateName(saveParam.getTemplateName());
salaryAcctResultTemplatePO.setUpdateTime(new Date());
getSalaryAcctResultTemplateService(user).update(salaryAcctResultTemplatePO);
} else {
Optional<SalaryAcctResultTemplatePO> saveNameOptional = templateBySobId.stream().filter(po -> po.getTemplateName().equals(saveParam.getTemplateName())).findFirst();
if (saveNameOptional.isPresent()) {
throw new SalaryRunTimeException("该账套中已经存在同名模板,请重新设置后保存");
}
// 新建
Date now = new Date();
getSalaryAcctResultTemplateService(user).insertIgnoreNull(SalaryAcctResultTemplatePO.builder()
.id(IdGenerator.generate())
.salarySobId(saveParam.getSalarySobId())
.salaryItemIds(StringUtils.join(saveParam.getSalaryItemIds(), ","))
.templateName(saveParam.getTemplateName())
.creator(Long.valueOf(user.getUID()))
.createTime(now)
.updateTime(now)
.deleteType(0)
.build());
}
}
@Override
public void deleteExportTemplate(List<Long> templateIds) {
getSalaryAcctResultTemplateService(user).deleteByIds(templateIds);
}
@Override
public Map<String, Object> getExportTemplateForm(Long templateId) {
SalaryAcctResultTemplatePO salaryAcctResultTemplatePO = getSalaryAcctResultTemplateService(user).getById(templateId);
if (salaryAcctResultTemplatePO == null) {
throw new SalaryRunTimeException("模板不存在或已被删除");
}
Map<String, Object> resultMap = new HashMap<>();
resultMap.put("checkItems", StringUtils.split(salaryAcctResultTemplatePO.getSalaryItemIds(), ","));
return resultMap;
}
@Override
public Map<String, Object> exportTemplateList(SalaryAcctResultTemplateSaveParam param) {
SalaryAcctRecordPO salaryAcctRecordPO = getSalaryAcctRecordService(user).getById(param.getSalaryAcctRecordId());
if (salaryAcctRecordPO == null){
throw new SalaryRunTimeException("薪资核算记录为空");
}
List<SalaryAcctResultTemplatePO> salaryAcctResultTemplatePOS = getSalaryAcctResultTemplateService(user).listBySalarySobId(salaryAcctRecordPO.getSalarySobId());
if (StringUtils.isNotBlank(param.getTemplateName())) {
salaryAcctResultTemplatePOS = salaryAcctResultTemplatePOS.stream().filter(po -> po.getTemplateName().contains(param.getTemplateName())).collect(Collectors.toList());
}
List<SalaryAcctResultTemplateDTO> resultList = new ArrayList<>();
salaryAcctResultTemplatePOS.stream().forEach(po -> resultList.add(SalaryAcctResultTemplateDTO.builder().id(po.getId()).templateName(po.getTemplateName()).createTime(SalaryDateUtil.getFormatLocalDateTime(po.getCreateTime())).build()));
PageInfo<SalaryAcctResultTemplateDTO> pageInfo = SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), resultList, SalaryAcctResultTemplateDTO.class);
Map<String, Object> resultMap = new HashMap<>();
resultMap.put("pageInfo", pageInfo);
return resultMap;
}
// @Override
// public Map<String, Object> exportCheckResult(
// SalaryCheckResultExportParam exportParam,

View File

@ -2,12 +2,11 @@ package com.engine.salary.service.impl;
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;
@ -50,6 +49,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;
@ -60,11 +60,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.jetbrains.annotations.NotNull;
@ -1153,7 +1151,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());

View File

@ -0,0 +1,72 @@
package com.engine.salary.service.impl;
import com.engine.core.impl.Service;
import com.engine.salary.entity.salaryacct.po.SalaryAcctResultTemplatePO;
import com.engine.salary.mapper.salaryacct.SalaryAcctResultTemplateMapper;
import com.engine.salary.service.SalaryAcctResultTemplateService;
import com.engine.salary.util.db.MapperProxyFactory;
import org.apache.commons.collections4.CollectionUtils;
import java.util.Collections;
import java.util.List;
/**
* @author Harryxzy
* @ClassName SalaryAcctResultTemplateServiceImpl
* @date 2024/03/26 15:30
* @description
*/
public class SalaryAcctResultTemplateServiceImpl extends Service implements SalaryAcctResultTemplateService {
private SalaryAcctResultTemplateMapper getSalaryAcctResultTemplateMapper() {
return MapperProxyFactory.getProxy(SalaryAcctResultTemplateMapper.class);
}
@Override
public List<SalaryAcctResultTemplatePO> listAll() {
return getSalaryAcctResultTemplateMapper().listAll();
}
@Override
public SalaryAcctResultTemplatePO getById(Long id) {
return getSalaryAcctResultTemplateMapper().getById(id);
}
@Override
public int insertIgnoreNull(SalaryAcctResultTemplatePO salaryAcctResultTemplate) {
return getSalaryAcctResultTemplateMapper().insertIgnoreNull(salaryAcctResultTemplate);
}
@Override
public int update(SalaryAcctResultTemplatePO salaryAcctResultTemplate) {
return getSalaryAcctResultTemplateMapper().update(salaryAcctResultTemplate);
}
@Override
public int updateIgnoreNull(SalaryAcctResultTemplatePO salaryAcctResultTemplate) {
return getSalaryAcctResultTemplateMapper().updateIgnoreNull(salaryAcctResultTemplate);
}
@Override
public int deleteById(Long id) {
if (id == null) {
return 0;
}
return getSalaryAcctResultTemplateMapper().deleteById(id);
}
@Override
public int deleteByIds(List<Long> ids) {
if (CollectionUtils.isEmpty(ids)) {
return 0;
}
return getSalaryAcctResultTemplateMapper().deleteByIds(ids);
}
@Override
public List<SalaryAcctResultTemplatePO> listBySalarySobId(Long salarySobId) {
if (salarySobId == null) {
return Collections.emptyList();
}
return getSalaryAcctResultTemplateMapper().listSome(SalaryAcctResultTemplatePO.builder().salarySobId(salarySobId).build());
}
}

View File

@ -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("工资单不存在或已被删除!");
}
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("工资单不存在或已被删除!");
}
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);

View File

@ -9,13 +9,13 @@ import com.cloudstore.dev.api.bean.MessageType;
import com.cloudstore.dev.api.util.Util_Message;
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.hrmelog.entity.dto.LoggerContext;
import com.engine.salary.biz.SalarySendBiz;
import com.engine.salary.biz.SalarySendInfoBiz;
import com.engine.salary.config.SalaryElogConfig;
import com.engine.salary.constant.SalaryArchiveConstant;
import com.engine.salary.constant.SalaryItemConstant;
import com.engine.salary.constant.SalaryTemplateSalaryItemSetGroupConstant;
import com.engine.hrmelog.entity.dto.LoggerContext;
import com.engine.salary.encrypt.EncryptUtil;
import com.engine.salary.entity.datacollection.AddUpSituation;
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
@ -39,6 +39,7 @@ import com.engine.salary.entity.salarysob.po.SalarySobItemPO;
import com.engine.salary.entity.salarysob.po.SalarySobPO;
import com.engine.salary.entity.taxagent.po.TaxAgentPO;
import com.engine.salary.enums.OperateTypeEnum;
import com.engine.salary.enums.UserStatusEnum;
import com.engine.salary.enums.salaryaccounting.SalaryAcctRecordStatusEnum;
import com.engine.salary.enums.salaryarchive.SalaryArchiveFieldTypeEnum;
import com.engine.salary.enums.salarybill.BillConfimStatusEnum;
@ -68,7 +69,6 @@ import com.engine.salary.util.page.SalaryPageUtil;
import com.google.common.collect.Lists;
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 org.apache.poi.xssf.usermodel.XSSFWorkbook;
@ -498,7 +498,7 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
// 获取默认模板信息
SalarySendPO salarySendPO = getSalarySendMapper().getById(salarySendInfo.getSalarySendId());
if (ObjectUtils.isEmpty(salarySendPO)) {
if (salarySendPO == null) {
throw new SalaryRunTimeException("工资单不存在");
}
// 获取记录首次查看时间
@ -753,7 +753,7 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
PageInfo<SalarySendInfoListDTO> pageInfo = SalaryPageUtil.buildPage(queryParam.getCurrent(), queryParam.getPageSize(),
page, SalarySendInfoListDTO.class);
SalarySendPO salarySendPO = getSalarySendMapper().getById(queryParam.getSalarySendId());
if (ObjectUtils.isEmpty(salarySendPO)) {
if (salarySendPO == null) {
throw new SalaryRunTimeException("工资单不存在或已被删除");
}
List<SalaryTemplatePO> salaryTemplates = getSalaryTemplateService(user).getDefaultTemplates(Collections.singletonList(salarySendPO.getSalarySobId()));
@ -762,7 +762,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 -> {
@ -928,14 +928,18 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
//获取员工信息的字段名和中文描述的map关系
SalaryFormulaEmployeeDTO salaryFormulaEmployeeDTO = SalaryFormulaEmployeeDTO.builder().employeeId(simpleEmployee.getEmployeeId())
.birthday(simpleEmployee.getBirthday())
.departmentId(simpleEmployee.getDepartmentId())
.departmentName(simpleEmployee.getDepartmentName())
.subcompanyName(simpleEmployee.getSubcompanyName())
.email(StringUtils.isEmpty(simpleEmployee.getEmail()) ? "" : simpleEmployee.getEmail())
.jobcall(simpleEmployee.getJobcall())
.companystartdate(simpleEmployee.getCompanystartdate())
.sex("0".equals(simpleEmployee.getSex()) ? "" : "")
.mobile(StringUtils.isEmpty(simpleEmployee.getMobile()) ? "" : simpleEmployee.getMobile())
.jobtitleName(simpleEmployee.getJobtitleName())
.jobtitleId(simpleEmployee.getJobtitleId())
.status(simpleEmployee.getStatus() == null ? "" : simpleEmployee.getStatus())
.statusName(simpleEmployee.getStatus() == null ? "" : UserStatusEnum.parseByValue(new Integer(simpleEmployee.getStatus())).getDefaultLabel())
.telephone(StringUtils.isEmpty(simpleEmployee.getTelephone()) ? "" : simpleEmployee.getTelephone())
.username(StringUtils.isEmpty(simpleEmployee.getUsername()) ? "" : simpleEmployee.getUsername())
.workcode(StringUtils.isEmpty(simpleEmployee.getWorkcode()) ? "" : simpleEmployee.getWorkcode())
@ -952,7 +956,7 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
try {
Method method = salaryFormulaEmployeeDTO.getClass().getMethod(getter);
Object invoke = method.invoke(salaryFormulaEmployeeDTO);
e.setSalaryItemValue((String) invoke);
e.setSalaryItemValue(invoke.toString());
} catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) {
log.error("no such method", e);
}
@ -1460,7 +1464,6 @@ public class SalarySendServiceImpl extends Service implements SalarySendService
SalaryElogConfig.salarySendLoggerTemplate.write(loggerContext);
SalarySendGrantParam grantParam = SalarySendGrantParam.builder().ids(param.getIds()).salarySendId(param.getSalarySendId()).build();
// 异步发送消息先修改数据再发消息避免出错后无法撤回撤回消息
@ -1613,8 +1616,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);

View File

@ -45,7 +45,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;
@ -234,7 +234,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());
}

View File

@ -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());

View File

@ -565,6 +565,43 @@ public class SalaryAcctController {
return new ResponseResult<List<Long>, String>(user).run(getSalaryAcctExcelService(user)::cacheExportField, param.getSalaryItems());
}
// 保存导出模板
@POST
@Path("/acctresult/saveExportTemplate")
@Produces(MediaType.APPLICATION_JSON)
public String saveExportTemplate(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryAcctResultTemplateSaveParam param) {
User user = HrmUserVarify.getUser(request, response);
return new ResponseResult<SalaryAcctResultTemplateSaveParam, String>(user).run(getSalaryAcctExcelService(user)::saveExportTemplate, param);
}
// 删除导出模板
@POST
@Path("/acctresult/deleteExportTemplate")
@Produces(MediaType.APPLICATION_JSON)
public String deleteExportTemplate(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryAcctResultTemplateSaveParam param) {
User user = HrmUserVarify.getUser(request, response);
return new ResponseResult<List<Long>, String>(user).run(getSalaryAcctExcelService(user)::deleteExportTemplate, param.getIds());
}
// 获取导出模板详细信息
@POST
@Path("/acctresult/getExportTemplateForm")
@Produces(MediaType.APPLICATION_JSON)
public String getExportTemplateForm(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryAcctResultTemplateSaveParam param) {
User user = HrmUserVarify.getUser(request, response);
return new ResponseResult<Long, Map<String, Object>>(user).run(getSalaryAcctExcelService(user)::getExportTemplateForm, param.getId());
}
// 获取导出模列表
@POST
@Path("/acctresult/exportTemplateList")
@Produces(MediaType.APPLICATION_JSON)
public String exportTemplateList(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryAcctResultTemplateSaveParam param) {
User user = HrmUserVarify.getUser(request, response);
return new ResponseResult<SalaryAcctResultTemplateSaveParam, Map<String, Object>>(user).run(getSalaryAcctExcelService(user)::exportTemplateList, param);
}
//导出导入模板
@GET
@Path("/acctresult/importtemplate/export")

View File

@ -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;

View File

@ -25,7 +25,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.hrm.User;
@ -179,7 +178,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());
// 规则设置赋值