package com.ruoyi.web.modules.trading;

import java.math.BigDecimal;
import java.util.Date;
import com.ruoyi.web.modules.trading.domain.BizSupplierSettlement;
import com.ruoyi.web.modules.trading.domain.BizTradeOrder;
import com.ruoyi.web.modules.trading.support.SettlementRules;
import com.ruoyi.web.modules.trading.support.SupplierRules;
import com.ruoyi.web.modules.trading.support.TradeOrderRules;

/**
 * 供应商结算测试样本。
 */
public final class SupplierSettlementTestSamples
{
    public static final Long SETTLEMENT_ID = 3001L;

    public static final String SETTLEMENT_NO = "JSD20260520001";

    public static final Long ORDER_ID = TradeOrderTestSamples.ORDER_ID;

    public static final String ORDER_NO = TradeOrderTestSamples.ORDER_NO;

    private SupplierSettlementTestSamples()
    {
    }

    public static BizSupplierSettlement pendingRow()
    {
        BizSupplierSettlement row = new BizSupplierSettlement();
        row.setId(SETTLEMENT_ID);
        row.setSettlementNo(SETTLEMENT_NO);
        row.setOrderId(ORDER_ID);
        row.setOrderNo(ORDER_NO);
        row.setSupplierId(TradeOrderTestSamples.SUPPLIER_ID_1);
        row.setSupplierName("扎西合作社");
        row.setTotalHeads(3);
        row.setTotalAmount(new BigDecimal("10000.00"));
        row.setFeeMethod(SupplierRules.FEE_METHOD_PER_HEAD);
        row.setFeeStandard(new BigDecimal("10"));
        row.setServiceFeeAmount(new BigDecimal("30.00"));
        row.setPayableAmount(new BigDecimal("9970.00"));
        row.setSettlementStatus(SettlementRules.SETTLEMENT_STATUS_PENDING);
        row.setDelFlag(SettlementRules.DEL_FLAG_NORMAL);
        row.setCreateTime(new Date());
        return row;
    }

    public static BizSupplierSettlement completedRow()
    {
        BizSupplierSettlement row = pendingRow();
        row.setSettlementStatus(SettlementRules.SETTLEMENT_STATUS_COMPLETED);
        row.setSettleVoucherUrl("/profile/upload/2026/05/settle.jpg");
        row.setSettleVoucherPath("/upload/2026/05/settle.jpg");
        row.setSettleFinishTime(new Date());
        return row;
    }

    public static BizSupplierSettlement settleRequest()
    {
        BizSupplierSettlement row = new BizSupplierSettlement();
        row.setId(SETTLEMENT_ID);
        row.setSettleVoucherUrl("/profile/upload/2026/05/settle.jpg");
        row.setSettleVoucherPath("/upload/2026/05/settle.jpg");
        return row;
    }

    public static BizTradeOrder completedOrder()
    {
        BizTradeOrder order = TradeOrderTestSamples.pendingRow();
        order.setOrderStatus(TradeOrderRules.ORDER_STATUS_COMPLETED);
        order.setFinishTime(new Date());
        return order;
    }
}
