package com.ximai.mes.pro.dto;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * 报工记录批量推送 SAP 结果
 */
@Data
public class FeedbackSapPushResult {

    private int successCount;
    private int failCount;
    private List<String> messages = new ArrayList<>();

    public void addSuccess(Long recordId, String pushType) {
        successCount++;
        messages.add(String.format("报工记录 %d 推送成功（%s）", recordId, pushType));
    }

    public void addFail(Long recordId, String reason) {
        failCount++;
        messages.add(String.format("报工记录 %d 推送失败：%s", recordId, reason));
    }
}
