package com.engine.salary.entity.salaryBill.param;

import com.engine.salary.common.BaseQueryParam;
import com.engine.salary.enums.salarybill.SalarySendStatusEnum;
import com.engine.salary.exception.SalaryRunTimeException;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDate;
import java.util.Collection;
import java.util.List;

/**
 * @Description: 工资单发放信息
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
////"工资单发放信息查询参数")
public class SalarySendInfoQueryParam extends BaseQueryParam {

//   主键id")
    private Collection<Long> ids;

//   工资单发放Id")
    private Long salarySendId;

    /**
     * 工资核算id
     */
//    @JsonIgnore
    private Long salaryAccountingId;

//   关键字（姓名）")
    private String keyword;

//   姓名")
    private String username;
    private Long userId;

//   个税扣缴义务人的主键id")
    private Long taxAgentId;

//   部门id")
    private List<Long> departmentIds;

    // 分部id
    private List<Long> subCompanyIds;

//   岗位id")
    private List<Long> positionIds;

//   状态")
    private String userstatus;

//   入职日期")
    private List<LocalDate> hiredate;

//   发送状态")
    private SalarySendStatusEnum sendStatus;

    /**
     * true= [已发送]
     * false= [未发送，已撤回]
     */
    private Boolean isGranted;

    /**
     * 发送状态
     */
//    @JsonIgnore
    private Integer sendStatusVal;

    /**
     * 发送状态
     */
//    @JsonIgnore
    private List<Integer> sendStatuss;

    private String departmentIdStr;

    private String subCompanyIdStr;

    public static String checkParam(SalarySendInfoQueryParam saveParam) {
        if (saveParam.getSalarySendId() == null) {
            throw new SalaryRunTimeException("工资单发放Id必传");
        }

        return "";
    }
}
