|
|
@@ -1,16 +1,20 @@
|
|
|
package com.ydtech.modules.admin.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
-import com.ydtech.modules.admin.model.report.financeData.AdvanceAndActualDataDto;
|
|
|
-import com.ydtech.modules.admin.model.report.financeData.AdvanceAndActualDeptDataDto;
|
|
|
-import com.ydtech.modules.admin.model.report.financeData.AdvanceAndActualDeptQueryDto;
|
|
|
-import com.ydtech.modules.admin.model.report.financeData.AdvanceAndActualQueryDto;
|
|
|
+import com.ydtech.modules.admin.dao.SysDeptAccountHistoryMapper;
|
|
|
+import com.ydtech.modules.admin.dao.SysUserAccountHistoryMapper;
|
|
|
+import com.ydtech.modules.admin.model.report.financeData.*;
|
|
|
import com.ydtech.modules.admin.service.FinanceDataReportService;
|
|
|
+import com.ydtech.modules.inv.dao.InvAccountExcelMapper;
|
|
|
import com.ydtech.modules.order.entity.BasePageResult;
|
|
|
import com.ydtech.modules.protocols.dao.InsFeeOrderNewMapper;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.math.BigDecimal;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
/**
|
|
|
* @version
|
|
|
* @author: hxl
|
|
|
@@ -25,6 +29,16 @@ public class FinanceDataReportServiceImpl implements FinanceDataReportService {
|
|
|
@Autowired
|
|
|
private InsFeeOrderNewMapper insFeeOrderNewMapper;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private SysUserAccountHistoryMapper sysUserAccountHistoryMapper;
|
|
|
+
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private SysDeptAccountHistoryMapper sysDeptAccountHistoryMapper;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private InvAccountExcelMapper invAccountExcelMapper;
|
|
|
+
|
|
|
/**
|
|
|
* @version
|
|
|
* @author: hxl
|
|
|
@@ -51,6 +65,65 @@ public class FinanceDataReportServiceImpl implements FinanceDataReportService {
|
|
|
return new BasePageResult<>(advanceAndActualDeptQueryDto.getPageNum(), page.getSize(), result.getTotal(), page.getPages(),
|
|
|
result.getRecords());
|
|
|
}
|
|
|
+ /**
|
|
|
+ * @version
|
|
|
+ * @author: hxl
|
|
|
+ * @Date: 2024/7/4 14:37
|
|
|
+ * @Description: 查询 代理人、渠道的收支明细
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public BasePageResult<RevenueAndExpenditureDataDto> queryRevenueAndExpenditureDataPage(RevenueAndExpenditureQueryDto revenueAndExpenditureQueryDto) {
|
|
|
+ Page<RevenueAndExpenditureDataDto> page = new Page<>(revenueAndExpenditureQueryDto.getPageNum(), revenueAndExpenditureQueryDto.getPageSize());
|
|
|
+ Page<RevenueAndExpenditureDataDto> result = sysUserAccountHistoryMapper.queryRevenueAndExpenditureDataPage(revenueAndExpenditureQueryDto, page);
|
|
|
+ return new BasePageResult<>(revenueAndExpenditureQueryDto.getPageNum(), page.getSize(), result.getTotal(), page.getPages(),
|
|
|
+ result.getRecords());
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * @version
|
|
|
+ * @author: hxl
|
|
|
+ * @Date: 2024/7/4 14:37
|
|
|
+ * @Description: 查询机构的收支明细
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public BasePageResult<RevenueAndExpenditureDeptDataDto> queryRevenueAndExpenditureDeptDataPage(RevenueAndExpenditureDeptQueryDto revenueAndExpenditureDeptQueryDto) {
|
|
|
+ Page<RevenueAndExpenditureDeptDataDto> page = new Page<>(revenueAndExpenditureDeptQueryDto.getPageNum(), revenueAndExpenditureDeptQueryDto.getPageSize());
|
|
|
+ Page<RevenueAndExpenditureDeptDataDto> result = sysDeptAccountHistoryMapper.queryAdvanceAndActualDeptDataPage(revenueAndExpenditureDeptQueryDto, page);
|
|
|
+ return new BasePageResult<>(revenueAndExpenditureDeptQueryDto.getPageNum(), page.getSize(), result.getTotal(), page.getPages(),
|
|
|
+ result.getRecords());
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * @version
|
|
|
+ * @author: hxl
|
|
|
+ * @Date: 2024/7/4 15:40
|
|
|
+ * @Description: 查询费用明细
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public BasePageResult<ExpensesDataDto> queryExpensesDataPage(ExpensesQueryDto expensesQueryDto) {
|
|
|
+ Page<ExpensesDataDto> page = new Page<>(expensesQueryDto.getPageNum(), expensesQueryDto.getPageSize());
|
|
|
+ Page<ExpensesDataDto> result = invAccountExcelMapper.queryExpensesDataPage(expensesQueryDto, page);
|
|
|
+ return new BasePageResult<>(expensesQueryDto.getPageNum(), page.getSize(), result.getTotal(), page.getPages(),
|
|
|
+ result.getRecords());
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * @version
|
|
|
+ * @author: hxl
|
|
|
+ * @Date: 2024/7/4 15:57
|
|
|
+ * @Description: 查询利润相关数据
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public List<ProfitDataDto> queryProfitDataPage(ProfitQueryDto profitQueryDto) {
|
|
|
+ //todo 暂时不知道如何处理 先写模拟数据处理
|
|
|
+ List<ProfitDataDto> result=new ArrayList<>();
|
|
|
+ ProfitDataDto pro1 = new ProfitDataDto("车险", new BigDecimal(123), new BigDecimal(456), new BigDecimal(789), new BigDecimal(555), new BigDecimal(666), new BigDecimal(22), new BigDecimal(222), new BigDecimal(555));
|
|
|
+ ProfitDataDto pro2 = new ProfitDataDto("夜来香", new BigDecimal(123), new BigDecimal(456), new BigDecimal(789), new BigDecimal(555), new BigDecimal(666), new BigDecimal(22), new BigDecimal(222), new BigDecimal(555));
|
|
|
+ ProfitDataDto pro3 = new ProfitDataDto("汽车增值服务", new BigDecimal(123), new BigDecimal(456), new BigDecimal(789), new BigDecimal(555), new BigDecimal(666), new BigDecimal(22), new BigDecimal(222), new BigDecimal(555));
|
|
|
+ ProfitDataDto pro4 = new ProfitDataDto("商务秘书", new BigDecimal(123), new BigDecimal(456), new BigDecimal(789), new BigDecimal(555), new BigDecimal(666), new BigDecimal(22), new BigDecimal(222), new BigDecimal(555));
|
|
|
+ result.add(pro1);
|
|
|
+ result.add(pro2);
|
|
|
+ result.add(pro3);
|
|
|
+ result.add(pro4);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|