|
@@ -1,10 +1,12 @@
|
|
|
package com.jzg.organization.controller;
|
|
package com.jzg.organization.controller;
|
|
|
|
|
|
|
|
|
|
+import cn.hutool.core.collection.CollUtil;
|
|
|
|
|
+import cn.hutool.core.lang.tree.Tree;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
|
+import cn.hutool.json.JSONUtil;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.jzg.commons.core.base.BaseController;
|
|
import com.jzg.commons.core.base.BaseController;
|
|
|
import com.jzg.commons.core.page.HttpResult;
|
|
import com.jzg.commons.core.page.HttpResult;
|
|
|
-import com.jzg.commons.entity.finance.dto.CompanySuperviseSettlementReportDto;
|
|
|
|
|
import com.jzg.commons.entity.finance.dto.ExportSuperviseSettlementExcelDto;
|
|
import com.jzg.commons.entity.finance.dto.ExportSuperviseSettlementExcelDto;
|
|
|
import com.jzg.commons.entity.finance.dto.ReceiverSettlementReportDto;
|
|
import com.jzg.commons.entity.finance.dto.ReceiverSettlementReportDto;
|
|
|
import com.jzg.commons.entity.finance.po.*;
|
|
import com.jzg.commons.entity.finance.po.*;
|
|
@@ -59,7 +61,7 @@ public class ReceivableController {
|
|
|
@PostMapping("getUnauditedOrder")
|
|
@PostMapping("getUnauditedOrder")
|
|
|
@Operation(summary = "获取未审核的订单")
|
|
@Operation(summary = "获取未审核的订单")
|
|
|
public HttpResult getUnauditedOrder(@RequestBody ReceivableQueryVo receivableQueryVo){
|
|
public HttpResult getUnauditedOrder(@RequestBody ReceivableQueryVo receivableQueryVo){
|
|
|
- if (Objects.isNull(receivableQueryVo.getAgreementType()) || receivableQueryVo.getAgreementType().isEmpty()) {
|
|
|
|
|
|
|
+ if (Objects.isNull(receivableQueryVo.getAgreementType()) || StrUtil.isBlank(receivableQueryVo.getAgreementType())) {
|
|
|
receivableQueryVo.setAgreementType("1");
|
|
receivableQueryVo.setAgreementType("1");
|
|
|
}
|
|
}
|
|
|
InsPlyIncome auditedOrder = receivableService.getUnauditedOrder(receivableQueryVo);
|
|
InsPlyIncome auditedOrder = receivableService.getUnauditedOrder(receivableQueryVo);
|
|
@@ -72,8 +74,9 @@ public class ReceivableController {
|
|
|
|
|
|
|
|
@PostMapping("addReceivable")
|
|
@PostMapping("addReceivable")
|
|
|
@Operation(summary = "添加应收记录")
|
|
@Operation(summary = "添加应收记录")
|
|
|
- public HttpResult addReceivable(@RequestSingleParam("orderNos") List<String> orderNos){
|
|
|
|
|
- boolean result = receivableService.saveAuditedOrder(orderNos);
|
|
|
|
|
|
|
+ public HttpResult<String> addReceivable(@RequestBody AddReceivableVo addReceivableVo){
|
|
|
|
|
+ log.info("添加应收记录:addReceivableVo=[{}]", JSONUtil.toJsonStr(addReceivableVo));
|
|
|
|
|
+ boolean result = receivableService.saveAuditedOrder(addReceivableVo);
|
|
|
return result ? HttpResult.ok("添加成功") : HttpResult.error("添加失败");
|
|
return result ? HttpResult.ok("添加成功") : HttpResult.error("添加失败");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -93,6 +96,54 @@ public class ReceivableController {
|
|
|
return HttpResult.ok(new InsPlyIncomeVO(data, receivablePageIds));
|
|
return HttpResult.ok(new InsPlyIncomeVO(data, receivablePageIds));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @PostMapping("getCommissionReceivableTotalAmount")
|
|
|
|
|
+ @Operation(summary = "获取私有协议手续费应收费用总金额")
|
|
|
|
|
+ public HttpResult<BigDecimal> getCommissionReceivableTotalAmount(@RequestBody ReceivableQueryVo receivableQueryVo){
|
|
|
|
|
+ if (StrUtil.isBlank(receivableQueryVo.getQueryType())){
|
|
|
|
|
+ receivableQueryVo.setQueryType("2");
|
|
|
|
|
+ }
|
|
|
|
|
+ // 协议类型 1 平台协议 2 私有协议
|
|
|
|
|
+ if (StrUtil.isBlank(receivableQueryVo.getAgreementType())){
|
|
|
|
|
+ receivableQueryVo.setAgreementType("2");
|
|
|
|
|
+ }
|
|
|
|
|
+ HttpResult<Page<InsPlyIncome>> ok = HttpResult.ok(receivableService.getReceivablePage(receivableQueryVo));
|
|
|
|
|
+ Page<InsPlyIncome> data = ok.getData();
|
|
|
|
|
+ if (null == data || CollUtil.isEmpty(data.getRecords())){
|
|
|
|
|
+ return HttpResult.ok(BigDecimal.ZERO);
|
|
|
|
|
+ }
|
|
|
|
|
+ BigDecimal reduce = data.getRecords().stream().map(income -> StrUtil.isNotBlank(income.getSuperviseCostsPremiums()) ? new BigDecimal(income.getSuperviseCostsPremiums()) : BigDecimal.ZERO)
|
|
|
|
|
+ .reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
|
|
+ return HttpResult.ok(reduce);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @PostMapping("/exportTemplateReceivableList")
|
|
|
|
|
+ @Operation(summary = "导出模板私有协议手续费")
|
|
|
|
|
+ public HttpResult<String> exportTemplateReceivableList(){
|
|
|
|
|
+ String receivablePageIds = receivableService.exportTemplateReceivableList();
|
|
|
|
|
+ return HttpResult.ok(receivablePageIds);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @PostMapping("/importReceivableListUpdate")
|
|
|
|
|
+ @Operation(summary = "导入私有协议手续费修改")
|
|
|
|
|
+ public HttpResult<ImportUpdateExcelResultVo> importReceivableListUpdate(@RequestParam("file") MultipartFile file){
|
|
|
|
|
+ ImportUpdateExcelResultVo importExcelResultVo = receivableService.importReceivableListUpdate(file);
|
|
|
|
|
+ return HttpResult.ok(importExcelResultVo);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @PostMapping("/exportAccountsReceivableInvoiceTemplate")
|
|
|
|
|
+ @Operation(summary = "导出应收开票模板")
|
|
|
|
|
+ public HttpResult<String> exportAccountsReceivableInvoiceTemplate(){
|
|
|
|
|
+ String receivablePageIds = receivableService.exportAccountsReceivableInvoiceTemplate();
|
|
|
|
|
+ return HttpResult.ok(receivablePageIds);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @PostMapping("/importAccountsReceivableInvoice")
|
|
|
|
|
+ @Operation(summary = "导入应收开票数据")
|
|
|
|
|
+ public HttpResult<ImportUpdateExcelResultVo> importAccountsReceivableInvoice(@RequestParam("file") MultipartFile file){
|
|
|
|
|
+ ImportUpdateExcelResultVo importExcelResultVo = receivableService.importAccountsReceivableInvoice(file);
|
|
|
|
|
+ return HttpResult.ok(importExcelResultVo);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
*
|
|
*
|
|
|
* @author lipf
|
|
* @author lipf
|
|
@@ -108,8 +159,12 @@ public class ReceivableController {
|
|
|
@PostMapping("getOtherReceivableList")
|
|
@PostMapping("getOtherReceivableList")
|
|
|
@Operation(summary = "获取私有协议跟单费列表")
|
|
@Operation(summary = "获取私有协议跟单费列表")
|
|
|
public HttpResult<InsPlyIncomeVO> getOtherReceivableList(@RequestBody ReceivableQueryVo receivableQueryVo){
|
|
public HttpResult<InsPlyIncomeVO> getOtherReceivableList(@RequestBody ReceivableQueryVo receivableQueryVo){
|
|
|
- receivableQueryVo.setQueryType("2");
|
|
|
|
|
- receivableQueryVo.setAgreementType("2");
|
|
|
|
|
|
|
+ if (StrUtil.isBlank(receivableQueryVo.getQueryType())){
|
|
|
|
|
+ receivableQueryVo.setQueryType("2");
|
|
|
|
|
+ }
|
|
|
|
|
+ if (StrUtil.isBlank(receivableQueryVo.getAgreementType())) {
|
|
|
|
|
+ receivableQueryVo.setAgreementType("2");
|
|
|
|
|
+ }
|
|
|
//return HttpResult.ok(receivableService.getReceivablePage(receivableQueryVo));
|
|
//return HttpResult.ok(receivableService.getReceivablePage(receivableQueryVo));
|
|
|
HttpResult<Page<InsPlyIncome>> ok = HttpResult.ok(receivableService.getReceivablePage(receivableQueryVo));
|
|
HttpResult<Page<InsPlyIncome>> ok = HttpResult.ok(receivableService.getReceivablePage(receivableQueryVo));
|
|
|
Page<InsPlyIncome> data = ok.getData();
|
|
Page<InsPlyIncome> data = ok.getData();
|
|
@@ -117,6 +172,25 @@ public class ReceivableController {
|
|
|
return HttpResult.ok(new InsPlyIncomeVO(data, receivablePageIds));
|
|
return HttpResult.ok(new InsPlyIncomeVO(data, receivablePageIds));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @PostMapping("getOtherReceivableTotalAmount")
|
|
|
|
|
+ @Operation(summary = "获取私有协议跟单费应收费用总金额")
|
|
|
|
|
+ public HttpResult<BigDecimal> getOtherReceivableTotalAmount(@RequestBody ReceivableQueryVo receivableQueryVo){
|
|
|
|
|
+ if (StrUtil.isBlank(receivableQueryVo.getQueryType())){
|
|
|
|
|
+ receivableQueryVo.setQueryType("2");
|
|
|
|
|
+ }
|
|
|
|
|
+ if (StrUtil.isBlank(receivableQueryVo.getAgreementType())) {
|
|
|
|
|
+ receivableQueryVo.setAgreementType("2");
|
|
|
|
|
+ }
|
|
|
|
|
+ HttpResult<Page<InsPlyIncome>> ok = HttpResult.ok(receivableService.getReceivablePage(receivableQueryVo));
|
|
|
|
|
+ Page<InsPlyIncome> data = ok.getData();
|
|
|
|
|
+ if (null == data || CollUtil.isEmpty(data.getRecords())){
|
|
|
|
|
+ return HttpResult.ok(BigDecimal.ZERO);
|
|
|
|
|
+ }
|
|
|
|
|
+ BigDecimal reduce = data.getRecords().stream().map(income -> StrUtil.isNotBlank(income.getOtherCostsPremiums()) ? new BigDecimal(income.getOtherCostsPremiums()) : BigDecimal.ZERO)
|
|
|
|
|
+ .reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
|
|
+ return HttpResult.ok(reduce);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@PostMapping("getJyCommissionReceivableList")
|
|
@PostMapping("getJyCommissionReceivableList")
|
|
|
@Operation(summary = "获取私有协议驾意险手续费列表")
|
|
@Operation(summary = "获取私有协议驾意险手续费列表")
|
|
|
public HttpResult<InsPlyIncomeVO> getJyCommissionReceivableList(@RequestBody ReceivableQueryVo receivableQueryVo){
|
|
public HttpResult<InsPlyIncomeVO> getJyCommissionReceivableList(@RequestBody ReceivableQueryVo receivableQueryVo){
|
|
@@ -139,18 +213,12 @@ public class ReceivableController {
|
|
|
return HttpResult.ok(new InsPlyIncomeVO(data, receivablePageIds));
|
|
return HttpResult.ok(new InsPlyIncomeVO(data, receivablePageIds));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- //@PostMapping("getSelectedReceivableList")
|
|
|
|
|
- @Operation(summary = "获取选中应收列表")
|
|
|
|
|
- public HttpResult getSelectedReceivableList(@RequestBody ReceivableQueryVo receivableQueryVo){
|
|
|
|
|
- return HttpResult.ok(receivableService.getReceivableList(receivableQueryVo));
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
@PostMapping("commissionInvoicing")
|
|
@PostMapping("commissionInvoicing")
|
|
|
@Operation(summary = "手续费开票")
|
|
@Operation(summary = "手续费开票")
|
|
|
public HttpResult<InvoiceingResult> commissionInvoicing(@RequestBody InsPlyIncomeInvoiceVO invoicingVo){
|
|
public HttpResult<InvoiceingResult> commissionInvoicing(@RequestBody InsPlyIncomeInvoiceVO invoicingVo){
|
|
|
InvoiceingResult result = receivableService.addInvoicing(invoicingVo);
|
|
InvoiceingResult result = receivableService.addInvoicing(invoicingVo);
|
|
|
if (Objects.nonNull(result)){
|
|
if (Objects.nonNull(result)){
|
|
|
- return HttpResult.ok("开票成功,发票号是" + result.getInvoiceId() ,result);
|
|
|
|
|
|
|
+ return HttpResult.ok("开票成功,发票编号是" + result.getInvoiceId() ,result);
|
|
|
}
|
|
}
|
|
|
return HttpResult.error("开票失败");
|
|
return HttpResult.error("开票失败");
|
|
|
}
|
|
}
|
|
@@ -178,7 +246,7 @@ public class ReceivableController {
|
|
|
return HttpResult.ok("无占用");
|
|
return HttpResult.ok("无占用");
|
|
|
}else{
|
|
}else{
|
|
|
List<String> invoiceIds = receivableService.queryIncomeBindInvoice(invoicingVo);
|
|
List<String> invoiceIds = receivableService.queryIncomeBindInvoice(invoicingVo);
|
|
|
- return HttpResult.error("订单已开票。发票序号是"+ invoiceIds.toString());
|
|
|
|
|
|
|
+ return HttpResult.error("订单已开票。发票编号是"+ invoiceIds.toString());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -205,6 +273,19 @@ public class ReceivableController {
|
|
|
return HttpResult.ok(receivableService.getReceivableCompany(invoicingVo));
|
|
return HttpResult.ok(receivableService.getReceivableCompany(invoicingVo));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 查询应收订单关联的所有对接人信息
|
|
|
|
|
+ *
|
|
|
|
|
+ * @author lipf
|
|
|
|
|
+ * @date 2026/5/30 10:09
|
|
|
|
|
+ */
|
|
|
|
|
+ @PostMapping("queryReceivableContact")
|
|
|
|
|
+ @Operation(summary = "获取对接人列表")
|
|
|
|
|
+ public HttpResult<List<ContractVO>> queryReceivableContact(@RequestBody InvoicingVo invoicingVo){
|
|
|
|
|
+ return receivableService.queryReceivableContact(invoicingVo);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
@PostMapping("settlement")
|
|
@PostMapping("settlement")
|
|
|
@Operation(summary = "私有协议结算")
|
|
@Operation(summary = "私有协议结算")
|
|
|
public HttpResult<String> settlement(@RequestBody SettlementVo settlementVo){
|
|
public HttpResult<String> settlement(@RequestBody SettlementVo settlementVo){
|
|
@@ -278,7 +359,7 @@ public class ReceivableController {
|
|
|
|
|
|
|
|
@PostMapping("/getPlatFormReceivableList")
|
|
@PostMapping("/getPlatFormReceivableList")
|
|
|
@Operation(summary = "获取平台协议列表")
|
|
@Operation(summary = "获取平台协议列表")
|
|
|
- public HttpResult<Page<InsPlyIncome>> getPlatFormReceivableList(@RequestBody ReceivableQueryVo receivableQueryVo){
|
|
|
|
|
|
|
+ public HttpResult<InsPlyIncomeVO> getPlatFormReceivableList(@RequestBody ReceivableQueryVo receivableQueryVo){
|
|
|
if (StrUtil.isBlank(receivableQueryVo.getQueryType())){
|
|
if (StrUtil.isBlank(receivableQueryVo.getQueryType())){
|
|
|
receivableQueryVo.setQueryType("1");
|
|
receivableQueryVo.setQueryType("1");
|
|
|
}
|
|
}
|
|
@@ -286,7 +367,28 @@ public class ReceivableController {
|
|
|
if (StrUtil.isBlank(receivableQueryVo.getAgreementType())){
|
|
if (StrUtil.isBlank(receivableQueryVo.getAgreementType())){
|
|
|
receivableQueryVo.setAgreementType("1");
|
|
receivableQueryVo.setAgreementType("1");
|
|
|
}
|
|
}
|
|
|
- return HttpResult.ok(receivableService.getPlatFormReceivableList(receivableQueryVo));
|
|
|
|
|
|
|
+ Page<InsPlyIncome> data = receivableService.getPlatFormReceivableList(receivableQueryVo);
|
|
|
|
|
+ List<InsPlyIncomeOrder> receivablePageIds = receivableService.getReceivablePageIds(receivableQueryVo);
|
|
|
|
|
+ return HttpResult.ok(new InsPlyIncomeVO(data, receivablePageIds));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @PostMapping("/getPlatFormReceivableTotalAmount")
|
|
|
|
|
+ @Operation(summary = "获取平台协议总金额")
|
|
|
|
|
+ public HttpResult<BigDecimal> getPlatFormReceivableTotalAmount(@RequestBody ReceivableQueryVo receivableQueryVo){
|
|
|
|
|
+ if (StrUtil.isBlank(receivableQueryVo.getQueryType())){
|
|
|
|
|
+ receivableQueryVo.setQueryType("1");
|
|
|
|
|
+ }
|
|
|
|
|
+ // 协议类型 1 平台协议 2 私有协议
|
|
|
|
|
+ if (StrUtil.isBlank(receivableQueryVo.getAgreementType())){
|
|
|
|
|
+ receivableQueryVo.setAgreementType("1");
|
|
|
|
|
+ }
|
|
|
|
|
+ Page<InsPlyIncome> data = receivableService.getPlatFormReceivableList(receivableQueryVo);
|
|
|
|
|
+ if (null == data || CollUtil.isEmpty(data.getRecords())){
|
|
|
|
|
+ return HttpResult.ok(BigDecimal.ZERO);
|
|
|
|
|
+ }
|
|
|
|
|
+ BigDecimal reduce = data.getRecords().stream().map(income -> null != income.getInsFeeOrders() ? income.getInsFeeOrders().getTotalReceivablePremium() : BigDecimal.ZERO)
|
|
|
|
|
+ .reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
|
|
+ return HttpResult.ok(reduce);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@PostMapping("/exportTemplatePlatFormReceivable")
|
|
@PostMapping("/exportTemplatePlatFormReceivable")
|
|
@@ -321,24 +423,41 @@ public class ReceivableController {
|
|
|
return HttpResult.ok(receivableService.deleteInvoiceById(id) ? "删除成功":"删除失败");
|
|
return HttpResult.ok(receivableService.deleteInvoiceById(id) ? "删除成功":"删除失败");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// @PostMapping("batchModify")
|
|
|
|
|
-// @Operation(summary = "批量修改")
|
|
|
|
|
-// public HttpResult batchModify(@RequestBody List<SettlementVo> settlementVoList){
|
|
|
|
|
-// return receivableService.batchModify(settlementVoList) ? HttpResult.ok("批量修改成功") : HttpResult.error("批量修改失败");
|
|
|
|
|
-// }
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 私有协议批量修改
|
|
|
|
|
+ * 修改手续费比例(商业险手续费比例, 交强险手续费比例)
|
|
|
|
|
+ * 签单时间
|
|
|
|
|
+ * 对接人(对接人姓名,手机号)
|
|
|
|
|
+ *
|
|
|
|
|
+ * @author lipf
|
|
|
|
|
+ * @date 2026/5/27 20:25
|
|
|
|
|
+ */
|
|
|
|
|
+ @PostMapping("batchModify")
|
|
|
|
|
+ @Operation(summary = "批量修改")
|
|
|
|
|
+ public HttpResult<String> batchModify(@RequestBody BatchModifyVo batchModifyVo){
|
|
|
|
|
+ return receivableService.batchModify(batchModifyVo) ? HttpResult.ok("批量修改成功") : HttpResult.error("批量修改失败");
|
|
|
|
|
+ }
|
|
|
@PostMapping("exportSuperviseExcel")
|
|
@PostMapping("exportSuperviseExcel")
|
|
|
@Operation(summary = "导出应收手续费excel文件(车险)")
|
|
@Operation(summary = "导出应收手续费excel文件(车险)")
|
|
|
public void exportSuperviseExcel(@RequestBody ReceivableQueryVo receivableQueryVo) throws IOException {
|
|
public void exportSuperviseExcel(@RequestBody ReceivableQueryVo receivableQueryVo) throws IOException {
|
|
|
- receivableQueryVo.setAgreementType("2");
|
|
|
|
|
- receivableQueryVo.setQueryType("1");
|
|
|
|
|
|
|
+ if (StrUtil.isBlank(receivableQueryVo.getAgreementType())){
|
|
|
|
|
+ receivableQueryVo.setAgreementType("2");
|
|
|
|
|
+ }
|
|
|
|
|
+ if (StrUtil.isBlank(receivableQueryVo.getQueryType())){
|
|
|
|
|
+ receivableQueryVo.setQueryType("1");
|
|
|
|
|
+ }
|
|
|
receivableService.exportSuperviseExcel(receivableQueryVo);
|
|
receivableService.exportSuperviseExcel(receivableQueryVo);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@PostMapping("exportSuperviseJyExcel")
|
|
@PostMapping("exportSuperviseJyExcel")
|
|
|
@Operation(summary = "导出应收手续费excel文件(非车险)")
|
|
@Operation(summary = "导出应收手续费excel文件(非车险)")
|
|
|
public void exportSuperviseJyExcel(@RequestBody ReceivableQueryVo receivableQueryVo) throws IOException {
|
|
public void exportSuperviseJyExcel(@RequestBody ReceivableQueryVo receivableQueryVo) throws IOException {
|
|
|
- receivableQueryVo.setAgreementType("2");
|
|
|
|
|
- receivableQueryVo.setQueryType("3");
|
|
|
|
|
|
|
+ if (StrUtil.isBlank(receivableQueryVo.getAgreementType())){
|
|
|
|
|
+ receivableQueryVo.setAgreementType("2");
|
|
|
|
|
+ }
|
|
|
|
|
+ if (StrUtil.isBlank(receivableQueryVo.getQueryType())){
|
|
|
|
|
+ receivableQueryVo.setQueryType("3");
|
|
|
|
|
+ }
|
|
|
receivableService.exportSuperviseJyExcel(receivableQueryVo);
|
|
receivableService.exportSuperviseJyExcel(receivableQueryVo);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -349,6 +468,19 @@ public class ReceivableController {
|
|
|
return HttpResult.ok(receivableService.superviseSettlementExcel(page,settlementQueryVo));
|
|
return HttpResult.ok(receivableService.superviseSettlementExcel(page,settlementQueryVo));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @PostMapping("platformSettlementExcel")
|
|
|
|
|
+ @Operation(summary = "平台协议结算记录")
|
|
|
|
|
+ public HttpResult<Page<ExportSuperviseSettlementExcelDto>> platformSettlementExcel(@RequestBody SettlementQueryVo settlementQueryVo) {
|
|
|
|
|
+ Page page = settlementQueryVo.getPage();
|
|
|
|
|
+ return HttpResult.ok(receivableService.platformSettlementExcel(page,settlementQueryVo));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @DeleteMapping("/deleteSettlementById/{id}")
|
|
|
|
|
+ @Operation(summary = "删除结算记录")
|
|
|
|
|
+ public HttpResult<Boolean> deleteSettlementById(@PathVariable String id) {
|
|
|
|
|
+ return HttpResult.ok(receivableService.deleteSettlementById(id) ? "删除成功":"删除失败");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
@PostMapping("exportSuperviseSettlementExcel")
|
|
@PostMapping("exportSuperviseSettlementExcel")
|
|
|
@Operation(summary = "导出应收手续费结算记录excel文件")
|
|
@Operation(summary = "导出应收手续费结算记录excel文件")
|
|
@@ -357,6 +489,13 @@ public class ReceivableController {
|
|
|
receivableService.exportSuperviseSettlementExcel(page,settlementQueryVo);
|
|
receivableService.exportSuperviseSettlementExcel(page,settlementQueryVo);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @PostMapping("exportPlatformSettlementExcel")
|
|
|
|
|
+ @Operation(summary = "导出平台结算记录excel文件")
|
|
|
|
|
+ public void exportPlatformSettlementExcel(@RequestBody SettlementQueryVo settlementQueryVo) throws IOException {
|
|
|
|
|
+ Page page = new Page<>(1,1000000);
|
|
|
|
|
+ receivableService.exportPlatformSettlementExcel(page,settlementQueryVo);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@PostMapping("superviseSettlementDetailExcel")
|
|
@PostMapping("superviseSettlementDetailExcel")
|
|
|
@Operation(summary = "应收手续费结算明细")
|
|
@Operation(summary = "应收手续费结算明细")
|
|
|
public HttpResult superviseSettlementDetailExcel(@RequestBody SettlementQueryVo settlementQueryVo) {
|
|
public HttpResult superviseSettlementDetailExcel(@RequestBody SettlementQueryVo settlementQueryVo) {
|
|
@@ -429,10 +568,16 @@ public class ReceivableController {
|
|
|
receivableService.exportOtherSettlementDetailJyExcel(page,settlementQueryVo);
|
|
receivableService.exportOtherSettlementDetailJyExcel(page,settlementQueryVo);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 私有协议-手续费,跟单费,平台协议三个页面的保险公司报表统计接口
|
|
|
|
|
+ *
|
|
|
|
|
+ * @author lipf
|
|
|
|
|
+ * @date 2026/5/28 11:15
|
|
|
|
|
+ */
|
|
|
@PostMapping("companySuperviseSettlementReport")
|
|
@PostMapping("companySuperviseSettlementReport")
|
|
|
@Operation(summary = "保险公司结算报表")
|
|
@Operation(summary = "保险公司结算报表")
|
|
|
- public HttpResult<List<CompanySuperviseSettlementReportDto>> companySuperviseSettlementReport(@RequestBody SettlementReportQueryVo settlementReportQueryVo) {
|
|
|
|
|
- return HttpResult.ok(receivableService.companySuperviseSettlementReport(settlementReportQueryVo));
|
|
|
|
|
|
|
+ public HttpResult<List<Tree<String>>> companySuperviseSettlementReport(@RequestBody SettlementReportQueryVo settlementReportQueryVo) {
|
|
|
|
|
+ return receivableService.companySuperviseSettlementReport(settlementReportQueryVo);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@PostMapping("receiverSettlementReport")
|
|
@PostMapping("receiverSettlementReport")
|
|
@@ -476,4 +621,23 @@ public class ReceivableController {
|
|
|
List<Long> idList = Arrays.asList(ids);
|
|
List<Long> idList = Arrays.asList(ids);
|
|
|
return receivableService.deleteIncomesByIds(idList,userName);
|
|
return receivableService.deleteIncomesByIds(idList,userName);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 计算两数只差
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param minuend 被减数 例如 10-3 = 7 , 被减数就是10
|
|
|
|
|
+ * @param subtrahend 减数, 例如 10-3 = 7,减数就是3
|
|
|
|
|
+ * @author lipf
|
|
|
|
|
+ * @date 2026/5/27 19:29
|
|
|
|
|
+ */
|
|
|
|
|
+ @GetMapping("calSub")
|
|
|
|
|
+ public HttpResult<BigDecimal> sub(@RequestParam("minuend") BigDecimal minuend,
|
|
|
|
|
+ @RequestParam("subtrahend") BigDecimal subtrahend){
|
|
|
|
|
+ log.info("计算两数只差。 minuend=[{}], subtrahend=[{}]", minuend, subtrahend);
|
|
|
|
|
+ if(minuend == null || subtrahend == null){
|
|
|
|
|
+ return HttpResult.error("被减数和减数不能为空");
|
|
|
|
|
+ }
|
|
|
|
|
+ BigDecimal subtract = minuend.subtract(subtrahend);
|
|
|
|
|
+ return HttpResult.ok(subtract);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|