Browse Source

[fix] 财务管理

修改财务应收账款的结案后端接口:新增结案后更新销售订单数据,结案状态更新为已结案
dev
liuxiaoxu 4 months ago
parent
commit
2188aab346
  1. 14
      ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/FinancialReceivablesServiceImpl.java

14
ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/FinancialReceivablesServiceImpl.java

@ -249,9 +249,23 @@ public class FinancialReceivablesServiceImpl implements IFinancialReceivablesSer
/* /*
* 结案 * 结案
* */ * */
@Transactional(rollbackFor = Exception.class)
@Override @Override
public int closingFinancialReceivablesById(Long financialReceivablesId) { public int closingFinancialReceivablesById(Long financialReceivablesId) {
int result = financialReceivablesMapper.updateReceivablesClosingStatusById(financialReceivablesId); int result = financialReceivablesMapper.updateReceivablesClosingStatusById(financialReceivablesId);
FinancialReceivables financialReceivables = financialReceivablesMapper.selectFinancialReceivablesById(financialReceivablesId);
String salesOrderCode = financialReceivables.getSalesOrderCode();
SysSalesOrderVo sysSalesOrderVo = sysSalesOrderMapper.selectSysSalesOrderBySalesOrderCode(salesOrderCode);
//设置为已结案
sysSalesOrderVo.setCloseStatus("3");
if (sysSalesOrderVo == null){
log.warn("销售单号不存在:{}", salesOrderCode);
}
int updateSysSalesOrderResult = sysSalesOrderMapper.updateSysSalesOrder(sysSalesOrderVo);
if (updateSysSalesOrderResult <= 0){
throw new BusinessException("销售订单结案失败");
}
return result; return result;
} }

Loading…
Cancel
Save