无关风月
2025-02-27 7685af4ed67c693d197393f56f392d7b12434853
ruoyi-system/src/main/java/com/ruoyi/system/importExcel/TBankFlowImportExcel.java
New file
@@ -0,0 +1,51 @@
package com.ruoyi.system.importExcel;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import java.io.Serializable;
import java.math.BigDecimal;
/**
 * @author 64502
 */
@Data
@ApiModel(value="银行流水导入Excel")
public class TBankFlowImportExcel implements Serializable {
    @ExcelProperty("银行流水号")
    private String bankSerialNumber;
    @ExcelProperty("流水金额")
    private BigDecimal flowMoney;
    @ExcelProperty("支付时间")
    private String payTime;
    @ExcelProperty("付款人")
    private String payer;
    @ExcelProperty("导入结果")
    private String result;
    public boolean validate() {
        if (StringUtils.isEmpty(bankSerialNumber)){
            result = "银行流水号不能为空";
            return false;
        }
        if (StringUtils.isEmpty(payTime)){
            result = "支付时间不能为空";
            return false;
        }
        if (flowMoney == null){
            result = "流水金额不能为空";
            return false;
        }
        return true;
    }
}