From 1674feb72362666f5b5d855ae900acc288de67a0 Mon Sep 17 00:00:00 2001 From: xiaoCJ <406612557@qq.com> Date: Thu, 29 Feb 2024 14:07:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=94=B6=E7=9B=8A=E5=88=86?= =?UTF-8?q?=E9=85=8D=E5=92=8C=E8=80=81=E5=B8=88=E7=AB=AFBUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/tea/ClassScoreController.java | 4 ++-- .../serviceImpl/ProfitDistributionServiceImpl.java | 3 ++- .../service/serviceImpl/tea/ClassScoreServiceImpl.java | 8 ++++---- .../fund_investment/service/tea/ClassScoreService.java | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/sztzjy/fund_investment/controller/tea/ClassScoreController.java b/src/main/java/com/sztzjy/fund_investment/controller/tea/ClassScoreController.java index 2cb9606..2146eaf 100644 --- a/src/main/java/com/sztzjy/fund_investment/controller/tea/ClassScoreController.java +++ b/src/main/java/com/sztzjy/fund_investment/controller/tea/ClassScoreController.java @@ -75,8 +75,8 @@ public class ClassScoreController { @AnonymousAccess @GetMapping("/importExcel") @ApiOperation("成绩管理/导出") //目前只导出提交了报告的学生的数据 - public void importExcel(HttpServletResponse response, @RequestParam String schoolId) { - classScoreService.importExcel(response, schoolId); + public void importExcel(HttpServletResponse response, @RequestParam String classId) { + classScoreService.importExcel(response, classId); } @AnonymousAccess diff --git a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/ProfitDistributionServiceImpl.java b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/ProfitDistributionServiceImpl.java index bc148fd..e0fb605 100644 --- a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/ProfitDistributionServiceImpl.java +++ b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/ProfitDistributionServiceImpl.java @@ -483,8 +483,9 @@ public class ProfitDistributionServiceImpl implements ProfitDistributionService // 第一轮归还劣后级LP本金和银行利息 profitDistribution.setRoundSubordinatedLp(subordinatedLp); + profitDistribution.setRoundOwnFunds(rightOwnFunds); profitDistribution.setRoundBankLoan(rightBankLoan); - residualIncome = residualIncome.subtract(subordinatedLp).subtract(rightBankLoan); //剩余收益 + residualIncome = residualIncome.subtract(subordinatedLp).subtract(rightBankLoan).subtract(rightOwnFunds); //剩余收益 //2.剩余收益分配比例为,自有资金25%,优先级LP 30%,劣后级LP 45% BigDecimal twoRightOwnFunds = residualIncome.multiply(BigDecimal.valueOf(0.25)).setScale(2, RoundingMode.HALF_UP);//剩余自有资金 BigDecimal twoRightFundraisingAmount = residualIncome.multiply(BigDecimal.valueOf(0.3)).setScale(2, RoundingMode.HALF_UP);//剩余自有资金 diff --git a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/tea/ClassScoreServiceImpl.java b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/tea/ClassScoreServiceImpl.java index 3e1144a..0204c46 100644 --- a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/tea/ClassScoreServiceImpl.java +++ b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/tea/ClassScoreServiceImpl.java @@ -213,9 +213,9 @@ public class ClassScoreServiceImpl implements ClassScoreService { * @Date 2023/11/27 */ @Override - public void importExcel(HttpServletResponse response, String schoolId) { + public void importExcel(HttpServletResponse response, String classId) { UserExample userTableExample = new UserExample(); - userTableExample.createCriteria().andSchoolIdEqualTo(schoolId).andRoleIdEqualTo(4); + userTableExample.createCriteria().andClassIdEqualTo(classId).andRoleIdEqualTo(4); List userTables = userMapper.selectByExample(userTableExample); List userDtoList = new ArrayList<>(); for (User userTable : userTables) { @@ -224,10 +224,10 @@ public class ClassScoreServiceImpl implements ClassScoreService { Flow flow = flowMapper.selectByPrimaryKey(userTable.getUserid()); String flowId = flow.getFlowId(); TrainingReportExample trainingReportExample = new TrainingReportExample(); - trainingReportExample.createCriteria().andFlowIdEqualTo(flowId).andSchoolIdEqualTo(schoolId); + trainingReportExample.createCriteria().andFlowIdEqualTo(flowId).andStepEqualTo(Constant.TZBG); List trainingReports = reportMapper.selectByExample(trainingReportExample); PerformanceScoreExample performanceScoreExample = new PerformanceScoreExample(); - performanceScoreExample.createCriteria().andFlowIdEqualTo(flowId).andSchoolIdEqualTo(schoolId); + performanceScoreExample.createCriteria().andFlowIdEqualTo(flowId).andClassIdEqualTo(classId); List performanceScores = performanceScoreMapper.selectByExample(performanceScoreExample); if (performanceScores.isEmpty()) { continue; diff --git a/src/main/java/com/sztzjy/fund_investment/service/tea/ClassScoreService.java b/src/main/java/com/sztzjy/fund_investment/service/tea/ClassScoreService.java index 4686e10..f9928dc 100644 --- a/src/main/java/com/sztzjy/fund_investment/service/tea/ClassScoreService.java +++ b/src/main/java/com/sztzjy/fund_investment/service/tea/ClassScoreService.java @@ -23,7 +23,7 @@ public interface ClassScoreService { PageInfo getStudentScoreDetails(Integer index, Integer size, String schoolId, String classId, String studentIdOrName); - void importExcel(HttpServletResponse response, String schoolId); + void importExcel(HttpServletResponse response, String classId); ResultEntity autoScore(String schoolId);