package com.jwipc.finance.model.query;

import lombok.Data;
import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;
import java.util.Arrays;
import java.util.List;

/**
 * <p>
 * 对账单附件关系表
 * </p>
 *
 * @author shenyang.ou
 * @since 2025-10-16
 */
@Data
public class PaymentAdvanceApplyAttachmentQuery implements Serializable {

    /**
     * 业务附件id
     */
    private Long businessAttachmentId;

    /**
     * 文件的id
     */
    private Long fileId;

    /**
     * 预付款单id
     */
    private Long appId;

    /**
     * 影像文件id
     */
    private String imageFileId;

    /**
     * 影像编码
     */
    private String imageCode;

    /**
     * 影像路径
     */
    private String imagePath;

    /**
     * 备注
     */
    private String remark;

    /**
     * 重新加载标识 0:无需重新加载 1:需要重新加载
     */
    private Integer reloadFlag;

    /**
     * 业务单据集合
     */
    private String businessCodes;
    /**
     * 业务类型集合
     */
    private String businessTypeCodes;

    public List<String> getBusinessCodeList(){
        if (StringUtils.isNotEmpty(this.businessCodes)){
            return  Arrays.asList(StringUtils.split(this.businessCodes, ","));
        }
        return null;
    }

    public List<String> getBusinessTypeCodeList(){
        if (StringUtils.isNotEmpty(this.businessTypeCodes)){
            return  Arrays.asList(StringUtils.split(this.businessTypeCodes, ","));
        }
        return null;
    }
}
