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