应付费用重算优化以及样式调整
This commit is contained in:
+50
-1
@@ -1,5 +1,7 @@
|
||||
package com.bms.web.controller.price;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
@@ -15,6 +17,7 @@ import com.bms.common.core.page.TableDataInfo;
|
||||
import com.bms.price.domain.PayOrderFeeLine;
|
||||
import com.bms.price.domain.PayOrderQuery;
|
||||
import com.bms.price.domain.PayOrderRecalcCommand;
|
||||
import com.bms.price.domain.PayOrderRecalcTask;
|
||||
import com.bms.price.service.IPayOrderListService;
|
||||
|
||||
/** 提单管理下的应付列表。 */
|
||||
@@ -43,7 +46,40 @@ public class PayOrderController extends BaseController
|
||||
@PostMapping("/recalc")
|
||||
public AjaxResult recalc(@RequestBody PayOrderRecalcCommand command)
|
||||
{
|
||||
return success(payOrderListService.recalc(command));
|
||||
Map<String, String> payload = new HashMap<>();
|
||||
payload.put("taskId", payOrderListService.submitRecalc(command));
|
||||
return success(payload);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询应付费用重算进度。
|
||||
*
|
||||
* @param taskId 任务号
|
||||
* @return Redis 中的进度和每一票结果
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('price:payOrder:recalc')")
|
||||
@GetMapping("/recalc/task/{taskId}")
|
||||
public AjaxResult recalcTask(@PathVariable String taskId)
|
||||
{
|
||||
PayOrderRecalcTask task = payOrderListService.getRecalcTask(taskId);
|
||||
if (task == null)
|
||||
{
|
||||
return error("重算任务不存在或已过期");
|
||||
}
|
||||
return success(task);
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消还没开始的应付费用重算。正在计算的这一票会算完。
|
||||
*
|
||||
* @param taskId 任务号
|
||||
* @return 更新后的进度
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('price:payOrder:recalc')")
|
||||
@PostMapping("/recalc/task/{taskId}/cancel")
|
||||
public AjaxResult cancelRecalc(@PathVariable String taskId)
|
||||
{
|
||||
return success(payOrderListService.cancelRecalc(taskId));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -86,4 +122,17 @@ public class PayOrderController extends BaseController
|
||||
payOrderListService.removeFee(feeId);
|
||||
return success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查看一票订单的费用操作日志,含变更前和变更后。
|
||||
*
|
||||
* @param billId 计费订单 ID
|
||||
* @return 当前页日志
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('price:payOrder:log')")
|
||||
@GetMapping("/{billId}/feeLogs")
|
||||
public TableDataInfo feeLogs(@PathVariable String billId)
|
||||
{
|
||||
return getDataTable(payOrderListService.feeLogs(billId));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user