147 lines
3.0 KiB
Java
147 lines
3.0 KiB
Java
package com.engine.salary.entity.salarysob.po;
|
|
|
|
import com.engine.salary.enums.SalaryRoundingModeEnum;
|
|
import com.engine.salary.enums.SalaryValueTypeEnum;
|
|
import com.engine.salary.enums.salaryitem.SalaryDataTypeEnum;
|
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.Builder;
|
|
import lombok.Data;
|
|
import lombok.NoArgsConstructor;
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
|
import java.util.Collection;
|
|
import java.util.Comparator;
|
|
import java.util.Date;
|
|
import java.util.List;
|
|
import java.util.stream.Collectors;
|
|
|
|
/**
|
|
* @author Harryxzy
|
|
* @date 2022/11/15 16:06
|
|
* @description 薪资账套回算薪资项目
|
|
* //hrsa_salary_sob_back_item")
|
|
*/
|
|
@Data
|
|
@Builder
|
|
@NoArgsConstructor
|
|
@AllArgsConstructor
|
|
public class SalarySobBackItemPO{
|
|
|
|
/**
|
|
* 主键id
|
|
*/
|
|
private Long id;
|
|
|
|
/**
|
|
* 薪资账套id
|
|
*/
|
|
private Long salarySobId;
|
|
|
|
/**
|
|
* 薪资项目id
|
|
*/
|
|
private Long salaryItemId;
|
|
|
|
/**
|
|
* 薪资项目code
|
|
*/
|
|
private String salaryItemCode;
|
|
|
|
/**
|
|
* 字段类型
|
|
*
|
|
* @see SalaryDataTypeEnum
|
|
*/
|
|
private String dataType;
|
|
|
|
/**
|
|
* 进位规则
|
|
*
|
|
* @see SalaryRoundingModeEnum
|
|
*/
|
|
private Integer roundingMode;
|
|
|
|
/**
|
|
* 保留的小数位数
|
|
*/
|
|
private Integer pattern;
|
|
|
|
/**
|
|
* 取值方式
|
|
*
|
|
* @see SalaryValueTypeEnum
|
|
*/
|
|
private Integer valueType;
|
|
|
|
/**
|
|
* 公式id
|
|
*/
|
|
private Long formulaId;
|
|
|
|
/**
|
|
* 0:已发项目、1:补发薪资项目
|
|
*/
|
|
private Integer backCalcType;
|
|
|
|
/**
|
|
* 租户key
|
|
*/
|
|
@JsonIgnore
|
|
private String tenantKey;
|
|
|
|
/**
|
|
* 创建人id
|
|
*/
|
|
@JsonIgnore
|
|
private Long creator;
|
|
|
|
/**
|
|
* 是否删除
|
|
*/
|
|
@JsonIgnore
|
|
private Integer deleteType;
|
|
|
|
/**
|
|
* 创建时间
|
|
*/
|
|
@JsonIgnore
|
|
private Date createTime;
|
|
|
|
/**
|
|
* 更新时间
|
|
*/
|
|
@JsonIgnore
|
|
private Date updateTime;
|
|
|
|
|
|
|
|
/**
|
|
* 薪资项目id
|
|
*/
|
|
private Collection<Long> salaryItemIds;
|
|
|
|
public String toCompareString() {
|
|
return "SalarySobBackItemPO{" +
|
|
"salarySobId=" + salarySobId +
|
|
", salaryItemId=" + salaryItemId +
|
|
", salaryItemCode='" + salaryItemCode + '\'' +
|
|
", dataType='" + dataType + '\'' +
|
|
", roundingMode=" + roundingMode +
|
|
", pattern=" + pattern +
|
|
", valueType=" + valueType +
|
|
", formulaId=" + formulaId +
|
|
", backCalcType=" + backCalcType +
|
|
'}';
|
|
}
|
|
|
|
public static String toCompareString(List<SalarySobBackItemPO> salarySobBackItems) {
|
|
if (CollectionUtils.isEmpty(salarySobBackItems)) {
|
|
return "";
|
|
}
|
|
return salarySobBackItems.stream()
|
|
.sorted(Comparator.comparingLong(SalarySobBackItemPO::getSalaryItemId))
|
|
.map(SalarySobBackItemPO::toCompareString)
|
|
.collect(Collectors.joining(","));
|
|
}
|
|
} |