From 9a112b559a21ca3d3053fb97b604b4708cd20ad9 Mon Sep 17 00:00:00 2001 From: xiaoCJ <406612557@qq.com> Date: Mon, 18 Dec 2023 16:20:57 +0800 Subject: [PATCH 01/18] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=80=80=E5=87=BA?= =?UTF-8?q?=E6=97=B6=E6=9C=BA=E8=A1=A8=EF=BC=8C=E5=AE=8C=E6=88=90=E6=8A=95?= =?UTF-8?q?=E8=B5=84=E6=8A=A5=E5=91=8A=E9=A1=B5=E9=9D=A2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProfitDistributionServiceImpl.java | 28 ++++-- .../ProfitManagementServiceImpl.java | 10 +- .../service/serviceImpl/TopicServiceImpl.java | 4 + .../tea/ClassScoreServiceImpl.java | 91 +++++++++++-------- 4 files changed, 87 insertions(+), 46 deletions(-) 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 7fe50d7..23ae5dc 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 @@ -1,10 +1,8 @@ package com.sztzjy.fund_investment.service.serviceImpl; -import com.sztzjy.fund_investment.entity.ExitTime; -import com.sztzjy.fund_investment.entity.Fundraising; -import com.sztzjy.fund_investment.entity.ProfitDistribution; -import com.sztzjy.fund_investment.entity.ProfitDistributionExample; +import com.sztzjy.fund_investment.entity.*; import com.sztzjy.fund_investment.mapper.ExitTimeMapper; +import com.sztzjy.fund_investment.mapper.PerformanceScoreMapper; import com.sztzjy.fund_investment.mapper.ProfitDistributionMapper; import com.sztzjy.fund_investment.service.ISysFundraisingService; import com.sztzjy.fund_investment.service.PerformanceScoreService; @@ -16,6 +14,7 @@ import org.springframework.stereotype.Service; import java.math.BigDecimal; import java.math.RoundingMode; +import java.util.Date; import java.util.List; /** @@ -32,8 +31,8 @@ public class ProfitDistributionServiceImpl implements ProfitDistributionService private ExitTimeMapper exitTimeMapper; @Autowired private PerformanceScoreService performanceScoreService; - - + @Autowired + private PerformanceScoreMapper performanceScoreMapper; /* 收益分配计算提交 * @author xcj * @Date 2023/12/11 @@ -231,6 +230,10 @@ public class ProfitDistributionServiceImpl implements ProfitDistributionService twoRightOwnFunds.compareTo(userRemainingOwnFunds) == 0 && twoRightFundraisingAmount.compareTo(userRemainingEarningsPreferredLp) == 0) { performanceScoreService.calculateScoreByModule("profitDistributionScore", 4, flowId); } + PerformanceScore performanceScore = performanceScoreService.getByFlowId(flowId); + performanceScore.setProfitDistributionTime(new Date()); + performanceScoreMapper.updateByPrimaryKey(performanceScore); + return new ResultEntity<>(HttpStatus.OK, "分配完成!"); } else if (type == 2) { //2:自有资金/优先级LP/劣后级LP if (profitDistribution.getUserRemainingEarningsSubordinatedLp() == null || profitDistribution.getUserRoundSubordinatedLp() == null) { return new ResultEntity<>(HttpStatus.BAD_REQUEST, "请填写劣后级LP分配金额!"); @@ -303,6 +306,10 @@ public class ProfitDistributionServiceImpl implements ProfitDistributionService userRoundSubordinatedLp.compareTo(subordinatedLp) == 0 && userRemainingEarningsSubordinatedLp.compareTo(twoRightSubordinatedLp) == 0) { performanceScoreService.calculateScoreByModule("profitDistributionScore", 4, flowId); } + PerformanceScore performanceScore = performanceScoreService.getByFlowId(flowId); + performanceScore.setProfitDistributionTime(new Date()); + performanceScoreMapper.updateByPrimaryKey(performanceScore); + return new ResultEntity<>(HttpStatus.OK, "分配完成!"); } else if (type == 3) { //3:银行借款/自有资金/优先级LP if (profitDistribution.getUserRoundBankLoan() == null) { return new ResultEntity<>(HttpStatus.BAD_REQUEST, "请填写银行借款分配金额!"); @@ -372,6 +379,10 @@ public class ProfitDistributionServiceImpl implements ProfitDistributionService rightBankLoan.compareTo(userRoundBankLoan) == 0) { performanceScoreService.calculateScoreByModule("profitDistributionScore", 4, flowId); } + PerformanceScore performanceScore = performanceScoreService.getByFlowId(flowId); + performanceScore.setProfitDistributionTime(new Date()); + performanceScoreMapper.updateByPrimaryKey(performanceScore); + return new ResultEntity<>(HttpStatus.OK, "分配完成!"); } else { //4:银行借款/优先级LP/劣后级LP/自有资金 if (profitDistribution.getUserRemainingEarningsSubordinatedLp() == null || profitDistribution.getUserRoundSubordinatedLp() == null) { return new ResultEntity<>(HttpStatus.BAD_REQUEST, "请填写劣后级LP分配金额!"); @@ -470,8 +481,11 @@ public class ProfitDistributionServiceImpl implements ProfitDistributionService userRemainingEarningsSubordinatedLp.compareTo(twoRightSubordinatedLp) == 0) { performanceScoreService.calculateScoreByModule("profitDistributionScore", 4, flowId); } + PerformanceScore performanceScore = performanceScoreService.getByFlowId(flowId); + performanceScore.setProfitDistributionTime(new Date()); + performanceScoreMapper.updateByPrimaryKey(performanceScore); + return new ResultEntity<>(HttpStatus.OK, "分配完成!"); } - return null; } diff --git a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/ProfitManagementServiceImpl.java b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/ProfitManagementServiceImpl.java index 159f8bb..0db1ed8 100644 --- a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/ProfitManagementServiceImpl.java +++ b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/ProfitManagementServiceImpl.java @@ -1,9 +1,11 @@ package com.sztzjy.fund_investment.service.serviceImpl; import com.sztzjy.fund_investment.entity.ExitTime; +import com.sztzjy.fund_investment.entity.PerformanceScore; import com.sztzjy.fund_investment.entity.ProfitManagement; import com.sztzjy.fund_investment.entity.ProfitManagementExample; import com.sztzjy.fund_investment.mapper.ExitTimeMapper; +import com.sztzjy.fund_investment.mapper.PerformanceScoreMapper; import com.sztzjy.fund_investment.mapper.ProfitManagementMapper; import com.sztzjy.fund_investment.service.PerformanceScoreService; import com.sztzjy.fund_investment.service.ProfitManagementService; @@ -14,6 +16,7 @@ import org.springframework.stereotype.Service; import java.math.BigDecimal; import java.math.RoundingMode; +import java.util.Date; import java.util.List; /** @@ -28,7 +31,8 @@ public class ProfitManagementServiceImpl implements ProfitManagementService { private PerformanceScoreService performanceScoreService; @Autowired private ExitTimeMapper exitTimeMapper; - + @Autowired + private PerformanceScoreMapper performanceScoreMapper; /* 折线图 * @author xcj @@ -142,6 +146,10 @@ public class ProfitManagementServiceImpl implements ProfitManagementService { } else { performanceScoreService.calculateScoreByModule("profitManagementMarketValueExitScore", 3, flowId); } + //标记页面完成时间 + PerformanceScore performanceScore = performanceScoreService.getByFlowId(flowId); + performanceScore.setProfitManagementTime(new Date()); + performanceScoreMapper.updateByPrimaryKey(performanceScore); return null; } } diff --git a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/TopicServiceImpl.java b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/TopicServiceImpl.java index c4602af..5dcb228 100644 --- a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/TopicServiceImpl.java +++ b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/TopicServiceImpl.java @@ -235,9 +235,13 @@ public class TopicServiceImpl implements TopicService { performanceScoreService.calculateScoreByModule("projectValuationScore", score, flowId); } if (module.equals(Constant.IPOBK)) { + performanceScore.setIpoTime(new Date()); + performanceScoreMapper.updateByPrimaryKey(performanceScore); performanceScoreService.calculateScoreByModule("ipoListedSectorScore", score, flowId); } if (module.equals(Constant.IPOTJ)) { + performanceScore.setIpoTime(new Date()); + performanceScoreMapper.updateByPrimaryKey(performanceScore); performanceScoreService.calculateScoreByModule("ipoListedConditionScore", score, flowId); } return new ResultEntity<>(list); 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 6f79328..205c35f 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 @@ -438,10 +438,7 @@ public class ClassScoreServiceImpl implements ClassScoreService { } - /* 实训成绩展示 - * @author xcj - * @Date 2023/11/29 - */ +// 实训成绩 @Override public PerformanceTrainingScoreDto getStuTrainingScore(String flowId) { PerformanceScoreExample example = new PerformanceScoreExample(); @@ -453,43 +450,61 @@ public class ClassScoreServiceImpl implements ClassScoreService { PerformanceScore performanceScore = performanceScores.get(0); PerformanceTrainingScoreDto performanceTrainingScoreDto = new PerformanceTrainingScoreDto(); performanceTrainingScoreDto.setFlowId(performanceScore.getFlowId()); - performanceTrainingScoreDto.setPracticalCognitionScore(performanceScore.getPracticalCognitionScore()); - performanceTrainingScoreDto.setKnowledgeAssessmentScore(performanceScore.getKnowledgeAssessmentScore()); - performanceTrainingScoreDto.setFundraisingScore(performanceScore.getFundraisingScore()); - performanceTrainingScoreDto.setProjectSearchScore(performanceScore.getProjectSearchScore().add(performanceScore.getProjectSearchReportScore())); - performanceTrainingScoreDto.setProjectDueDiligenceScore(performanceScore.getProjectDueDiligenceScore() - .add(performanceScore.getProjectDueDiligenceFinanceReportScore() - .add(performanceScore.getProjectDueDiligenceBusinessReportScore() - .add(performanceScore.getProjectValuationEstimationRiskScore())))); - - performanceTrainingScoreDto.setProjectValuationScore(performanceScore.getProjectValuationRelativeScore() - .add(performanceScore.getProjectValuationScore() - .add(performanceScore.getProjectValuationAbsoluteScore() - .add(performanceScore.getProjectUseValuationAbsoluteScore() - .add(performanceScore.getProjectUseValuationRelativeScore()))))); - performanceTrainingScoreDto.setInvestmentSigningScore(performanceScore.getInvestmentSigningVlauationReportScore() - .add(performanceScore.getInvestmentSigningDiligenceReportScore() - .add(performanceScore.getInvestmentSigningInvestScore() - .add(performanceScore.getInvestmentSigningScore())))); - - performanceTrainingScoreDto.setIpoScore(performanceScore.getIpoFlowScore().add(performanceScore.getIpoListedConditionScore() - .add(performanceScore.getIpoListedSectorScore()))); - - performanceTrainingScoreDto.setPricingIssuanceScore(performanceScore.getNewPricingIssuanceScore() - .add(performanceScore.getPricingIssuanceConfirmScore().add(performanceScore.getInitPricingIssuanceScore() - .add(performanceScore.getPricingIssuanceEnteringScore())))); - - performanceTrainingScoreDto.setProfitManagementScore(performanceScore.getProfitManagementMarketValueScore() - .add(performanceScore.getProfitManagementFundScore() - .add(performanceScore.getProfitManagementFundExitScore() - .add(performanceScore.getProfitManagementMarketValueExitScore())))); - - performanceTrainingScoreDto.setProfitDistributionScore(performanceScore.getProfitDistributionScore()); - performanceTrainingScoreDto.setInvestmentReportScore(performanceScore.getInvestmentReportScore().add(performanceScore.getExperienceScore())); - performanceTrainingScoreDto.setTotalScore(performanceScore.getTotalScore()); + + performanceTrainingScoreDto.setPracticalCognitionScore(Optional.ofNullable(performanceScore.getPracticalCognitionScore()).orElse(BigDecimal.ZERO)); + performanceTrainingScoreDto.setKnowledgeAssessmentScore(Optional.ofNullable(performanceScore.getKnowledgeAssessmentScore()).orElse(BigDecimal.ZERO)); + performanceTrainingScoreDto.setFundraisingScore(Optional.ofNullable(performanceScore.getFundraisingScore()).orElse(BigDecimal.ZERO)); + performanceTrainingScoreDto.setProjectSearchScore(Optional.ofNullable(performanceScore.getProjectSearchScore()).map(score -> score.add(Optional.ofNullable(performanceScore.getProjectSearchReportScore()).orElse(BigDecimal.ZERO))).orElse(BigDecimal.ZERO)); + performanceTrainingScoreDto.setProjectDueDiligenceScore( + Optional.ofNullable(performanceScore.getProjectDueDiligenceScore()).map(score -> + score.add(Optional.ofNullable(performanceScore.getProjectDueDiligenceFinanceReportScore()).orElse(BigDecimal.ZERO)) + .add(Optional.ofNullable(performanceScore.getProjectDueDiligenceBusinessReportScore()).orElse(BigDecimal.ZERO)) + .add(Optional.ofNullable(performanceScore.getProjectValuationEstimationRiskScore()).orElse(BigDecimal.ZERO)) + ).orElse(BigDecimal.ZERO) + ); + performanceTrainingScoreDto.setProjectValuationScore( + Optional.ofNullable(performanceScore.getProjectValuationRelativeScore()).orElse(BigDecimal.ZERO) + .add(Optional.ofNullable(performanceScore.getProjectValuationScore()).orElse(BigDecimal.ZERO)) + .add(Optional.ofNullable(performanceScore.getProjectValuationAbsoluteScore()).orElse(BigDecimal.ZERO)) + .add(Optional.ofNullable(performanceScore.getProjectUseValuationAbsoluteScore()).orElse(BigDecimal.ZERO)) + .add(Optional.ofNullable(performanceScore.getProjectUseValuationRelativeScore()).orElse(BigDecimal.ZERO)) + ); + + performanceTrainingScoreDto.setInvestmentSigningScore( + Optional.ofNullable(performanceScore.getInvestmentSigningVlauationReportScore()).orElse(BigDecimal.ZERO) + .add(Optional.ofNullable(performanceScore.getInvestmentSigningDiligenceReportScore()).orElse(BigDecimal.ZERO)) + .add(Optional.ofNullable(performanceScore.getInvestmentSigningInvestScore()).orElse(BigDecimal.ZERO)) + .add(Optional.ofNullable(performanceScore.getInvestmentSigningScore()).orElse(BigDecimal.ZERO)) + ); + + performanceTrainingScoreDto.setIpoScore( + Optional.ofNullable(performanceScore.getIpoFlowScore()).orElse(BigDecimal.ZERO) + .add(Optional.ofNullable(performanceScore.getIpoListedConditionScore()).orElse(BigDecimal.ZERO)) + .add(Optional.ofNullable(performanceScore.getIpoListedSectorScore()).orElse(BigDecimal.ZERO)) + ); + + performanceTrainingScoreDto.setPricingIssuanceScore( + Optional.ofNullable(performanceScore.getNewPricingIssuanceScore()).orElse(BigDecimal.ZERO) + .add(Optional.ofNullable(performanceScore.getPricingIssuanceConfirmScore()).orElse(BigDecimal.ZERO)) + .add(Optional.ofNullable(performanceScore.getInitPricingIssuanceScore()).orElse(BigDecimal.ZERO)) + .add(Optional.ofNullable(performanceScore.getPricingIssuanceEnteringScore()).orElse(BigDecimal.ZERO)) + ); + + performanceTrainingScoreDto.setProfitManagementScore( + Optional.ofNullable(performanceScore.getProfitManagementMarketValueScore()).orElse(BigDecimal.ZERO) + .add(Optional.ofNullable(performanceScore.getProfitManagementFundScore()).orElse(BigDecimal.ZERO)) + .add(Optional.ofNullable(performanceScore.getProfitManagementFundExitScore()).orElse(BigDecimal.ZERO)) + .add(Optional.ofNullable(performanceScore.getProfitManagementMarketValueExitScore()).orElse(BigDecimal.ZERO)) + ); + + performanceTrainingScoreDto.setProfitDistributionScore(Optional.ofNullable(performanceScore.getProfitDistributionScore()).orElse(BigDecimal.ZERO)); + performanceTrainingScoreDto.setInvestmentReportScore(Optional.ofNullable(performanceScore.getInvestmentReportScore()).orElse(BigDecimal.ZERO).add(Optional.ofNullable(performanceScore.getExperienceScore()).orElse(BigDecimal.ZERO))); + performanceTrainingScoreDto.setTotalScore(Optional.ofNullable(performanceScore.getTotalScore()).orElse(BigDecimal.ZERO)); + return performanceTrainingScoreDto; } + /* 实训成绩页面展示五个结论及分数 * @author xcj * @Date 2023/11/30 From 80fea40d01296005c6e391bafb40d8d83dce121d Mon Sep 17 00:00:00 2001 From: yz <3614508250@qq.com> Date: Mon, 18 Dec 2023 16:30:49 +0800 Subject: [PATCH 02/18] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E4=BC=B0=E5=80=BC=E8=AE=A1=E7=AE=97=E9=80=BB=E8=BE=91=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=A1=B9=E7=9B=AE=E5=AE=8C=E6=88=90=E6=97=B6?= =?UTF-8?q?=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/FoundProjectController.java | 8 ++++++++ .../controller/FundraisingController.java | 7 +++++++ .../ProjectDueDiligenceController.java | 6 ++++++ .../controller/ProjectValuationController.java | 12 ++++++++---- .../entity/ProFinancialIndexDetailUser.java | 3 +++ .../SysProjectDueDiligenceServiceImpl.java | 17 ++++++++++------- .../SysProjectValuationServiceImpl.java | 2 +- 7 files changed, 43 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/sztzjy/fund_investment/controller/FoundProjectController.java b/src/main/java/com/sztzjy/fund_investment/controller/FoundProjectController.java index e9d47d8..abf21fc 100644 --- a/src/main/java/com/sztzjy/fund_investment/controller/FoundProjectController.java +++ b/src/main/java/com/sztzjy/fund_investment/controller/FoundProjectController.java @@ -3,8 +3,10 @@ package com.sztzjy.fund_investment.controller; import com.github.pagehelper.PageInfo; import com.sztzjy.fund_investment.annotation.AnonymousAccess; import com.sztzjy.fund_investment.entity.FoundProject; +import com.sztzjy.fund_investment.entity.PerformanceScore; import com.sztzjy.fund_investment.entity.ProjectPool; import com.sztzjy.fund_investment.mapper.FoundProjectMapper; +import com.sztzjy.fund_investment.mapper.PerformanceScoreMapper; import com.sztzjy.fund_investment.service.ISysFoundProjectService; import com.sztzjy.fund_investment.service.ISysProjectPoolService; import com.sztzjy.fund_investment.service.PerformanceScoreService; @@ -24,6 +26,7 @@ import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; import java.io.File; import java.nio.file.Paths; +import java.util.Date; //yz @RestController @@ -40,6 +43,8 @@ public class FoundProjectController { ISysFoundProjectService foundProjectService; @Autowired PerformanceScoreService scoreService; + @Autowired + PerformanceScoreMapper performanceScoreMapper; @GetMapping("getProjectPoolList") @ApiOperation("寻找项目数据展示") @@ -92,6 +97,9 @@ public class FoundProjectController { scoreService.calculateScoreByModule("projectSearchReportScore",0,foundProject.getFlowId()); } scoreService.calculateScoreByModule("projectSearchScore",3,foundProject.getFlowId()); + PerformanceScore performanceScore = scoreService.getByFlowId(foundProject.getFlowId()); + performanceScore.setProjectSearchTime(new Date()); + performanceScoreMapper.updateByPrimaryKey(performanceScore); return new ResultEntity(HttpStatus.OK,"立项成功"); } diff --git a/src/main/java/com/sztzjy/fund_investment/controller/FundraisingController.java b/src/main/java/com/sztzjy/fund_investment/controller/FundraisingController.java index 2413e4f..1d7abda 100644 --- a/src/main/java/com/sztzjy/fund_investment/controller/FundraisingController.java +++ b/src/main/java/com/sztzjy/fund_investment/controller/FundraisingController.java @@ -3,6 +3,7 @@ package com.sztzjy.fund_investment.controller; import com.sztzjy.fund_investment.entity.Fundraising; import com.sztzjy.fund_investment.entity.PerformanceScore; import com.sztzjy.fund_investment.mapper.FundraisingMapper; +import com.sztzjy.fund_investment.mapper.PerformanceScoreMapper; import com.sztzjy.fund_investment.service.ISysFundraisingService; import com.sztzjy.fund_investment.service.PerformanceScoreService; import com.sztzjy.fund_investment.util.ResultEntity; @@ -17,6 +18,7 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import java.math.BigDecimal; +import java.util.Date; import java.util.UUID; //yz @@ -30,6 +32,8 @@ public class FundraisingController { FundraisingMapper fundraisingMapper; @Autowired PerformanceScoreService performanceScoreService; + @Autowired + PerformanceScoreMapper performanceScoreMapper; @GetMapping("getFundraising") @ApiOperation("资金募资回显") @@ -126,6 +130,9 @@ public class FundraisingController { if(aBoolean){ //新增成功 增加分数 如果之前分数为零 则不进行加分 performanceScoreService.calculateScoreByModule("fundraisingScore",5,flowId); + PerformanceScore performanceScore = performanceScoreService.getByFlowId(flowId); + performanceScore.setFundraisingTime(new Date()); + performanceScoreMapper.updateByPrimaryKey(performanceScore); return new ResultEntity(HttpStatus.OK,"资金募资新增成功",fundraising); }else { return new ResultEntity(HttpStatus.BAD_REQUEST,"新增基金募资失败"); diff --git a/src/main/java/com/sztzjy/fund_investment/controller/ProjectDueDiligenceController.java b/src/main/java/com/sztzjy/fund_investment/controller/ProjectDueDiligenceController.java index bd610bf..8ab0036 100644 --- a/src/main/java/com/sztzjy/fund_investment/controller/ProjectDueDiligenceController.java +++ b/src/main/java/com/sztzjy/fund_investment/controller/ProjectDueDiligenceController.java @@ -12,6 +12,7 @@ import com.sztzjy.fund_investment.annotation.AnonymousAccess; import com.sztzjy.fund_investment.entity.*; import com.sztzjy.fund_investment.entity.treeSelect.TreeSelect; import com.sztzjy.fund_investment.mapper.FoundProjectMapper; +import com.sztzjy.fund_investment.mapper.PerformanceScoreMapper; import com.sztzjy.fund_investment.mapper.ProjectPoolMapper; import com.sztzjy.fund_investment.service.ISysProjectDueDiligenceService; import com.sztzjy.fund_investment.service.PerformanceScoreService; @@ -55,6 +56,8 @@ public class ProjectDueDiligenceController { private IFileUtil fileUtil; @Autowired PerformanceScoreService scoreService; + @Autowired + PerformanceScoreMapper performanceScoreMapper; //*************公司业务尽职调查 @@ -321,6 +324,9 @@ public class ProjectDueDiligenceController { } projectDueDiligenceService.updateServiceDueDiligence(foundProject); scoreService.calculateScoreByModule("projectDueDiligenceFinanceReportScore",2,foundProject.getFlowId()); + PerformanceScore performanceScore = scoreService.getByFlowId(foundProject.getFlowId()); + performanceScore.setProjectDueDiligenceTime(new Date()); + performanceScoreMapper.updateByPrimaryKey(performanceScore); return new ResultEntity(HttpStatus.OK, "财务尽调结论保存成功"); } diff --git a/src/main/java/com/sztzjy/fund_investment/controller/ProjectValuationController.java b/src/main/java/com/sztzjy/fund_investment/controller/ProjectValuationController.java index d91c28c..8e3582b 100644 --- a/src/main/java/com/sztzjy/fund_investment/controller/ProjectValuationController.java +++ b/src/main/java/com/sztzjy/fund_investment/controller/ProjectValuationController.java @@ -11,6 +11,7 @@ import com.sztzjy.fund_investment.entity.*; import com.sztzjy.fund_investment.entity.dto.DDMDto; import com.sztzjy.fund_investment.entity.dto.FCFFFCFEDto; import com.sztzjy.fund_investment.mapper.FoundProjectMapper; +import com.sztzjy.fund_investment.mapper.PerformanceScoreMapper; import com.sztzjy.fund_investment.mapper.ProjectPoolMapper; import com.sztzjy.fund_investment.service.*; import com.sztzjy.fund_investment.util.ResultEntity; @@ -28,10 +29,8 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.math.BigDecimal; import java.net.URLEncoder; -import java.util.ArrayList; -import java.util.Arrays; +import java.util.*; import java.util.List; -import java.util.TreeMap; //yz @RestController @@ -56,6 +55,8 @@ public class ProjectValuationController { PerformanceScoreService scoreService; @Autowired ISysProjectDueDiligenceService projectDueDiligenceService; + @Autowired + PerformanceScoreMapper performanceScoreMapper; @GetMapping("getPE") @ApiOperation("相对估值法-PE市盈率法") @@ -166,11 +167,14 @@ public class ProjectValuationController { if (StringUtils.isBlank(foundProject.getFlowId())) { return new ResultEntity(HttpStatus.BAD_REQUEST, "流程ID为空"); } - if (StringUtils.isBlank(foundProject.getProjectValuationRelative())) { + if (StringUtils.isBlank(foundProject.getProjectValuationAbsolute())) { return new ResultEntity(HttpStatus.BAD_REQUEST, "绝对估值结论为空"); } projectDueDiligenceService.updateServiceDueDiligence(foundProject); scoreService.calculateScoreByModule("projectValuationRelativeScore",2,foundProject.getFlowId()); + PerformanceScore performanceScore = scoreService.getByFlowId(foundProject.getFlowId()); + performanceScore.setProjectValuationTime(new Date()); + performanceScoreMapper.updateByPrimaryKey(performanceScore); return new ResultEntity(HttpStatus.OK, "绝对估值结论保存成功"); } diff --git a/src/main/java/com/sztzjy/fund_investment/entity/ProFinancialIndexDetailUser.java b/src/main/java/com/sztzjy/fund_investment/entity/ProFinancialIndexDetailUser.java index cc4944c..d6e6f28 100644 --- a/src/main/java/com/sztzjy/fund_investment/entity/ProFinancialIndexDetailUser.java +++ b/src/main/java/com/sztzjy/fund_investment/entity/ProFinancialIndexDetailUser.java @@ -45,6 +45,9 @@ public class ProFinancialIndexDetailUser { this.lastThreeYearValue=proFinancialIndexDetail.getLastThreeYearValue(); } + public ProFinancialIndexDetailUser() { + } + public String getId() { return id; } diff --git a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/SysProjectDueDiligenceServiceImpl.java b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/SysProjectDueDiligenceServiceImpl.java index 45e0e7c..55dd679 100644 --- a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/SysProjectDueDiligenceServiceImpl.java +++ b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/SysProjectDueDiligenceServiceImpl.java @@ -251,14 +251,17 @@ public class SysProjectDueDiligenceServiceImpl implements ISysProjectDueDiligenc criteria.andFlowIdEqualTo(flowId); List indexDetailUsers = proFinancialIndexDetailUserMapper.selectByExample(example); List list = pageInfo.getList(); - for (int j = 0; j < list.size(); j++) { - list.get(j).setLastYearValue("0"); - if (indexDetailUsers.isEmpty()) { - continue; + + if(indexDetailUsers.isEmpty()){ + for (int i = 0; i < list.size(); i++) { + list.get(i).setLastYearValue("0"); } - for (int i = 0; i < indexDetailUsers.size(); i++) { - if (list.get(j).getFinancialIndexId().equals(indexDetailUsers.get(i))) { - list.get(j).setLastYearValue(indexDetailUsers.get(i).getLastYearValue()); + }else { + for (int j = 0; j < list.size(); j++) { + for (int i = 0; i < indexDetailUsers.size(); i++) { + if (list.get(j).getFinancialIndexId().equals(indexDetailUsers.get(i).getFinancialIndexId())) { + list.get(j).setLastYearValue(indexDetailUsers.get(i).getLastYearValue()); + } } } } diff --git a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/SysProjectValuationServiceImpl.java b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/SysProjectValuationServiceImpl.java index 4286549..67084a3 100644 --- a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/SysProjectValuationServiceImpl.java +++ b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/SysProjectValuationServiceImpl.java @@ -132,7 +132,7 @@ public class SysProjectValuationServiceImpl implements ISysProjectValuationServi BigDecimal marketPrice = valuation.getMarketPrice(); //对比公司 每股市价 BigDecimal netWorth = valuation.getNetWorth();//对比公司 每股净资产 BigDecimal netInterest = valuation.getNetInterest();//对比公司 权益净利率 - flag = flag.add(marketPrice.divide(netWorth).divide(netInterest)); + flag = flag.add(marketPrice.divide(netWorth,2,BigDecimal.ROUND_HALF_UP).divide(netInterest,2,BigDecimal.ROUND_HALF_UP)); } BigDecimal avg = flag.divide(BigDecimal.valueOf(3)); //平均数 BigDecimal answer = avg.multiply(netWorth1).multiply(netInterest1).setScale(2,BigDecimal.ROUND_HALF_UP); From 33884aa8121320bdae8ec403e123f1e4ba98bea7 Mon Sep 17 00:00:00 2001 From: xiaoCJ <406612557@qq.com> Date: Tue, 19 Dec 2023 10:57:37 +0800 Subject: [PATCH 03/18] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=80=80=E5=87=BA?= =?UTF-8?q?=E6=97=B6=E6=9C=BA=E8=A1=A8=EF=BC=8C=E5=AE=8C=E6=88=90=E6=8A=95?= =?UTF-8?q?=E8=B5=84=E6=8A=A5=E5=91=8A=E9=A1=B5=E9=9D=A2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../InvestmentReportServiceImpl.java | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/InvestmentReportServiceImpl.java b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/InvestmentReportServiceImpl.java index 037a98a..6f4a96c 100644 --- a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/InvestmentReportServiceImpl.java +++ b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/InvestmentReportServiceImpl.java @@ -2,10 +2,13 @@ package com.sztzjy.fund_investment.service.serviceImpl; import cn.hutool.core.util.IdUtil; import com.sztzjy.fund_investment.config.Constant; +import com.sztzjy.fund_investment.entity.PerformanceScore; import com.sztzjy.fund_investment.entity.TrainingReport; import com.sztzjy.fund_investment.entity.TrainingReportExample; +import com.sztzjy.fund_investment.mapper.PerformanceScoreMapper; import com.sztzjy.fund_investment.mapper.TrainingReportMapper; import com.sztzjy.fund_investment.service.InvestmentReportService; +import com.sztzjy.fund_investment.service.PerformanceScoreService; import com.sztzjy.fund_investment.util.ResultEntity; import com.sztzjy.fund_investment.util.file.IFileUtil; import org.apache.commons.lang3.StringUtils; @@ -27,8 +30,11 @@ public class InvestmentReportServiceImpl implements InvestmentReportService { @Autowired private IFileUtil fileUtil; @Autowired - TrainingReportMapper trainingReportMapper; - + private TrainingReportMapper trainingReportMapper; + @Autowired + private PerformanceScoreService performanceScoreService; + @Autowired + private PerformanceScoreMapper performanceScoreMapper; /** * 报告提交 @@ -58,6 +64,10 @@ public class InvestmentReportServiceImpl implements InvestmentReportService { trainingReport.setUploadtime(new Date()); trainingReport.setStep(Constant.TZBG); trainingReportMapper.updateByPrimaryKeySelective(trainingReport); + //记录时间 + PerformanceScore performanceScore = performanceScoreService.getByFlowId(flowId); + performanceScore.setInvestmentReportTime(new Date()); + performanceScoreMapper.updateByPrimaryKey(performanceScore); return new ResultEntity<>(HttpStatus.OK, "报告上传成功!"); } } else { //没上传报告没提交心得的情况 @@ -70,6 +80,10 @@ public class InvestmentReportServiceImpl implements InvestmentReportService { trainingReport.setUploadtime(new Date()); trainingReport.setStep(Constant.TZBG); trainingReportMapper.insert(trainingReport); + //记录时间 + PerformanceScore performanceScore = performanceScoreService.getByFlowId(flowId); + performanceScore.setInvestmentReportTime(new Date()); + performanceScoreMapper.updateByPrimaryKey(performanceScore); return new ResultEntity<>(HttpStatus.OK, "报告上传成功!"); } } From 230bda7eeef4a74cee41527a894ffa997ab1a1a5 Mon Sep 17 00:00:00 2001 From: xiaoCJ <406612557@qq.com> Date: Tue, 19 Dec 2023 17:58:50 +0800 Subject: [PATCH 04/18] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=80=80=E5=87=BA?= =?UTF-8?q?=E6=97=B6=E6=9C=BA=E8=A1=A8=EF=BC=8C=E5=AE=8C=E6=88=90=E6=8A=95?= =?UTF-8?q?=E8=B5=84=E6=8A=A5=E5=91=8A=E9=A1=B5=E9=9D=A2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/sztzjy/fund_investment/task/Task.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/sztzjy/fund_investment/task/Task.java b/src/main/java/com/sztzjy/fund_investment/task/Task.java index 7bc4344..f81c434 100644 --- a/src/main/java/com/sztzjy/fund_investment/task/Task.java +++ b/src/main/java/com/sztzjy/fund_investment/task/Task.java @@ -102,6 +102,7 @@ public class Task { Date date = Date.from(currentDate.atStartOfDay(ZoneId.systemDefault()).toInstant()); teaClassScore.setSchoolId(schoolId); teaClassScore.setStartTime(date); + System.out.println("定时任务执行的时间为=========》》:date"); teaClassScore.setId(IdUtil.simpleUUID()); teaClassScore.setClassMaxScore(classMaxScore); teaClassScore.setClassMinScore(classMinScore); From 9312056347513e95cb634b6569101f48d8d0b41c Mon Sep 17 00:00:00 2001 From: xiaoCJ <406612557@qq.com> Date: Wed, 20 Dec 2023 10:42:00 +0800 Subject: [PATCH 05/18] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=80=80=E5=87=BA?= =?UTF-8?q?=E6=97=B6=E6=9C=BA=E8=A1=A8=EF=BC=8C=E5=AE=8C=E6=88=90=E6=8A=95?= =?UTF-8?q?=E8=B5=84=E6=8A=A5=E5=91=8A=E9=A1=B5=E9=9D=A2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/PerformanceScoreMapper.java | 5 +++++ .../java/com/sztzjy/fund_investment/task/Task.java | 13 ++++--------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/sztzjy/fund_investment/mapper/PerformanceScoreMapper.java b/src/main/java/com/sztzjy/fund_investment/mapper/PerformanceScoreMapper.java index 76a612c..96de062 100644 --- a/src/main/java/com/sztzjy/fund_investment/mapper/PerformanceScoreMapper.java +++ b/src/main/java/com/sztzjy/fund_investment/mapper/PerformanceScoreMapper.java @@ -6,6 +6,8 @@ import java.util.List; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + @Mapper public interface PerformanceScoreMapper { long countByExample(PerformanceScoreExample example); @@ -29,4 +31,7 @@ public interface PerformanceScoreMapper { int updateByPrimaryKeySelective(PerformanceScore record); int updateByPrimaryKey(PerformanceScore record); + + @Select("select class_id from performance_score group By class_id") + List selectClassId(); } \ No newline at end of file diff --git a/src/main/java/com/sztzjy/fund_investment/task/Task.java b/src/main/java/com/sztzjy/fund_investment/task/Task.java index f81c434..ebbedb5 100644 --- a/src/main/java/com/sztzjy/fund_investment/task/Task.java +++ b/src/main/java/com/sztzjy/fund_investment/task/Task.java @@ -38,14 +38,7 @@ public class Task { // 查到单个班级下所有的已经在投资报告页面提交过的学生的总成绩 // 算平均值,存表 //查出所有数据 - PerformanceScoreExample performanceScoreExample = new PerformanceScoreExample(); - List performanceScores = performanceScoreMapper.selectByExample(performanceScoreExample); - List classIdList = new ArrayList<>(); - for (PerformanceScore performanceScore : performanceScores) { - //查询classID相同的所有数据 - String classId = performanceScore.getClassId(); - classIdList.add(classId); - } + List classIdList = performanceScoreMapper.selectClassId(); for (String classId : classIdList) { BigDecimal avgScore = BigDecimal.ZERO; BigDecimal count = BigDecimal.ZERO; @@ -70,6 +63,7 @@ public class Task { schoolId = score.getSchoolId(); //没提交报告的 算0分跳过 if (score.getInvestmentReportScore() == null || score.getInvestmentReportScore().equals(BigDecimal.ZERO)) { + classMinScore = BigDecimal.ZERO; continue; } @@ -102,7 +96,7 @@ public class Task { Date date = Date.from(currentDate.atStartOfDay(ZoneId.systemDefault()).toInstant()); teaClassScore.setSchoolId(schoolId); teaClassScore.setStartTime(date); - System.out.println("定时任务执行的时间为=========》》:date"); + System.out.println(new Date()); teaClassScore.setId(IdUtil.simpleUUID()); teaClassScore.setClassMaxScore(classMaxScore); teaClassScore.setClassMinScore(classMinScore); @@ -125,5 +119,6 @@ public class Task { teaClassScoreMapper.insert(teaClassScore); } } + } From 975f2041504027b0c127b4a662155dfee1e8b5c8 Mon Sep 17 00:00:00 2001 From: xiaoCJ <406612557@qq.com> Date: Wed, 20 Dec 2023 17:15:58 +0800 Subject: [PATCH 06/18] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=80=80=E5=87=BA?= =?UTF-8?q?=E6=97=B6=E6=9C=BA=E8=A1=A8=EF=BC=8C=E5=AE=8C=E6=88=90=E6=8A=95?= =?UTF-8?q?=E8=B5=84=E6=8A=A5=E5=91=8A=E9=A1=B5=E9=9D=A2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/tea/ClassScoreController.java | 12 +++--------- .../sztzjy/fund_investment/mapper/UserMapper.java | 5 +++++ .../serviceImpl/tea/ClassScoreServiceImpl.java | 5 +++-- .../serviceImpl/tea/TeaTopicManageServiceImpl.java | 2 +- .../java/com/sztzjy/fund_investment/task/Task.java | 2 +- 5 files changed, 13 insertions(+), 13 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 410e7b3..55b0948 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 @@ -78,7 +78,7 @@ public class ClassScoreController { @AnonymousAccess @GetMapping("/importExcel") - @ApiOperation("成绩管理/导出") + @ApiOperation("成绩管理/导出") //目前只导出提交了报告的学生的数据 public void importExcel(HttpServletResponse response, @RequestParam String schoolId) { classScoreService.importExcel(response, schoolId); } @@ -168,14 +168,8 @@ public class ClassScoreController { @GetMapping("/getClassNameBySchoolId") @ApiOperation("成绩管理&互动答疑/班级下拉框") public ResultEntity> getClassNameBySchoolId(@RequestParam String schoolId) { - UserExample userTableExample = new UserExample(); - userTableExample.createCriteria().andSchoolIdEqualTo(schoolId); - List userTables = userMapper.selectByExample(userTableExample); - List list = new ArrayList<>(); - for (User userTable : userTables) { - list.add(userTable.getClassName()); - } - return new ResultEntity>(list); + List className = userMapper.selectClassNameBySchoolId(schoolId); + return new ResultEntity<>(className); } diff --git a/src/main/java/com/sztzjy/fund_investment/mapper/UserMapper.java b/src/main/java/com/sztzjy/fund_investment/mapper/UserMapper.java index 0663ab7..8ca1e67 100644 --- a/src/main/java/com/sztzjy/fund_investment/mapper/UserMapper.java +++ b/src/main/java/com/sztzjy/fund_investment/mapper/UserMapper.java @@ -6,6 +6,8 @@ import java.util.List; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + @Mapper public interface UserMapper { long countByExample(UserExample example); @@ -29,4 +31,7 @@ public interface UserMapper { int updateByPrimaryKeySelective(User record); int updateByPrimaryKey(User record); + + @Select("select class_name from wx_user where school_id = #{schoolId} group by class_name") + List selectClassNameBySchoolId(@Param("schoolId") String schoolId); } \ No newline at end of file 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 205c35f..522968e 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 @@ -78,7 +78,7 @@ public class ClassScoreServiceImpl implements ClassScoreService { } - /* + /* 班级成绩统计分析饼状图 * @author xcj * @Date 2023/11/24 */ @@ -146,6 +146,7 @@ public class ClassScoreServiceImpl implements ClassScoreService { UserExample userTableExample = new UserExample(); UserExample.Criteria criteria = userTableExample.createCriteria(); UserExample.Criteria orCriteria = userTableExample.createCriteria(); + criteria.andRoleIdEqualTo(4); if (StringUtils.isNotBlank(classId)) { criteria.andClassIdEqualTo(classId); } else { @@ -198,7 +199,7 @@ public class ClassScoreServiceImpl implements ClassScoreService { @Override public void importExcel(HttpServletResponse response, String schoolId) { UserExample userTableExample = new UserExample(); - userTableExample.createCriteria().andSchoolIdEqualTo(schoolId); + userTableExample.createCriteria().andSchoolIdEqualTo(schoolId).andRoleIdEqualTo(4); List userTables = userMapper.selectByExample(userTableExample); List userDtoList = new ArrayList<>(); for (User userTable : userTables) { diff --git a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/tea/TeaTopicManageServiceImpl.java b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/tea/TeaTopicManageServiceImpl.java index 4df08ca..81c99d6 100644 --- a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/tea/TeaTopicManageServiceImpl.java +++ b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/tea/TeaTopicManageServiceImpl.java @@ -103,7 +103,7 @@ public class TeaTopicManageServiceImpl implements TeaTopicManageService { UserExample userTableExample = new UserExample(); UserExample.Criteria criteria = userTableExample.createCriteria(); UserExample.Criteria or = userTableExample.createCriteria(); - criteria.andSchoolIdEqualTo(schoolId); + criteria.andSchoolIdEqualTo(schoolId).andRoleIdEqualTo(4); if (StringUtils.isNotBlank(className)) { criteria.andClassNameEqualTo(className); } diff --git a/src/main/java/com/sztzjy/fund_investment/task/Task.java b/src/main/java/com/sztzjy/fund_investment/task/Task.java index ebbedb5..5f32e6f 100644 --- a/src/main/java/com/sztzjy/fund_investment/task/Task.java +++ b/src/main/java/com/sztzjy/fund_investment/task/Task.java @@ -106,7 +106,7 @@ public class Task { teaClassScore.setFailCount(gradeCounts.get("fail")); teaClassScore.setClassId(classId); UserExample userTableExample =new UserExample(); - userTableExample.createCriteria().andSchoolIdEqualTo(schoolId).andClassIdEqualTo(classId); + userTableExample.createCriteria().andSchoolIdEqualTo(schoolId).andClassIdEqualTo(classId).andRoleIdEqualTo(4); List userTables = userMapper.selectByExample(userTableExample); User userTable = userTables.get(0); teaClassScore.setClassName(userTable.getClassName()); From 7cd85b1af56842dc6220029ea6060e07f93b2922 Mon Sep 17 00:00:00 2001 From: xiaoCJ <406612557@qq.com> Date: Thu, 21 Dec 2023 15:53:59 +0800 Subject: [PATCH 07/18] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug=20=EF=BC=8C?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AD=A6=E7=94=9F=E6=8F=90=E9=97=AE=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/TopicController.java | 1 - .../controller/tea/ClassScoreController.java | 6 +- .../tea/TeaTopicManageController.java | 31 +++- .../entity/QuestionAnswerExample.java | 47 ++----- .../entity/dto/QuestionAnswerDto.java | 3 + .../fund_investment/mapper/UserMapper.java | 5 +- .../PerformanceScoreServiceImpl.java | 16 ++- .../tea/ClassScoreServiceImpl.java | 133 ++++++++++++------ .../tea/TeaTopicManageServiceImpl.java | 6 +- .../service/tea/TeaTopicManageService.java | 4 +- 10 files changed, 148 insertions(+), 104 deletions(-) diff --git a/src/main/java/com/sztzjy/fund_investment/controller/TopicController.java b/src/main/java/com/sztzjy/fund_investment/controller/TopicController.java index 9afb801..8a9fea3 100644 --- a/src/main/java/com/sztzjy/fund_investment/controller/TopicController.java +++ b/src/main/java/com/sztzjy/fund_investment/controller/TopicController.java @@ -15,7 +15,6 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; 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 55b0948..1d68cbc 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 @@ -167,9 +167,9 @@ public class ClassScoreController { @AnonymousAccess @GetMapping("/getClassNameBySchoolId") @ApiOperation("成绩管理&互动答疑/班级下拉框") - public ResultEntity> getClassNameBySchoolId(@RequestParam String schoolId) { - List className = userMapper.selectClassNameBySchoolId(schoolId); - return new ResultEntity<>(className); + public ResultEntity>> getClassNameBySchoolId(@RequestParam String schoolId) { + List> nameAndId = userMapper.selectClassNameBySchoolId(schoolId); + return new ResultEntity<>(nameAndId); } diff --git a/src/main/java/com/sztzjy/fund_investment/controller/tea/TeaTopicManageController.java b/src/main/java/com/sztzjy/fund_investment/controller/tea/TeaTopicManageController.java index a4a744f..57fb0d0 100644 --- a/src/main/java/com/sztzjy/fund_investment/controller/tea/TeaTopicManageController.java +++ b/src/main/java/com/sztzjy/fund_investment/controller/tea/TeaTopicManageController.java @@ -1,5 +1,6 @@ package com.sztzjy.fund_investment.controller.tea; +import cn.hutool.core.util.IdUtil; import com.github.pagehelper.PageInfo; import com.sztzjy.fund_investment.annotation.AnonymousAccess; import com.sztzjy.fund_investment.entity.QuestionAnswerWithBLOBs; @@ -17,6 +18,10 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.*; +import java.sql.Timestamp; +import java.util.Date; +import java.util.List; + /** * @Author xcj * @Date 2023/12/1 @@ -48,10 +53,10 @@ public class TeaTopicManageController { @GetMapping("/getTopicsBySchoolId") @ApiOperation("试题管理/页面搜索展示") public ResultEntity> getTopicsBySchoolId(@RequestParam Integer index, - @RequestParam Integer size, - @RequestParam String schoolId, - @ApiParam("module值同导入功能模块") @RequestParam String module, - @ApiParam("搜索框/题干") @RequestParam(required = false) String topicContent) { + @RequestParam Integer size, + @RequestParam String schoolId, + @ApiParam("module值同导入功能模块") @RequestParam String module, + @ApiParam("搜索框/题干") @RequestParam(required = false) String topicContent) { return new ResultEntity>(teaTopicManageService.getTopicsBySchoolId(index, size, schoolId, module, topicContent)); } @@ -97,16 +102,30 @@ public class TeaTopicManageController { return new ResultEntity(HttpStatus.BAD_REQUEST, "请输入回复内容!"); } questionAnswerWithBLOBs.setReplyContent(content); - questionAnswerMapper.updateByPrimaryKey(questionAnswerWithBLOBs); + questionAnswerMapper.updateByPrimaryKeyWithBLOBs(questionAnswerWithBLOBs); return new ResultEntity(HttpStatus.OK, "回复成功!"); } @AnonymousAccess @GetMapping("/getQuestionById") - @ApiOperation("互动答疑/获取单挑互动数据") + @ApiOperation("互动答疑/获取单条互动数据") public ResultEntity getQuestionById(@ApiParam("展示接口中的id字段") @RequestParam String questionId) { return new ResultEntity(questionAnswerMapper.selectByPrimaryKey(questionId)); } + @AnonymousAccess + @PostMapping("/addQuestion") + @ApiOperation("互动答疑/学生提问") + public ResultEntity getQuestionById(@ApiParam("传flowId,提问内容,学校ID") @RequestBody QuestionAnswerWithBLOBs questionAnswerWithBLOBs) { + questionAnswerWithBLOBs.setId(IdUtil.simpleUUID()); + questionAnswerWithBLOBs.setQuestionTime(new Date()); + try { + questionAnswerMapper.insert(questionAnswerWithBLOBs); + }catch (Exception e){ + return new ResultEntity<>(HttpStatus.BAD_REQUEST,"提问失败,数据缺失!"); + } + return new ResultEntity<>(HttpStatus.OK,"提问成功!"); + } + } diff --git a/src/main/java/com/sztzjy/fund_investment/entity/QuestionAnswerExample.java b/src/main/java/com/sztzjy/fund_investment/entity/QuestionAnswerExample.java index b916eff..9f55be3 100644 --- a/src/main/java/com/sztzjy/fund_investment/entity/QuestionAnswerExample.java +++ b/src/main/java/com/sztzjy/fund_investment/entity/QuestionAnswerExample.java @@ -2,7 +2,6 @@ package com.sztzjy.fund_investment.entity; import java.util.ArrayList; import java.util.Date; -import java.util.Iterator; import java.util.List; public class QuestionAnswerExample { @@ -106,32 +105,6 @@ public class QuestionAnswerExample { criteria.add(new Criterion(condition, value1, value2)); } - protected void addCriterionForJDBCDate(String condition, Date value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - addCriterion(condition, new java.sql.Date(value.getTime()), property); - } - - protected void addCriterionForJDBCDate(String condition, List values, String property) { - if (values == null || values.size() == 0) { - throw new RuntimeException("Value list for " + property + " cannot be null or empty"); - } - List dateList = new ArrayList<>(); - Iterator iter = values.iterator(); - while (iter.hasNext()) { - dateList.add(new java.sql.Date(iter.next().getTime())); - } - addCriterion(condition, dateList, property); - } - - protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property); - } - public Criteria andIdIsNull() { addCriterion("id is null"); return (Criteria) this; @@ -353,52 +326,52 @@ public class QuestionAnswerExample { } public Criteria andQuestionTimeEqualTo(Date value) { - addCriterionForJDBCDate("question_time =", value, "questionTime"); + addCriterion("question_time =", value, "questionTime"); return (Criteria) this; } public Criteria andQuestionTimeNotEqualTo(Date value) { - addCriterionForJDBCDate("question_time <>", value, "questionTime"); + addCriterion("question_time <>", value, "questionTime"); return (Criteria) this; } public Criteria andQuestionTimeGreaterThan(Date value) { - addCriterionForJDBCDate("question_time >", value, "questionTime"); + addCriterion("question_time >", value, "questionTime"); return (Criteria) this; } public Criteria andQuestionTimeGreaterThanOrEqualTo(Date value) { - addCriterionForJDBCDate("question_time >=", value, "questionTime"); + addCriterion("question_time >=", value, "questionTime"); return (Criteria) this; } public Criteria andQuestionTimeLessThan(Date value) { - addCriterionForJDBCDate("question_time <", value, "questionTime"); + addCriterion("question_time <", value, "questionTime"); return (Criteria) this; } public Criteria andQuestionTimeLessThanOrEqualTo(Date value) { - addCriterionForJDBCDate("question_time <=", value, "questionTime"); + addCriterion("question_time <=", value, "questionTime"); return (Criteria) this; } public Criteria andQuestionTimeIn(List values) { - addCriterionForJDBCDate("question_time in", values, "questionTime"); + addCriterion("question_time in", values, "questionTime"); return (Criteria) this; } public Criteria andQuestionTimeNotIn(List values) { - addCriterionForJDBCDate("question_time not in", values, "questionTime"); + addCriterion("question_time not in", values, "questionTime"); return (Criteria) this; } public Criteria andQuestionTimeBetween(Date value1, Date value2) { - addCriterionForJDBCDate("question_time between", value1, value2, "questionTime"); + addCriterion("question_time between", value1, value2, "questionTime"); return (Criteria) this; } public Criteria andQuestionTimeNotBetween(Date value1, Date value2) { - addCriterionForJDBCDate("question_time not between", value1, value2, "questionTime"); + addCriterion("question_time not between", value1, value2, "questionTime"); return (Criteria) this; } } diff --git a/src/main/java/com/sztzjy/fund_investment/entity/dto/QuestionAnswerDto.java b/src/main/java/com/sztzjy/fund_investment/entity/dto/QuestionAnswerDto.java index fa5cee9..00b74ce 100644 --- a/src/main/java/com/sztzjy/fund_investment/entity/dto/QuestionAnswerDto.java +++ b/src/main/java/com/sztzjy/fund_investment/entity/dto/QuestionAnswerDto.java @@ -1,7 +1,9 @@ package com.sztzjy.fund_investment.entity.dto; +import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; import java.util.Date; @@ -20,6 +22,7 @@ public class QuestionAnswerDto { @ApiModelProperty("学校ID") private String schoolid; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") @ApiModelProperty("提问时间") private Date questionTime; diff --git a/src/main/java/com/sztzjy/fund_investment/mapper/UserMapper.java b/src/main/java/com/sztzjy/fund_investment/mapper/UserMapper.java index 8ca1e67..6715793 100644 --- a/src/main/java/com/sztzjy/fund_investment/mapper/UserMapper.java +++ b/src/main/java/com/sztzjy/fund_investment/mapper/UserMapper.java @@ -3,6 +3,7 @@ package com.sztzjy.fund_investment.mapper; import com.sztzjy.fund_investment.entity.User; import com.sztzjy.fund_investment.entity.UserExample; import java.util.List; +import java.util.Map; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -32,6 +33,6 @@ public interface UserMapper { int updateByPrimaryKey(User record); - @Select("select class_name from wx_user where school_id = #{schoolId} group by class_name") - List selectClassNameBySchoolId(@Param("schoolId") String schoolId); + @Select("select distinct(class_id),class_name from wx_user where school_id = #{schoolId}") + List> selectClassNameBySchoolId(@Param("schoolId") String schoolId); } \ No newline at end of file diff --git a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/PerformanceScoreServiceImpl.java b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/PerformanceScoreServiceImpl.java index 5ddc592..1c2bca2 100644 --- a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/PerformanceScoreServiceImpl.java +++ b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/PerformanceScoreServiceImpl.java @@ -28,9 +28,13 @@ public class PerformanceScoreServiceImpl implements PerformanceScoreService { public void calculateScoreByModule(String methodName, Integer score, String flowId) { PerformanceScore performanceScore = getByFlowId(flowId); Object o = performanceScore.get(methodName); - if (o==null){ + if (o == null) { performanceScore.set(methodName, BigDecimal.valueOf(score)); - performanceScore.setTotalScore(performanceScore.getTotalScore().add(BigDecimal.valueOf(score))); + if (performanceScore.getTotalScore()== null) { + performanceScore.setTotalScore(BigDecimal.valueOf(score)); + } else { + performanceScore.setTotalScore(performanceScore.getTotalScore().add(BigDecimal.valueOf(score))); + } performanceScoreMapper.updateByPrimaryKey(performanceScore); } } @@ -39,13 +43,13 @@ public class PerformanceScoreServiceImpl implements PerformanceScoreService { public void calculateScoreByModule2(String methodName, Integer score, String flowId) { PerformanceScore performanceScore = getByFlowId(flowId); Object o = performanceScore.get(methodName); - if(o==null){ + if (o == null) { performanceScore.set(methodName, BigDecimal.valueOf(score)); performanceScore.setTotalScore(performanceScore.getTotalScore().add(BigDecimal.valueOf(score))); performanceScoreMapper.updateByPrimaryKey(performanceScore); - }else { - BigDecimal bigDecimal=(BigDecimal) performanceScore.get(methodName); - if(bigDecimal.compareTo(BigDecimal.valueOf(score))<0){ + } else { + BigDecimal bigDecimal = (BigDecimal) performanceScore.get(methodName); + if (bigDecimal.compareTo(BigDecimal.valueOf(score)) < 0) { performanceScore.set(methodName, BigDecimal.valueOf(score)); performanceScore.setTotalScore(performanceScore.getTotalScore().add(BigDecimal.valueOf(score)).subtract(bigDecimal)); performanceScoreMapper.updateByPrimaryKey(performanceScore); 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 522968e..3726cbd 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 @@ -95,7 +95,7 @@ public class ClassScoreServiceImpl implements ClassScoreService { int schoolGeneralCount = 0; int schoolFailCount = 0; BigDecimal maxScoreBySchoolId = BigDecimal.ZERO; - BigDecimal minScoreBySchoolId = null; + BigDecimal minScoreBySchoolId = BigDecimal.ZERO; BigDecimal avgScoreBySchoolId = BigDecimal.ZERO; for (TeaClassScore teaClassScore : teaClassScores) { schoolExcellentCount = schoolExcellentCount + teaClassScore.getExcellentCount(); @@ -104,13 +104,19 @@ public class ClassScoreServiceImpl implements ClassScoreService { schoolFailCount = schoolFailCount + teaClassScore.getFailCount(); BigDecimal maxScore = teaClassScore.getClassMaxScore(); + if (maxScore == null) { + maxScore = BigDecimal.ZERO; + } BigDecimal minScore = teaClassScore.getClassMinScore(); + if (minScore == null) { + minScore = BigDecimal.ZERO; + } // 计算最高分 if (maxScore.compareTo(maxScoreBySchoolId) >= 0) { maxScoreBySchoolId = maxScore; } // 计算最低分 - if (minScoreBySchoolId == null || minScore.compareTo(minScoreBySchoolId) <= 0) { + if (minScoreBySchoolId.compareTo(BigDecimal.ZERO) == 0 || minScore.compareTo(minScoreBySchoolId) <= 0) { minScoreBySchoolId = minScore; } //所有班级平均分累加 @@ -172,11 +178,12 @@ public class ClassScoreServiceImpl implements ClassScoreService { List performanceScores = performanceScoreMapper.selectByExample(performanceScoreExample); if (!performanceScores.isEmpty()) { PerformanceScore performanceScore = performanceScores.get(0); - if (!trainingReports.isEmpty()) { - for (TrainingReport trainingReport : trainingReports) { - userDto.setReportId(trainingReport.getId()); - userDto.setReportName(trainingReport.getReportName()); - } + if (trainingReports.isEmpty()) { + continue; + } + for (TrainingReport trainingReport : trainingReports) { + userDto.setReportId(trainingReport.getId()); + userDto.setReportName(trainingReport.getReportName()); } userDto.setFlowId(flowId); userDto.setScore(performanceScore.getTotalScore()); @@ -253,16 +260,45 @@ public class ClassScoreServiceImpl implements ClassScoreService { PerformanceScoreExample performanceScoreExample = new PerformanceScoreExample(); performanceScoreExample.createCriteria().andSchoolIdEqualTo(schoolId); List performanceScores = performanceScoreMapper.selectByExample(performanceScoreExample); + List list = new ArrayList(); if (!performanceScores.isEmpty()) { for (PerformanceScore performanceScore : performanceScores) { String flowId = performanceScore.getFlowId(); + list.add(flowId); FoundProject foundProject = foundProjectMapper.selectByPrimaryKey(flowId); - String foundProjectConclusion = foundProject.getFoundProjectConclusion(); // 寻找项目结论 - String serviceDueDiligence = foundProject.getServiceDueDiligence(); // 业务尽调结论 - String financialDueDiligence = foundProject.getFinancialDueDiligence(); //财务尽调结论 - String projectValuationRelative = foundProject.getProjectValuationRelative();//相对估值结论得分 - String projectValuationAbsolute = foundProject.getProjectValuationAbsolute();//绝对估值结论得分 - + if (foundProject == null) { + continue; + } + String serviceDueDiligence = ""; + String financialDueDiligence = ""; + String projectValuationRelative = ""; + String projectValuationAbsolute = ""; + String foundProjectConclusion = ""; + if (foundProject.getFoundProjectConclusion() == null) { + performanceScoreService.calculateScoreByModule("projectSearchReportScore", 0, flowId); + } else { + foundProjectConclusion = foundProject.getFoundProjectConclusion(); // 寻找项目结论 + } + if (foundProject.getServiceDueDiligence() == null) { + performanceScoreService.calculateScoreByModule("projectDueDiligenceBusinessReportScore", 0, flowId); + } else { + serviceDueDiligence = foundProject.getServiceDueDiligence(); // 业务尽调结论 + } + if (foundProject.getFinancialDueDiligence() == null) { + performanceScoreService.calculateScoreByModule("projectDueDiligenceFinanceReportScore", 0, flowId); + } else { + financialDueDiligence = foundProject.getFinancialDueDiligence(); //财务尽调结论 + } + if (foundProject.getProjectValuationRelative() == null) { + performanceScoreService.calculateScoreByModule("projectValuationRelativeScore", 0, flowId); + } else { + projectValuationRelative = foundProject.getProjectValuationRelative();//相对估值结论得分 + } + if (foundProject.getProjectValuationAbsolute() == null) { + performanceScoreService.calculateScoreByModule("projectValuationAbsoluteScore", 0, flowId); + } else { + projectValuationAbsolute = foundProject.getProjectValuationAbsolute();//绝对估值结论得分 + } foundProjectConclusion = foundProjectConclusion.replaceAll("[^a-zA-Z0-9]", ""); serviceDueDiligence = serviceDueDiligence.replaceAll("[^a-zA-Z0-9]", ""); financialDueDiligence = financialDueDiligence.replaceAll("[^a-zA-Z0-9]", ""); @@ -278,21 +314,18 @@ public class ClassScoreServiceImpl implements ClassScoreService { //未超过30,结论报告是必填项,到这里就给1分没有0 performanceScoreService.calculateScoreByModule("projectSearchReportScore", 1, flowId); } - // 业务尽调结论 if (serviceDueDiligence.length() >= 30) { performanceScoreService.calculateScoreByModule("projectDueDiligenceBusinessReportScore", 2, flowId); } else { performanceScoreService.calculateScoreByModule("projectDueDiligenceBusinessReportScore", 1, flowId); } - //财务尽调结论 if (financialDueDiligence.length() >= 30) { performanceScoreService.calculateScoreByModule("projectDueDiligenceFinanceReportScore", 2, flowId); } else { performanceScoreService.calculateScoreByModule("projectDueDiligenceFinanceReportScore", 1, flowId); } - //项目相对估值结论 if (projectValuationRelative.length() >= 30) { performanceScoreService.calculateScoreByModule("projectValuationRelativeScore", 2, flowId); @@ -305,38 +338,46 @@ public class ClassScoreServiceImpl implements ClassScoreService { } else { performanceScoreService.calculateScoreByModule("projectValuationAbsoluteScore", 1, flowId); } + } + for (String flowIdByList : list) { TrainingReportExample trainingReportExample = new TrainingReportExample(); - trainingReportExample.createCriteria().andSchoolIdEqualTo(schoolId).andFlowIdEqualTo(flowId); + trainingReportExample.createCriteria().andSchoolIdEqualTo(schoolId).andFlowIdEqualTo(flowIdByList); List trainingReports = trainingReportMapper.selectByExample(trainingReportExample); - if (!trainingReports.isEmpty()) { - TrainingReport trainingReport = trainingReports.get(0); - String experience = trainingReport.getExperience(); - String url = trainingReport.getUrl(); - String reportName = trainingReport.getReportName(); - experience = experience.replaceAll("[^a-zA-Z0-9]", ""); - url = url.replaceAll("[^a-zA-Z0-9]", ""); - reportName = reportName.replaceAll("[^a-zA-Z0-9]", ""); - //实训心得 - if (experience.length() < 100) { - performanceScoreService.calculateScoreByModule("projectValuationRelativeScore", 1, flowId); //todo 需要修改 - trainingReport.setExperienceScore(BigDecimal.ONE); - } - if (experience.length() >= 100 && experience.length() < 300) { - performanceScoreService.calculateScoreByModule("projectValuationRelativeScore", 2, flowId);//todo 需要修改 - trainingReport.setExperienceScore(BigDecimal.valueOf(2)); - } - if (experience.length() >= 300) { - performanceScoreService.calculateScoreByModule("projectValuationRelativeScore", 3, flowId);//todo 需要修改 - trainingReport.setExperienceScore(BigDecimal.valueOf(3)); - } - - //实验报告,未上传 0 分 上传得两分 - if (!(url.isEmpty()) && !(reportName.isEmpty())) { - performanceScoreService.calculateScoreByModule("investmentReportScore", 2, flowId);//todo 需要修改 - trainingReport.setReportScore(BigDecimal.valueOf(2)); - } - trainingReportMapper.updateByPrimaryKey(trainingReport); + if (trainingReports.isEmpty()) { + continue; + } + String experience = ""; + TrainingReport trainingReport = trainingReports.get(0); + if (trainingReport.getExperience() == null) { + performanceScoreService.calculateScoreByModule("projectValuationRelativeScore", 0, flowIdByList); + trainingReport.setExperienceScore(BigDecimal.ZERO); + } else { + experience = trainingReport.getExperience(); + } + //实训心得 + if (experience.length() < 100) { + performanceScoreService.calculateScoreByModule("projectValuationRelativeScore", 1, flowIdByList); + trainingReport.setExperienceScore(BigDecimal.ONE); + } + if (experience.length() >= 100 && experience.length() < 300) { + performanceScoreService.calculateScoreByModule("projectValuationRelativeScore", 2, flowIdByList); + trainingReport.setExperienceScore(BigDecimal.valueOf(2)); + } + if (experience.length() >= 300) { + performanceScoreService.calculateScoreByModule("projectValuationRelativeScore", 3, flowIdByList); + trainingReport.setExperienceScore(BigDecimal.valueOf(3)); + } + + //实验报告,未上传 0 分 上传得两分 + if (trainingReport.getUrl() == null && trainingReport.getReportName() == null) { + performanceScoreService.calculateScoreByModule("investmentReportScore", 0, flowIdByList);//todo 需要修改 + trainingReport.setReportScore(BigDecimal.ZERO); + } + if (!(trainingReport.getUrl().isEmpty()) && !(trainingReport.getReportName().isEmpty())) { + performanceScoreService.calculateScoreByModule("investmentReportScore", 2, flowIdByList);//todo 需要修改 + trainingReport.setReportScore(BigDecimal.valueOf(2)); } + trainingReportMapper.updateByPrimaryKey(trainingReport); } return new ResultEntity<>(HttpStatus.OK); } @@ -439,7 +480,7 @@ public class ClassScoreServiceImpl implements ClassScoreService { } -// 实训成绩 + // 实训成绩 @Override public PerformanceTrainingScoreDto getStuTrainingScore(String flowId) { PerformanceScoreExample example = new PerformanceScoreExample(); diff --git a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/tea/TeaTopicManageServiceImpl.java b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/tea/TeaTopicManageServiceImpl.java index 81c99d6..ccae9f1 100644 --- a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/tea/TeaTopicManageServiceImpl.java +++ b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/tea/TeaTopicManageServiceImpl.java @@ -1,5 +1,6 @@ package com.sztzjy.fund_investment.service.serviceImpl.tea; +import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.sztzjy.fund_investment.entity.*; import com.sztzjy.fund_investment.entity.dto.QuestionAnswerDto; @@ -83,8 +84,9 @@ public class TeaTopicManageServiceImpl implements TeaTopicManageService { */ @Override public PageInfo getTopicsBySchoolId(Integer index, Integer size, String schoolId, String module, String topicContent) { + PageHelper.startPage(index, size); List topics = topicsMapper.getTopicsByCondition(schoolId, module, topicContent); - PageInfo pageInfo = PageUtil.pageHelper(topics, index, size); + PageInfo pageInfo = new PageInfo<>(topics); return pageInfo; } @@ -99,7 +101,7 @@ public class TeaTopicManageServiceImpl implements TeaTopicManageService { public PageInfo getQuestionAnswer(Integer index, Integer size, String schoolId, String className, String keyWord) { QuestionAnswerExample questionAnswerExample = new QuestionAnswerExample(); questionAnswerExample.createCriteria().andSchoolidEqualTo(schoolId); - List questionAnswers = questionAnswerMapper.selectByExample(questionAnswerExample); + List questionAnswers = questionAnswerMapper.selectByExampleWithBLOBs(questionAnswerExample); UserExample userTableExample = new UserExample(); UserExample.Criteria criteria = userTableExample.createCriteria(); UserExample.Criteria or = userTableExample.createCriteria(); diff --git a/src/main/java/com/sztzjy/fund_investment/service/tea/TeaTopicManageService.java b/src/main/java/com/sztzjy/fund_investment/service/tea/TeaTopicManageService.java index 9c834d9..94aa25d 100644 --- a/src/main/java/com/sztzjy/fund_investment/service/tea/TeaTopicManageService.java +++ b/src/main/java/com/sztzjy/fund_investment/service/tea/TeaTopicManageService.java @@ -5,6 +5,8 @@ import com.sztzjy.fund_investment.entity.TopicsWithBLOBs; import com.sztzjy.fund_investment.entity.dto.QuestionAnswerDto; import com.sztzjy.fund_investment.util.ResultEntity; +import java.util.List; + /** * @Author xcj * @Date 2023/12/1 @@ -12,7 +14,7 @@ import com.sztzjy.fund_investment.util.ResultEntity; public interface TeaTopicManageService { ResultEntity insertTopics(TopicsWithBLOBs topics); - PageInfo getTopicsBySchoolId(Integer index, Integer size,String schoolId, String module,String topicContent); + PageInfo getTopicsBySchoolId(Integer index, Integer size, String schoolId, String module, String topicContent); PageInfo getQuestionAnswer(Integer index, Integer size,String schoolId, String className, String keyWord); From 7ed4c011a829293092962e869b6dcc11d9d50483 Mon Sep 17 00:00:00 2001 From: xiaoCJ <406612557@qq.com> Date: Thu, 21 Dec 2023 15:54:14 +0800 Subject: [PATCH 08/18] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=80=80=E5=87=BA?= =?UTF-8?q?=E6=97=B6=E6=9C=BA=E8=A1=A8=EF=BC=8C=E5=AE=8C=E6=88=90=E6=8A=95?= =?UTF-8?q?=E8=B5=84=E6=8A=A5=E5=91=8A=E9=A1=B5=E9=9D=A2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mappers/QuestionAnswerMapper.xml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/resources/mappers/QuestionAnswerMapper.xml b/src/main/resources/mappers/QuestionAnswerMapper.xml index 4b95f50..2382ca5 100644 --- a/src/main/resources/mappers/QuestionAnswerMapper.xml +++ b/src/main/resources/mappers/QuestionAnswerMapper.xml @@ -5,7 +5,7 @@ - + @@ -128,7 +128,7 @@ question_time, question_content, reply_content ) values (#{id,jdbcType=VARCHAR}, #{flowId,jdbcType=VARCHAR}, #{schoolid,jdbcType=VARCHAR}, - #{questionTime,jdbcType=DATE}, #{questionContent,jdbcType=LONGVARCHAR}, #{replyContent,jdbcType=LONGVARCHAR} + #{questionTime,jdbcType=TIMESTAMP}, #{questionContent,jdbcType=LONGVARCHAR}, #{replyContent,jdbcType=LONGVARCHAR} ) @@ -164,7 +164,7 @@ #{schoolid,jdbcType=VARCHAR}, - #{questionTime,jdbcType=DATE}, + #{questionTime,jdbcType=TIMESTAMP}, #{questionContent,jdbcType=LONGVARCHAR}, @@ -193,7 +193,7 @@ schoolId = #{record.schoolid,jdbcType=VARCHAR}, - question_time = #{record.questionTime,jdbcType=DATE}, + question_time = #{record.questionTime,jdbcType=TIMESTAMP}, question_content = #{record.questionContent,jdbcType=LONGVARCHAR}, @@ -211,7 +211,7 @@ set id = #{record.id,jdbcType=VARCHAR}, flow_id = #{record.flowId,jdbcType=VARCHAR}, schoolId = #{record.schoolid,jdbcType=VARCHAR}, - question_time = #{record.questionTime,jdbcType=DATE}, + question_time = #{record.questionTime,jdbcType=TIMESTAMP}, question_content = #{record.questionContent,jdbcType=LONGVARCHAR}, reply_content = #{record.replyContent,jdbcType=LONGVARCHAR} @@ -223,7 +223,7 @@ set id = #{record.id,jdbcType=VARCHAR}, flow_id = #{record.flowId,jdbcType=VARCHAR}, schoolId = #{record.schoolid,jdbcType=VARCHAR}, - question_time = #{record.questionTime,jdbcType=DATE} + question_time = #{record.questionTime,jdbcType=TIMESTAMP} @@ -238,7 +238,7 @@ schoolId = #{schoolid,jdbcType=VARCHAR}, - question_time = #{questionTime,jdbcType=DATE}, + question_time = #{questionTime,jdbcType=TIMESTAMP}, question_content = #{questionContent,jdbcType=LONGVARCHAR}, @@ -253,7 +253,7 @@ update question_answer set flow_id = #{flowId,jdbcType=VARCHAR}, schoolId = #{schoolid,jdbcType=VARCHAR}, - question_time = #{questionTime,jdbcType=DATE}, + question_time = #{questionTime,jdbcType=TIMESTAMP}, question_content = #{questionContent,jdbcType=LONGVARCHAR}, reply_content = #{replyContent,jdbcType=LONGVARCHAR} where id = #{id,jdbcType=VARCHAR} @@ -262,7 +262,7 @@ update question_answer set flow_id = #{flowId,jdbcType=VARCHAR}, schoolId = #{schoolid,jdbcType=VARCHAR}, - question_time = #{questionTime,jdbcType=DATE} + question_time = #{questionTime,jdbcType=TIMESTAMP} where id = #{id,jdbcType=VARCHAR} \ No newline at end of file From ea9b27b9b8e674109cd5089faa115fd6b68e5e1c Mon Sep 17 00:00:00 2001 From: yz <3614508250@qq.com> Date: Thu, 21 Dec 2023 17:44:43 +0800 Subject: [PATCH 09/18] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectDueDiligenceController.java | 256 ++++++++++-------- 1 file changed, 139 insertions(+), 117 deletions(-) diff --git a/src/main/java/com/sztzjy/fund_investment/controller/ProjectDueDiligenceController.java b/src/main/java/com/sztzjy/fund_investment/controller/ProjectDueDiligenceController.java index 8ab0036..6cb0be9 100644 --- a/src/main/java/com/sztzjy/fund_investment/controller/ProjectDueDiligenceController.java +++ b/src/main/java/com/sztzjy/fund_investment/controller/ProjectDueDiligenceController.java @@ -13,6 +13,7 @@ import com.sztzjy.fund_investment.entity.*; import com.sztzjy.fund_investment.entity.treeSelect.TreeSelect; import com.sztzjy.fund_investment.mapper.FoundProjectMapper; import com.sztzjy.fund_investment.mapper.PerformanceScoreMapper; +import com.sztzjy.fund_investment.mapper.ProFinancialIndexDetailUserMapper; import com.sztzjy.fund_investment.mapper.ProjectPoolMapper; import com.sztzjy.fund_investment.service.ISysProjectDueDiligenceService; import com.sztzjy.fund_investment.service.PerformanceScoreService; @@ -28,6 +29,7 @@ import org.apache.poi.ss.formula.functions.T; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.*; + import javax.servlet.http.HttpServletResponse; import java.awt.*; import java.io.BufferedInputStream; @@ -58,6 +60,8 @@ public class ProjectDueDiligenceController { PerformanceScoreService scoreService; @Autowired PerformanceScoreMapper performanceScoreMapper; + @Autowired + ProFinancialIndexDetailUserMapper proFinancialIndexDetailUserMapper; //*************公司业务尽职调查 @@ -194,7 +198,7 @@ public class ProjectDueDiligenceController { return new ResultEntity(HttpStatus.BAD_REQUEST, "业务尽调结论为空"); } projectDueDiligenceService.updateServiceDueDiligence(foundProject); - scoreService.calculateScoreByModule("projectDueDiligenceBusinessReportScore",2,foundProject.getFlowId()); + scoreService.calculateScoreByModule("projectDueDiligenceBusinessReportScore", 2, foundProject.getFlowId()); return new ResultEntity(HttpStatus.OK, "业务尽调结论保存成功"); } @@ -234,18 +238,37 @@ public class ProjectDueDiligenceController { @ApiOperation("财务指标查询") @AnonymousAccess public ResultEntity> selectProFinancialIndexDetailList(@ApiParam("节点id的集合List") @RequestBody List proFinancialIndexIdList, - @ApiParam("流程ID") @RequestParam String flowId, - @ApiParam("条数") @RequestParam Integer size, - @ApiParam("页数") @RequestParam Integer index) { + @ApiParam("流程ID") @RequestParam String flowId, + @ApiParam("条数") @RequestParam Integer size, + @ApiParam("页数") @RequestParam Integer index) { PageInfo pageInfo = projectDueDiligenceService.selectProFinancialIndexDetailList(proFinancialIndexIdList, flowId, size, index); return new ResultEntity(HttpStatus.OK, "财务指标查询成功", pageInfo); } + @GetMapping("selectFinancialIndexDetailListHistory") + @ApiOperation("财务指标历史查询") + @AnonymousAccess + public ResultEntity> selectFinancialIndexDetailListHistory(@ApiParam("流程ID") @RequestParam String flowId) { + List ids=new ArrayList<>(); + ProFinancialIndexDetailUserExample example = new ProFinancialIndexDetailUserExample(); + ProFinancialIndexDetailUserExample.Criteria criteria = example.createCriteria(); + criteria.andFlowIdEqualTo(flowId).andLastYearValueNotEqualTo("0"); + List proFinancialIndexDetailUsers = proFinancialIndexDetailUserMapper.selectByExample(example); + if(proFinancialIndexDetailUsers.isEmpty()){ + return new ResultEntity(HttpStatus.OK, "财务指标历史查询为空", ids); + }else { + for (int i = 0; i < proFinancialIndexDetailUsers.size(); i++) { + ids.add(proFinancialIndexDetailUsers.get(i).getFinancialIndexId()); + } + return new ResultEntity(HttpStatus.OK, "财务指标历史查询成功", ids); + } + } + @PostMapping("insertProFinancialIndexDetailUserList") @ApiOperation("财务指标保存") @AnonymousAccess public ResultEntity insertProFinancialIndexDetailUserList(@ApiParam("保存的对象") @RequestBody List proFinancialIndexDetailList, - @ApiParam("流程ID") @RequestParam String flowId) { + @ApiParam("流程ID") @RequestParam String flowId) { ResultEntity resultEntity = projectDueDiligenceService.insertProFinancialIndexDetailUserList(proFinancialIndexDetailList, flowId); return resultEntity; } @@ -254,9 +277,9 @@ public class ProjectDueDiligenceController { @ApiOperation("财务报表查询") @AnonymousAccess public ResultEntity> selectProFinancialStatementDetailList(@ApiParam("节点id的集合List") @RequestBody List proFinancialStatementIdList, - @ApiParam("流程ID") @RequestParam String flowId, - @ApiParam("条数") @RequestParam Integer size, - @ApiParam("页数") @RequestParam Integer index) { + @ApiParam("流程ID") @RequestParam String flowId, + @ApiParam("条数") @RequestParam Integer size, + @ApiParam("页数") @RequestParam Integer index) { PageInfo pageInfo = projectDueDiligenceService.selectProFinancialStatementDetailList(proFinancialStatementIdList, flowId, size, index); return new ResultEntity(HttpStatus.OK, "财务报表查询成功", pageInfo); } @@ -265,8 +288,8 @@ public class ProjectDueDiligenceController { @ApiOperation("财务指标选取导出") @AnonymousAccess public void exportProFinancialIndexDetailList(@ApiParam("HttpServletResponse") HttpServletResponse response, - @ApiParam("节点id的集合List") @RequestParam List proFinancialIndexIdList, - @ApiParam("流程ID") @RequestParam String flowId) { + @ApiParam("节点id的集合List") @RequestParam List proFinancialIndexIdList, + @ApiParam("流程ID") @RequestParam String flowId) { //导出的表名 String title = IdUtil.simpleUUID(); //表中第一行表头字段 @@ -323,7 +346,7 @@ public class ProjectDueDiligenceController { return new ResultEntity(HttpStatus.BAD_REQUEST, "财务尽调结论为空"); } projectDueDiligenceService.updateServiceDueDiligence(foundProject); - scoreService.calculateScoreByModule("projectDueDiligenceFinanceReportScore",2,foundProject.getFlowId()); + scoreService.calculateScoreByModule("projectDueDiligenceFinanceReportScore", 2, foundProject.getFlowId()); PerformanceScore performanceScore = scoreService.getByFlowId(foundProject.getFlowId()); performanceScore.setProjectDueDiligenceTime(new Date()); performanceScoreMapper.updateByPrimaryKey(performanceScore); @@ -347,8 +370,8 @@ public class ProjectDueDiligenceController { @ApiOperation("财务尽调生成报告") @AnonymousAccess public void exportFinanceDueDiligencePDF(HttpServletResponse response, - @ApiParam("流程ID") @RequestParam String flowId) throws IOException, DocumentException { - String projectPoolName=getProjectPoolNameByFlowId(flowId); //公司名称 + @ApiParam("流程ID") @RequestParam String flowId) throws IOException, DocumentException { + String projectPoolName = getProjectPoolNameByFlowId(flowId); //公司名称 Document document = new Document(); // 创建 PdfWriter 对象 第一个参数是对文档对象的引用,第二个参数是文件的实际名称,在该名称中还会给出其输出路径。 @@ -357,12 +380,12 @@ public class ProjectDueDiligenceController { PdfWriter writer = PdfWriter.getInstance(document, response.getOutputStream()); writer.setPageEvent(new HeaderAndFooterEvent()); document.open(); - HeaderAndFooterEvent.tpl=writer.getDirectContent().createTemplate(500,500); + HeaderAndFooterEvent.tpl = writer.getDirectContent().createTemplate(500, 500); HeaderAndFooterEvent.PAGE_NUMBER = true;//实现页眉跟页脚 HeaderAndFooterEvent.HeaderLeft = "";//左上角 HeaderAndFooterEvent.HeaderRight = "";//右上角 HeaderAndFooterEvent.FooterLeft = "";//左下角 - HeaderAndFooterEvent.FooterRight= "深圳市天择教育科技有限公司";//右下角 + HeaderAndFooterEvent.FooterRight = "深圳市天择教育科技有限公司";//右下角 HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "宋体", 25, Font.BOLD); //添加一个空段落来占位,五个参数分别为:内容,对齐方式(1为居中,0为居左,2为居右),段后空行数,段前空行数,行间距 document.add(HeaderAndFooterEvent.AddParagraph(" ", 1, 200, 0, 1.5f)); @@ -437,28 +460,28 @@ public class ProjectDueDiligenceController { document.add(HeaderAndFooterEvent.AddParagraph("工商信息:", 0, 1.5f));//工商信息 ProBusinessInfoShareholder proBusinessInfoShareholder = projectDueDiligenceService.getBusinessInfoShareholderListByFlowId(flowId).get(0); ProBusinessInfo proBusinessInfo = projectDueDiligenceService.getBusinessInfoList(flowId).get(0); - TreeMap treeMap=new TreeMap<>(); - treeMap.put("企业名称",projectPoolName); - treeMap.put("法定代表人",proBusinessInfoShareholder.getLegalPerson()); - treeMap.put("股东",proBusinessInfoShareholder.getShareholder1()); - treeMap.put("持股比例",proBusinessInfoShareholder.getValue1()); - treeMap.put("注册资本",proBusinessInfo.getRegisteredCapital()); - treeMap.put("经营状态",proBusinessInfo.getOperatingState()); - treeMap.put("统一社会信用代码",proBusinessInfo.getCreditCode()); - treeMap.put("纳税人识别号",proBusinessInfo.getIdentificationNumber()); - treeMap.put("营业期限",proBusinessInfo.getBusinessTerm()); - treeMap.put("实缴资本",proBusinessInfo.getPaidinCapital()); - treeMap.put("参保人数",proBusinessInfo.getInsuranceNum()); - treeMap.put("成立日期",proBusinessInfo.getCreateDate()); - treeMap.put("工商注册号",proBusinessInfo.getRegistrationNum()); - treeMap.put("组织机构代码",proBusinessInfo.getOrgaStruCode()); - treeMap.put("公司类型",proBusinessInfo.getCompanyType()); - treeMap.put("行业",proBusinessInfo.getIndustry()); - treeMap.put("核准日期",proBusinessInfo.getApprovalDate()); - treeMap.put("人员规模",proBusinessInfo.getStaffSize()); - treeMap.put("登记机关",proBusinessInfo.getRegistrar()); - treeMap.put("注册地址",proBusinessInfo.getRegisteredAddress()); - treeMap.put("经营范围",proBusinessInfo.getBusinessScope()); + TreeMap treeMap = new TreeMap<>(); + treeMap.put("企业名称", projectPoolName); + treeMap.put("法定代表人", proBusinessInfoShareholder.getLegalPerson()); + treeMap.put("股东", proBusinessInfoShareholder.getShareholder1()); + treeMap.put("持股比例", proBusinessInfoShareholder.getValue1()); + treeMap.put("注册资本", proBusinessInfo.getRegisteredCapital()); + treeMap.put("经营状态", proBusinessInfo.getOperatingState()); + treeMap.put("统一社会信用代码", proBusinessInfo.getCreditCode()); + treeMap.put("纳税人识别号", proBusinessInfo.getIdentificationNumber()); + treeMap.put("营业期限", proBusinessInfo.getBusinessTerm()); + treeMap.put("实缴资本", proBusinessInfo.getPaidinCapital()); + treeMap.put("参保人数", proBusinessInfo.getInsuranceNum()); + treeMap.put("成立日期", proBusinessInfo.getCreateDate()); + treeMap.put("工商注册号", proBusinessInfo.getRegistrationNum()); + treeMap.put("组织机构代码", proBusinessInfo.getOrgaStruCode()); + treeMap.put("公司类型", proBusinessInfo.getCompanyType()); + treeMap.put("行业", proBusinessInfo.getIndustry()); + treeMap.put("核准日期", proBusinessInfo.getApprovalDate()); + treeMap.put("人员规模", proBusinessInfo.getStaffSize()); + treeMap.put("登记机关", proBusinessInfo.getRegistrar()); + treeMap.put("注册地址", proBusinessInfo.getRegisteredAddress()); + treeMap.put("经营范围", proBusinessInfo.getBusinessScope()); PdfPTable table = returnPdfPTable(treeMap); document.add(table); @@ -469,12 +492,12 @@ public class ProjectDueDiligenceController { HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 14, Font.BOLD); document.add(HeaderAndFooterEvent.AddParagraph("司法风险:", 0, 1.5f)); ProJudicialRisk proJudicialRisk = projectDueDiligenceService.getProJudicialRiskListByFlowId(flowId).get(0); - TreeMap treeMap2=new TreeMap<>(); - treeMap2.put("开庭日期",proJudicialRisk.getLawfulDay()); - treeMap2.put("案号",proJudicialRisk.getCaseCode()); - treeMap2.put("案由",proJudicialRisk.getCause()); - treeMap2.put("公诉人/原告",proJudicialRisk.getPlaintiff()); - treeMap2.put("被告人",proJudicialRisk.getDefendant()); + TreeMap treeMap2 = new TreeMap<>(); + treeMap2.put("开庭日期", proJudicialRisk.getLawfulDay()); + treeMap2.put("案号", proJudicialRisk.getCaseCode()); + treeMap2.put("案由", proJudicialRisk.getCause()); + treeMap2.put("公诉人/原告", proJudicialRisk.getPlaintiff()); + treeMap2.put("被告人", proJudicialRisk.getDefendant()); PdfPTable table2 = returnPdfPTable(treeMap2); document.add(table2); @@ -485,13 +508,13 @@ public class ProjectDueDiligenceController { HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 14, Font.BOLD); document.add(HeaderAndFooterEvent.AddParagraph("经营风险:", 0, 1.5f)); ProBusinessRisk proBusinessRisk = projectDueDiligenceService.getProBusinessRiskListByFlowId(flowId).get(0); - TreeMap treeMap3=new TreeMap<>(); - treeMap3.put("列入日期 ",proBusinessRisk.getIncludedDate()); - treeMap3.put("列入经营异常名录原因",proBusinessRisk.getIncludedCause()); - treeMap3.put("列入机关 ",proBusinessRisk.getIncludedOrganization()); - treeMap3.put("移出日期",proBusinessRisk.getRemovedDate()); - treeMap3.put("移出经营异常名录原因",proBusinessRisk.getRemovedCause()); - treeMap3.put("移出决定机关 ",proBusinessRisk.getRemovedOrganization()); + TreeMap treeMap3 = new TreeMap<>(); + treeMap3.put("列入日期 ", proBusinessRisk.getIncludedDate()); + treeMap3.put("列入经营异常名录原因", proBusinessRisk.getIncludedCause()); + treeMap3.put("列入机关 ", proBusinessRisk.getIncludedOrganization()); + treeMap3.put("移出日期", proBusinessRisk.getRemovedDate()); + treeMap3.put("移出经营异常名录原因", proBusinessRisk.getRemovedCause()); + treeMap3.put("移出决定机关 ", proBusinessRisk.getRemovedOrganization()); PdfPTable table3 = returnPdfPTable(treeMap3); document.add(table3); @@ -502,39 +525,38 @@ public class ProjectDueDiligenceController { HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 14, Font.BOLD); document.add(HeaderAndFooterEvent.AddParagraph("核心团队:", 0, 1.5f)); ProCoreTeam proCoreTeam = projectDueDiligenceService.getProCoreTeamListByFlowId(flowId).get(0); - TreeMap treeMap4=new TreeMap<>(); - treeMap4.put("姓名",proCoreTeam.getName()); - treeMap4.put("职位",proCoreTeam.getDuty()); - treeMap4.put("简介",proCoreTeam.getIntroduction()); + TreeMap treeMap4 = new TreeMap<>(); + treeMap4.put("姓名", proCoreTeam.getName()); + treeMap4.put("职位", proCoreTeam.getDuty()); + treeMap4.put("简介", proCoreTeam.getIntroduction()); PdfPTable table4 = returnPdfPTable(treeMap4); document.add(table4); HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 14, Font.BOLD); document.add(HeaderAndFooterEvent.AddParagraph("核心业务:", 0, 1.5f)); ProCoreBusiness proCoreBusiness = projectDueDiligenceService.getProCoreBusinessListByFlowId(flowId).get(0); - TreeMap treeMap42=new TreeMap<>(); - treeMap42.put("产品名称",proCoreBusiness.getProductnameName()); - treeMap42.put("行业",proCoreBusiness.getIndustry()); - treeMap42.put("产品介绍",proCoreBusiness.getProductIntroduction()); + TreeMap treeMap42 = new TreeMap<>(); + treeMap42.put("产品名称", proCoreBusiness.getProductnameName()); + treeMap42.put("行业", proCoreBusiness.getIndustry()); + treeMap42.put("产品介绍", proCoreBusiness.getProductIntroduction()); PdfPTable table42 = returnPdfPTable(treeMap42); document.add(table42); HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 14, Font.BOLD); document.add(HeaderAndFooterEvent.AddParagraph("相关竞品:", 0, 1.5f)); ProCoreCompPro proCoreCompPro = projectDueDiligenceService.getProCoreCompProListByFlowId(flowId).get(0); - TreeMap treeMap43=new TreeMap<>(); - treeMap43.put("竞品名称",proCoreCompPro.getCompProName()); - treeMap43.put("地区",proCoreCompPro.getIndustry()); - treeMap43.put("当前融资轮次",proCoreCompPro.getArea()); - treeMap43.put("行业",proCoreCompPro.getIndustry()); - treeMap43.put("业务",proCoreCompPro.getBusiness()); - treeMap43.put("成立时间",proCoreCompPro.getCreateDate()); - treeMap43.put("估值",proCoreCompPro.getValuation()); + TreeMap treeMap43 = new TreeMap<>(); + treeMap43.put("竞品名称", proCoreCompPro.getCompProName()); + treeMap43.put("地区", proCoreCompPro.getIndustry()); + treeMap43.put("当前融资轮次", proCoreCompPro.getArea()); + treeMap43.put("行业", proCoreCompPro.getIndustry()); + treeMap43.put("业务", proCoreCompPro.getBusiness()); + treeMap43.put("成立时间", proCoreCompPro.getCreateDate()); + treeMap43.put("估值", proCoreCompPro.getValuation()); PdfPTable table43 = returnPdfPTable(treeMap43); document.add(table43); - HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 16, Font.BOLD); Paragraph p15 = HeaderAndFooterEvent.AddParagraph("五、经营状况", 0, 1.5f); document.add(p15); @@ -542,44 +564,44 @@ public class ProjectDueDiligenceController { HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 14, Font.BOLD); document.add(HeaderAndFooterEvent.AddParagraph("公司招聘:", 0, 1.5f)); ProManaSituRecruit proManaSituRecruit = projectDueDiligenceService.getProManaSituRecruitListByFlowId(flowId).get(0); - TreeMap treeMap51=new TreeMap<>(); - treeMap51.put("发布日期",proManaSituRecruit.getReleaseDate()); - treeMap51.put("招聘职位",proManaSituRecruit.getDuty()); - treeMap51.put("月薪",proManaSituRecruit.getSalary()); - treeMap51.put("学历",proManaSituRecruit.getDegrees()); - treeMap51.put("工作经验",proManaSituRecruit.getExperience()); - treeMap51.put("地区",proManaSituRecruit.getArea()); + TreeMap treeMap51 = new TreeMap<>(); + treeMap51.put("发布日期", proManaSituRecruit.getReleaseDate()); + treeMap51.put("招聘职位", proManaSituRecruit.getDuty()); + treeMap51.put("月薪", proManaSituRecruit.getSalary()); + treeMap51.put("学历", proManaSituRecruit.getDegrees()); + treeMap51.put("工作经验", proManaSituRecruit.getExperience()); + treeMap51.put("地区", proManaSituRecruit.getArea()); PdfPTable table51 = returnPdfPTable(treeMap51); document.add(table51); HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 14, Font.BOLD); document.add(HeaderAndFooterEvent.AddParagraph("抽查检查:", 0, 1.5f)); ProManaSituCheck proManaSituCheck = projectDueDiligenceService.getProManaSituCheckListByFlowId(flowId).get(0); - TreeMap treeMap52=new TreeMap<>(); - treeMap52.put("日期",proManaSituCheck.getCheckDate()); - treeMap52.put("类型",proManaSituCheck.getCheckType()); - treeMap52.put("结果",proManaSituCheck.getConsequence()); - treeMap52.put("检查实施机关",proManaSituCheck.getOrganization()); + TreeMap treeMap52 = new TreeMap<>(); + treeMap52.put("日期", proManaSituCheck.getCheckDate()); + treeMap52.put("类型", proManaSituCheck.getCheckType()); + treeMap52.put("结果", proManaSituCheck.getConsequence()); + treeMap52.put("检查实施机关", proManaSituCheck.getOrganization()); PdfPTable table52 = returnPdfPTable(treeMap52); document.add(table52); HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 14, Font.BOLD); document.add(HeaderAndFooterEvent.AddParagraph("行政许可:", 0, 1.5f)); ProManaSituLicense proManaSituLicense = projectDueDiligenceService.getProManaSituLicenseListByFlowId(flowId).get(0); - TreeMap treeMap53=new TreeMap<>(); - treeMap53.put("行政许可文书号",proManaSituLicense.getWrittenDecisionNum()); - treeMap53.put("许可决定机关",proManaSituLicense.getOrganization()); - treeMap53.put("许可决定日期",proManaSituLicense.getLicenseDate()); + TreeMap treeMap53 = new TreeMap<>(); + treeMap53.put("行政许可文书号", proManaSituLicense.getWrittenDecisionNum()); + treeMap53.put("许可决定机关", proManaSituLicense.getOrganization()); + treeMap53.put("许可决定日期", proManaSituLicense.getLicenseDate()); PdfPTable table53 = returnPdfPTable(treeMap53); document.add(table53); HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 14, Font.BOLD); document.add(HeaderAndFooterEvent.AddParagraph("招投标:", 0, 1.5f)); ProManaSituTenderingBidding proManaSituTenderingBidding = projectDueDiligenceService.getProManaSituTenderingBiddingListByFlowId(flowId).get(0); - TreeMap treeMap54=new TreeMap<>(); - treeMap54.put("发布日期",proManaSituTenderingBidding.getReleaseDate()); - treeMap54.put("标题",proManaSituTenderingBidding.getTitle()); - treeMap54.put("采购人",proManaSituTenderingBidding.getPurchaser()); + TreeMap treeMap54 = new TreeMap<>(); + treeMap54.put("发布日期", proManaSituTenderingBidding.getReleaseDate()); + treeMap54.put("标题", proManaSituTenderingBidding.getTitle()); + treeMap54.put("采购人", proManaSituTenderingBidding.getPurchaser()); PdfPTable table54 = returnPdfPTable(treeMap54); document.add(table54); @@ -590,23 +612,23 @@ public class ProjectDueDiligenceController { HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 14, Font.BOLD); document.add(HeaderAndFooterEvent.AddParagraph("专利信息:", 0, 1.5f)); ProIntelPropertyPatentinfo proIntelPropertyPatentinfo = projectDueDiligenceService.getProIntelPropertyPatentInfoListByFlowId(flowId).get(0); - TreeMap treeMap61=new TreeMap<>(); - treeMap61.put("申请公布日",proIntelPropertyPatentinfo.getPublishDate()); - treeMap61.put("专利名称",proIntelPropertyPatentinfo.getPatentName()); - treeMap61.put("申请号",proIntelPropertyPatentinfo.getApplicationNum()); - treeMap61.put("申请公布号",proIntelPropertyPatentinfo.getApplicationPubNum()); - treeMap61.put("专利类型",proIntelPropertyPatentinfo.getPatentType()); + TreeMap treeMap61 = new TreeMap<>(); + treeMap61.put("申请公布日", proIntelPropertyPatentinfo.getPublishDate()); + treeMap61.put("专利名称", proIntelPropertyPatentinfo.getPatentName()); + treeMap61.put("申请号", proIntelPropertyPatentinfo.getApplicationNum()); + treeMap61.put("申请公布号", proIntelPropertyPatentinfo.getApplicationPubNum()); + treeMap61.put("专利类型", proIntelPropertyPatentinfo.getPatentType()); PdfPTable table61 = returnPdfPTable(treeMap61); document.add(table61); HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 14, Font.BOLD); document.add(HeaderAndFooterEvent.AddParagraph("网站备案:", 0, 1.5f)); ProIntelPropertyWebsiteRecord proIntelPropertyWebsiteRecord = projectDueDiligenceService.getProIntelPropertyWebsiteRecordListByFlowId(flowId).get(0); - TreeMap treeMap62=new TreeMap<>(); - treeMap62.put("审核日期",proIntelPropertyWebsiteRecord.getReviewDate()); - treeMap62.put("网站名称",proIntelPropertyWebsiteRecord.getWebsiteName()); - treeMap62.put("IP地址",proIntelPropertyWebsiteRecord.getIpAddress()); - treeMap62.put("域名信息",proIntelPropertyWebsiteRecord.getDomainNameInfo()); + TreeMap treeMap62 = new TreeMap<>(); + treeMap62.put("审核日期", proIntelPropertyWebsiteRecord.getReviewDate()); + treeMap62.put("网站名称", proIntelPropertyWebsiteRecord.getWebsiteName()); + treeMap62.put("IP地址", proIntelPropertyWebsiteRecord.getIpAddress()); + treeMap62.put("域名信息", proIntelPropertyWebsiteRecord.getDomainNameInfo()); PdfPTable table62 = returnPdfPTable(treeMap62); document.add(table62); @@ -617,13 +639,13 @@ public class ProjectDueDiligenceController { HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 14, Font.BOLD); document.add(HeaderAndFooterEvent.AddParagraph("行政处罚:", 0, 1.5f)); ProAdminiPenalty proAdminiPenalty = projectDueDiligenceService.getProAdminiPenaltyListByFlowId(flowId).get(0); - TreeMap treeMap7=new TreeMap<>(); - treeMap7.put("公司名称",projectPoolName); - treeMap7.put("决定日期",proAdminiPenalty.getDecisionDate()); - treeMap7.put("决定书文号",proAdminiPenalty.getWrittenDecisionNum()); - treeMap7.put("处罚事由",proAdminiPenalty.getPunishmentCause()); - treeMap7.put("处罚结果",proAdminiPenalty.getPunishmentResult()); - treeMap7.put("处罚机关",proAdminiPenalty.getPunishmentOrganization()); + TreeMap treeMap7 = new TreeMap<>(); + treeMap7.put("公司名称", projectPoolName); + treeMap7.put("决定日期", proAdminiPenalty.getDecisionDate()); + treeMap7.put("决定书文号", proAdminiPenalty.getWrittenDecisionNum()); + treeMap7.put("处罚事由", proAdminiPenalty.getPunishmentCause()); + treeMap7.put("处罚结果", proAdminiPenalty.getPunishmentResult()); + treeMap7.put("处罚机关", proAdminiPenalty.getPunishmentOrganization()); PdfPTable table7 = returnPdfPTable(treeMap7); document.add(table7); @@ -642,7 +664,7 @@ public class ProjectDueDiligenceController { PdfPTable table8 = new PdfPTable(4); table8.setWidthPercentage(100);//设置表格宽度占用百分比 - List headList1=new ArrayList<>(); + List headList1 = new ArrayList<>(); headList1.add("项目"); headList1.add("2022-12-31"); headList1.add("2021-12-31"); @@ -650,12 +672,12 @@ public class ProjectDueDiligenceController { PdfPTable table8return = setPdfPTableHead(table8, headList1); for (int i = 0; i < financialIndexDetailList.size(); i++) { ProFinancialIndexDetail proFinancialIndexDetail = financialIndexDetailList.get(i); - List headList2=new ArrayList<>(); + List headList2 = new ArrayList<>(); headList2.add(proFinancialIndexDetail.getName()); headList2.add(proFinancialIndexDetail.getLastYearValue()); headList2.add(proFinancialIndexDetail.getLastTowYearValue()); headList2.add(proFinancialIndexDetail.getLastThreeYearValue()); - table8return=setPdfPTableHead(table8return, headList2); + table8return = setPdfPTableHead(table8return, headList2); } document.add(table8return); @@ -679,12 +701,12 @@ public class ProjectDueDiligenceController { PdfPTable table82return = setPdfPTableHead(table82, headList1); for (int i = 0; i < financialStatementDetailList.size(); i++) { ProFinancialStatementDetail proFinancialStatementDetail = financialStatementDetailList.get(i); - List headList82=new ArrayList<>(); + List headList82 = new ArrayList<>(); headList82.add(proFinancialStatementDetail.getName()); headList82.add(proFinancialStatementDetail.getLastYearValue()); headList82.add(proFinancialStatementDetail.getLastTowYearValue()); headList82.add(proFinancialStatementDetail.getLastThreeYearValue()); - table82return=setPdfPTableHead(table82return, headList82); + table82return = setPdfPTableHead(table82return, headList82); } document.add(table82return); @@ -710,12 +732,12 @@ public class ProjectDueDiligenceController { PdfPTable table83return = setPdfPTableHead(table83, headList1); for (int i = 0; i < financialStatementDetailList83.size(); i++) { ProFinancialStatementDetail proFinancialStatementDetail = financialStatementDetailList83.get(i); - List headList83=new ArrayList<>(); + List headList83 = new ArrayList<>(); headList83.add(proFinancialStatementDetail.getName()); headList83.add(proFinancialStatementDetail.getLastYearValue()); headList83.add(proFinancialStatementDetail.getLastTowYearValue()); headList83.add(proFinancialStatementDetail.getLastThreeYearValue()); - table83return=setPdfPTableHead(table83return, headList83); + table83return = setPdfPTableHead(table83return, headList83); } document.add(table83return); @@ -741,20 +763,20 @@ public class ProjectDueDiligenceController { PdfPTable table84return = setPdfPTableHead(table84, headList1); for (int i = 0; i < financialStatementDetailList84.size(); i++) { ProFinancialStatementDetail proFinancialStatementDetail = financialStatementDetailList84.get(i); - List headList84=new ArrayList<>(); + List headList84 = new ArrayList<>(); headList84.add(proFinancialStatementDetail.getName()); headList84.add(proFinancialStatementDetail.getLastYearValue()); headList84.add(proFinancialStatementDetail.getLastTowYearValue()); headList84.add(proFinancialStatementDetail.getLastThreeYearValue()); - table84return=setPdfPTableHead(table84return, headList84); + table84return = setPdfPTableHead(table84return, headList84); } document.add(table84return); document.close(); } - public PdfPTable returnPdfPTable(TreeMap treeMap){ - PdfPTable table =new PdfPTable(2); //两列 + public PdfPTable returnPdfPTable(TreeMap treeMap) { + PdfPTable table = new PdfPTable(2); //两列 table.setWidthPercentage(100);//设置表格宽度占用百分比 for (Map.Entry entry : treeMap.entrySet()) { String key = entry.getKey(); @@ -773,7 +795,7 @@ public class ProjectDueDiligenceController { return table; } - public PdfPTable setPdfPTableHead(PdfPTable table,List list){ + public PdfPTable setPdfPTableHead(PdfPTable table, List list) { for (int i = 0; i < list.size(); i++) { HeaderAndFooterEvent.SetFont(BaseColor.BLACK, "黑体", 12, Font.NORMAL); PdfPCell cell_data1 = new PdfPCell(HeaderAndFooterEvent.AddParagraph(list.get(i), 0, 1.5f)); From ee0ba6d857316b58767b4f3a67a0204ed058a600 Mon Sep 17 00:00:00 2001 From: xiaoCJ <406612557@qq.com> Date: Thu, 21 Dec 2023 17:46:41 +0800 Subject: [PATCH 10/18] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=80=80=E5=87=BA?= =?UTF-8?q?=E6=97=B6=E6=9C=BA=E8=A1=A8=EF=BC=8C=E5=AE=8C=E6=88=90=E6=8A=95?= =?UTF-8?q?=E8=B5=84=E6=8A=A5=E5=91=8A=E9=A1=B5=E9=9D=A2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ProfitDistributionController.java | 8 ++++++-- .../service/serviceImpl/ProfitManagementServiceImpl.java | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/sztzjy/fund_investment/controller/ProfitDistributionController.java b/src/main/java/com/sztzjy/fund_investment/controller/ProfitDistributionController.java index beed75f..70c1963 100644 --- a/src/main/java/com/sztzjy/fund_investment/controller/ProfitDistributionController.java +++ b/src/main/java/com/sztzjy/fund_investment/controller/ProfitDistributionController.java @@ -1,6 +1,7 @@ package com.sztzjy.fund_investment.controller; import com.sztzjy.fund_investment.annotation.AnonymousAccess; +import com.sztzjy.fund_investment.entity.Fundraising; import com.sztzjy.fund_investment.entity.ProfitDistribution; import com.sztzjy.fund_investment.service.ISysFundraisingService; import com.sztzjy.fund_investment.service.ProfitDistributionService; @@ -42,8 +43,11 @@ public class ProfitDistributionController { @PostMapping("/getType") @ApiOperation("返回基金募集的类型") public Integer submit(@RequestParam String flowId) { - return fundraisingService.selectByFlowId(flowId).getType(); - + Fundraising fundraising = fundraisingService.selectByFlowId(flowId); + if (fundraising!=null) { + return fundraising.getType(); + } + return null; } } diff --git a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/ProfitManagementServiceImpl.java b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/ProfitManagementServiceImpl.java index 0db1ed8..76899a1 100644 --- a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/ProfitManagementServiceImpl.java +++ b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/ProfitManagementServiceImpl.java @@ -99,6 +99,9 @@ public class ProfitManagementServiceImpl implements ProfitManagementService { } else { ExitTime exitTime = new ExitTime(); List profitManagementList = getLineChart(flowId); + if (profitManagementList.isEmpty()){ + return null; + } ProfitManagement profitManagement = profitManagementList.get(0); exitTime.setFlowId(flowId); exitTime.setProjectName(profitManagement.getProjectName()); From 9f0ff3c1ed3b712a8ebc2bfc64389c050c32d82b Mon Sep 17 00:00:00 2001 From: xiaoCJ <406612557@qq.com> Date: Fri, 22 Dec 2023 08:41:50 +0800 Subject: [PATCH 11/18] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=80=80=E5=87=BA?= =?UTF-8?q?=E6=97=B6=E6=9C=BA=E8=A1=A8=EF=BC=8C=E5=AE=8C=E6=88=90=E6=8A=95?= =?UTF-8?q?=E8=B5=84=E6=8A=A5=E5=91=8A=E9=A1=B5=E9=9D=A2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fund_investment/service/serviceImpl/TopicServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/TopicServiceImpl.java b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/TopicServiceImpl.java index 5dcb228..1abeabf 100644 --- a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/TopicServiceImpl.java +++ b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/TopicServiceImpl.java @@ -223,10 +223,10 @@ public class TopicServiceImpl implements TopicService { } // 调用计分方法 if (module.equals(Constant.ZSCETK)) { - performanceScoreService.calculateScoreByModule("knowledgeAssessmentScore", score, flowId); //标记完成时间 performanceScore.setKnowledgeAssessmentTime(new Date()); performanceScoreMapper.updateByPrimaryKey(performanceScore); + performanceScoreService.calculateScoreByModule("knowledgeAssessmentScore", score, flowId); } if (module.equals(Constant.XMJDTK)) { performanceScoreService.calculateScoreByModule("projectDueDiligenceScore", score, flowId); From 94992317b4e9234bf6750eb27f8aa7fc11145400 Mon Sep 17 00:00:00 2001 From: xiaoCJ <406612557@qq.com> Date: Fri, 22 Dec 2023 11:17:42 +0800 Subject: [PATCH 12/18] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=80=80=E5=87=BA?= =?UTF-8?q?=E6=97=B6=E6=9C=BA=E8=A1=A8=EF=BC=8C=E5=AE=8C=E6=88=90=E6=8A=95?= =?UTF-8?q?=E8=B5=84=E6=8A=A5=E5=91=8A=E9=A1=B5=E9=9D=A2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fund_investment/entity/TopicRecord.java | 8 ++--- .../entity/TopicRecordExample.java | 30 +++++++------------ .../mapper/TopicRecordMapper.java | 4 +-- .../service/serviceImpl/TopicServiceImpl.java | 10 +++---- .../resources/mappers/TopicRecordMapper.xml | 22 +++++++------- 5 files changed, 31 insertions(+), 43 deletions(-) diff --git a/src/main/java/com/sztzjy/fund_investment/entity/TopicRecord.java b/src/main/java/com/sztzjy/fund_investment/entity/TopicRecord.java index 9f4d773..c90117d 100644 --- a/src/main/java/com/sztzjy/fund_investment/entity/TopicRecord.java +++ b/src/main/java/com/sztzjy/fund_investment/entity/TopicRecord.java @@ -7,7 +7,7 @@ import io.swagger.annotations.ApiModelProperty; * topic_record */ public class TopicRecord { - private String id; + private Integer id; @ApiModelProperty("题目ID") private String topicId; @@ -41,12 +41,12 @@ public class TopicRecord { @ApiModelProperty("正确答案") private String answer; - public String getId() { + public Integer getId() { return id; } - public void setId(String id) { - this.id = id == null ? null : id.trim(); + public void setId(Integer id) { + this.id = id; } public String getTopicId() { diff --git a/src/main/java/com/sztzjy/fund_investment/entity/TopicRecordExample.java b/src/main/java/com/sztzjy/fund_investment/entity/TopicRecordExample.java index ffcbea6..7e1eb45 100644 --- a/src/main/java/com/sztzjy/fund_investment/entity/TopicRecordExample.java +++ b/src/main/java/com/sztzjy/fund_investment/entity/TopicRecordExample.java @@ -114,62 +114,52 @@ public class TopicRecordExample { return (Criteria) this; } - public Criteria andIdEqualTo(String value) { + public Criteria andIdEqualTo(Integer value) { addCriterion("id =", value, "id"); return (Criteria) this; } - public Criteria andIdNotEqualTo(String value) { + public Criteria andIdNotEqualTo(Integer value) { addCriterion("id <>", value, "id"); return (Criteria) this; } - public Criteria andIdGreaterThan(String value) { + public Criteria andIdGreaterThan(Integer value) { addCriterion("id >", value, "id"); return (Criteria) this; } - public Criteria andIdGreaterThanOrEqualTo(String value) { + public Criteria andIdGreaterThanOrEqualTo(Integer value) { addCriterion("id >=", value, "id"); return (Criteria) this; } - public Criteria andIdLessThan(String value) { + public Criteria andIdLessThan(Integer value) { addCriterion("id <", value, "id"); return (Criteria) this; } - public Criteria andIdLessThanOrEqualTo(String value) { + public Criteria andIdLessThanOrEqualTo(Integer value) { addCriterion("id <=", value, "id"); return (Criteria) this; } - public Criteria andIdLike(String value) { - addCriterion("id like", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotLike(String value) { - addCriterion("id not like", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { + public Criteria andIdIn(List values) { addCriterion("id in", values, "id"); return (Criteria) this; } - public Criteria andIdNotIn(List values) { + public Criteria andIdNotIn(List values) { addCriterion("id not in", values, "id"); return (Criteria) this; } - public Criteria andIdBetween(String value1, String value2) { + public Criteria andIdBetween(Integer value1, Integer value2) { addCriterion("id between", value1, value2, "id"); return (Criteria) this; } - public Criteria andIdNotBetween(String value1, String value2) { + public Criteria andIdNotBetween(Integer value1, Integer value2) { addCriterion("id not between", value1, value2, "id"); return (Criteria) this; } diff --git a/src/main/java/com/sztzjy/fund_investment/mapper/TopicRecordMapper.java b/src/main/java/com/sztzjy/fund_investment/mapper/TopicRecordMapper.java index 184bf28..b1b5827 100644 --- a/src/main/java/com/sztzjy/fund_investment/mapper/TopicRecordMapper.java +++ b/src/main/java/com/sztzjy/fund_investment/mapper/TopicRecordMapper.java @@ -12,7 +12,7 @@ public interface TopicRecordMapper { int deleteByExample(TopicRecordExample example); - int deleteByPrimaryKey(String id); + int deleteByPrimaryKey(Integer id); int insert(TopicRecord record); @@ -20,7 +20,7 @@ public interface TopicRecordMapper { List selectByExample(TopicRecordExample example); - TopicRecord selectByPrimaryKey(String id); + TopicRecord selectByPrimaryKey(Integer id); int updateByExampleSelective(@Param("record") TopicRecord record, @Param("example") TopicRecordExample example); diff --git a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/TopicServiceImpl.java b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/TopicServiceImpl.java index 1abeabf..93c9edd 100644 --- a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/TopicServiceImpl.java +++ b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/TopicServiceImpl.java @@ -154,7 +154,6 @@ public class TopicServiceImpl implements TopicService { return new ResultEntity>(HttpStatus.BAD_REQUEST, "请勿重复提交!"); } int score = 0; - List list = new ArrayList<>(); String module = ""; for (TopicsWithBLOBs topic : topics) { String userAnswer = topic.getUserAnswer(); @@ -195,8 +194,6 @@ public class TopicServiceImpl implements TopicService { } //添加到答题记录表 TopicRecord topicRecord = new TopicRecord(); - String recordId = IdUtil.simpleUUID(); - topicRecord.setId(recordId); topicRecord.setTopicId(topicId); topicRecord.setUserAnswer(userAnswer); topicRecord.setAnswer(rightAnswer); @@ -213,7 +210,6 @@ public class TopicServiceImpl implements TopicService { topicRecord.setModule(module); topicRecord.setTopicType(topicType); topicRecordMapper.insert(topicRecord); - list.add(recordId); } PerformanceScore performanceScore = performanceScoreService.getByFlowId(flowId); @@ -244,7 +240,7 @@ public class TopicServiceImpl implements TopicService { performanceScoreMapper.updateByPrimaryKey(performanceScore); performanceScoreService.calculateScoreByModule("ipoListedConditionScore", score, flowId); } - return new ResultEntity<>(list); + return new ResultEntity<>(HttpStatus.OK,"提交成功!"); } @@ -318,7 +314,9 @@ public class TopicServiceImpl implements TopicService { public List getTopicRecord(String flowId, String module) { TopicRecordExample example = new TopicRecordExample(); example.createCriteria().andModuleEqualTo(module).andFlowIdEqualTo(flowId); - return topicRecordMapper.selectByExample(example); + example.setOrderByClause("id"); + List list = topicRecordMapper.selectByExample(example); + return list; } diff --git a/src/main/resources/mappers/TopicRecordMapper.xml b/src/main/resources/mappers/TopicRecordMapper.xml index 66e9ddc..860467c 100644 --- a/src/main/resources/mappers/TopicRecordMapper.xml +++ b/src/main/resources/mappers/TopicRecordMapper.xml @@ -2,7 +2,7 @@ - + @@ -92,15 +92,15 @@ order by ${orderByClause} - select from topic_record - where id = #{id,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} - + delete from topic_record - where id = #{id,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} delete from topic_record @@ -114,7 +114,7 @@ choicesA, choicesB, choicesC, choicesD, choicesE, user_answer, answer) - values (#{id,jdbcType=VARCHAR}, #{topicId,jdbcType=VARCHAR}, #{flowId,jdbcType=VARCHAR}, + values (#{id,jdbcType=INTEGER}, #{topicId,jdbcType=VARCHAR}, #{flowId,jdbcType=VARCHAR}, #{module,jdbcType=VARCHAR}, #{topicContent,jdbcType=VARCHAR}, #{topicType,jdbcType=VARCHAR}, #{choicesa,jdbcType=VARCHAR}, #{choicesb,jdbcType=VARCHAR}, #{choicesc,jdbcType=VARCHAR}, #{choicesd,jdbcType=VARCHAR}, #{choicese,jdbcType=VARCHAR}, #{userAnswer,jdbcType=VARCHAR}, @@ -165,7 +165,7 @@ - #{id,jdbcType=VARCHAR}, + #{id,jdbcType=INTEGER}, #{topicId,jdbcType=VARCHAR}, @@ -215,7 +215,7 @@ update topic_record - id = #{record.id,jdbcType=VARCHAR}, + id = #{record.id,jdbcType=INTEGER}, topic_id = #{record.topicId,jdbcType=VARCHAR}, @@ -260,7 +260,7 @@ update topic_record - set id = #{record.id,jdbcType=VARCHAR}, + set id = #{record.id,jdbcType=INTEGER}, topic_id = #{record.topicId,jdbcType=VARCHAR}, flow_id = #{record.flowId,jdbcType=VARCHAR}, module = #{record.module,jdbcType=VARCHAR}, @@ -317,7 +317,7 @@ answer = #{answer,jdbcType=VARCHAR}, - where id = #{id,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} update topic_record @@ -333,6 +333,6 @@ choicesE = #{choicese,jdbcType=VARCHAR}, user_answer = #{userAnswer,jdbcType=VARCHAR}, answer = #{answer,jdbcType=VARCHAR} - where id = #{id,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} \ No newline at end of file From b0b97c5d61d4a76684c462ef2048f83d1d8f7477 Mon Sep 17 00:00:00 2001 From: yz <3614508250@qq.com> Date: Fri, 22 Dec 2023 11:18:31 +0800 Subject: [PATCH 13/18] =?UTF-8?q?=E4=BF=AE=E5=A4=8DBug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/FundraisingController.java | 36 +++++++++---------- .../util/pdfUtils/HeaderAndFooterEvent.java | 3 +- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/src/main/java/com/sztzjy/fund_investment/controller/FundraisingController.java b/src/main/java/com/sztzjy/fund_investment/controller/FundraisingController.java index 1d7abda..92905d1 100644 --- a/src/main/java/com/sztzjy/fund_investment/controller/FundraisingController.java +++ b/src/main/java/com/sztzjy/fund_investment/controller/FundraisingController.java @@ -48,7 +48,7 @@ public class FundraisingController { @ApiParam("自有资金") @RequestParam BigDecimal ownFunds, @ApiParam("银行借款") @RequestParam (required = false)BigDecimal bankLoan, @ApiParam("优先级LP") @RequestParam BigDecimal priorityLP, - @ApiParam("劣后级LP") @RequestParam(required = false) BigDecimal subordinatedLP, + @ApiParam("劣后级LP") @RequestParam(required = false) BigDecimal subordinatedLp, @ApiParam("基金募资金额(为前面四个参数之和)") @RequestParam BigDecimal fundraisingAmount) { if (ownFunds.add(priorityLP).compareTo(BigDecimal.valueOf(1000000))<0){ performanceScoreService.calculateScoreByModule("fundraisingScore",0,flowId); @@ -59,60 +59,60 @@ public class FundraisingController { } Fundraising fundraising = new Fundraising(); //判断基金募集类型 1:自有资金/优先级LP、2:自有资金/优先级LP/劣后级LP、3:自有资金/优先级LP/银行借款、4:自有资金/优先级LP/劣后级LP/银行借款 - if(subordinatedLP!=null){ - if(bankLoan!=null){ + if(subordinatedLp.compareTo(BigDecimal.ZERO)!=0){ + if(bankLoan.compareTo(BigDecimal.ZERO)!=0){ fundraising.setType(4); - BigDecimal totalFunds = priorityLP.add(ownFunds).add(subordinatedLP).add(bankLoan); - if(ownFunds.divide(totalFunds).compareTo(new BigDecimal("0.05"))>0){ + BigDecimal totalFunds = priorityLP.add(ownFunds).add(subordinatedLp).add(bankLoan); + if(ownFunds.divide(totalFunds,4,BigDecimal.ROUND_HALF_UP).compareTo(new BigDecimal("0.05"))>0){ performanceScoreService.calculateScoreByModule("fundraisingScore",0,flowId); return new ResultEntity(HttpStatus.BAD_REQUEST,"新增基金募资失败,类型4,自有资金不能超过总资金的5%"); } - if(priorityLP.divide(totalFunds).compareTo(new BigDecimal("0.6"))<0){ + if(priorityLP.divide(totalFunds,4,BigDecimal.ROUND_HALF_UP).compareTo(new BigDecimal("0.6"))<0){ performanceScoreService.calculateScoreByModule("fundraisingScore",0,flowId); return new ResultEntity(HttpStatus.BAD_REQUEST,"新增基金募资失败,类型4,优先级LP不能低于总资金的60%"); } - if(subordinatedLP.divide(totalFunds).compareTo(new BigDecimal("0.3"))<0){ + if(subordinatedLp.divide(totalFunds,4,BigDecimal.ROUND_HALF_UP).compareTo(new BigDecimal("0.3"))<0){ performanceScoreService.calculateScoreByModule("fundraisingScore",0,flowId); return new ResultEntity(HttpStatus.BAD_REQUEST,"新增基金募资失败,类型4,劣后级LP不能低于总资金的30%"); } - if(bankLoan.divide(totalFunds).compareTo(new BigDecimal("0.05"))<0){ + if(bankLoan.divide(totalFunds,4,BigDecimal.ROUND_HALF_UP).compareTo(new BigDecimal("0.05"))<0){ performanceScoreService.calculateScoreByModule("fundraisingScore",0,flowId); return new ResultEntity(HttpStatus.BAD_REQUEST,"新增基金募资失败,类型4,银行借款不能低于总资金的5%"); } }else { - BigDecimal totalFunds = priorityLP.add(ownFunds).add(subordinatedLP); - if(ownFunds.divide(totalFunds).compareTo(new BigDecimal("0.1"))>0){ + BigDecimal totalFunds = priorityLP.add(ownFunds).add(subordinatedLp); + if(ownFunds.divide(totalFunds,4,BigDecimal.ROUND_HALF_UP).compareTo(new BigDecimal("0.1"))>0){ performanceScoreService.calculateScoreByModule("fundraisingScore",0,flowId); return new ResultEntity(HttpStatus.BAD_REQUEST,"新增基金募资失败,类型2,自有资金不能超过总资金的10%"); } - if(priorityLP.divide(totalFunds).compareTo(new BigDecimal("0.6"))<0){ + if(priorityLP.divide(totalFunds,4,BigDecimal.ROUND_HALF_UP).compareTo(new BigDecimal("0.6"))<0){ performanceScoreService.calculateScoreByModule("fundraisingScore",0,flowId); return new ResultEntity(HttpStatus.BAD_REQUEST,"新增基金募资失败,类型2,优先级LP不能低于总资金的60%"); } - if(subordinatedLP.divide(totalFunds).compareTo(new BigDecimal("0.3"))<0){ + if(subordinatedLp.divide(totalFunds,4,BigDecimal.ROUND_HALF_UP).compareTo(new BigDecimal("0.3"))<0){ performanceScoreService.calculateScoreByModule("fundraisingScore",0,flowId); return new ResultEntity(HttpStatus.BAD_REQUEST,"新增基金募资失败,类型2,劣后级LP不能低于总资金的30%"); } fundraising.setType(2); } }else { - if(bankLoan!=null){ + if(bankLoan.compareTo(BigDecimal.ZERO)!=0){ BigDecimal totalFunds = priorityLP.add(ownFunds).add(bankLoan); - if(ownFunds.divide(totalFunds).compareTo(new BigDecimal("0.1"))>0){ + if(ownFunds.divide(totalFunds,4,BigDecimal.ROUND_HALF_UP).compareTo(new BigDecimal("0.1"))>0){ performanceScoreService.calculateScoreByModule("fundraisingScore",0,flowId); return new ResultEntity(HttpStatus.BAD_REQUEST,"新增基金募资失败,类型3,自有资金不能超过总资金的10%"); } - if(priorityLP.divide(totalFunds).compareTo(new BigDecimal("0.6"))<0){ + if(priorityLP.divide(totalFunds,4,BigDecimal.ROUND_HALF_UP).compareTo(new BigDecimal("0.6"))<0){ performanceScoreService.calculateScoreByModule("fundraisingScore",0,flowId); return new ResultEntity(HttpStatus.BAD_REQUEST,"新增基金募资失败,类型3,优先级LP不能低于总资金的60%"); } - if(bankLoan.divide(totalFunds).compareTo(new BigDecimal("0.3"))<0){ + if(bankLoan.divide(totalFunds,4,BigDecimal.ROUND_HALF_UP).compareTo(new BigDecimal("0.3"))<0){ performanceScoreService.calculateScoreByModule("fundraisingScore",0,flowId); return new ResultEntity(HttpStatus.BAD_REQUEST,"新增基金募资失败,类型3,银行借款不能低于总资金的30%"); } fundraising.setType(3); }else { - if(ownFunds.divide(priorityLP.add(ownFunds)).compareTo(new BigDecimal("0.1"))>0){ + if(ownFunds.divide(priorityLP.add(ownFunds),4,BigDecimal.ROUND_HALF_UP).compareTo(new BigDecimal("0.1"))>0){ performanceScoreService.calculateScoreByModule("fundraisingScore",0,flowId); return new ResultEntity(HttpStatus.BAD_REQUEST,"新增基金募资失败,类型1,自有资金不能超过总资金的10%"); } @@ -124,7 +124,7 @@ public class FundraisingController { fundraising.setOwnFunds(ownFunds); fundraising.setBankLoan(bankLoan); fundraising.setPriorityLp(priorityLP); - fundraising.setSubordinatedLp(subordinatedLP); + fundraising.setSubordinatedLp(subordinatedLp); fundraising.setFundraisingAmount(fundraisingAmount); Boolean aBoolean = fundraisingService.insertFundraising(fundraising); if(aBoolean){ diff --git a/src/main/java/com/sztzjy/fund_investment/util/pdfUtils/HeaderAndFooterEvent.java b/src/main/java/com/sztzjy/fund_investment/util/pdfUtils/HeaderAndFooterEvent.java index f5b1de5..cb1dc6f 100644 --- a/src/main/java/com/sztzjy/fund_investment/util/pdfUtils/HeaderAndFooterEvent.java +++ b/src/main/java/com/sztzjy/fund_investment/util/pdfUtils/HeaderAndFooterEvent.java @@ -41,7 +41,8 @@ public class HeaderAndFooterEvent extends PdfPageEventHelper { @SneakyThrows public static void SetFont(BaseColor color, String fontName, float size, int style) { BaseFont baseFont; - String FONT_PATH="C:/Windows/Fonts/"; +// String FONT_PATH="C:/Windows/Fonts/"; + String FONT_PATH="/usr/share/fonts/"; switch (fontName) { case "黑体": // baseFont = BaseFont.createFont("SIMHEI.TTF", BaseFont.IDENTITY_H, BaseFont.EMBEDDED); From 9c66437197f75b19fdb7e1736a04fd1b8daf2fd8 Mon Sep 17 00:00:00 2001 From: xiaoCJ <406612557@qq.com> Date: Fri, 22 Dec 2023 13:54:13 +0800 Subject: [PATCH 14/18] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=80=80=E5=87=BA?= =?UTF-8?q?=E6=97=B6=E6=9C=BA=E8=A1=A8=EF=BC=8C=E5=AE=8C=E6=88=90=E6=8A=95?= =?UTF-8?q?=E8=B5=84=E6=8A=A5=E5=91=8A=E9=A1=B5=E9=9D=A2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fund_investment/service/serviceImpl/TopicServiceImpl.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/TopicServiceImpl.java b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/TopicServiceImpl.java index 93c9edd..0d09b1a 100644 --- a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/TopicServiceImpl.java +++ b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/TopicServiceImpl.java @@ -331,7 +331,6 @@ public class TopicServiceImpl implements TopicService { if (!(IPOBKList.isEmpty()) || !(IPOTJList.isEmpty())) { return null; } - int topicCountPerModule = 3; TopicQuery topicQuery = new TopicQuery(); topicQuery.setCount(3); topicQuery.setModule(Constant.IPOBK); From db7625773220272c5c360f2898cf53db25bae0f0 Mon Sep 17 00:00:00 2001 From: xiaoCJ <406612557@qq.com> Date: Fri, 22 Dec 2023 16:09:47 +0800 Subject: [PATCH 15/18] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=80=80=E5=87=BA?= =?UTF-8?q?=E6=97=B6=E6=9C=BA=E8=A1=A8=EF=BC=8C=E5=AE=8C=E6=88=90=E6=8A=95?= =?UTF-8?q?=E8=B5=84=E6=8A=A5=E5=91=8A=E9=A1=B5=E9=9D=A2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mappers/TopicRecordMapper.xml | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/main/resources/mappers/TopicRecordMapper.xml b/src/main/resources/mappers/TopicRecordMapper.xml index 860467c..66e9ddc 100644 --- a/src/main/resources/mappers/TopicRecordMapper.xml +++ b/src/main/resources/mappers/TopicRecordMapper.xml @@ -2,7 +2,7 @@ - + @@ -92,15 +92,15 @@ order by ${orderByClause} - select from topic_record - where id = #{id,jdbcType=INTEGER} + where id = #{id,jdbcType=VARCHAR} - + delete from topic_record - where id = #{id,jdbcType=INTEGER} + where id = #{id,jdbcType=VARCHAR} delete from topic_record @@ -114,7 +114,7 @@ choicesA, choicesB, choicesC, choicesD, choicesE, user_answer, answer) - values (#{id,jdbcType=INTEGER}, #{topicId,jdbcType=VARCHAR}, #{flowId,jdbcType=VARCHAR}, + values (#{id,jdbcType=VARCHAR}, #{topicId,jdbcType=VARCHAR}, #{flowId,jdbcType=VARCHAR}, #{module,jdbcType=VARCHAR}, #{topicContent,jdbcType=VARCHAR}, #{topicType,jdbcType=VARCHAR}, #{choicesa,jdbcType=VARCHAR}, #{choicesb,jdbcType=VARCHAR}, #{choicesc,jdbcType=VARCHAR}, #{choicesd,jdbcType=VARCHAR}, #{choicese,jdbcType=VARCHAR}, #{userAnswer,jdbcType=VARCHAR}, @@ -165,7 +165,7 @@ - #{id,jdbcType=INTEGER}, + #{id,jdbcType=VARCHAR}, #{topicId,jdbcType=VARCHAR}, @@ -215,7 +215,7 @@ update topic_record - id = #{record.id,jdbcType=INTEGER}, + id = #{record.id,jdbcType=VARCHAR}, topic_id = #{record.topicId,jdbcType=VARCHAR}, @@ -260,7 +260,7 @@ update topic_record - set id = #{record.id,jdbcType=INTEGER}, + set id = #{record.id,jdbcType=VARCHAR}, topic_id = #{record.topicId,jdbcType=VARCHAR}, flow_id = #{record.flowId,jdbcType=VARCHAR}, module = #{record.module,jdbcType=VARCHAR}, @@ -317,7 +317,7 @@ answer = #{answer,jdbcType=VARCHAR}, - where id = #{id,jdbcType=INTEGER} + where id = #{id,jdbcType=VARCHAR} update topic_record @@ -333,6 +333,6 @@ choicesE = #{choicese,jdbcType=VARCHAR}, user_answer = #{userAnswer,jdbcType=VARCHAR}, answer = #{answer,jdbcType=VARCHAR} - where id = #{id,jdbcType=INTEGER} + where id = #{id,jdbcType=VARCHAR} \ No newline at end of file From 8ef5213c8a3eec99aa8cb4acaacaf6a702e38f4f Mon Sep 17 00:00:00 2001 From: xiaoCJ <406612557@qq.com> Date: Fri, 22 Dec 2023 16:13:56 +0800 Subject: [PATCH 16/18] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=80=80=E5=87=BA?= =?UTF-8?q?=E6=97=B6=E6=9C=BA=E8=A1=A8=EF=BC=8C=E5=AE=8C=E6=88=90=E6=8A=95?= =?UTF-8?q?=E8=B5=84=E6=8A=A5=E5=91=8A=E9=A1=B5=E9=9D=A2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mappers/TopicRecordMapper.xml | 90 +++++++++---------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/src/main/resources/mappers/TopicRecordMapper.xml b/src/main/resources/mappers/TopicRecordMapper.xml index 66e9ddc..998eca7 100644 --- a/src/main/resources/mappers/TopicRecordMapper.xml +++ b/src/main/resources/mappers/TopicRecordMapper.xml @@ -2,7 +2,7 @@ - + @@ -75,7 +75,7 @@ - id, topic_id, flow_id, module, topic_content, topic_type, choicesA, choicesB, choicesC, + id, topic_id, flow_id, module, topic_content, topic_type, choicesA, choicesB, choicesC, choicesD, choicesE, user_answer, answer - + select from topic_record - where id = #{id,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} - + delete from topic_record - where id = #{id,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} delete from topic_record @@ -109,16 +109,16 @@ - insert into topic_record (id, topic_id, flow_id, - module, topic_content, topic_type, - choicesA, choicesB, choicesC, - choicesD, choicesE, user_answer, - answer) - values (#{id,jdbcType=VARCHAR}, #{topicId,jdbcType=VARCHAR}, #{flowId,jdbcType=VARCHAR}, - #{module,jdbcType=VARCHAR}, #{topicContent,jdbcType=VARCHAR}, #{topicType,jdbcType=VARCHAR}, - #{choicesa,jdbcType=VARCHAR}, #{choicesb,jdbcType=VARCHAR}, #{choicesc,jdbcType=VARCHAR}, - #{choicesd,jdbcType=VARCHAR}, #{choicese,jdbcType=VARCHAR}, #{userAnswer,jdbcType=VARCHAR}, - #{answer,jdbcType=VARCHAR}) + insert into topic_record (id, topic_id, flow_id, + module, topic_content, topic_type, + choicesA, choicesB, choicesC, + choicesD, choicesE, user_answer, + answer) + values (#{id,jdbcType=INTEGER}, #{topicId,jdbcType=VARCHAR}, #{flowId,jdbcType=VARCHAR}, + #{module,jdbcType=VARCHAR}, #{topicContent,jdbcType=VARCHAR}, #{topicType,jdbcType=VARCHAR}, + #{choicesa,jdbcType=VARCHAR}, #{choicesb,jdbcType=VARCHAR}, #{choicesc,jdbcType=VARCHAR}, + #{choicesd,jdbcType=VARCHAR}, #{choicese,jdbcType=VARCHAR}, #{userAnswer,jdbcType=VARCHAR}, + #{answer,jdbcType=VARCHAR}) insert into topic_record @@ -165,7 +165,7 @@ - #{id,jdbcType=VARCHAR}, + #{id,jdbcType=INTEGER}, #{topicId,jdbcType=VARCHAR}, @@ -215,7 +215,7 @@ update topic_record - id = #{record.id,jdbcType=VARCHAR}, + id = #{record.id,jdbcType=INTEGER}, topic_id = #{record.topicId,jdbcType=VARCHAR}, @@ -260,19 +260,19 @@ update topic_record - set id = #{record.id,jdbcType=VARCHAR}, - topic_id = #{record.topicId,jdbcType=VARCHAR}, - flow_id = #{record.flowId,jdbcType=VARCHAR}, - module = #{record.module,jdbcType=VARCHAR}, - topic_content = #{record.topicContent,jdbcType=VARCHAR}, - topic_type = #{record.topicType,jdbcType=VARCHAR}, - choicesA = #{record.choicesa,jdbcType=VARCHAR}, - choicesB = #{record.choicesb,jdbcType=VARCHAR}, - choicesC = #{record.choicesc,jdbcType=VARCHAR}, - choicesD = #{record.choicesd,jdbcType=VARCHAR}, - choicesE = #{record.choicese,jdbcType=VARCHAR}, - user_answer = #{record.userAnswer,jdbcType=VARCHAR}, - answer = #{record.answer,jdbcType=VARCHAR} + set id = #{record.id,jdbcType=INTEGER}, + topic_id = #{record.topicId,jdbcType=VARCHAR}, + flow_id = #{record.flowId,jdbcType=VARCHAR}, + module = #{record.module,jdbcType=VARCHAR}, + topic_content = #{record.topicContent,jdbcType=VARCHAR}, + topic_type = #{record.topicType,jdbcType=VARCHAR}, + choicesA = #{record.choicesa,jdbcType=VARCHAR}, + choicesB = #{record.choicesb,jdbcType=VARCHAR}, + choicesC = #{record.choicesc,jdbcType=VARCHAR}, + choicesD = #{record.choicesd,jdbcType=VARCHAR}, + choicesE = #{record.choicese,jdbcType=VARCHAR}, + user_answer = #{record.userAnswer,jdbcType=VARCHAR}, + answer = #{record.answer,jdbcType=VARCHAR} @@ -317,22 +317,22 @@ answer = #{answer,jdbcType=VARCHAR}, - where id = #{id,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} update topic_record set topic_id = #{topicId,jdbcType=VARCHAR}, - flow_id = #{flowId,jdbcType=VARCHAR}, - module = #{module,jdbcType=VARCHAR}, - topic_content = #{topicContent,jdbcType=VARCHAR}, - topic_type = #{topicType,jdbcType=VARCHAR}, - choicesA = #{choicesa,jdbcType=VARCHAR}, - choicesB = #{choicesb,jdbcType=VARCHAR}, - choicesC = #{choicesc,jdbcType=VARCHAR}, - choicesD = #{choicesd,jdbcType=VARCHAR}, - choicesE = #{choicese,jdbcType=VARCHAR}, - user_answer = #{userAnswer,jdbcType=VARCHAR}, - answer = #{answer,jdbcType=VARCHAR} - where id = #{id,jdbcType=VARCHAR} + flow_id = #{flowId,jdbcType=VARCHAR}, + module = #{module,jdbcType=VARCHAR}, + topic_content = #{topicContent,jdbcType=VARCHAR}, + topic_type = #{topicType,jdbcType=VARCHAR}, + choicesA = #{choicesa,jdbcType=VARCHAR}, + choicesB = #{choicesb,jdbcType=VARCHAR}, + choicesC = #{choicesc,jdbcType=VARCHAR}, + choicesD = #{choicesd,jdbcType=VARCHAR}, + choicesE = #{choicese,jdbcType=VARCHAR}, + user_answer = #{userAnswer,jdbcType=VARCHAR}, + answer = #{answer,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} \ No newline at end of file From c69f37529f76f07b79cf6880165f296714b208c3 Mon Sep 17 00:00:00 2001 From: xiaoCJ <406612557@qq.com> Date: Fri, 22 Dec 2023 16:48:17 +0800 Subject: [PATCH 17/18] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=80=81=E5=B8=88?= =?UTF-8?q?=E7=AB=AF=E4=BA=92=E5=8A=A8=E7=AD=94=E7=96=91=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/tea/TeaTopicManageController.java | 4 ++-- .../service/serviceImpl/tea/TeaTopicManageServiceImpl.java | 6 +++--- .../fund_investment/service/tea/TeaTopicManageService.java | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/sztzjy/fund_investment/controller/tea/TeaTopicManageController.java b/src/main/java/com/sztzjy/fund_investment/controller/tea/TeaTopicManageController.java index 57fb0d0..3f7cd6a 100644 --- a/src/main/java/com/sztzjy/fund_investment/controller/tea/TeaTopicManageController.java +++ b/src/main/java/com/sztzjy/fund_investment/controller/tea/TeaTopicManageController.java @@ -87,9 +87,9 @@ public class TeaTopicManageController { public ResultEntity> getQuestionAnswer(@RequestParam Integer index, @RequestParam Integer size, @RequestParam String schoolId, - @ApiParam("班级下拉框") @RequestParam(required = false) String className, + @ApiParam("班级下拉框") @RequestParam(required = false) String classId, @ApiParam("姓名/学号") @RequestParam(required = false) String keyWord) { - return new ResultEntity<>(teaTopicManageService.getQuestionAnswer(index, size, schoolId, className, keyWord)); + return new ResultEntity<>(teaTopicManageService.getQuestionAnswer(index, size, schoolId, classId, keyWord)); } @AnonymousAccess diff --git a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/tea/TeaTopicManageServiceImpl.java b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/tea/TeaTopicManageServiceImpl.java index ccae9f1..b9b12dc 100644 --- a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/tea/TeaTopicManageServiceImpl.java +++ b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/tea/TeaTopicManageServiceImpl.java @@ -98,7 +98,7 @@ public class TeaTopicManageServiceImpl implements TeaTopicManageService { * @Date 2023/12/1 */ @Override - public PageInfo getQuestionAnswer(Integer index, Integer size, String schoolId, String className, String keyWord) { + public PageInfo getQuestionAnswer(Integer index, Integer size, String schoolId, String classId, String keyWord) { QuestionAnswerExample questionAnswerExample = new QuestionAnswerExample(); questionAnswerExample.createCriteria().andSchoolidEqualTo(schoolId); List questionAnswers = questionAnswerMapper.selectByExampleWithBLOBs(questionAnswerExample); @@ -106,8 +106,8 @@ public class TeaTopicManageServiceImpl implements TeaTopicManageService { UserExample.Criteria criteria = userTableExample.createCriteria(); UserExample.Criteria or = userTableExample.createCriteria(); criteria.andSchoolIdEqualTo(schoolId).andRoleIdEqualTo(4); - if (StringUtils.isNotBlank(className)) { - criteria.andClassNameEqualTo(className); + if (StringUtils.isNotBlank(classId)) { + criteria.andClassIdEqualTo(classId); } if (StringUtils.isNotBlank(keyWord)) { criteria.andStudentIdEqualTo(keyWord); diff --git a/src/main/java/com/sztzjy/fund_investment/service/tea/TeaTopicManageService.java b/src/main/java/com/sztzjy/fund_investment/service/tea/TeaTopicManageService.java index 94aa25d..d96be75 100644 --- a/src/main/java/com/sztzjy/fund_investment/service/tea/TeaTopicManageService.java +++ b/src/main/java/com/sztzjy/fund_investment/service/tea/TeaTopicManageService.java @@ -16,6 +16,6 @@ public interface TeaTopicManageService { PageInfo getTopicsBySchoolId(Integer index, Integer size, String schoolId, String module, String topicContent); - PageInfo getQuestionAnswer(Integer index, Integer size,String schoolId, String className, String keyWord); + PageInfo getQuestionAnswer(Integer index, Integer size,String schoolId, String classId, String keyWord); } From 03e379b49811a13fd59d570e4773b43b06dc422a Mon Sep 17 00:00:00 2001 From: xiaoCJ <406612557@qq.com> Date: Mon, 25 Dec 2023 10:09:16 +0800 Subject: [PATCH 18/18] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=80=80=E5=87=BA?= =?UTF-8?q?=E6=97=B6=E6=9C=BA=E8=A1=A8=EF=BC=8C=E5=AE=8C=E6=88=90=E6=8A=95?= =?UTF-8?q?=E8=B5=84=E6=8A=A5=E5=91=8A=E9=A1=B5=E9=9D=A2=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/TopicController.java | 18 +++++++++--------- .../entity/dto/ClassAVGScoreVo.java | 2 +- .../serviceImpl/tea/ClassScoreServiceImpl.java | 5 +++-- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/sztzjy/fund_investment/controller/TopicController.java b/src/main/java/com/sztzjy/fund_investment/controller/TopicController.java index 8a9fea3..96e9e76 100644 --- a/src/main/java/com/sztzjy/fund_investment/controller/TopicController.java +++ b/src/main/java/com/sztzjy/fund_investment/controller/TopicController.java @@ -53,7 +53,7 @@ public class TopicController { @AnonymousAccess public ResultEntity getRandomTopic(@ApiParam("导入的文件") @RequestParam MultipartFile file, @ApiParam("学校ID") @RequestParam String schoolId, - @ApiParam("知识测评题库,项目尽调题库,项目估值题库,IPO上市板块题目,IPO上市条件题目") @RequestParam String module) { + @ApiParam("知识测评题库,项目尽调题库,项目估值题库,上市板块相关题库,上市条件相关题库") @RequestParam String module) { return new ResultEntity(topicService.importFile(file, schoolId, module)); } @@ -110,7 +110,7 @@ public class TopicController { /* * @author xcj - * @Date 2023/11/21 + * @Date 2023/11/21`` */ @GetMapping("getAllScore") @ApiOperation("页面回显得分通用接口") @@ -123,13 +123,13 @@ public class TopicController { } - @GetMapping("getIPOTopicOne") - @ApiOperation("IPO弹窗1") - @AnonymousAccess - public ResultEntity getIPOTopicOne() { - TopicsWithBLOBs topics = topicsMapper.selectByPrimaryKey(Constant.NINE); - return new ResultEntity(topics); - } +// @GetMapping("getIPOTopicOne") +// @ApiOperation("IPO弹窗1") +// @AnonymousAccess +// public ResultEntity getIPOTopicOne() { +// TopicsWithBLOBs topics = topicsMapper.selectByPrimaryKey(Constant.NINE); +// return new ResultEntity(topics); +// } @AnonymousAccess diff --git a/src/main/java/com/sztzjy/fund_investment/entity/dto/ClassAVGScoreVo.java b/src/main/java/com/sztzjy/fund_investment/entity/dto/ClassAVGScoreVo.java index c415a9e..92d5de9 100644 --- a/src/main/java/com/sztzjy/fund_investment/entity/dto/ClassAVGScoreVo.java +++ b/src/main/java/com/sztzjy/fund_investment/entity/dto/ClassAVGScoreVo.java @@ -50,5 +50,5 @@ public class ClassAVGScoreVo { @DateTimeFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") @ApiModelProperty("最早得分日期") - private Date startTime; + private List startTime; } 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 3726cbd..1d7a671 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 @@ -65,13 +65,14 @@ public class ClassScoreServiceImpl implements ClassScoreService { if (list.isEmpty()) { continue; } - TeaClassScore teaClassScore = list.get(0); - vo.setStartTime(teaClassScore.getStartTime()); List scoreList = new ArrayList(); + List dateList = new ArrayList<>(); for (TeaClassScore classScore : list) { scoreList.add(classScore.getClassAverageScore()); + dateList.add(classScore.getStartTime()); } vo.setClassAverageScore(scoreList); + vo.setStartTime(dateList); voList.add(vo); } return voList;