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:
@@ -1,7 +1,9 @@
|
||||
package com.bms.web.controller.price;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@@ -20,10 +22,13 @@ import com.bms.common.core.domain.AjaxResult;
|
||||
import com.bms.common.core.page.TableDataInfo;
|
||||
import com.bms.common.enums.BusinessType;
|
||||
import com.bms.common.utils.DateUtils;
|
||||
import com.bms.common.utils.MessageUtils;
|
||||
import com.bms.common.utils.StringUtils;
|
||||
import com.bms.price.domain.BatchAddIncomeBillFeeTask;
|
||||
import com.bms.price.domain.PrcOrderBill;
|
||||
import com.bms.price.domain.PrcQuote;
|
||||
import com.bms.price.domain.vo.AddIncomeBillFeeRequest;
|
||||
import com.bms.price.domain.vo.BatchAddIncomeBillFeeRequest;
|
||||
import com.bms.price.domain.vo.UpdateIncomeBillFeeRequest;
|
||||
import com.bms.price.domain.vo.TmsPriceBillRequest;
|
||||
import com.bms.price.domain.vo.TmsPriceQuoteRequest;
|
||||
@@ -207,6 +212,38 @@ public class BillingController extends BaseController
|
||||
return success(prcOrderBillService.addIncomeFee(request));
|
||||
}
|
||||
|
||||
/** Preview matched bills for batch add fee (filter: customer / transferNo / country). */
|
||||
@PreAuthorize("@ss.hasPermi('price:billing:feeAdd')")
|
||||
@PostMapping("/bill/fee/batch/preview")
|
||||
public AjaxResult previewBatchAddIncomeFee(@RequestBody BatchAddIncomeBillFeeRequest request)
|
||||
{
|
||||
return success(prcOrderBillService.previewBatchAddIncomeFee(request));
|
||||
}
|
||||
|
||||
/** Submit async batch add fee; poll /bill/fee/batch/task/{taskId}. */
|
||||
@PreAuthorize("@ss.hasPermi('price:billing:feeAdd')")
|
||||
@Log(title = "Billing batch income fee", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/bill/fee/batch")
|
||||
public AjaxResult submitBatchAddIncomeFee(@Validated @RequestBody BatchAddIncomeBillFeeRequest request)
|
||||
{
|
||||
String taskId = prcOrderBillService.submitBatchAddIncomeFee(request);
|
||||
Map<String, Object> payload = new HashMap<String, Object>();
|
||||
payload.put("taskId", taskId);
|
||||
return success(payload);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('price:billing:feeAdd')")
|
||||
@GetMapping("/bill/fee/batch/task/{taskId}")
|
||||
public AjaxResult getBatchAddIncomeFeeTask(@PathVariable String taskId)
|
||||
{
|
||||
BatchAddIncomeBillFeeTask task = prcOrderBillService.getBatchAddIncomeFeeTask(taskId);
|
||||
if (task == null)
|
||||
{
|
||||
return error(MessageUtils.message("price.bill.fee.batch.taskNotExists"));
|
||||
}
|
||||
return success(task);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('price:billing:feeEdit')")
|
||||
@Log(title = "Billing income fee", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/bill/fee")
|
||||
|
||||
@@ -175,6 +175,12 @@ price.bill.packageZonePriceNotHit=已匹配分区,但套餐版本无该分区/
|
||||
price.bill.packagePriceNotHit=套餐版本无匹配的国家/重量段价格
|
||||
price.bill.productNotInPackage=产品不在客户套餐版本中,无法计费
|
||||
price.bill.fee.scIdRequired=附加费不能为空
|
||||
price.bill.fee.batch.taskNotExists=批量增加费用任务不存在或已过期
|
||||
price.bill.fee.batch.tooMany=匹配订单超过上限 {0} 条,请缩小筛选范围
|
||||
price.bill.fee.batch.noMatch=未查询到匹配的计费订单,无法批量增加费用
|
||||
price.bill.fee.batch.filterRequired=请先在计费列表设置查询条件
|
||||
price.bill.fee.batch.selectedRequired=请勾选要增加费用的订单
|
||||
price.bill.fee.batch.scopeRequired=请选择添加范围
|
||||
price.bill.fee.surchargeNotFound=附加费配置不存在或已停用
|
||||
price.bill.fee.notFound=费用明细不存在
|
||||
price.bill.fee.notManual=仅手动增加的费用可编辑或删除
|
||||
|
||||
Reference in New Issue
Block a user