修改计费失败原因
This commit is contained in:
+17
-27
@@ -152,8 +152,8 @@ public class BillingController extends BaseController
|
||||
{
|
||||
query = new PrcOrderBill();
|
||||
}
|
||||
// Billing list only shows success and the three soft misses.
|
||||
query.setBillingFailStatuses(limitBillingListFailStatus(query.getBillingFailStatuses()));
|
||||
// Billing list only shows successfully billed orders.
|
||||
query.setBillingFailStatuses(limitBillingListFailStatus());
|
||||
query.setBillingFailStatus(null);
|
||||
startPage();
|
||||
List<PrcOrderBill> list = prcOrderBillService.selectBillList(query);
|
||||
@@ -161,7 +161,7 @@ public class BillingController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* Async export billing list by current filters (status limited to 0-3).
|
||||
* Async export billing list by current filters (status limited to success=0).
|
||||
* Requires at least one meaningful filter. Poll task then download.
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('price:billing:export')")
|
||||
@@ -178,7 +178,7 @@ public class BillingController extends BaseController
|
||||
{
|
||||
return error(MessageUtils.message("price.bill.export.filterRequired"));
|
||||
}
|
||||
query.setBillingFailStatuses(limitBillingListFailStatus(query.getBillingFailStatuses()));
|
||||
query.setBillingFailStatuses(limitBillingListFailStatus());
|
||||
query.setBillingFailStatus(null);
|
||||
return successTask(prcOrderBillService.submitOrderBillExport(
|
||||
PrcOrderBillExportTask.TYPE_BILLING, query));
|
||||
@@ -204,32 +204,13 @@ public class BillingController extends BaseController
|
||||
prcOrderBillService.downloadOrderBillExport(taskId, response);
|
||||
}
|
||||
|
||||
private static List<Integer> limitBillingListFailStatus(List<Integer> requested)
|
||||
private static List<Integer> limitBillingListFailStatus()
|
||||
{
|
||||
// Soft-fail list: success + sales 1/2/3 + product-catalog 23/24/25
|
||||
List<Integer> allowed = Arrays.asList(
|
||||
Integer.valueOf(0), Integer.valueOf(1), Integer.valueOf(2), Integer.valueOf(3),
|
||||
Integer.valueOf(23), Integer.valueOf(24), Integer.valueOf(25));
|
||||
if (requested == null || requested.isEmpty())
|
||||
{
|
||||
return new ArrayList<Integer>(allowed);
|
||||
}
|
||||
List<Integer> kept = new ArrayList<Integer>();
|
||||
for (Integer status : requested)
|
||||
{
|
||||
if (status != null && allowed.contains(status) && !kept.contains(status))
|
||||
{
|
||||
kept.add(status);
|
||||
}
|
||||
}
|
||||
if (kept.isEmpty())
|
||||
{
|
||||
kept.add(Integer.valueOf(-1));
|
||||
}
|
||||
return kept;
|
||||
// Billing list is success-only (billing_fail_status = 0).
|
||||
return new ArrayList<Integer>(Arrays.asList(Integer.valueOf(0)));
|
||||
}
|
||||
|
||||
/** All prc_order_bill rows. Billing list stays limited to status 0-3. */
|
||||
/** All prc_order_bill rows. Billing list stays limited to status 0. */
|
||||
@PreAuthorize("@ss.hasPermi('price:orderBill:list')")
|
||||
@GetMapping("/orderBill/list")
|
||||
public TableDataInfo orderBillList(PrcOrderBill query)
|
||||
@@ -239,6 +220,15 @@ public class BillingController extends BaseController
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/** Order-list popup: billing fail reason by billId (data-scoped). */
|
||||
@PreAuthorize("@ss.hasPermi('price:orderBill:list')")
|
||||
@GetMapping("/orderBill/{billId}/failReason")
|
||||
public AjaxResult orderBillFailReason(@PathVariable("billId") String billId)
|
||||
{
|
||||
return success(prcOrderBillService.getBillingFailReason(billId));
|
||||
}
|
||||
|
||||
/**
|
||||
* Async export order list by current filters.
|
||||
* Requires at least one meaningful filter (default orderStatuses alone is not enough).
|
||||
|
||||
Reference in New Issue
Block a user