薪资项目宽度
This commit is contained in:
parent
f03c0d0147
commit
7945c84fbb
|
|
@ -170,7 +170,7 @@ public class SalaryAcctResultBO {
|
||||||
List<WeaTableColumnGroup> columns = Lists.newArrayList();
|
List<WeaTableColumnGroup> columns = Lists.newArrayList();
|
||||||
// 员工信息字段
|
// 员工信息字段
|
||||||
for (SalarySobEmpFieldDTO salarySobEmpFieldDTO : salarySobItemAggregateDTO.getEmpFields()) {
|
for (SalarySobEmpFieldDTO salarySobEmpFieldDTO : salarySobItemAggregateDTO.getEmpFields()) {
|
||||||
columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobEmpFieldDTO.getFieldName()), salarySobEmpFieldDTO.getFieldName(), salarySobEmpFieldDTO.getFieldId()));
|
columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobEmpFieldDTO.getFieldName(), 0), salarySobEmpFieldDTO.getFieldName(), salarySobEmpFieldDTO.getFieldId()));
|
||||||
}
|
}
|
||||||
// 薪资项目分组下的薪资项目
|
// 薪资项目分组下的薪资项目
|
||||||
for (SalarySobItemGroupDTO salarySobItemGroupDTO : salarySobItemAggregateDTO.getItemGroups()) {
|
for (SalarySobItemGroupDTO salarySobItemGroupDTO : salarySobItemAggregateDTO.getItemGroups()) {
|
||||||
|
|
@ -180,29 +180,29 @@ public class SalaryAcctResultBO {
|
||||||
List<WeaTableColumnGroup> childrenColumns = Lists.newArrayList();
|
List<WeaTableColumnGroup> childrenColumns = Lists.newArrayList();
|
||||||
for (SalarySobItemDTO salarySobItemDTO : salarySobItemGroupDTO.getItems()) {
|
for (SalarySobItemDTO salarySobItemDTO : salarySobItemGroupDTO.getItems()) {
|
||||||
if (lockSalaryItemIds.contains(salarySobItemDTO.getSalaryItemId())) {
|
if (lockSalaryItemIds.contains(salarySobItemDTO.getSalaryItemId())) {
|
||||||
childrenColumns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getValue(), salarySobItemDTO.getPattern()));
|
childrenColumns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), salarySobItemDTO.getWidth()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getValue(), salarySobItemDTO.getPattern()));
|
||||||
} else {
|
} else {
|
||||||
childrenColumns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getValue(), salarySobItemDTO.getPattern()));
|
childrenColumns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), salarySobItemDTO.getWidth()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getValue(), salarySobItemDTO.getPattern()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
WeaTableColumnGroup weaTableColumnWapper = new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemGroupDTO.getName()), salarySobItemGroupDTO.getName(), String.valueOf(salarySobItemGroupDTO.getId()), childrenColumns);
|
WeaTableColumnGroup weaTableColumnWapper = new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemGroupDTO.getName(), 0), salarySobItemGroupDTO.getName(), String.valueOf(salarySobItemGroupDTO.getId()), childrenColumns);
|
||||||
columns.add(weaTableColumnWapper);
|
columns.add(weaTableColumnWapper);
|
||||||
}
|
}
|
||||||
// 没有分类的薪资项目
|
// 没有分类的薪资项目
|
||||||
for (SalarySobItemDTO salarySobItemDTO : salarySobItemAggregateDTO.getItems()) {
|
for (SalarySobItemDTO salarySobItemDTO : salarySobItemAggregateDTO.getItems()) {
|
||||||
if (lockSalaryItemIds.contains(salarySobItemDTO.getSalaryItemId())) {
|
if (lockSalaryItemIds.contains(salarySobItemDTO.getSalaryItemId())) {
|
||||||
columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getValue(), salarySobItemDTO.getPattern()));
|
columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), salarySobItemDTO.getWidth()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getValue(), salarySobItemDTO.getPattern()));
|
||||||
} else {
|
} else {
|
||||||
columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getValue(), salarySobItemDTO.getPattern()));
|
columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), salarySobItemDTO.getWidth()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getValue(), salarySobItemDTO.getPattern()));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
// 回算的薪资项目
|
// 回算的薪资项目
|
||||||
for (SalarySobItemDTO salarySobItemDTO : salarySobItemAggregateDTO.getBackCalcItems()) {
|
for (SalarySobItemDTO salarySobItemDTO : salarySobItemAggregateDTO.getBackCalcItems()) {
|
||||||
if (lockSalaryItemIds.contains(salarySobItemDTO.getSalaryItemId())) {
|
if (lockSalaryItemIds.contains(salarySobItemDTO.getSalaryItemId())) {
|
||||||
columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getValue(), salarySobItemDTO.getPattern()));
|
columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), 0), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getValue(), salarySobItemDTO.getPattern()));
|
||||||
} else {
|
} else {
|
||||||
columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName()), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getValue(), salarySobItemDTO.getPattern()));
|
columns.add(new WeaTableColumnGroup(SalaryPageUtil.selfAdaption(salarySobItemDTO.getName(), 0), salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getValue(), salarySobItemDTO.getPattern()));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -117,6 +117,7 @@ public class SalaryItemBO {
|
||||||
.description(salaryItemPO.getDescription())
|
.description(salaryItemPO.getDescription())
|
||||||
.canDelete(true)
|
.canDelete(true)
|
||||||
.canEdit(openFormulaForcedEditing ||Objects.equals(salaryItemPO.getCanEdit(), NumberUtils.INTEGER_ONE))
|
.canEdit(openFormulaForcedEditing ||Objects.equals(salaryItemPO.getCanEdit(), NumberUtils.INTEGER_ONE))
|
||||||
|
.width(salaryItemPO.getWidth())
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
).collect(Collectors.toList());
|
).collect(Collectors.toList());
|
||||||
|
|
@ -200,7 +201,8 @@ public class SalaryItemBO {
|
||||||
.setCanEdit(salaryItemPO.getCanEdit())
|
.setCanEdit(salaryItemPO.getCanEdit())
|
||||||
.setTaxAgentIds(salaryItemPO.getTaxAgentIds())
|
.setTaxAgentIds(salaryItemPO.getTaxAgentIds())
|
||||||
.setSharedType(salaryItemPO.getSharedType())
|
.setSharedType(salaryItemPO.getSharedType())
|
||||||
.setSortedIndex(salaryItemPO.getSortedIndex());
|
.setSortedIndex(salaryItemPO.getSortedIndex())
|
||||||
|
.setWidth(salaryItemPO.getWidth());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -280,6 +282,7 @@ public class SalaryItemBO {
|
||||||
.sharedType(Optional.ofNullable(saveParam.getSharedType()).orElse(0))
|
.sharedType(Optional.ofNullable(saveParam.getSharedType()).orElse(0))
|
||||||
.taxAgentIds(saveParam.getTaxAgentIds())
|
.taxAgentIds(saveParam.getTaxAgentIds())
|
||||||
.sortedIndex(saveParam.getSortedIndex())
|
.sortedIndex(saveParam.getSortedIndex())
|
||||||
|
.width(saveParam.getWidth())
|
||||||
.build();
|
.build();
|
||||||
// 开启了"薪资档案引用",取值方式固定为输入
|
// 开启了"薪资档案引用",取值方式固定为输入
|
||||||
// if (Objects.equals(saveParam.getUseInEmployeeSalary(), NumberUtils.INTEGER_ONE)) {
|
// if (Objects.equals(saveParam.getUseInEmployeeSalary(), NumberUtils.INTEGER_ONE)) {
|
||||||
|
|
|
||||||
|
|
@ -95,4 +95,7 @@ public class SalaryItemFormDTO {
|
||||||
private String taxAgentIds;
|
private String taxAgentIds;
|
||||||
|
|
||||||
private Integer sortedIndex;
|
private Integer sortedIndex;
|
||||||
|
|
||||||
|
// 宽度
|
||||||
|
private Integer width;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -105,6 +105,9 @@ public class SalaryItemListDTO {
|
||||||
@TableTitle(title = "显示顺序",dataIndex = "sortedIndex",key = "sortedIndex")
|
@TableTitle(title = "显示顺序",dataIndex = "sortedIndex",key = "sortedIndex")
|
||||||
private Integer sortedIndex;
|
private Integer sortedIndex;
|
||||||
|
|
||||||
|
// 宽度
|
||||||
|
private Integer width;
|
||||||
|
|
||||||
@SalaryTableColumn(text = "操作", width = "20%", column = "operate")
|
@SalaryTableColumn(text = "操作", width = "20%", column = "operate")
|
||||||
private String operate;
|
private String operate;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -102,4 +102,9 @@ public class SalaryItemSaveParam {
|
||||||
* 排序
|
* 排序
|
||||||
*/
|
*/
|
||||||
private Integer sortedIndex;
|
private Integer sortedIndex;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 宽度
|
||||||
|
*/
|
||||||
|
private Integer width;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -159,4 +159,9 @@ public class SalaryItemPO {
|
||||||
* 排序
|
* 排序
|
||||||
*/
|
*/
|
||||||
private Integer sortedIndex;
|
private Integer sortedIndex;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 宽度
|
||||||
|
*/
|
||||||
|
private Integer width;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -143,6 +143,7 @@ public class SalarySobItemAggregateBO {
|
||||||
.sortedIndex(salarySobItemPO.getSortedIndex())
|
.sortedIndex(salarySobItemPO.getSortedIndex())
|
||||||
.canEdit(openFormulaForcedEditing || Objects.equals(salaryItemPO.getCanEdit(), 1))
|
.canEdit(openFormulaForcedEditing || Objects.equals(salaryItemPO.getCanEdit(), 1))
|
||||||
.canDelete(openFormulaForcedEditing || salaryItemPO.getCanDelete() == null || Objects.equals(salaryItemPO.getCanDelete(), 1))
|
.canDelete(openFormulaForcedEditing || salaryItemPO.getCanDelete() == null || Objects.equals(salaryItemPO.getCanDelete(), 1))
|
||||||
|
.width(salaryItemPO.getWidth())
|
||||||
.build());
|
.build());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -109,4 +109,7 @@ public class SalarySobItemDTO {
|
||||||
* 保留小数位数
|
* 保留小数位数
|
||||||
*/
|
*/
|
||||||
private Integer pattern;
|
private Integer pattern;
|
||||||
|
|
||||||
|
// 显示宽度
|
||||||
|
private Integer width;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,8 @@
|
||||||
t.shared_type,
|
t.shared_type,
|
||||||
t.tax_agent_ids,
|
t.tax_agent_ids,
|
||||||
t.sorted_index,
|
t.sorted_index,
|
||||||
t.hide_default
|
t.hide_default,
|
||||||
|
t.width
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<!-- 查询全部 -->
|
<!-- 查询全部 -->
|
||||||
|
|
@ -217,6 +218,9 @@
|
||||||
<if test="sortedIndex != null">
|
<if test="sortedIndex != null">
|
||||||
sorted_index,
|
sorted_index,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="width != null">
|
||||||
|
width,
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||||
<if test="id != null">
|
<if test="id != null">
|
||||||
|
|
@ -288,6 +292,9 @@
|
||||||
<if test="sortedIndex != null">
|
<if test="sortedIndex != null">
|
||||||
#{sortedIndex},
|
#{sortedIndex},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="width != null">
|
||||||
|
#{width},
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
@ -359,6 +366,9 @@
|
||||||
<if test="taxAgentIds != null">
|
<if test="taxAgentIds != null">
|
||||||
tax_agent_ids=#{taxAgentIds},
|
tax_agent_ids=#{taxAgentIds},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="width != null">
|
||||||
|
width=#{width},
|
||||||
|
</if>
|
||||||
sorted_index=#{sortedIndex},
|
sorted_index=#{sortedIndex},
|
||||||
</set>
|
</set>
|
||||||
WHERE id = #{id} AND delete_type = 0
|
WHERE id = #{id} AND delete_type = 0
|
||||||
|
|
|
||||||
|
|
@ -254,6 +254,7 @@ public class SalaryItemServiceImpl extends Service implements SalaryItemService
|
||||||
newSalaryItemPO.setSharedType(saveParam.getSharedType());
|
newSalaryItemPO.setSharedType(saveParam.getSharedType());
|
||||||
newSalaryItemPO.setTaxAgentIds(saveParam.getTaxAgentIds());
|
newSalaryItemPO.setTaxAgentIds(saveParam.getTaxAgentIds());
|
||||||
newSalaryItemPO.setSortedIndex(saveParam.getSortedIndex());
|
newSalaryItemPO.setSortedIndex(saveParam.getSortedIndex());
|
||||||
|
newSalaryItemPO.setWidth(saveParam.getWidth());
|
||||||
salaryItemBiz.updateById(newSalaryItemPO);
|
salaryItemBiz.updateById(newSalaryItemPO);
|
||||||
|
|
||||||
//改名后更新公式
|
//改名后更新公式
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,10 @@ public class SalaryPageUtil {
|
||||||
endIndex > source.size() ? source.size() : endIndex);
|
endIndex > source.size() ? source.size() : endIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String selfAdaption(String chars) {
|
public static String selfAdaption(String chars, Integer width) {
|
||||||
|
if (width != null && width != 0){
|
||||||
|
return width + "";
|
||||||
|
}
|
||||||
int adaption = 0;
|
int adaption = 0;
|
||||||
|
|
||||||
if (chars != null) {
|
if (chars != null) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue