Implement batch fee management features in BillingController, including preview, submission, and task retrieval. Update related services and mappers to support batch processing. Add necessary error messages in properties file and enhance front-end API for batch operations.
This commit is contained in:
+103
@@ -0,0 +1,103 @@
|
||||
package com.bms.price.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/** Async batch add income fee progress (Redis). */
|
||||
public class BatchAddIncomeBillFeeTask implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public static final String STATUS_PENDING = "PENDING";
|
||||
public static final String STATUS_RUNNING = "RUNNING";
|
||||
public static final String STATUS_SUCCESS = "SUCCESS";
|
||||
public static final String STATUS_FAIL = "FAIL";
|
||||
|
||||
private String taskId;
|
||||
private String status;
|
||||
private int percent;
|
||||
private String message;
|
||||
private String error;
|
||||
private int total;
|
||||
private int success;
|
||||
private int fail;
|
||||
|
||||
public String getTaskId()
|
||||
{
|
||||
return taskId;
|
||||
}
|
||||
|
||||
public void setTaskId(String taskId)
|
||||
{
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public int getPercent()
|
||||
{
|
||||
return percent;
|
||||
}
|
||||
|
||||
public void setPercent(int percent)
|
||||
{
|
||||
this.percent = percent;
|
||||
}
|
||||
|
||||
public String getMessage()
|
||||
{
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message)
|
||||
{
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public String getError()
|
||||
{
|
||||
return error;
|
||||
}
|
||||
|
||||
public void setError(String error)
|
||||
{
|
||||
this.error = error;
|
||||
}
|
||||
|
||||
public int getTotal()
|
||||
{
|
||||
return total;
|
||||
}
|
||||
|
||||
public void setTotal(int total)
|
||||
{
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
public int getSuccess()
|
||||
{
|
||||
return success;
|
||||
}
|
||||
|
||||
public void setSuccess(int success)
|
||||
{
|
||||
this.success = success;
|
||||
}
|
||||
|
||||
public int getFail()
|
||||
{
|
||||
return fail;
|
||||
}
|
||||
|
||||
public void setFail(int fail)
|
||||
{
|
||||
this.fail = fail;
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,8 @@ public class PrcOrderBill extends BaseEntity
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String billId;
|
||||
/** 批量查询:多个账单ID精确匹配(仅查询用,非表字段) */
|
||||
private List<String> billIds;
|
||||
private String billKey;
|
||||
private String orderNo;
|
||||
/** 批量查询:多个订单号精确匹配(仅查询用,非表字段) */
|
||||
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package com.bms.price.domain.vo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import com.bms.price.domain.PrcOrderBill;
|
||||
import lombok.Data;
|
||||
|
||||
/** Preview matched bills before async batch add fee. */
|
||||
@Data
|
||||
public class BatchAddIncomeBillFeePreview implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private int matchCount;
|
||||
/** First N rows for UI preview. */
|
||||
private List<PrcOrderBill> samples = new ArrayList<PrcOrderBill>();
|
||||
}
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
package com.bms.price.domain.vo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Batch add receivable fee lines.
|
||||
* scopeMode=SELECTED uses billIds; scopeMode=ALL uses list query filters.
|
||||
*/
|
||||
@Data
|
||||
public class BatchAddIncomeBillFeeRequest implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** ALL = list filters; SELECTED = billIds only. */
|
||||
private String scopeMode;
|
||||
|
||||
/** Selected bill ids when scopeMode=SELECTED. */
|
||||
private List<String> billIds;
|
||||
|
||||
/** Same filters as billing list search. */
|
||||
private List<String> orderNos;
|
||||
private List<String> trackingNos;
|
||||
private List<String> transferNos;
|
||||
private List<String> customerCodes;
|
||||
private List<String> productCodes;
|
||||
private String countryCode;
|
||||
private String creditArrearsStatus;
|
||||
|
||||
/** Surcharge config id (prc_surcharge.sc_id). */
|
||||
@NotNull(message = "scId required")
|
||||
private Long scId;
|
||||
|
||||
/** Dict bms_fee_type; empty = use surcharge.feeType. */
|
||||
private String feeType;
|
||||
|
||||
/**
|
||||
* Fixed amount for every matched bill.
|
||||
* Empty = calculate per bill from surcharge chargeType / weight / freight.
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
|
||||
/** Default CNY. */
|
||||
private String currency;
|
||||
|
||||
private String remark;
|
||||
}
|
||||
Reference in New Issue
Block a user