调整:账单不变动余额,额度
This commit is contained in:
+1
-29
@@ -61,9 +61,6 @@ import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.file.FileUtils;
|
||||
import com.ruoyi.common.utils.file.FileUploadUtils;
|
||||
import com.ruoyi.common.utils.uuid.IdUtils;
|
||||
import com.ruoyi.customer.customermoney.api.CreditUsageCommand;
|
||||
import com.ruoyi.customer.customermoney.api.CustomerFundBizType;
|
||||
import com.ruoyi.customer.customermoney.api.ICustomerAccountApi;
|
||||
import com.ruoyi.price.domain.PrcIncomeBillFee;
|
||||
import com.ruoyi.price.domain.PrcOrderBill;
|
||||
import com.ruoyi.price.mapper.PrcIncomeBillFeeMapper;
|
||||
@@ -86,7 +83,6 @@ public class ArBillServiceImpl implements IArBillService
|
||||
@Autowired private IArBillLogService logService;
|
||||
@Autowired private PrcOrderBillMapper sourceBillMapper;
|
||||
@Autowired private PrcIncomeBillFeeMapper sourceFeeMapper;
|
||||
@Autowired private ICustomerAccountApi customerAccountApi;
|
||||
|
||||
@Override
|
||||
public List<ArBill> selectArBillList(ArBillQuery query)
|
||||
@@ -292,10 +288,7 @@ public class ArBillServiceImpl implements IArBillService
|
||||
bill.getStatus(),
|
||||
"账单状态已发生变化,请刷新后重试", operator, requestId);
|
||||
}
|
||||
// 账单确认:应收形成,按账单金额占用客户授信额度。
|
||||
// 不校验可用额度,兼容历史 used_credit 可高于总额度、外币账户静默跳过的口径。
|
||||
// 账单不调用余额变动接口
|
||||
// customerAccountApi.occupyCredit(buildCreditCommand(bill, "确认应收账单"));
|
||||
// 应收账单只负责形成应收,不参与客户余额或授信额度变更。
|
||||
recordSuccess(bill, ArLogObjectType.BILL, ArLogOperationType.CONFIRM,
|
||||
"确认应收账单", ArBillStatus.DRAFT.getCode(), ArBillStatus.CONFIRMED.getCode(), requestId, operator);
|
||||
return selectArBillById(arBillId);
|
||||
@@ -338,11 +331,6 @@ public class ArBillServiceImpl implements IArBillService
|
||||
bill.getStatus(),
|
||||
"账单状态已发生变化,请刷新后重试", operator, requestId);
|
||||
}
|
||||
// 账单作废:已确认账单占用的授信额度全额释放(可作废的CONFIRMED账单必然零核销)。
|
||||
if (currentStatus == ArBillStatus.CONFIRMED)
|
||||
{
|
||||
customerAccountApi.releaseCredit(buildCreditCommand(bill, "作废应收账单"));
|
||||
}
|
||||
if (!sourceBillIds.isEmpty())
|
||||
{
|
||||
int releasedCount = sourceBillMapper.releaseArBillOrders(sourceBillIds, operator,
|
||||
@@ -571,22 +559,6 @@ public class ArBillServiceImpl implements IArBillService
|
||||
return new ServiceException(message);
|
||||
}
|
||||
|
||||
/** 构造客户资金模块使用的应收账单授信命令,确认和作废共用同一业务标识。 */
|
||||
private CreditUsageCommand buildCreditCommand(ArBill bill, String reason)
|
||||
{
|
||||
CreditUsageCommand command = new CreditUsageCommand();
|
||||
command.setCustomerId(bill.getCustomerId());
|
||||
command.setCurrency(bill.getCurrency());
|
||||
command.setAmount(nvl(bill.getTotalAmount()));
|
||||
command.setBizType(CustomerFundBizType.AR_BILL);
|
||||
command.setBizId(bill.getArBillId());
|
||||
command.setBizNo(bill.getBillNo());
|
||||
command.setReason(reason + ":" + bill.getBillNo());
|
||||
// 应收确认沿用历史口径:允许已用额度暂时超过额度上限;释放场景该字段无意义。
|
||||
command.setCheckAvailable(Boolean.FALSE);
|
||||
return command;
|
||||
}
|
||||
|
||||
private byte[] buildWorkbook(ArBill bill) throws IOException
|
||||
{
|
||||
ClassPathResource resource = new ClassPathResource(EXPORT_TEMPLATE_RESOURCE);
|
||||
|
||||
Reference in New Issue
Block a user