修改计费规则
This commit is contained in:
+15
@@ -21,6 +21,7 @@ import com.bms.price.domain.vo.BillingTaskSubmitRequest;
|
||||
import com.bms.price.domain.vo.TmsPriceBillRequest;
|
||||
import com.bms.price.domain.vo.TmsPriceQuoteResult;
|
||||
import com.bms.price.enums.BillBillingFailStatus;
|
||||
import com.bms.price.enums.BillOrderStatus;
|
||||
import com.bms.price.enums.BillTaskFailCode;
|
||||
import com.bms.price.enums.BillTaskSuccessStatus;
|
||||
import com.bms.price.enums.BillTaskType;
|
||||
@@ -293,6 +294,20 @@ public class PrcBillingTaskServiceImpl implements IPrcBillingTaskService
|
||||
{
|
||||
throw new ServiceException("Oracle order mapped orderNo empty");
|
||||
}
|
||||
// Upstream ORDER_STATUS 9/10 -> REFUND (even if task was submitted as PENDING/REBILL).
|
||||
if (BillOrderStatus.requiresFeeRefund(billReq.getOrderStatus()))
|
||||
{
|
||||
String refundOrderNo = StringUtils.isNotEmpty(billReq.getOrderNo())
|
||||
? billReq.getOrderNo().trim()
|
||||
: resolveRefundOrderNo(task);
|
||||
log.info("billing task upstream status {} -> REFUND path taskId={} orderNo={}",
|
||||
billReq.getOrderStatus(), taskId, refundOrderNo);
|
||||
task.setBillType(BillTaskType.REFUND.getCode());
|
||||
fillCustomerCodeFromBill(task, refundOrderNo);
|
||||
refundWithDbRetry(taskId, refundOrderNo);
|
||||
deleteTaskAfterBillSaved(task);
|
||||
return;
|
||||
}
|
||||
if (StringUtils.isEmpty(billReq.getCustomerCode()))
|
||||
{
|
||||
throw new ServiceException("Oracle order mapped customerCode empty");
|
||||
|
||||
Reference in New Issue
Block a user