费用明细可以增加费用

This commit is contained in:
wuweihua
2026-09-22 15:30:25 +08:00
parent 77b95f9450
commit 226db7799b
20 changed files with 797 additions and 14 deletions
@@ -4,18 +4,24 @@ import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.price.domain.PrcOrderBill;
import com.ruoyi.price.domain.PrcQuote;
import com.ruoyi.price.domain.vo.AddIncomeBillFeeRequest;
import com.ruoyi.price.domain.vo.UpdateIncomeBillFeeRequest;
import com.ruoyi.price.domain.vo.TmsPriceBillRequest;
import com.ruoyi.price.domain.vo.TmsPriceQuoteRequest;
import com.ruoyi.price.domain.vo.TmsPriceQuoteResult;
@@ -110,6 +116,30 @@ public class BillingController extends BaseController
return success(prcOrderBillService.getBill(billId));
}
@PreAuthorize("@ss.hasPermi('price:billing:feeAdd')")
@Log(title = "Billing income fee", businessType = BusinessType.INSERT)
@PostMapping("/bill/fee")
public AjaxResult addIncomeFee(@Validated @RequestBody AddIncomeBillFeeRequest request)
{
return success(prcOrderBillService.addIncomeFee(request));
}
@PreAuthorize("@ss.hasPermi('price:billing:feeEdit')")
@Log(title = "Billing income fee", businessType = BusinessType.UPDATE)
@PutMapping("/bill/fee")
public AjaxResult updateIncomeFee(@Validated @RequestBody UpdateIncomeBillFeeRequest request)
{
return success(prcOrderBillService.updateIncomeFee(request));
}
@PreAuthorize("@ss.hasPermi('price:billing:feeRemove')")
@Log(title = "Billing income fee", businessType = BusinessType.DELETE)
@DeleteMapping("/bill/fee/{feeId}")
public AjaxResult deleteIncomeFee(@PathVariable String feeId)
{
return success(prcOrderBillService.deleteIncomeFee(feeId));
}
@PreAuthorize("@ss.hasPermi('price:billing:bill')")
@PostMapping("/bill")
public AjaxResult bill(@Validated @RequestBody TmsPriceBillRequest request)
@@ -69,7 +69,8 @@ public class SurchargeController extends BaseController
* 不要求 price:surcharge:list 权限,套餐维护角色(price:set:*)也能读,避免套餐页拿到 403 空列表。
*/
@PreAuthorize("@ss.hasPermi('price:surcharge:list') or @ss.hasPermi('price:surcharge:query')"
+ " or @ss.hasPermi('price:set:query') or @ss.hasPermi('price:set:add') or @ss.hasPermi('price:set:edit')")
+ " or @ss.hasPermi('price:set:query') or @ss.hasPermi('price:set:add') or @ss.hasPermi('price:set:edit')"
+ " or @ss.hasPermi('price:billing:bill')")
@GetMapping("/options")
public AjaxResult listOptions(PrcSurcharge surcharge)
{
@@ -153,6 +153,12 @@ price.bill.notFound=计费记录不存在
price.bill.customerRequired=订单同步缺少有效客户
price.bill.alreadyInArBill=订单{0}已生成应收账单,作废后方可重新计费
price.bill.bizDateRequired=业务日期为空
price.bill.fee.scIdRequired=附加费不能为空
price.bill.fee.surchargeNotFound=附加费配置不存在或已停用
price.bill.fee.notFound=费用明细不存在
price.bill.fee.notManual=仅手动增加的费用可编辑或删除
price.bill.fee.alreadyBilled=费用已生成账单,不可编辑或删除
price.bill.fee.idRequired=费用ID不能为空
price.set.version.effectiveTime.empty=版本生效时间不能为空
price.set.version.notExists=套餐版本不存在