额度审批
This commit is contained in:
+1
-27
@@ -13,8 +13,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.ar.domain.ArBalanceWriteoff;
|
||||
import com.ruoyi.ar.service.IArBalanceWriteoffService;
|
||||
import com.ruoyi.ar.service.IArBillService;
|
||||
import com.ruoyi.ar.domain.vo.ArBillQuery;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
@@ -22,7 +20,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
|
||||
/**
|
||||
* 客户余额核销应收账单 / 账单只读查询 Controller
|
||||
* 客户余额核销应收账单 Controller(账单查看统一走应收管理-应收账单页面)
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-09-16
|
||||
@@ -34,9 +32,6 @@ public class CustomerBillController extends BaseController
|
||||
@Autowired
|
||||
private IArBalanceWriteoffService balanceWriteoffService;
|
||||
|
||||
@Autowired
|
||||
private IArBillService billService;
|
||||
|
||||
/**
|
||||
* 查询客户可核销账单(已确认/部分核销,未核销额大于0)
|
||||
*/
|
||||
@@ -87,25 +82,4 @@ public class CustomerBillController extends BaseController
|
||||
balanceWriteoffService.cancelWriteoff(writeoffId, body == null ? null : body.getCancelRemark());
|
||||
return success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 账单查看:分页查询应收账单(只读,供客户侧账单查看页使用)
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('customer:bill:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo billList(ArBillQuery query)
|
||||
{
|
||||
startPage();
|
||||
return getDataTable(billService.selectArBillList(query));
|
||||
}
|
||||
|
||||
/**
|
||||
* 账单查看:账单详情(含订单明细/费用明细)
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('customer:bill:query')")
|
||||
@GetMapping("/{arBillId}")
|
||||
public AjaxResult billInfo(@PathVariable("arBillId") Long arBillId)
|
||||
{
|
||||
return success(billService.selectArBillById(arBillId));
|
||||
}
|
||||
}
|
||||
|
||||
+69
-7
@@ -17,6 +17,7 @@ import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.customer.customermoney.domain.CustomerBalanceFlow;
|
||||
import com.ruoyi.customer.customermoney.domain.CustomerCreditApply;
|
||||
import com.ruoyi.customer.customermoney.domain.CustomerCreditFlow;
|
||||
import com.ruoyi.customer.customermoney.domain.CustomerReceipt;
|
||||
import com.ruoyi.customer.customermoney.service.ICustomerMoneyService;
|
||||
@@ -136,15 +137,76 @@ public class CustomerMoneyController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* 调整客户额度(信用额度/临时额度),调整过程留额度流水
|
||||
* 提交额度调整申请(信用额度/临时额度),申请待审批通过后才真正调整额度
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('customer:credit:adjust')")
|
||||
@Log(title = "客户额度调整", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/credit/adjust")
|
||||
public AjaxResult adjustCredit(@RequestBody CustomerCreditFlow flow)
|
||||
@Log(title = "客户额度调整申请", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/credit/apply")
|
||||
public AjaxResult applyCredit(@RequestBody CustomerCreditApply apply)
|
||||
{
|
||||
flow.setCreateBy(getUsername());
|
||||
flow.setOperatorId(getUserId());
|
||||
return toAjax(customerMoneyService.adjustCredit(flow));
|
||||
apply.setCreateBy(getUsername());
|
||||
return toAjax(customerMoneyService.applyCreditAdjust(apply));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询额度调整申请列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('customersupplier:customerinfo:list')")
|
||||
@GetMapping("/credit/apply/list")
|
||||
public TableDataInfo creditApplyList(CustomerCreditApply query)
|
||||
{
|
||||
if (query == null || query.getCustomerId() == null || query.getCustomerId() == 0L) {
|
||||
return getDataTable(Collections.emptyList());
|
||||
}
|
||||
startPage();
|
||||
List<CustomerCreditApply> list = customerMoneyService.selectCreditApplyList(query);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询额度调整申请详情
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('customersupplier:customerinfo:list')")
|
||||
@GetMapping("/credit/apply/{applyId}")
|
||||
public AjaxResult getCreditApply(@PathVariable("applyId") Long applyId)
|
||||
{
|
||||
return success(customerMoneyService.selectCreditApplyById(applyId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 审批通过额度调整申请:通过后调整账户额度并生成额度流水
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('customer:credit:approve')")
|
||||
@Log(title = "客户额度调整审批", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/credit/apply/approve/{applyId}")
|
||||
public AjaxResult approveCreditApply(@PathVariable("applyId") Long applyId,
|
||||
@RequestBody(required = false) CustomerCreditApply body)
|
||||
{
|
||||
String remark = body != null ? body.getApproveRemark() : null;
|
||||
return toAjax(customerMoneyService.approveCreditApply(applyId, remark));
|
||||
}
|
||||
|
||||
/**
|
||||
* 驳回额度调整申请(驳回原因必填)
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('customer:credit:approve')")
|
||||
@Log(title = "客户额度调整驳回", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/credit/apply/reject/{applyId}")
|
||||
public AjaxResult rejectCreditApply(@PathVariable("applyId") Long applyId,
|
||||
@RequestBody CustomerCreditApply body)
|
||||
{
|
||||
String reason = body != null ? body.getApproveRemark() : null;
|
||||
return toAjax(customerMoneyService.rejectCreditApply(applyId, reason));
|
||||
}
|
||||
|
||||
/**
|
||||
* 撤销待审批的额度调整申请
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('customer:credit:adjust')")
|
||||
@Log(title = "客户额度调整撤销", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/credit/apply/cancel/{applyId}")
|
||||
public AjaxResult cancelCreditApply(@PathVariable("applyId") Long applyId)
|
||||
{
|
||||
return toAjax(customerMoneyService.cancelCreditApply(applyId));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user