核算锁定
This commit is contained in:
parent
271daf29be
commit
10ffe88810
|
|
@ -8,6 +8,10 @@ import java.util.List;
|
|||
@Data
|
||||
public class WeaTableColumnGroup extends WeaTableColumn {
|
||||
|
||||
/**
|
||||
* 锁定状态
|
||||
*/
|
||||
private String lockStatus;
|
||||
|
||||
private List<WeaTableColumnGroup> children;
|
||||
|
||||
|
|
@ -18,8 +22,20 @@ public class WeaTableColumnGroup extends WeaTableColumn {
|
|||
super(width, text, column);
|
||||
}
|
||||
|
||||
public WeaTableColumnGroup(String width, String text, String column, String lockStatus) {
|
||||
super(width, text, column);
|
||||
this.lockStatus = lockStatus;
|
||||
}
|
||||
|
||||
|
||||
public WeaTableColumnGroup(String width, String text, String column, List<WeaTableColumnGroup> children) {
|
||||
super(width, text, column);
|
||||
this.children = children;
|
||||
}
|
||||
|
||||
public WeaTableColumnGroup(String width, String text, String column, List<WeaTableColumnGroup> children, String lockStatus) {
|
||||
super(width, text, column);
|
||||
this.children = children;
|
||||
this.lockStatus = lockStatus;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ import com.engine.salary.entity.salarysob.po.SalarySobEmpFieldPO;
|
|||
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.salaryaccounting.LockStatusEnum;
|
||||
import com.engine.salary.enums.salaryitem.SalaryDataTypeEnum;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.engine.salary.util.SalaryI18nUtil;
|
||||
|
|
@ -125,28 +126,36 @@ public class SalaryAcctResultBO {
|
|||
* @param salarySobItemAggregateDTO
|
||||
* @return
|
||||
*/
|
||||
public static List<WeaTableColumnGroup> buildTableColumns(SalarySobItemAggregateDTO salarySobItemAggregateDTO) {
|
||||
public static List<WeaTableColumnGroup> buildTableColumns(SalarySobItemAggregateDTO salarySobItemAggregateDTO, List<Long> lockSalaryItemIds) {
|
||||
List<WeaTableColumnGroup> columns = Lists.newArrayList();
|
||||
// 员工信息字段
|
||||
for (SalarySobEmpFieldDTO salarySobEmpFieldDTO : salarySobItemAggregateDTO.getEmpFields()) {
|
||||
columns.add(new WeaTableColumnGroup("150", salarySobEmpFieldDTO.getFieldName(), salarySobEmpFieldDTO.getFieldId()));
|
||||
}
|
||||
// 薪资项目分组下的薪资项目
|
||||
// 薪资项目分组下的薪资项目
|
||||
for (SalarySobItemGroupDTO salarySobItemGroupDTO : salarySobItemAggregateDTO.getItemGroups()) {
|
||||
if (CollectionUtils.isEmpty(salarySobItemGroupDTO.getItems())) {
|
||||
continue;
|
||||
}
|
||||
List<WeaTableColumnGroup> childrenColumns = Lists.newArrayList();
|
||||
for (SalarySobItemDTO salarySobItemDTO : salarySobItemGroupDTO.getItems()) {
|
||||
childrenColumns.add(new WeaTableColumnGroup("150", salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId()));
|
||||
if (lockSalaryItemIds.contains(salarySobItemDTO.getSalaryItemId())) {
|
||||
childrenColumns.add(new WeaTableColumnGroup("150", salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getValue()));
|
||||
} else {
|
||||
childrenColumns.add(new WeaTableColumnGroup("150", salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getValue()));
|
||||
}
|
||||
}
|
||||
WeaTableColumnGroup weaTableColumnWapper = new WeaTableColumnGroup("150", salarySobItemGroupDTO.getName(), String.valueOf(salarySobItemGroupDTO.getId()), childrenColumns);
|
||||
columns.add(weaTableColumnWapper);
|
||||
}
|
||||
// 没有分类的薪资项目
|
||||
for (SalarySobItemDTO salarySobItemDTO : salarySobItemAggregateDTO.getItems()) {
|
||||
columns.add(new WeaTableColumnGroup("150", salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId()));
|
||||
if (lockSalaryItemIds.contains(salarySobItemDTO.getSalaryItemId())) {
|
||||
columns.add(new WeaTableColumnGroup("150", salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.LOCK.getValue()));
|
||||
} else {
|
||||
columns.add(new WeaTableColumnGroup("150", salarySobItemDTO.getName(), "" + salarySobItemDTO.getSalaryItemId(), LockStatusEnum.UNLOCK.getValue()));
|
||||
}
|
||||
|
||||
}
|
||||
return columns;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ import com.wbi.util.Util;
|
|||
import dm.jdbc.util.IdGenerator;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.collections4.ListUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.ss.usermodel.Sheet;
|
||||
import org.apache.poi.util.IOUtils;
|
||||
|
|
@ -319,7 +320,7 @@ public class SalaryAcctExcelServiceImpl extends Service implements SalaryAcctExc
|
|||
// 查询薪资账套下的薪资项目+员工信息字段
|
||||
SalarySobItemAggregateDTO salarySobItemAggregateDTO = getSalarySobItemService(user).getAggregateWithItemHideBySalarySobId(salaryAcctRecordPO.getSalarySobId());
|
||||
// 构建薪资核算结果列表表头
|
||||
return SalaryAcctResultBO.buildTableColumns(salarySobItemAggregateDTO);
|
||||
return SalaryAcctResultBO.buildTableColumns(salarySobItemAggregateDTO, ListUtils.emptyIfNull(salaryAcctRecordPO.getLockSalaryItemIds()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue