From 3547641f25634eec4b6dcf379080e92ed5025ee1 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期五, 21 六月 2024 14:21:52 +0800
Subject: [PATCH] 解决工时排序问题+考评bug调试

---
 performance-server/src/main/java/com/yuanchu/mom/service/impl/EvaluateCompetentServiceImpl.java        |    2 
 performance-server/src/main/java/com/yuanchu/mom/controller/EvaluateCompetentController.java           |    2 
 performance-server/src/main/resources/mapper/EvaluateGroupMapper.xml                                   |    2 
 performance-server/src/main/java/com/yuanchu/mom/dto/AuxiliaryOriginalHoursDto.java                    |    1 
 performance-server/src/main/java/com/yuanchu/mom/service/impl/EvaluateLeaderServiceImpl.java           |    2 
 performance-server/src/main/resources/mapper/EvaluateLeaderMapper.xml                                  |    2 
 performance-server/src/main/java/com/yuanchu/mom/controller/AuxiliaryOriginalHoursController.java      |    2 
 performance-server/src/main/java/com/yuanchu/mom/service/impl/EvaluateGroupServiceImpl.java            |    2 
 inspect-server/src/main/resources/mapper/StandardProductListMapper.xml                                 |   16 ++++-
 inspect-server/src/main/resources/mapper/StandardTreeMapper.xml                                        |   34 ++++++++---
 performance-server/src/main/java/com/yuanchu/mom/controller/EvaluateController.java                    |    2 
 cnas-server/src/main/resources/mapper/StructureItemParameterMapper.xml                                 |   12 +++
 performance-server/src/main/resources/mapper/EvaluateMapper.xml                                        |   10 +-
 performance-server/src/main/java/com/yuanchu/mom/controller/EvaluateLeaderController.java              |    2 
 inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardProductListServiceImpl.java          |   24 +++++++-
 system-run/src/main/java/com/yuanchu/mom/CodeGenerator.java                                            |    2 
 performance-server/src/main/resources/mapper/EvaluateCompetentMapper.xml                               |    2 
 performance-server/src/main/java/com/yuanchu/mom/service/impl/AuxiliaryCorrectionHoursServiceImpl.java |    2 
 18 files changed, 86 insertions(+), 35 deletions(-)

diff --git a/cnas-server/src/main/resources/mapper/StructureItemParameterMapper.xml b/cnas-server/src/main/resources/mapper/StructureItemParameterMapper.xml
index 44a1f3f..031e9e2 100644
--- a/cnas-server/src/main/resources/mapper/StructureItemParameterMapper.xml
+++ b/cnas-server/src/main/resources/mapper/StructureItemParameterMapper.xml
@@ -4,7 +4,9 @@
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.yuanchu.mom.mapper.StructureItemParameterMapper">
     <delete id="removeNoSample">
-        delete from structure_item_parameter where sample like concat('%',#{sample},'%')
+        delete
+        from structure_item_parameter
+        where sample like concat('%', #{sample}, '%')
     </delete>
     <select id="selectItemParameterList" resultType="com.yuanchu.mom.pojo.StructureItemParameter">
         select * from (select A.id,
@@ -54,7 +56,13 @@
         WHEN code IS NULL THEN 1
         ELSE 0
         END,
-        CAST(code AS UNSIGNED) asc
+        CAST(code AS UNSIGNED),
+        case when man_hour_group is NULL then 1
+        when man_hour_group ='' then 1  else 0 end,
+        CASE
+        WHEN man_hour_group REGEXP '^[0-9]' THEN CAST(man_hour_group AS UNSIGNED) -- 濡傛灉浠ユ暟瀛楀紑澶达紝鍒欐寜鐓ф暟瀛楀ぇ灏忔帓搴�
+        WHEN man_hour_group REGEXP '[0-9]+' THEN CAST(SUBSTRING(man_hour_group, 2)AS UNSIGNED) END -- 鎻愬彇瀛楁瘝鍚庨潰鐨勬暟瀛楅儴鍒�
+        ,id asc
     </select>
 
     <resultMap id="getInsProductions" type="map">
diff --git a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardProductListServiceImpl.java b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardProductListServiceImpl.java
index 491465c..a14f013 100644
--- a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardProductListServiceImpl.java
+++ b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardProductListServiceImpl.java
@@ -58,16 +58,19 @@
     public List<StandardProductList> selectStandardProductList(InsSample insSample) {
         String[] models = insSample.getModel().split("-(?=[^-]*$)");//鎷嗗垎鏈�鍚庝竴涓��-銆�
         String[] factorys = insSample.getFactory().split(" - ");
-        List<StandardProductList> list = standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery().eq(StandardProductList::getStandardMethodListId, insSample.getStandardMethodListId()).eq(StandardProductList::getState, 1).eq(StandardProductList::getModel, models[0]).eq(StandardProductList::getSampleType, factorys[2]));
+        //List<StandardProductList> list = standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery().eq(StandardProductList::getStandardMethodListId, insSample.getStandardMethodListId()).eq(StandardProductList::getState, 1).eq(StandardProductList::getModel, models[0]).eq(StandardProductList::getSampleType, factorys[2]));
+        List<StandardProductList> list = standardProductListMapper.selectDetail(insSample.getStandardMethodListId(), 1, models[0]);
         if (list.size() == 0) {
             if (Objects.equals(insSample.getFactory(), "") || insSample.getFactory() == null) {
                 return null;
             }
             String[] split = insSample.getFactory().split(" - ");
-            list = standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery()
+            list = standardProductListMapper.selectDetail2(insSample.getStandardMethodListId(), 1, split[0] + " - " + split[1] + " - " + split[2] + " - " + split[3]);
+           /* list = standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery()
                     .eq(StandardProductList::getStandardMethodListId, insSample.getStandardMethodListId())
                     .eq(StandardProductList::getState, 1)
-                    .like(StandardProductList::getTree, split[0] + " - " + split[1] + " - " + split[2] + " - " + split[3]));
+                    .like(StandardProductList::getTree, split[0] + " - " + split[1] + " - " + split[2] + " - " + split[3]));*/
+
         }
         list = list.stream().filter(a -> {
             try {
@@ -255,6 +258,15 @@
             });
         }
         Map<String, Object> map = new HashMap<>();
+        Collections.sort(list, (o1, o2) -> {
+            String field1 = o1.getManHourGroup();
+            String field2 = o2.getManHourGroup();
+
+            int num1 = extractNumber(field1);
+            int num2 = extractNumber(field2);
+
+            return Integer.compare(num1, num2);
+        });
         try {
             map.put("productList", list.subList((page - 1) * 50, page * 50));
         } catch (IndexOutOfBoundsException e) {
@@ -264,6 +276,12 @@
         return map;
     }
 
+    private int extractNumber(String s) {
+        // 浠庡瓧绗︿覆涓彁鍙栨暟瀛楃殑閫昏緫锛岃繖閲屽亣璁惧瓧娈电殑鏍煎紡鏄� "text<number>"
+        String number = s.replaceAll("\\D", "");
+        return Integer.parseInt(number);
+    }
+
     @Override
     public IPage<StandardProductList> selectStandardProductByMethodId(Integer id, String tree, Integer page, String laboratory, String item, String items) {
         IPage<StandardProductList> iPage = new Page<>();
diff --git a/inspect-server/src/main/resources/mapper/StandardProductListMapper.xml b/inspect-server/src/main/resources/mapper/StandardProductListMapper.xml
index 7393188..1a649df 100644
--- a/inspect-server/src/main/resources/mapper/StandardProductListMapper.xml
+++ b/inspect-server/src/main/resources/mapper/StandardProductListMapper.xml
@@ -66,15 +66,23 @@
         where standard_method_list_id = #{standardMethodListId}
         and state =#{state}
         and model=#{model}
-        order by case when man_hour_group is NULL then 1 else 0 end, CAST(man_hour_group as UNSIGNED),
-                 man_hour_group REGEXP '^[0-9]', id asc
+        order by case when man_hour_group is NULL then 1
+                      when man_hour_group ='' then 1  else 0 end,
+                 CASE
+                     WHEN man_hour_group REGEXP '^[0-9]' THEN CAST(man_hour_group AS UNSIGNED) -- 濡傛灉浠ユ暟瀛楀紑澶达紝鍒欐寜鐓ф暟瀛楀ぇ灏忔帓搴�
+                     WHEN man_hour_group REGEXP '[0-9]+' THEN CAST(SUBSTRING(man_hour_group, 2)AS UNSIGNED) END -- 鎻愬彇瀛楁瘝鍚庨潰鐨勬暟瀛楅儴鍒�
+                ,id asc
     </select>
     <select id="selectDetail2" resultType="com.yuanchu.mom.pojo.StandardProductList">
         select * from standard_product_list
         where standard_method_list_id = #{standardMethodListId}
           and state =#{state}
           and tree=#{tree}
-        order by case when man_hour_group is NULL then 1 else 0 end, CAST(man_hour_group as UNSIGNED),
-                 man_hour_group REGEXP '^[0-9]', id asc
+        order by case when man_hour_group is NULL then 1
+                      when man_hour_group ='' then 1  else 0 end,
+                 CASE
+                     WHEN man_hour_group REGEXP '^[0-9]' THEN CAST(man_hour_group AS UNSIGNED) -- 濡傛灉浠ユ暟瀛楀紑澶达紝鍒欐寜鐓ф暟瀛楀ぇ灏忔帓搴�
+                     WHEN man_hour_group REGEXP '[0-9]+' THEN CAST(SUBSTRING(man_hour_group, 2)AS UNSIGNED) END -- 鎻愬彇瀛楁瘝鍚庨潰鐨勬暟瀛楅儴鍒�
+                ,id asc
     </select>
 </mapper>
diff --git a/inspect-server/src/main/resources/mapper/StandardTreeMapper.xml b/inspect-server/src/main/resources/mapper/StandardTreeMapper.xml
index b461dc1..a01d630 100644
--- a/inspect-server/src/main/resources/mapper/StandardTreeMapper.xml
+++ b/inspect-server/src/main/resources/mapper/StandardTreeMapper.xml
@@ -57,7 +57,7 @@
                  left join product p on p.object_id = sto.id
                  left join standard_tree st on st.sample_type = sto.specimen_name
             and st.sample = p.name
-        order by l.id, CAST(sto.code AS DECIMAL), p.id, ISNULL(st.id), st.id
+        order by l.id, CAST(sto.code AS DECIMAL), p.id, ISNULL (st.id), st.id
     </select>
 
     <select id="selectStandardProductById" resultType="com.yuanchu.mom.pojo.StandardProductList">
@@ -166,8 +166,13 @@
                       or sample = '[]'
                       OR sample LIKE CONCAT('%[', #{tree}, ']%')
                   )
-        order by case when man_hour_group is NULL then 1 else 0 end, CAST(man_hour_group as UNSIGNED),
-                 man_hour_group REGEXP '^[0-9]', id asc
+        order by case when man_hour_group is NULL then 1
+                      when man_hour_group ='' then 1  else 0 end,
+                 CASE
+                     WHEN man_hour_group REGEXP '^[0-9]' THEN CAST(man_hour_group AS UNSIGNED) -- 濡傛灉浠ユ暟瀛楀紑澶达紝鍒欐寜鐓ф暟瀛楀ぇ灏忔帓搴�
+                     WHEN man_hour_group REGEXP '[0-9]+' THEN CAST(SUBSTRING(man_hour_group, 2)AS UNSIGNED) END -- 鎻愬彇瀛楁瘝鍚庨潰鐨勬暟瀛楅儴鍒�
+
+                ,id asc
     </select>
 
     <select id="selectStandardProductListByTree2" resultType="com.yuanchu.mom.pojo.StandardProductList">
@@ -202,8 +207,13 @@
                id        structure_item_parameter_id
         from structure_item_parameter
         where sample LIKE CONCAT('%[', #{tree}, ']%')
-        order by case when man_hour_group is NULL then 1 else 0 end, CAST(man_hour_group as UNSIGNED),
-                 man_hour_group REGEXP '^[0-9]', id asc
+        order by case when man_hour_group is NULL then 1
+                      when man_hour_group ='' then 1  else 0 end,
+                 CASE
+                     WHEN man_hour_group REGEXP '^[0-9]' THEN CAST(man_hour_group AS UNSIGNED) -- 濡傛灉浠ユ暟瀛楀紑澶达紝鍒欐寜鐓ф暟瀛楀ぇ灏忔帓搴�
+                     WHEN man_hour_group REGEXP '[0-9]+' THEN CAST(SUBSTRING(man_hour_group, 2)AS UNSIGNED) END -- 鎻愬彇瀛楁瘝鍚庨潰鐨勬暟瀛楅儴鍒�
+
+                ,id asc
     </select>
 
     <select id="getStandardTree2" resultMap="SampleTypeDto">
@@ -252,8 +262,13 @@
                       or sample = '[]'
                       OR sample LIKE CONCAT('%', #{tree}, '%')
                   )
-        order by case when man_hour_group is NULL then 1 else 0 end, CAST(man_hour_group as UNSIGNED),
-                 man_hour_group REGEXP '^[0-9]', id asc
+        order by case when man_hour_group is NULL then 1
+                      when man_hour_group ='' then 1  else 0 end,
+                 CASE
+                     WHEN man_hour_group REGEXP '^[0-9]' THEN CAST(man_hour_group AS UNSIGNED) -- 濡傛灉浠ユ暟瀛楀紑澶达紝鍒欐寜鐓ф暟瀛楀ぇ灏忔帓搴�
+                     WHEN man_hour_group REGEXP '[0-9]+' THEN CAST(SUBSTRING(man_hour_group, 2)AS UNSIGNED) END -- 鎻愬彇瀛楁瘝鍚庨潰鐨勬暟瀛楅儴鍒�
+
+                ,id asc
     </select>
     <select id="getStandardTree3" resultType="com.yuanchu.mom.dto.SampleDto">
         select model label,
@@ -280,8 +295,9 @@
         </if>
     </select>
     <select id="selectPList" resultType="com.yuanchu.mom.dto.ProductDto">
-        select p.name from structure_test_object sto
-        left join product p on p.object_id = sto.id
+        select p.name
+        from structure_test_object sto
+                 left join product p on p.object_id = sto.id
         where sto.specimen_name = #{name}
         order by p.id
     </select>
diff --git a/performance-server/src/main/java/com/yuanchu/mom/controller/AuxiliaryOriginalHoursController.java b/performance-server/src/main/java/com/yuanchu/mom/controller/AuxiliaryOriginalHoursController.java
index 7a3ef74..891a3de 100644
--- a/performance-server/src/main/java/com/yuanchu/mom/controller/AuxiliaryOriginalHoursController.java
+++ b/performance-server/src/main/java/com/yuanchu/mom/controller/AuxiliaryOriginalHoursController.java
@@ -38,7 +38,7 @@
 
     @ValueClassify("宸ユ椂绠$悊")
     @ApiOperation(value = "瀵煎嚭鍘熷宸ユ椂")
-    @GetMapping("/exportOriginalHours")
+    @PostMapping("/exportOriginalHours")
     public void exportOriginalHours(@RequestParam("month") String month,  @RequestParam("name") String name,  @RequestParam("departLims") String departLims,HttpServletResponse response) throws IOException {
         auxiliaryOriginalHoursService.exportWorkingHours(month,name,departLims,response);
     }
diff --git a/performance-server/src/main/java/com/yuanchu/mom/controller/EvaluateCompetentController.java b/performance-server/src/main/java/com/yuanchu/mom/controller/EvaluateCompetentController.java
index 8651fbd..4b2c315 100644
--- a/performance-server/src/main/java/com/yuanchu/mom/controller/EvaluateCompetentController.java
+++ b/performance-server/src/main/java/com/yuanchu/mom/controller/EvaluateCompetentController.java
@@ -48,7 +48,7 @@
 
     @ValueClassify("浜哄憳鑰冭瘎")
     @ApiOperation(value = "瀵煎嚭涓荤鎵撳垎")
-    @GetMapping("/exportEvaluateCompetent")
+    @PostMapping("/exportEvaluateCompetent")
     public void exportEvaluateCompetent(@RequestParam("month") String month, @RequestParam("name") String name, @RequestParam("departLims") String departLims, HttpServletResponse response) throws IOException {
         evaluateCompetentService.export(month, name, departLims, response);
     }
diff --git a/performance-server/src/main/java/com/yuanchu/mom/controller/EvaluateController.java b/performance-server/src/main/java/com/yuanchu/mom/controller/EvaluateController.java
index b5814d4..e9834ee 100644
--- a/performance-server/src/main/java/com/yuanchu/mom/controller/EvaluateController.java
+++ b/performance-server/src/main/java/com/yuanchu/mom/controller/EvaluateController.java
@@ -44,7 +44,7 @@
 
     @ValueClassify("浜哄憳鑰冭瘎")
     @ApiOperation(value = "瀵煎嚭鑰冭瘎")
-    @GetMapping("/exportEvaluate")
+    @PostMapping("/exportEvaluate")
     public void exportEvaluate(@RequestParam("month") String month, @RequestParam("name") String name, @RequestParam("departLims") String departLims, HttpServletResponse response) throws IOException {
         evaluateService.export(month, name, departLims, response);
     }
diff --git a/performance-server/src/main/java/com/yuanchu/mom/controller/EvaluateLeaderController.java b/performance-server/src/main/java/com/yuanchu/mom/controller/EvaluateLeaderController.java
index 404fd22..4e9f6c6 100644
--- a/performance-server/src/main/java/com/yuanchu/mom/controller/EvaluateLeaderController.java
+++ b/performance-server/src/main/java/com/yuanchu/mom/controller/EvaluateLeaderController.java
@@ -47,7 +47,7 @@
 
     @ValueClassify("浜哄憳鑰冭瘎")
     @ApiOperation(value = "瀵煎嚭缁勯暱鎵撳垎")
-    @GetMapping("/exportEvaluateLeader")
+    @PostMapping("/exportEvaluateLeader")
     public void exportEvaluateLeader(@RequestParam("month") String month, @RequestParam("name") String name, @RequestParam("departLims") String departLims, HttpServletResponse response) throws IOException {
         evaluateLeaderService.export(month, name, departLims, response);
     }
diff --git a/performance-server/src/main/java/com/yuanchu/mom/dto/AuxiliaryOriginalHoursDto.java b/performance-server/src/main/java/com/yuanchu/mom/dto/AuxiliaryOriginalHoursDto.java
index e247f70..04702b3 100644
--- a/performance-server/src/main/java/com/yuanchu/mom/dto/AuxiliaryOriginalHoursDto.java
+++ b/performance-server/src/main/java/com/yuanchu/mom/dto/AuxiliaryOriginalHoursDto.java
@@ -26,6 +26,7 @@
     @ExcelProperty(value = "1鏃�")
     private Double oneHours;
 
+    @ExcelIgnore
     private Integer one;
 
     @ApiModelProperty("2鏃ュ伐鏃�")
diff --git a/performance-server/src/main/java/com/yuanchu/mom/service/impl/AuxiliaryCorrectionHoursServiceImpl.java b/performance-server/src/main/java/com/yuanchu/mom/service/impl/AuxiliaryCorrectionHoursServiceImpl.java
index d91c8f0..957044d 100644
--- a/performance-server/src/main/java/com/yuanchu/mom/service/impl/AuxiliaryCorrectionHoursServiceImpl.java
+++ b/performance-server/src/main/java/com/yuanchu/mom/service/impl/AuxiliaryCorrectionHoursServiceImpl.java
@@ -115,7 +115,7 @@
                 throw new RuntimeException("绯荤粺娌℃湁鏌ュ埌" + auxiliaryCorrectionHoursDto.getName() + "杩欎釜鐢ㄦ埛淇℃伅!");
             }
             String regex = "\\d{4}-\\d{2}";
-            if (Pattern.matches(regex,auxiliaryCorrectionHours.getMonth())) {
+            if (!Pattern.matches(regex,auxiliaryCorrectionHoursDto.getMonth())) {
                 throw new RuntimeException(auxiliaryCorrectionHoursDto.getMonth() + "鏍煎紡涓嶆纭�,鏈堜唤鏍煎紡搴斾负yyyy-MM");
             }
             BeanUtils.copyProperties(auxiliaryCorrectionHoursDto, auxiliaryCorrectionHours);
diff --git a/performance-server/src/main/java/com/yuanchu/mom/service/impl/EvaluateCompetentServiceImpl.java b/performance-server/src/main/java/com/yuanchu/mom/service/impl/EvaluateCompetentServiceImpl.java
index 8f88526..9e0616b 100644
--- a/performance-server/src/main/java/com/yuanchu/mom/service/impl/EvaluateCompetentServiceImpl.java
+++ b/performance-server/src/main/java/com/yuanchu/mom/service/impl/EvaluateCompetentServiceImpl.java
@@ -52,7 +52,7 @@
         double newTotal = evaluateCompetent.getSkill() + evaluateCompetent.getCompliance() + evaluateCompetent.getPositive() + evaluateCompetent.getTidy() + evaluateCompetent.getDiscipline() + evaluateCompetent.getSolidarity() + evaluateCompetent.getProposal();
         EvaluateCompetent evaluateCompetent1 = evaluateCompetentMapper.selectById(evaluateCompetent.getId());
         Evaluate evaluate = evaluateMapper.selectById(evaluateCompetent.getEvaluateId());
-        evaluate.setScore(evaluate.getScore() - evaluateCompetent1.getTotal() + newTotal);
+        evaluate.setScore(evaluate.getScore() - evaluateCompetent1.getTotal() * 0.5 + newTotal * 0.5);
         evaluateMapper.updateById(evaluate);
         evaluateCompetent.setTotal(newTotal);
         evaluateCompetentMapper.updateById(evaluateCompetent);
diff --git a/performance-server/src/main/java/com/yuanchu/mom/service/impl/EvaluateGroupServiceImpl.java b/performance-server/src/main/java/com/yuanchu/mom/service/impl/EvaluateGroupServiceImpl.java
index 50d6ded..85feb33 100644
--- a/performance-server/src/main/java/com/yuanchu/mom/service/impl/EvaluateGroupServiceImpl.java
+++ b/performance-server/src/main/java/com/yuanchu/mom/service/impl/EvaluateGroupServiceImpl.java
@@ -43,7 +43,7 @@
         double newTotal = evaluateGroup.getSeasonable() + evaluateGroup.getExact() + evaluateGroup.getSkill() + evaluateGroup.getPreserve() + evaluateGroup.getDiscipline() + evaluateGroup.getSolidarity() + evaluateGroup.getTidy();
         EvaluateGroup evaluateGroup1 = evaluateGroupMapper.selectById(evaluateGroup.getId());
         Evaluate evaluate = evaluateMapper.selectById(evaluateGroup.getEvaluateId());
-        evaluate.setScore(evaluate.getScore() - evaluateGroup1.getTotal() + newTotal);
+        evaluate.setScore(evaluate.getScore() - evaluateGroup1.getTotal()*0.2 + newTotal*0.2);
         evaluateMapper.updateById(evaluate);
         evaluateGroup.setTotal(newTotal);
         evaluateGroupMapper.updateById(evaluateGroup);
diff --git a/performance-server/src/main/java/com/yuanchu/mom/service/impl/EvaluateLeaderServiceImpl.java b/performance-server/src/main/java/com/yuanchu/mom/service/impl/EvaluateLeaderServiceImpl.java
index 962d4d0..d67a746 100644
--- a/performance-server/src/main/java/com/yuanchu/mom/service/impl/EvaluateLeaderServiceImpl.java
+++ b/performance-server/src/main/java/com/yuanchu/mom/service/impl/EvaluateLeaderServiceImpl.java
@@ -51,7 +51,7 @@
         double newTotal = evaluateLeader.getSeasonable() + evaluateLeader.getExact() + evaluateLeader.getResponsibility() + evaluateLeader.getCompliance() + evaluateLeader.getPositive() + evaluateLeader.getSolidarity();
         EvaluateLeader evaluateLeader1 = evaluateLeaderMapper.selectById(evaluateLeader.getId());
         Evaluate evaluate = evaluateMapper.selectById(evaluateLeader.getEvaluateId());
-        evaluate.setScore(evaluate.getScore() - evaluateLeader1.getTotal() + newTotal);
+        evaluate.setScore(evaluate.getScore() - evaluateLeader1.getTotal() * 0.3 + newTotal * 0.3);
         evaluateMapper.updateById(evaluate);
         evaluateLeader.setTotal(newTotal);
         evaluateLeaderMapper.updateById(evaluateLeader);
diff --git a/performance-server/src/main/resources/mapper/EvaluateCompetentMapper.xml b/performance-server/src/main/resources/mapper/EvaluateCompetentMapper.xml
index f1479a1..205c05e 100644
--- a/performance-server/src/main/resources/mapper/EvaluateCompetentMapper.xml
+++ b/performance-server/src/main/resources/mapper/EvaluateCompetentMapper.xml
@@ -27,7 +27,7 @@
         from evaluate_competent ec
         left join evaluate e on ec.evaluate_id = e.id
         left join user u on e.user_id = u.id
-        left join department_lims dl on depart_lims_id like  dl.id
+        left join department_lims dl on depart_lims_id like concat('%',dl.id,'%')
         where 1=1
         <if test="month!=null and month!=''">
             and e.month=#{month}
diff --git a/performance-server/src/main/resources/mapper/EvaluateGroupMapper.xml b/performance-server/src/main/resources/mapper/EvaluateGroupMapper.xml
index ec731cd..e80061d 100644
--- a/performance-server/src/main/resources/mapper/EvaluateGroupMapper.xml
+++ b/performance-server/src/main/resources/mapper/EvaluateGroupMapper.xml
@@ -25,7 +25,7 @@
         from evaluate_group eg
         left join evaluate e on eg.evaluate_id = e.id
         left join user u on e.user_id = u.id
-        left join department_lims dl on depart_lims_id like  dl.id
+        left join department_lims dl on depart_lims_id like concat('%',dl.id,'%')
         where 1=1
         <if test="month!=null and month!=''">
             and e.month=#{month}
diff --git a/performance-server/src/main/resources/mapper/EvaluateLeaderMapper.xml b/performance-server/src/main/resources/mapper/EvaluateLeaderMapper.xml
index 1bd8468..b7f0755 100644
--- a/performance-server/src/main/resources/mapper/EvaluateLeaderMapper.xml
+++ b/performance-server/src/main/resources/mapper/EvaluateLeaderMapper.xml
@@ -25,7 +25,7 @@
         from evaluate_leader el
         left join evaluate e on el.evaluate_id = e.id
         left join user u on e.user_id = u.id
-        left join department_lims dl on depart_lims_id like  dl.id
+        left join department_lims dl on depart_lims_id like concat('%',dl.id,'%')
         where 1=1
         <if test="month!=null and month!=''">
             and e.month=#{month}
diff --git a/performance-server/src/main/resources/mapper/EvaluateMapper.xml b/performance-server/src/main/resources/mapper/EvaluateMapper.xml
index c1914b3..e55ca24 100644
--- a/performance-server/src/main/resources/mapper/EvaluateMapper.xml
+++ b/performance-server/src/main/resources/mapper/EvaluateMapper.xml
@@ -16,19 +16,19 @@
         <result column="leaderTotal" property="leaderTotal"/>
     </resultMap>
     <select id="getPage" resultType="com.yuanchu.mom.pojo.Evaluate">
-        select  * from(select e.*,
+        select * from(select e.*,
         account,
         u.name name,
         dl.name depart_lims,
-        ec.total competentTotal,
-        eg.total groupTotal,
-        el.total leaderTotal
+        ec.total*0.5 competentTotal,
+        eg.total*0.2 groupTotal,
+        el.total*0.3 leaderTotal
         from evaluate e
         left join evaluate_competent ec on e.id = ec.evaluate_id
         left join evaluate_group eg on e.id = eg.evaluate_id
         left join evaluate_leader el on e.id = el.evaluate_id
         left join user u on e.user_id = u.id
-        left join department_lims dl on depart_lims_id like dl.id ) A
+        left join department_lims dl on depart_lims_id like concat('%',dl.id,'%') ) A
         <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
             ${ew.customSqlSegment}
         </if>
diff --git a/system-run/src/main/java/com/yuanchu/mom/CodeGenerator.java b/system-run/src/main/java/com/yuanchu/mom/CodeGenerator.java
index d6c63d8..8c9fc9a 100644
--- a/system-run/src/main/java/com/yuanchu/mom/CodeGenerator.java
+++ b/system-run/src/main/java/com/yuanchu/mom/CodeGenerator.java
@@ -20,7 +20,7 @@
     public static String database_username = "root";
     public static String database_password= "123456";
     public static String author = "姹熻嫃榈烽洀缃戠粶绉戞妧鏈夐檺鍏徃";
-    public static String model_name = "/performance-server"; // 濡傛灉涓哄垎甯冨紡濉瓙妯″潡鍚嶇О锛屽鏋滀笉鏄垎甯冨紡涓虹┖鍗冲彲
+    public static String model_name = "/cnas-server"; // 濡傛灉涓哄垎甯冨紡濉瓙妯″潡鍚嶇О锛屽鏋滀笉鏄垎甯冨紡涓虹┖鍗冲彲
     public static String setParent = "com.yuanchu.mom"; // 鍖呰矾寰�
     public static void main(String[] args) {
         String projectPath = System.getProperty("user.dir");

--
Gitblit v1.9.3