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

import com.engine.salary.entity.salaryBill.po.SalaryTemplatePO;
import com.engine.salary.exception.SalaryRunTimeException;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @Description: 工资单发放参数
 * @Author: wangxiangzhong
 * @Date: 2021/12/13 16:18
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
////"工资单发放参数")
public class SalarySendGrantParam {

//    主键id
    private List<Long> ids;

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

    /**
     * 工资单发放范围id
     */
    private List<Long> salarySendRangeIds;

    //模板，发消息用
    private SalaryTemplatePO template;

    public static String checkParam(SalarySendGrantParam param, Long employeeId, String tenantKey) {
        if (param.getSalarySendId() == null) {
            throw new SalaryRunTimeException("工资单发放Id必传");
        }

        return "";
    }
}
