package com.engine.salary.entity.salaryacct.dto;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @description: 薪资核算结果详情
 * @author: xiajun
 * @modified By: xiajun
 * @date: Created in 12/9/21 5:13 PM
 * @version:v1.0
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
//薪资核算结果详情")
public class SalaryAcctResultDetailDTO {

    /**
     * SalaryAcctEmployee的id
     */
    //薪资核算结果id")
    private Long id;

    //员工信息")
    private Long employeeId;

    //员工信息")
    private List<SalaryAcctEmployeeInfoDTO> employeeInfos;

    //公式项")
    private List<SalaryAcctResultDetailItemDTO> formulaItems;

    //输入项")
    private List<SalaryAcctResultDetailItemDTO> inputItems;

    // 根据账套分组的薪资项目
    private List<SalaryAcctResultDetailItemByGroupDTO> itemsByGroup;

    //已发补发
    private List<SalaryAcctResultDetailItemDTO> issuedAndReissueItems;

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class SalaryAcctResultDetailItemDTO {

        //薪资项目id")
        private Long salaryItemId;

        //薪资项目名称")
        private String salaryItemName;

        //核算结果的值")
        private String resultValue;

        // 公式/输入
        private String itemFormulaContent;

        //数据类型：number、string")
        private String dataType;

        //是否可编辑
        private Boolean canEdit;

        // 保留小数位数
        private Integer pattern;

        // 锁定状态
        private String lockStatus;
    }

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class SalaryAcctResultDetailItemByGroupDTO {

        //薪资账套分组id")
        private Long salarySobItemGroupId;

        //薪资项目分组名称")
        private String salarySobItemGroupName;

        //分组中包含的薪资项目
        private List<SalaryAcctResultDetailItemDTO> salaryItems;

        //分组顺序
        private Integer sortedIndex;
    }
}
