From 74bcfc32d62cceb1a0b5884012734c1bae945883 Mon Sep 17 00:00:00 2001
From: yz <3614508250@qq.com>
Date: Fri, 27 Sep 2024 18:25:48 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=90=86=E8=B4=A2BUG?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../controller/GradeController.java           |  45 ++++----
 .../controller/ProductCenter.java             |   6 +-
 .../controller/SynthesisPlanController.java   |   4 +-
 .../controller/common/UserController.java     |   1 +
 .../money_management/entity/InsurancePro.java |  21 +---
 .../entity/InsuranceProExample.java           | 101 ++++--------------
 .../entity/InsuranceProWithBLOBs.java         |  11 ++
 .../mapper/SynthesisPlanClientMapper.java     |   6 +-
 .../mapper/SynthesisPlanScoreMapper.java      |   6 +-
 .../mapper/UserInfoMapper.java                |   2 +-
 .../service/impl/ScoreRankServiceImpl.java    |  27 ++++-
 .../service/impl/TrainingServiceImpl.java     |   3 +
 .../resources/mapper/InsuranceProMapper.xml   |  77 ++++++-------
 src/main/resources/mapper/UserInfoMapper.xml  |   2 +-
 14 files changed, 143 insertions(+), 169 deletions(-)

diff --git a/src/main/java/com/sztzjy/money_management/controller/GradeController.java b/src/main/java/com/sztzjy/money_management/controller/GradeController.java
index e3333b6..277e887 100644
--- a/src/main/java/com/sztzjy/money_management/controller/GradeController.java
+++ b/src/main/java/com/sztzjy/money_management/controller/GradeController.java
@@ -122,7 +122,10 @@ public class GradeController {
         StuTrainingExample stuTrainingExample = new StuTrainingExample();
         stuTrainingExample.createCriteria().andUserIdEqualTo(userId).andChapterIdEqualTo(chapterId);
         List<StuTraining> stuTrainings = trainingMapper.selectByExample(stuTrainingExample);
-        StuTraining stuTraining = stuTrainings.get(0);
+        StuTraining stuTraining=new StuTraining();
+        if(!stuTrainings.isEmpty()){
+            stuTraining = stuTrainings.get(0);
+        }
         //进行整合
         StuTrainingDto stuTrainingDto = new StuTrainingDto();
         //设置返回对象计分规则
@@ -137,17 +140,17 @@ public class GradeController {
         stuTrainingDto.setExpTrainingWeight(studentScoreWeight.getExperimentalTrainingWeight());
         stuTrainingDto.setReportWeight(studentScoreWeight.getReportWeight());
         //设置返回对象完成情况
-        stuTrainingDto.setKnowledgeSummaryCompleteStatus(stuTraining.getKnowledgeSummaryCompleteStatus());
-        stuTrainingDto.setResourceLearningCompleteStatus(stuTraining.getResourceLearningCompleteStatus());
-        stuTrainingDto.setLearningEvalCompleteStatus(stuTraining.getLearningEvalCompleteStatus());
-        stuTrainingDto.setExpTrainingCompleteStatus(stuTraining.getExpTrainingCompleteStatus());
+        stuTrainingDto.setKnowledgeSummaryCompleteStatus(stuTraining.getKnowledgeSummaryCompleteStatus()==null?0:stuTraining.getKnowledgeSummaryCompleteStatus());
+        stuTrainingDto.setResourceLearningCompleteStatus(stuTraining.getResourceLearningCompleteStatus()==null?0:stuTraining.getResourceLearningCompleteStatus());
+        stuTrainingDto.setLearningEvalCompleteStatus(stuTraining.getLearningEvalCompleteStatus()==null?0:stuTraining.getLearningEvalCompleteStatus());
+        stuTrainingDto.setExpTrainingCompleteStatus(stuTraining.getExpTrainingCompleteStatus()==null?0:stuTraining.getExpTrainingCompleteStatus());
         TrainingReportExample trainingReportExample = new TrainingReportExample();
         trainingReportExample.createCriteria().andChapterIdEqualTo(chapterId).andUserIdEqualTo(userId);
         //设置返回对象得分  根据学生实训表完成情况 设置得分
-        stuTrainingDto.setKnowledgeSummaryScore(studentScoreWeight.getSummaryOfKnowledgeScore().multiply(BigDecimal.valueOf(stuTraining.getKnowledgeSummaryCompleteStatus())));
-        stuTrainingDto.setResourceLearningScore(studentScoreWeight.getResourceLearningScore().multiply(BigDecimal.valueOf(stuTraining.getResourceLearningCompleteStatus())));
-        stuTrainingDto.setLearningEvalScore(studentScoreWeight.getLearningAssessmentScore().multiply(BigDecimal.valueOf(stuTraining.getLearningEvalCompleteStatus())));
-        stuTrainingDto.setCaseStuScore(studentScoreWeight.getExperimentalTrainingScore().multiply(BigDecimal.valueOf(stuTraining.getExpTrainingCompleteStatus())));
+        stuTrainingDto.setKnowledgeSummaryScore(studentScoreWeight.getSummaryOfKnowledgeScore().multiply(BigDecimal.valueOf(stuTraining.getKnowledgeSummaryCompleteStatus()==null?0:stuTraining.getKnowledgeSummaryCompleteStatus())));
+        stuTrainingDto.setResourceLearningScore(studentScoreWeight.getResourceLearningScore().multiply(BigDecimal.valueOf(stuTraining.getResourceLearningCompleteStatus()==null?0:stuTraining.getResourceLearningCompleteStatus())));
+        stuTrainingDto.setLearningEvalScore(studentScoreWeight.getLearningAssessmentScore().multiply(BigDecimal.valueOf(stuTraining.getLearningEvalCompleteStatus()==null?0:stuTraining.getLearningEvalCompleteStatus())));
+        stuTrainingDto.setCaseStuScore(studentScoreWeight.getExperimentalTrainingScore().multiply(BigDecimal.valueOf(stuTraining.getExpTrainingCompleteStatus()==null?0:stuTraining.getExpTrainingCompleteStatus())));
 
         //设置实验报告情况及得分
         List<TrainingReport> trainingReports = trainingReportMapper.selectByExample(trainingReportExample);
@@ -295,6 +298,7 @@ public class GradeController {
 
         //理论考试成绩
         StuTotalScoreDto theoryReturnDto = new StuTotalScoreDto();
+        theoryReturnDto.setModelName("理论考试成绩");
         if(scoreRankList.isEmpty()){
             theoryReturnDto.setTrainingScore(BigDecimal.ZERO);
             theoryReturnDto.setUseTime(BigDecimal.ZERO);
@@ -312,14 +316,14 @@ public class GradeController {
             }
         }
         theoryReturnDto.setScoreWight(totalWeight.getLlkh());
-        returnDtoList.add(synthesisPlanReturnDto);
-        return new ResultEntity<>(HttpStatus.BAD_REQUEST,"学生端-成绩中心-成绩总览展示成功" ,returnDtoList);
+        returnDtoList.add(theoryReturnDto);
+        return new ResultEntity<>(HttpStatus.OK,"学生端-成绩中心-成绩总览展示成功" ,returnDtoList);
     }
 
 
     //教师端 客户案例成绩查询 成绩总览成绩查询
     @AnonymousAccess
-    @ApiOperation("教师端-成绩中心-成绩总览展示、客户案例展示  客户案例总成绩为客户案例成绩")
+    @ApiOperation("教师端-成绩中心-成绩总览展示")
     @PostMapping("selectTeaSummaryOfResults")
     public ResultEntity<PageInfo<ScoreRank>> selectTeaSummaryOfResults(@RequestParam String schoolId,@RequestParam Integer index,@RequestParam Integer size,
                                                   @RequestParam(required = false) String name,
@@ -343,6 +347,7 @@ public class GradeController {
         //查询成绩总览权重
         TotalWeight totalWeight = totalWeightMapper.selectByPrimaryKey(schoolId);
         if(totalWeight==null){
+            totalWeight=new TotalWeight();
             totalWeight.setKhan(BigDecimal.valueOf(0.4));
             totalWeight.setZhgh(BigDecimal.valueOf(0.4));
             totalWeight.setLlkh(BigDecimal.valueOf(0.2));
@@ -364,6 +369,7 @@ public class GradeController {
     public ResultEntity<TotalWeight> seleteTotalWeight(@RequestBody String schoolId){
         TotalWeight totalWeight = totalWeightMapper.selectByPrimaryKey(schoolId);
         if(totalWeight==null){
+            totalWeight=new TotalWeight();
             totalWeight.setSchoolId(schoolId);
             totalWeight.setKhan(BigDecimal.valueOf(0.4));
             totalWeight.setZhgh(BigDecimal.valueOf(0.4));
@@ -396,7 +402,7 @@ public class GradeController {
                            @RequestParam String schoolId) {
         List<ScoreRank> scoreRankList=scoreRankService.selectExportScoreRankList(schoolId);
         //导出的表名
-        String title = IdUtil.simpleUUID();
+        String title = "成绩总览";
         //表中第一行表头字段
         String[] headers = {"排名", "姓名", "学号", "总成绩", "班级", "客户案例成绩", "综合规划成绩", "理论考核成绩"};
 
@@ -412,7 +418,7 @@ public class GradeController {
 
     //客户案例成绩查询
     @AnonymousAccess
-    @ApiOperation("教师端-成绩中心-成绩总览展示、客户案例展示  客户案例总成绩为客户案例成绩")
+    @ApiOperation("教师端-成绩中心-客户案例展示")
     @PostMapping("selectTeaClientCaseScoreList")
     public ResultEntity<PageInfo<ScoreRank>> selectTeaClientCaseScoreList(@RequestParam String schoolId,@RequestParam Integer index,@RequestParam Integer size,
                                                                        @RequestParam(required = false) String name,
@@ -435,10 +441,10 @@ public class GradeController {
         List<ScoreRank> scoreRankList = scoreRankMapper.selectByExample(scoreRankExample);
 
         //设置总成绩
-        for (int i = 0; i < scoreRankList.size(); i++) {
-            ScoreRank scoreRank = scoreRankList.get(i);
-            scoreRank.setTotalScore(scoreRank.getZhghScore());
-        }
+//        for (int i = 0; i < scoreRankList.size(); i++) {
+//            ScoreRank scoreRank = scoreRankList.get(i);
+//            scoreRank.setTotalScore(scoreRank.getZhghScore());
+//        }
         PageInfo pageInfo = new PageInfo(scoreRankList);
         return new ResultEntity<PageInfo<ScoreRank>>(pageInfo);
     }
@@ -466,11 +472,12 @@ public class GradeController {
 
     //教师端 客户案例权重查询
     @AnonymousAccess
-    @ApiOperation("教师端-成绩中心-成绩总览权重查询")
+    @ApiOperation("教师端-成绩中心-客户案例权重查询")
     @PostMapping("seleteClientWeight")
     public ResultEntity<ClientWeight> seleteClientWeight(@RequestBody String schoolId){
         ClientWeight clientWeight = clientWeightMapper.selectByPrimaryKey(schoolId);
         if(clientWeight==null){
+            clientWeight=new ClientWeight();
             clientWeight.setFxcp(BigDecimal.valueOf(0.05));
             clientWeight.setCwfx(BigDecimal.valueOf(0.20));
             clientWeight.setXjgh(BigDecimal.valueOf(0.05));
diff --git a/src/main/java/com/sztzjy/money_management/controller/ProductCenter.java b/src/main/java/com/sztzjy/money_management/controller/ProductCenter.java
index e851bac..ffac29d 100644
--- a/src/main/java/com/sztzjy/money_management/controller/ProductCenter.java
+++ b/src/main/java/com/sztzjy/money_management/controller/ProductCenter.java
@@ -123,7 +123,7 @@ public class ProductCenter {
     @PostMapping("selectInsurancePro")
     @ApiOperation("保险产品查询")
     @AnonymousAccess
-    public ResultEntity<PageInfo<InsurancePro>> selectInsurancePro(@ApiParam("保险子类") @RequestParam(required = false) String kind,
+    public ResultEntity<PageInfo<InsuranceProWithBLOBs>> selectInsurancePro(@ApiParam("保险子类") @RequestParam(required = false) String kind,
                                                                @ApiParam("搜索参数") @RequestParam(required = false) String name,
                                                                @RequestParam Integer index,
                                                                @RequestParam Integer size) {
@@ -136,8 +136,8 @@ public class ProductCenter {
         if (name != null) {
             criteria.andNameLike("%" + name + "%");
         }
-        List<InsurancePro> insurancePros = insuranceProMapper.selectByExample(example);
-        PageInfo<InsurancePro> pageInfo = new PageInfo<>(insurancePros);
+        List<InsuranceProWithBLOBs> insurancePros = insuranceProMapper.selectByExampleWithBLOBs(example);
+        PageInfo<InsuranceProWithBLOBs> pageInfo = new PageInfo<>(insurancePros);
         return new ResultEntity<>(HttpStatus.OK, "保险产品查询成功!", pageInfo);
     }
 
diff --git a/src/main/java/com/sztzjy/money_management/controller/SynthesisPlanController.java b/src/main/java/com/sztzjy/money_management/controller/SynthesisPlanController.java
index 642bae7..6699aa6 100644
--- a/src/main/java/com/sztzjy/money_management/controller/SynthesisPlanController.java
+++ b/src/main/java/com/sztzjy/money_management/controller/SynthesisPlanController.java
@@ -333,8 +333,8 @@ public class SynthesisPlanController {
         UserStatisticsDto userStatisticsDto = new UserStatisticsDto();
         userStatisticsDto.setQianZaiTotalCount(qianZaiTotalCount);
         userStatisticsDto.setYiYouTotalCount(yiYouTotalCount);
-        userStatisticsDto.setHighNetClientHaveCount(userStatistics.getHighNetClientHaveCount());
-        userStatisticsDto.setHighNetClientLatentCount(userStatistics.getHighNetClientLatentCount());
+        userStatisticsDto.setHighNetClientHaveCount(userStatistics==null?0:userStatistics.getHighNetClientHaveCount());
+        userStatisticsDto.setHighNetClientLatentCount(userStatistics==null?0:userStatistics.getHighNetClientLatentCount());
 
         return new ResultEntity<>(HttpStatus.OK, "客户统计查询成功!", userStatisticsDto);
     }
diff --git a/src/main/java/com/sztzjy/money_management/controller/common/UserController.java b/src/main/java/com/sztzjy/money_management/controller/common/UserController.java
index 95cd9e3..63a7121 100644
--- a/src/main/java/com/sztzjy/money_management/controller/common/UserController.java
+++ b/src/main/java/com/sztzjy/money_management/controller/common/UserController.java
@@ -136,6 +136,7 @@ public class UserController {
             stuUser.setSchoolId(zyUserInfo.getSchoolId().toString());
             stuUser.setSchoolName(zyUserInfo.getSchoolName());
             stuUser.setCreateTime(new Date());
+            stuUser.setClassName(zyUserInfo.getClassName());
             users.add(stuUser);
         }
         if (users.isEmpty()) {
diff --git a/src/main/java/com/sztzjy/money_management/entity/InsurancePro.java b/src/main/java/com/sztzjy/money_management/entity/InsurancePro.java
index 946d2f4..bdb3590 100644
--- a/src/main/java/com/sztzjy/money_management/entity/InsurancePro.java
+++ b/src/main/java/com/sztzjy/money_management/entity/InsurancePro.java
@@ -1,7 +1,5 @@
 package com.sztzjy.money_management.entity;
 
-import java.math.BigDecimal;
-
 import io.swagger.annotations.ApiModelProperty;
 /**
  * 保险产品表
@@ -20,7 +18,7 @@ public class InsurancePro {
     private String insuranceCompany;
 
     @ApiModelProperty("承保限制")
-    private BigDecimal insuranceLimit;
+    private String insuranceLimit;
 
     @ApiModelProperty("详细条款名称")
     private String detailConditionName;
@@ -28,9 +26,6 @@ public class InsurancePro {
     @ApiModelProperty("保险类型")
     private String kind;
 
-    @ApiModelProperty("详细条件URL")
-    private String detailConditionContent;
-
     public String getInsuranceProId() {
         return insuranceProId;
     }
@@ -55,12 +50,12 @@ public class InsurancePro {
         this.insuranceCompany = insuranceCompany == null ? null : insuranceCompany.trim();
     }
 
-    public BigDecimal getInsuranceLimit() {
+    public String getInsuranceLimit() {
         return insuranceLimit;
     }
 
-    public void setInsuranceLimit(BigDecimal insuranceLimit) {
-        this.insuranceLimit = insuranceLimit;
+    public void setInsuranceLimit(String insuranceLimit) {
+        this.insuranceLimit = insuranceLimit == null ? null : insuranceLimit.trim();
     }
 
     public String getDetailConditionName() {
@@ -78,12 +73,4 @@ public class InsurancePro {
     public void setKind(String kind) {
         this.kind = kind == null ? null : kind.trim();
     }
-
-    public String getDetailConditionContent() {
-        return detailConditionContent;
-    }
-
-    public void setDetailConditionContent(String detailConditionContent) {
-        this.detailConditionContent = detailConditionContent == null ? null : detailConditionContent.trim();
-    }
 }
\ No newline at end of file
diff --git a/src/main/java/com/sztzjy/money_management/entity/InsuranceProExample.java b/src/main/java/com/sztzjy/money_management/entity/InsuranceProExample.java
index 3b8d393..01ad179 100644
--- a/src/main/java/com/sztzjy/money_management/entity/InsuranceProExample.java
+++ b/src/main/java/com/sztzjy/money_management/entity/InsuranceProExample.java
@@ -1,6 +1,5 @@
 package com.sztzjy.money_management.entity;
 
-import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -325,52 +324,62 @@ public class InsuranceProExample {
             return (Criteria) this;
         }
 
-        public Criteria andInsuranceLimitEqualTo(BigDecimal value) {
+        public Criteria andInsuranceLimitEqualTo(String value) {
             addCriterion("insurance_limit =", value, "insuranceLimit");
             return (Criteria) this;
         }
 
-        public Criteria andInsuranceLimitNotEqualTo(BigDecimal value) {
+        public Criteria andInsuranceLimitNotEqualTo(String value) {
             addCriterion("insurance_limit <>", value, "insuranceLimit");
             return (Criteria) this;
         }
 
-        public Criteria andInsuranceLimitGreaterThan(BigDecimal value) {
+        public Criteria andInsuranceLimitGreaterThan(String value) {
             addCriterion("insurance_limit >", value, "insuranceLimit");
             return (Criteria) this;
         }
 
-        public Criteria andInsuranceLimitGreaterThanOrEqualTo(BigDecimal value) {
+        public Criteria andInsuranceLimitGreaterThanOrEqualTo(String value) {
             addCriterion("insurance_limit >=", value, "insuranceLimit");
             return (Criteria) this;
         }
 
-        public Criteria andInsuranceLimitLessThan(BigDecimal value) {
+        public Criteria andInsuranceLimitLessThan(String value) {
             addCriterion("insurance_limit <", value, "insuranceLimit");
             return (Criteria) this;
         }
 
-        public Criteria andInsuranceLimitLessThanOrEqualTo(BigDecimal value) {
+        public Criteria andInsuranceLimitLessThanOrEqualTo(String value) {
             addCriterion("insurance_limit <=", value, "insuranceLimit");
             return (Criteria) this;
         }
 
-        public Criteria andInsuranceLimitIn(List<BigDecimal> values) {
+        public Criteria andInsuranceLimitLike(String value) {
+            addCriterion("insurance_limit like", value, "insuranceLimit");
+            return (Criteria) this;
+        }
+
+        public Criteria andInsuranceLimitNotLike(String value) {
+            addCriterion("insurance_limit not like", value, "insuranceLimit");
+            return (Criteria) this;
+        }
+
+        public Criteria andInsuranceLimitIn(List<String> values) {
             addCriterion("insurance_limit in", values, "insuranceLimit");
             return (Criteria) this;
         }
 
-        public Criteria andInsuranceLimitNotIn(List<BigDecimal> values) {
+        public Criteria andInsuranceLimitNotIn(List<String> values) {
             addCriterion("insurance_limit not in", values, "insuranceLimit");
             return (Criteria) this;
         }
 
-        public Criteria andInsuranceLimitBetween(BigDecimal value1, BigDecimal value2) {
+        public Criteria andInsuranceLimitBetween(String value1, String value2) {
             addCriterion("insurance_limit between", value1, value2, "insuranceLimit");
             return (Criteria) this;
         }
 
-        public Criteria andInsuranceLimitNotBetween(BigDecimal value1, BigDecimal value2) {
+        public Criteria andInsuranceLimitNotBetween(String value1, String value2) {
             addCriterion("insurance_limit not between", value1, value2, "insuranceLimit");
             return (Criteria) this;
         }
@@ -514,76 +523,6 @@ public class InsuranceProExample {
             addCriterion("kind not between", value1, value2, "kind");
             return (Criteria) this;
         }
-
-        public Criteria andDetailConditionContentIsNull() {
-            addCriterion("detail_condition_content is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andDetailConditionContentIsNotNull() {
-            addCriterion("detail_condition_content is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andDetailConditionContentEqualTo(String value) {
-            addCriterion("detail_condition_content =", value, "detailConditionContent");
-            return (Criteria) this;
-        }
-
-        public Criteria andDetailConditionContentNotEqualTo(String value) {
-            addCriterion("detail_condition_content <>", value, "detailConditionContent");
-            return (Criteria) this;
-        }
-
-        public Criteria andDetailConditionContentGreaterThan(String value) {
-            addCriterion("detail_condition_content >", value, "detailConditionContent");
-            return (Criteria) this;
-        }
-
-        public Criteria andDetailConditionContentGreaterThanOrEqualTo(String value) {
-            addCriterion("detail_condition_content >=", value, "detailConditionContent");
-            return (Criteria) this;
-        }
-
-        public Criteria andDetailConditionContentLessThan(String value) {
-            addCriterion("detail_condition_content <", value, "detailConditionContent");
-            return (Criteria) this;
-        }
-
-        public Criteria andDetailConditionContentLessThanOrEqualTo(String value) {
-            addCriterion("detail_condition_content <=", value, "detailConditionContent");
-            return (Criteria) this;
-        }
-
-        public Criteria andDetailConditionContentLike(String value) {
-            addCriterion("detail_condition_content like", value, "detailConditionContent");
-            return (Criteria) this;
-        }
-
-        public Criteria andDetailConditionContentNotLike(String value) {
-            addCriterion("detail_condition_content not like", value, "detailConditionContent");
-            return (Criteria) this;
-        }
-
-        public Criteria andDetailConditionContentIn(List<String> values) {
-            addCriterion("detail_condition_content in", values, "detailConditionContent");
-            return (Criteria) this;
-        }
-
-        public Criteria andDetailConditionContentNotIn(List<String> values) {
-            addCriterion("detail_condition_content not in", values, "detailConditionContent");
-            return (Criteria) this;
-        }
-
-        public Criteria andDetailConditionContentBetween(String value1, String value2) {
-            addCriterion("detail_condition_content between", value1, value2, "detailConditionContent");
-            return (Criteria) this;
-        }
-
-        public Criteria andDetailConditionContentNotBetween(String value1, String value2) {
-            addCriterion("detail_condition_content not between", value1, value2, "detailConditionContent");
-            return (Criteria) this;
-        }
     }
 
     public static class Criteria extends GeneratedCriteria {
diff --git a/src/main/java/com/sztzjy/money_management/entity/InsuranceProWithBLOBs.java b/src/main/java/com/sztzjy/money_management/entity/InsuranceProWithBLOBs.java
index 1b97df7..b2e4046 100644
--- a/src/main/java/com/sztzjy/money_management/entity/InsuranceProWithBLOBs.java
+++ b/src/main/java/com/sztzjy/money_management/entity/InsuranceProWithBLOBs.java
@@ -26,6 +26,9 @@ public class InsuranceProWithBLOBs extends InsurancePro {
     @ApiModelProperty("典型案例")
     private String typicalCase;
 
+    @ApiModelProperty("详细条件URL")
+    private String detailConditionContent;
+
     public String getFeatures() {
         return features;
     }
@@ -73,4 +76,12 @@ public class InsuranceProWithBLOBs extends InsurancePro {
     public void setTypicalCase(String typicalCase) {
         this.typicalCase = typicalCase == null ? null : typicalCase.trim();
     }
+
+    public String getDetailConditionContent() {
+        return detailConditionContent;
+    }
+
+    public void setDetailConditionContent(String detailConditionContent) {
+        this.detailConditionContent = detailConditionContent == null ? null : detailConditionContent.trim();
+    }
 }
\ No newline at end of file
diff --git a/src/main/java/com/sztzjy/money_management/mapper/SynthesisPlanClientMapper.java b/src/main/java/com/sztzjy/money_management/mapper/SynthesisPlanClientMapper.java
index 322dbe0..a335723 100644
--- a/src/main/java/com/sztzjy/money_management/mapper/SynthesisPlanClientMapper.java
+++ b/src/main/java/com/sztzjy/money_management/mapper/SynthesisPlanClientMapper.java
@@ -32,15 +32,15 @@ public interface SynthesisPlanClientMapper {
 
     int updateByPrimaryKey(SynthesisPlanClient record);
 
-    @Select("select count(*) from synthesis_plan_client where user_id=#{userId}")
+    @Select("select count(*) from synthesis_plan_client where userid=#{userId}")
     Integer selectQianZaiTotalCount(@Param("userId") String userId);
 
-    @Select("select count(*) from synthesis_plan_client where user_id=#{userId} and submit_status='已审核'")
+    @Select("select count(*) from synthesis_plan_client where userid=#{userId} and submit_status='已审核'")
     Integer selectYiYouTotalCount(String userId);
 
     List<SynthesisPlanClient> getPotentialCustomerList(@Param("keyWord") String keyWord);
 
-    @Select("select sum(use_time) from synthesis_plan_client where user_id=#{userId}")
+    @Select("select sum(use_time) from synthesis_plan_client where userid=#{userId}")
     Integer getTotalUseTime(String userId);
 
 }
\ No newline at end of file
diff --git a/src/main/java/com/sztzjy/money_management/mapper/SynthesisPlanScoreMapper.java b/src/main/java/com/sztzjy/money_management/mapper/SynthesisPlanScoreMapper.java
index e903ef5..875fb3e 100644
--- a/src/main/java/com/sztzjy/money_management/mapper/SynthesisPlanScoreMapper.java
+++ b/src/main/java/com/sztzjy/money_management/mapper/SynthesisPlanScoreMapper.java
@@ -42,13 +42,13 @@ public interface SynthesisPlanScoreMapper {
 
     int updateByPrimaryKey(SynthesisPlanScore record);
 
-    @Select("SELECT SUM(score) FROM synthesis_plan_score WHERE user_id=#{userId} AND case_id=#{caseId}")
+    @Select("SELECT SUM(score) FROM synthesis_plan_score WHERE userid=#{userId} AND caseid=#{caseId}")
     Double getTotalScore(@Param("userId") String userId,@Param("caseId") String caseId);
 
-    @Select("SELECT SUM(score) FROM synthesis_plan_score WHERE user_id=#{userId} AND case_id=#{caseId}")
+    @Select("SELECT SUM(score) FROM synthesis_plan_score WHERE userid=#{userId} AND caseid=#{caseId}")
     BigDecimal selectTotalScoreByUserIdAndCaseId(@Param("userId")String userId,@Param("caseId") String caseid);
 
-    @Select("SELECT SUM(score) FROM synthesis_plan_score WHERE user_id=#{userId}")
+    @Select("SELECT SUM(score) FROM synthesis_plan_score WHERE userid=#{userId}")
     BigDecimal selectTotalScoreByUserId(@Param("userId")String userId);
 
     int batchInsert(@Param("list") List<SynthesisPlanScoreWithBLOBs> synthesisPlanScore);
diff --git a/src/main/java/com/sztzjy/money_management/mapper/UserInfoMapper.java b/src/main/java/com/sztzjy/money_management/mapper/UserInfoMapper.java
index 92576a6..5d5ce81 100644
--- a/src/main/java/com/sztzjy/money_management/mapper/UserInfoMapper.java
+++ b/src/main/java/com/sztzjy/money_management/mapper/UserInfoMapper.java
@@ -40,6 +40,6 @@ public interface UserInfoMapper {
     @Select("select userid from userinfo where school_id=#{schoolId}")
     List<String> selectAllUserIdBySchoolId(@Param("schoolId") String schoolId);
 
-    @Select("select class_name from userinfo where school_id=#{schoolId}")
+    @Select("select DISTINCT class_name from userinfo where school_id=#{schoolId}")
     List<String> selectClassNameBySchoolId(@Param("schoolId") String schoolId);
 }
\ No newline at end of file
diff --git a/src/main/java/com/sztzjy/money_management/service/impl/ScoreRankServiceImpl.java b/src/main/java/com/sztzjy/money_management/service/impl/ScoreRankServiceImpl.java
index c6321b8..473d668 100644
--- a/src/main/java/com/sztzjy/money_management/service/impl/ScoreRankServiceImpl.java
+++ b/src/main/java/com/sztzjy/money_management/service/impl/ScoreRankServiceImpl.java
@@ -43,12 +43,21 @@ public class ScoreRankServiceImpl implements ScoreRankService {
             String schoolId = schoolIdList.get(i);
             //根据学校ID 获取所有学生userId
             UserInfoExample userInfoExample = new UserInfoExample();
-            userInfoExample.createCriteria().andSchoolIdEqualTo(schoolId);
+            userInfoExample.createCriteria().andSchoolIdEqualTo(schoolId).andRoleIdEqualTo(4);
             List<UserInfo> userList = userInfoMapper.selectByExample(userInfoExample);
             //查询学习成绩权重表
             Map<String, BigDecimal> clientWeight = trainingService.getClientWeight(schoolId);  //客户案例权重
             Map<String, StudentScoreWeight> studentScoreWeightMap = trainingService.getStudentScoreWeightMap(schoolId);  //学习成绩权重
 
+            //查询成绩总览权重
+            TotalWeight totalWeight = totalWeightMapper.selectByPrimaryKey(schoolId);
+            if(totalWeight==null){
+                totalWeight=new TotalWeight();
+                totalWeight.setKhan(BigDecimal.valueOf(0.4));
+                totalWeight.setZhgh(BigDecimal.valueOf(0.4));
+                totalWeight.setLlkh(BigDecimal.valueOf(0.2));
+            }
+
             for (int j = 0; j < userList.size(); j++) {
                 UserInfo userInfo = userList.get(j);
                 String userId = userInfo.getUserid();
@@ -155,6 +164,21 @@ public class ScoreRankServiceImpl implements ScoreRankService {
                 } else {
                     scoreRank.setLlkhScore(stuTheoryRecord.getAverageScore());
                 }
+
+                //设置totalscore
+                BigDecimal weightKhan = totalWeight.getKhan();
+                BigDecimal weightZhgh = totalWeight.getZhgh();
+                BigDecimal weightLlkh = totalWeight.getLlkh();
+                if(scoreRank.getKhalScore()==null){
+                    scoreRank.setKhalScore(BigDecimal.ZERO);
+                }
+                if(scoreRank.getZhghScore()==null){
+                    scoreRank.setZhghScore(BigDecimal.ZERO);
+                }
+                if(scoreRank.getLlkhScore()==null){
+                    scoreRank.setLlkhScore(BigDecimal.ZERO);
+                }
+                scoreRank.setTotalScore(scoreRank.getKhalScore().multiply(weightKhan).add(scoreRank.getZhghScore().multiply(weightZhgh)).add(scoreRank.getLlkhScore().multiply(weightLlkh)));
                 scoreRankList.add(scoreRank);
             }
             //总排名排序
@@ -211,6 +235,7 @@ public class ScoreRankServiceImpl implements ScoreRankService {
         //查询成绩总览权重
         TotalWeight totalWeight = totalWeightMapper.selectByPrimaryKey(schoolId);
         if(totalWeight==null){
+            totalWeight=new TotalWeight();
             totalWeight.setKhan(BigDecimal.valueOf(0.4));
             totalWeight.setZhgh(BigDecimal.valueOf(0.4));
             totalWeight.setLlkh(BigDecimal.valueOf(0.2));
diff --git a/src/main/java/com/sztzjy/money_management/service/impl/TrainingServiceImpl.java b/src/main/java/com/sztzjy/money_management/service/impl/TrainingServiceImpl.java
index 802d79e..1022204 100644
--- a/src/main/java/com/sztzjy/money_management/service/impl/TrainingServiceImpl.java
+++ b/src/main/java/com/sztzjy/money_management/service/impl/TrainingServiceImpl.java
@@ -56,6 +56,9 @@ public class TrainingServiceImpl implements TrainingService {
             Integer learningEvalCompleteStatus = stuTraining.getLearningEvalCompleteStatus()== null ? 0 : stuTraining.getLearningEvalCompleteStatus();
             Integer expStatus = stuTraining.getExpTrainingCompleteStatus()==null?0:stuTraining.getExpTrainingCompleteStatus();
             StudentScoreWeight studentScoreWeight = studentScoreWeightMap.get(stuTraining.getChapterName());
+            if(studentScoreWeight==null){
+                continue;
+            }
             BigDecimal summaryScore = studentScoreWeight.getSummaryOfKnowledgeScore().multiply(BigDecimal.valueOf(knowledgeStatus)).multiply(studentScoreWeight.getSummaryOfKnowledgeWeight());
             BigDecimal resourceScore = studentScoreWeight.getResourceLearningScore().multiply(BigDecimal.valueOf(resourceStatus)).multiply(studentScoreWeight.getResourceLearningWeight());
             BigDecimal learningScore = studentScoreWeight.getLearningAssessmentScore().multiply(BigDecimal.valueOf(learningEvalCompleteStatus)).multiply(studentScoreWeight.getLearningAssessmentWeight());
diff --git a/src/main/resources/mapper/InsuranceProMapper.xml b/src/main/resources/mapper/InsuranceProMapper.xml
index f4b7af2..1b6b49a 100644
--- a/src/main/resources/mapper/InsuranceProMapper.xml
+++ b/src/main/resources/mapper/InsuranceProMapper.xml
@@ -5,10 +5,9 @@
     <id column="insurance_pro_id" jdbcType="VARCHAR" property="insuranceProId" />
     <result column="name" jdbcType="VARCHAR" property="name" />
     <result column="insurance_company" jdbcType="VARCHAR" property="insuranceCompany" />
-    <result column="insurance_limit" jdbcType="DECIMAL" property="insuranceLimit" />
+    <result column="insurance_limit" jdbcType="VARCHAR" property="insuranceLimit" />
     <result column="detail_condition_name" jdbcType="VARCHAR" property="detailConditionName" />
     <result column="kind" jdbcType="VARCHAR" property="kind" />
-    <result column="detail_condition_content" jdbcType="VARCHAR" property="detailConditionContent" />
   </resultMap>
   <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.sztzjy.money_management.entity.InsuranceProWithBLOBs">
     <result column="features" jdbcType="LONGVARCHAR" property="features" />
@@ -17,6 +16,7 @@
     <result column="insurance_application" jdbcType="LONGVARCHAR" property="insuranceApplication" />
     <result column="paraphrase" jdbcType="LONGVARCHAR" property="paraphrase" />
     <result column="typical_case" jdbcType="LONGVARCHAR" property="typicalCase" />
+    <result column="detail_condition_content" jdbcType="LONGVARCHAR" property="detailConditionContent" />
   </resultMap>
   <sql id="Example_Where_Clause">
     <where>
@@ -78,10 +78,10 @@
   </sql>
   <sql id="Base_Column_List">
     insurance_pro_id, name, insurance_company, insurance_limit, detail_condition_name, 
-    kind, detail_condition_content
+    kind
   </sql>
   <sql id="Blob_Column_List">
-    features, details, attention, insurance_application, paraphrase, typical_case
+    features, details, attention, insurance_application, paraphrase, typical_case, detail_condition_content
   </sql>
   <select id="selectByExampleWithBLOBs" parameterType="com.sztzjy.money_management.entity.InsuranceProExample" resultMap="ResultMapWithBLOBs">
     select
@@ -134,14 +134,16 @@
   <insert id="insert" parameterType="com.sztzjy.money_management.entity.InsuranceProWithBLOBs">
     insert into insurance_pro (insurance_pro_id, name, insurance_company, 
       insurance_limit, detail_condition_name, kind, 
-      detail_condition_content, features, details, 
-      attention, insurance_application, 
-      paraphrase, typical_case)
+      features, details, attention, 
+      insurance_application, paraphrase, 
+      typical_case, detail_condition_content
+      )
     values (#{insuranceProId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{insuranceCompany,jdbcType=VARCHAR}, 
-      #{insuranceLimit,jdbcType=DECIMAL}, #{detailConditionName,jdbcType=VARCHAR}, #{kind,jdbcType=VARCHAR}, 
-      #{detailConditionContent,jdbcType=VARCHAR}, #{features,jdbcType=LONGVARCHAR}, #{details,jdbcType=LONGVARCHAR}, 
-      #{attention,jdbcType=LONGVARCHAR}, #{insuranceApplication,jdbcType=LONGVARCHAR}, 
-      #{paraphrase,jdbcType=LONGVARCHAR}, #{typicalCase,jdbcType=LONGVARCHAR})
+      #{insuranceLimit,jdbcType=VARCHAR}, #{detailConditionName,jdbcType=VARCHAR}, #{kind,jdbcType=VARCHAR}, 
+      #{features,jdbcType=LONGVARCHAR}, #{details,jdbcType=LONGVARCHAR}, #{attention,jdbcType=LONGVARCHAR}, 
+      #{insuranceApplication,jdbcType=LONGVARCHAR}, #{paraphrase,jdbcType=LONGVARCHAR}, 
+      #{typicalCase,jdbcType=LONGVARCHAR}, #{detailConditionContent,jdbcType=LONGVARCHAR}
+      )
   </insert>
   <insert id="insertSelective" parameterType="com.sztzjy.money_management.entity.InsuranceProWithBLOBs">
     insert into insurance_pro
@@ -164,9 +166,6 @@
       <if test="kind != null">
         kind,
       </if>
-      <if test="detailConditionContent != null">
-        detail_condition_content,
-      </if>
       <if test="features != null">
         features,
       </if>
@@ -185,6 +184,9 @@
       <if test="typicalCase != null">
         typical_case,
       </if>
+      <if test="detailConditionContent != null">
+        detail_condition_content,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="insuranceProId != null">
@@ -197,7 +199,7 @@
         #{insuranceCompany,jdbcType=VARCHAR},
       </if>
       <if test="insuranceLimit != null">
-        #{insuranceLimit,jdbcType=DECIMAL},
+        #{insuranceLimit,jdbcType=VARCHAR},
       </if>
       <if test="detailConditionName != null">
         #{detailConditionName,jdbcType=VARCHAR},
@@ -205,9 +207,6 @@
       <if test="kind != null">
         #{kind,jdbcType=VARCHAR},
       </if>
-      <if test="detailConditionContent != null">
-        #{detailConditionContent,jdbcType=VARCHAR},
-      </if>
       <if test="features != null">
         #{features,jdbcType=LONGVARCHAR},
       </if>
@@ -226,6 +225,9 @@
       <if test="typicalCase != null">
         #{typicalCase,jdbcType=LONGVARCHAR},
       </if>
+      <if test="detailConditionContent != null">
+        #{detailConditionContent,jdbcType=LONGVARCHAR},
+      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.sztzjy.money_management.entity.InsuranceProExample" resultType="java.lang.Long">
@@ -247,7 +249,7 @@
         insurance_company = #{record.insuranceCompany,jdbcType=VARCHAR},
       </if>
       <if test="record.insuranceLimit != null">
-        insurance_limit = #{record.insuranceLimit,jdbcType=DECIMAL},
+        insurance_limit = #{record.insuranceLimit,jdbcType=VARCHAR},
       </if>
       <if test="record.detailConditionName != null">
         detail_condition_name = #{record.detailConditionName,jdbcType=VARCHAR},
@@ -255,9 +257,6 @@
       <if test="record.kind != null">
         kind = #{record.kind,jdbcType=VARCHAR},
       </if>
-      <if test="record.detailConditionContent != null">
-        detail_condition_content = #{record.detailConditionContent,jdbcType=VARCHAR},
-      </if>
       <if test="record.features != null">
         features = #{record.features,jdbcType=LONGVARCHAR},
       </if>
@@ -276,6 +275,9 @@
       <if test="record.typicalCase != null">
         typical_case = #{record.typicalCase,jdbcType=LONGVARCHAR},
       </if>
+      <if test="record.detailConditionContent != null">
+        detail_condition_content = #{record.detailConditionContent,jdbcType=LONGVARCHAR},
+      </if>
     </set>
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -286,16 +288,16 @@
     set insurance_pro_id = #{record.insuranceProId,jdbcType=VARCHAR},
       name = #{record.name,jdbcType=VARCHAR},
       insurance_company = #{record.insuranceCompany,jdbcType=VARCHAR},
-      insurance_limit = #{record.insuranceLimit,jdbcType=DECIMAL},
+      insurance_limit = #{record.insuranceLimit,jdbcType=VARCHAR},
       detail_condition_name = #{record.detailConditionName,jdbcType=VARCHAR},
       kind = #{record.kind,jdbcType=VARCHAR},
-      detail_condition_content = #{record.detailConditionContent,jdbcType=VARCHAR},
       features = #{record.features,jdbcType=LONGVARCHAR},
       details = #{record.details,jdbcType=LONGVARCHAR},
       attention = #{record.attention,jdbcType=LONGVARCHAR},
       insurance_application = #{record.insuranceApplication,jdbcType=LONGVARCHAR},
       paraphrase = #{record.paraphrase,jdbcType=LONGVARCHAR},
-      typical_case = #{record.typicalCase,jdbcType=LONGVARCHAR}
+      typical_case = #{record.typicalCase,jdbcType=LONGVARCHAR},
+      detail_condition_content = #{record.detailConditionContent,jdbcType=LONGVARCHAR}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -305,10 +307,9 @@
     set insurance_pro_id = #{record.insuranceProId,jdbcType=VARCHAR},
       name = #{record.name,jdbcType=VARCHAR},
       insurance_company = #{record.insuranceCompany,jdbcType=VARCHAR},
-      insurance_limit = #{record.insuranceLimit,jdbcType=DECIMAL},
+      insurance_limit = #{record.insuranceLimit,jdbcType=VARCHAR},
       detail_condition_name = #{record.detailConditionName,jdbcType=VARCHAR},
-      kind = #{record.kind,jdbcType=VARCHAR},
-      detail_condition_content = #{record.detailConditionContent,jdbcType=VARCHAR}
+      kind = #{record.kind,jdbcType=VARCHAR}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -323,7 +324,7 @@
         insurance_company = #{insuranceCompany,jdbcType=VARCHAR},
       </if>
       <if test="insuranceLimit != null">
-        insurance_limit = #{insuranceLimit,jdbcType=DECIMAL},
+        insurance_limit = #{insuranceLimit,jdbcType=VARCHAR},
       </if>
       <if test="detailConditionName != null">
         detail_condition_name = #{detailConditionName,jdbcType=VARCHAR},
@@ -331,9 +332,6 @@
       <if test="kind != null">
         kind = #{kind,jdbcType=VARCHAR},
       </if>
-      <if test="detailConditionContent != null">
-        detail_condition_content = #{detailConditionContent,jdbcType=VARCHAR},
-      </if>
       <if test="features != null">
         features = #{features,jdbcType=LONGVARCHAR},
       </if>
@@ -352,6 +350,9 @@
       <if test="typicalCase != null">
         typical_case = #{typicalCase,jdbcType=LONGVARCHAR},
       </if>
+      <if test="detailConditionContent != null">
+        detail_condition_content = #{detailConditionContent,jdbcType=LONGVARCHAR},
+      </if>
     </set>
     where insurance_pro_id = #{insuranceProId,jdbcType=VARCHAR}
   </update>
@@ -359,26 +360,26 @@
     update insurance_pro
     set name = #{name,jdbcType=VARCHAR},
       insurance_company = #{insuranceCompany,jdbcType=VARCHAR},
-      insurance_limit = #{insuranceLimit,jdbcType=DECIMAL},
+      insurance_limit = #{insuranceLimit,jdbcType=VARCHAR},
       detail_condition_name = #{detailConditionName,jdbcType=VARCHAR},
       kind = #{kind,jdbcType=VARCHAR},
-      detail_condition_content = #{detailConditionContent,jdbcType=VARCHAR},
       features = #{features,jdbcType=LONGVARCHAR},
       details = #{details,jdbcType=LONGVARCHAR},
       attention = #{attention,jdbcType=LONGVARCHAR},
       insurance_application = #{insuranceApplication,jdbcType=LONGVARCHAR},
       paraphrase = #{paraphrase,jdbcType=LONGVARCHAR},
-      typical_case = #{typicalCase,jdbcType=LONGVARCHAR}
+      typical_case = #{typicalCase,jdbcType=LONGVARCHAR},
+      detail_condition_content = #{detailConditionContent,jdbcType=LONGVARCHAR}
     where insurance_pro_id = #{insuranceProId,jdbcType=VARCHAR}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.sztzjy.money_management.entity.InsurancePro">
     update insurance_pro
     set name = #{name,jdbcType=VARCHAR},
       insurance_company = #{insuranceCompany,jdbcType=VARCHAR},
-      insurance_limit = #{insuranceLimit,jdbcType=DECIMAL},
+      insurance_limit = #{insuranceLimit,jdbcType=VARCHAR},
       detail_condition_name = #{detailConditionName,jdbcType=VARCHAR},
-      kind = #{kind,jdbcType=VARCHAR},
-      detail_condition_content = #{detailConditionContent,jdbcType=VARCHAR}
+      kind = #{kind,jdbcType=VARCHAR}
     where insurance_pro_id = #{insuranceProId,jdbcType=VARCHAR}
   </update>
+
 </mapper>
\ No newline at end of file
diff --git a/src/main/resources/mapper/UserInfoMapper.xml b/src/main/resources/mapper/UserInfoMapper.xml
index b97faf5..5f633e1 100644
--- a/src/main/resources/mapper/UserInfoMapper.xml
+++ b/src/main/resources/mapper/UserInfoMapper.xml
@@ -351,7 +351,7 @@
     where userid = #{userid,jdbcType=VARCHAR}
   </update>
 
-  <insert id="batchInsertStudents" parameterType="java.util.List">
+  <insert id="batchInsertUserInfo" parameterType="java.util.List">
     INSERT INTO userinfo (userid, name, student_id, class_id,class_name, username, password, phone,
     email,major,
     role_id,create_time,school_id,school_name) VALUES