From f31ae33e37895b9517ee6ace6bd703f4bbb47e81 Mon Sep 17 00:00:00 2001
From: value <z1292839451@163.com>
Date: 星期日, 23 六月 2024 23:44:30 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 cnas-server/src/main/resources/mapper/DeviceMapper.xml                                                 |   20 +
 performance-server/src/main/java/com/yuanchu/mom/controller/EvaluateCompetentController.java           |   40 ++
 cnas-server/src/main/java/com/yuanchu/mom/dto/DeviceDto.java                                           |    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           |   61 ++++
 performance-server/src/main/resources/mapper/EvaluateLeaderMapper.xml                                  |   20 +
 performance-server/src/main/java/com/yuanchu/mom/service/impl/EvaluateGroupServiceImpl.java            |   32 ++
 performance-server/src/main/java/com/yuanchu/mom/service/impl/EvaluateServiceImpl.java                 |   51 +++
 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/pojo/EvaluateLeader.java                              |   20 +
 cnas-server/src/main/resources/mapper/LaboratoryMapper.xml                                             |    1 
 inspect-server/src/main/java/com/yuanchu/mom/vo/InsOrderPlanVO.java                                    |    4 
 performance-server/src/main/java/com/yuanchu/mom/mapper/EvaluateMapper.java                            |    5 
 inspect-server/src/main/java/com/yuanchu/mom/service/impl/StandardProductListServiceImpl.java          |   24 +
 performance-server/src/main/java/com/yuanchu/mom/controller/EvaluateGroupController.java               |   32 ++
 performance-server/src/main/java/com/yuanchu/mom/service/AuxiliaryOriginalHoursService.java            |    2 
 performance-server/src/main/java/com/yuanchu/mom/service/EvaluateService.java                          |    7 
 performance-server/src/main/java/com/yuanchu/mom/mapper/EvaluateGroupMapper.java                       |    6 
 cnas-server/src/main/java/com/yuanchu/mom/pojo/Laboratory.java                                         |    4 
 performance-server/src/main/java/com/yuanchu/mom/mapper/EvaluateLeaderMapper.java                      |    4 
 performance-server/src/main/java/com/yuanchu/mom/service/EvaluateLeaderService.java                    |   16 +
 performance-server/src/main/java/com/yuanchu/mom/service/impl/EvaluateCompetentServiceImpl.java        |   63 ++++
 performance-server/src/main/java/com/yuanchu/mom/mapper/EvaluateCompetentMapper.java                   |    4 
 performance-server/src/main/resources/mapper/EvaluateGroupMapper.xml                                   |   49 ++-
 inspect-server/src/main/resources/mapper/InsSampleMapper.xml                                           |    2 
 performance-server/src/main/java/com/yuanchu/mom/controller/AuxiliaryOriginalHoursController.java      |    6 
 performance-server/src/main/java/com/yuanchu/mom/service/EvaluateGroupService.java                     |   16 +
 performance-server/src/main/java/com/yuanchu/mom/service/EvaluateCompetentService.java                 |   10 
 performance-server/src/main/java/com/yuanchu/mom/controller/EvaluateController.java                    |   18 
 cnas-server/src/main/resources/mapper/StructureItemParameterMapper.xml                                 |   28 +
 performance-server/src/main/resources/mapper/EvaluateMapper.xml                                        |   36 ++
 performance-server/src/main/java/com/yuanchu/mom/pojo/EvaluateCompetent.java                           |   24 +
 performance-server/src/main/java/com/yuanchu/mom/controller/EvaluateLeaderController.java              |   39 ++
 performance-server/src/main/java/com/yuanchu/mom/service/impl/AuxiliaryOriginalHoursServiceImpl.java   |   17 +
 performance-server/src/main/java/com/yuanchu/mom/dto/EvaluateGroupDto.java                             |   17 +
 performance-server/src/main/java/com/yuanchu/mom/pojo/Evaluate.java                                    |   20 +
 performance-server/src/main/java/com/yuanchu/mom/pojo/EvaluateGroup.java                               |    4 
 system-run/src/main/java/com/yuanchu/mom/CodeGenerator.java                                            |    2 
 performance-server/src/main/resources/mapper/EvaluateCompetentMapper.xml                               |   21 +
 performance-server/src/main/java/com/yuanchu/mom/service/impl/AuxiliaryCorrectionHoursServiceImpl.java |    2 
 41 files changed, 705 insertions(+), 75 deletions(-)

diff --git a/cnas-server/src/main/java/com/yuanchu/mom/dto/DeviceDto.java b/cnas-server/src/main/java/com/yuanchu/mom/dto/DeviceDto.java
index 8bd8ce8..5963016 100644
--- a/cnas-server/src/main/java/com/yuanchu/mom/dto/DeviceDto.java
+++ b/cnas-server/src/main/java/com/yuanchu/mom/dto/DeviceDto.java
@@ -22,5 +22,5 @@
 
     @ValueTableShow(13)
     @ApiModelProperty(value = "妫�楠岄」鐩�")
-    private Integer insProductItem;
+    private String insProductItem;
 }
diff --git a/cnas-server/src/main/java/com/yuanchu/mom/pojo/Laboratory.java b/cnas-server/src/main/java/com/yuanchu/mom/pojo/Laboratory.java
index 42114b0..444ec92 100644
--- a/cnas-server/src/main/java/com/yuanchu/mom/pojo/Laboratory.java
+++ b/cnas-server/src/main/java/com/yuanchu/mom/pojo/Laboratory.java
@@ -30,6 +30,10 @@
     @ApiModelProperty(value = "鍦烘墍缂栫爜")
     private String laboratoryNumber;
 
+    @ValueTableShow(3)
+    @ApiModelProperty(value = "瀹為獙瀹や唬鍙�")
+    private String laboratoryCode;
+
     @ValueTableShow(4)
     @ApiModelProperty(value = "璐熻矗浜虹數璇�")
     private String phoneNumber;
diff --git a/cnas-server/src/main/resources/mapper/DeviceMapper.xml b/cnas-server/src/main/resources/mapper/DeviceMapper.xml
index 44655bd..6eaebf9 100644
--- a/cnas-server/src/main/resources/mapper/DeviceMapper.xml
+++ b/cnas-server/src/main/resources/mapper/DeviceMapper.xml
@@ -93,11 +93,25 @@
     <select id="selectDeviceParameterPage" resultType="com.yuanchu.mom.dto.DeviceDto">
         select * from(
         SELECT
-        d.*, u.name equipmentManagerUser, l.laboratory_name laboratoryName
+        d.*,
+        GROUP_CONCAT(
+        CONCAT_WS(', ',
+        TRIM(BOTH '["]' FROM SUBSTRING_INDEX(REPLACE(sample, '[["', ''), '"]]', 1)),
+        inspection_item,
+        inspection_item_subclass
+        )
+        SEPARATOR ';'
+        ) AS insProductItem,
+        u.name ,
+        l.laboratory_name
         FROM
         device d
-        left join `user` u on u.id = d.equipment_manager
-        left join laboratory l on l.id = d.subordinate_departments_id
+        LEFT JOIN `user` u ON u.id = d.equipment_manager
+        LEFT JOIN laboratory l ON l.id = d.subordinate_departments_id
+        LEFT JOIN structure_item_parameter sip ON FIND_IN_SET(sip.id, d.ins_product_ids)
+        GROUP BY
+        d.id,
+        u.name, l.laboratory_name
         ) a
         <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
             ${ew.customSqlSegment}
diff --git a/cnas-server/src/main/resources/mapper/LaboratoryMapper.xml b/cnas-server/src/main/resources/mapper/LaboratoryMapper.xml
index bba2d21..1251b4f 100644
--- a/cnas-server/src/main/resources/mapper/LaboratoryMapper.xml
+++ b/cnas-server/src/main/resources/mapper/LaboratoryMapper.xml
@@ -10,6 +10,7 @@
         select l.id,
         laboratory_name,
         laboratory_number,
+        laboratory_code,
         phone_number,
         head,
         l.address,
diff --git a/cnas-server/src/main/resources/mapper/StructureItemParameterMapper.xml b/cnas-server/src/main/resources/mapper/StructureItemParameterMapper.xml
index 44a1f3f..02911c3 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,19 +56,37 @@
         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">
-        <result property="name" column="inspection_item"/>
+        <result property="name" column="sample"/>
         <collection property="children" resultMap="seProInsListByIdmaps" javaType="List"/>
     </resultMap>
     <resultMap id="seProInsListByIdmaps" type="map">
+        <result property="name" column="inspection_item"/>
+        <collection property="children" resultMap="seProInsListByIdmaps2" javaType="List"/>
+    </resultMap>
+    <resultMap id="seProInsListByIdmaps2" type="map">
         <id property="id" column="id"/>
         <result property="name" column="subclass"/>
     </resultMap>
     <select id="getInsProduction" resultMap="getInsProductions">
-        select id,
+        select distinct id,
+               CASE
+                   WHEN INSTR(sample, ',') > 0 THEN
+                       SUBSTRING_INDEX(SUBSTRING_INDEX(sample, '","', 1), '"', -1)
+                   when sample = '[""]' then '*'
+                   ELSE
+                       TRIM(BOTH '["]' FROM SUBSTRING_INDEX(REPLACE(sample, '[["', ''), '"]]', 1))
+                   END
+                as sample,
                inspection_item,
                case
                    when inspection_item_subclass is null then inspection_item
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 66ca4aa..0aca9ac 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 {
@@ -373,6 +376,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) {
@@ -382,6 +394,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/java/com/yuanchu/mom/vo/InsOrderPlanVO.java b/inspect-server/src/main/java/com/yuanchu/mom/vo/InsOrderPlanVO.java
index 7a2681d..2f724d6 100644
--- a/inspect-server/src/main/java/com/yuanchu/mom/vo/InsOrderPlanVO.java
+++ b/inspect-server/src/main/java/com/yuanchu/mom/vo/InsOrderPlanVO.java
@@ -13,8 +13,8 @@
     @ValueTableShow(value = 1,name = "濮旀墭缂栧彿")
     private String entrustCode;
 
-    @ValueTableShow(value = 2,name = "妫�楠屽璞�")
-    private String sampleType;
+    @ValueTableShow(value = 2,name = "鏍峰搧鍚嶇О")
+    private String sample;
 
     @ValueTableShow(value = 4,name = "绱ф�ョ▼搴�")
     private String type;
diff --git a/inspect-server/src/main/resources/mapper/InsSampleMapper.xml b/inspect-server/src/main/resources/mapper/InsSampleMapper.xml
index 3d0ac72..32195f8 100644
--- a/inspect-server/src/main/resources/mapper/InsSampleMapper.xml
+++ b/inspect-server/src/main/resources/mapper/InsSampleMapper.xml
@@ -37,7 +37,7 @@
         io.type,
         io.appointed,
         io.send_time,
-        io.sample_type,
+        group_concat(distinct isa.sample,' ') sample,
         isu.user_id,
         ip.son_laboratory,
         io.ins_time
diff --git a/inspect-server/src/main/resources/mapper/StandardProductListMapper.xml b/inspect-server/src/main/resources/mapper/StandardProductListMapper.xml
index e43e303..7931dcd 100644
--- a/inspect-server/src/main/resources/mapper/StandardProductListMapper.xml
+++ b/inspect-server/src/main/resources/mapper/StandardProductListMapper.xml
@@ -67,15 +67,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 8658998..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,8 +38,8 @@
 
     @ValueClassify("宸ユ椂绠$悊")
     @ApiOperation(value = "瀵煎嚭鍘熷宸ユ椂")
-    @GetMapping("/exportOriginalHours")
-    public void exportOriginalHours(@RequestBody AuxiliaryOriginalHoursLookDto auxiliaryOriginalHoursLookDto,HttpServletResponse response) throws IOException {
-        auxiliaryOriginalHoursService.exportWorkingHours(auxiliaryOriginalHoursLookDto,response);
+    @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 e1e453f..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
@@ -1,8 +1,20 @@
 package com.yuanchu.mom.controller;
 
+import com.yuanchu.mom.annotation.ValueClassify;
+import com.yuanchu.mom.dto.EvaluateGroupDto;
+import com.yuanchu.mom.mapper.EvaluateCompetentMapper;
+import com.yuanchu.mom.pojo.EvaluateCompetent;
+import com.yuanchu.mom.pojo.EvaluateLeader;
+import com.yuanchu.mom.service.EvaluateCompetentService;
+import com.yuanchu.mom.service.EvaluateLeaderService;
+import com.yuanchu.mom.vo.Result;
 import io.swagger.annotations.Api;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
 
 /**
  * <p>
@@ -17,4 +29,28 @@
 @RequestMapping("/evaluateCompetent")
 public class EvaluateCompetentController {
 
+    @Resource
+    private EvaluateCompetentService evaluateCompetentService;
+
+    @ValueClassify("浜哄憳鑰冭瘎")
+    @ApiOperation(value="鏌ヨ涓荤鎵撳垎")
+    @PostMapping("/getEvaluateCompetent")
+    public Result getEvaluateCompetent(@RequestBody EvaluateGroupDto evaluateGroupDto)  {
+        return Result.success(evaluateCompetentService.getEvaluateCompetent(evaluateGroupDto));
+    }
+
+    @ValueClassify("浜哄憳鑰冭瘎")
+    @ApiOperation(value="濉啓涓荤鎵撳垎")
+    @PostMapping("/writeEvaluateCompetent")
+    public Result writeEvaluateCompetent(@RequestBody EvaluateCompetent evaluateCompetent)  {
+        return Result.success(evaluateCompetentService.writeEvaluateCompetent(evaluateCompetent));
+    }
+
+    @ValueClassify("浜哄憳鑰冭瘎")
+    @ApiOperation(value = "瀵煎嚭涓荤鎵撳垎")
+    @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 49f76bb..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
@@ -9,12 +9,11 @@
 import com.yuanchu.mom.vo.Result;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
 import java.util.Map;
 
 /**
@@ -35,12 +34,19 @@
     private EvaluateService evaluateService;
 
     @ValueClassify("浜哄憳鑰冭瘎")
-    @ApiOperation(value="鑰冭瘎鍒嗛〉鏌ヨ")
+    @ApiOperation(value = "鏌ヨ鑰冭瘎")
     @PostMapping("/page")
     public Result page(@RequestBody Map<String, Object> data) throws Exception {
         Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class);
         Evaluate entity = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), Evaluate.class);
-        return Result.success(evaluateService.getPage(page,entity));
+        return Result.success(evaluateService.getPage(page, entity));
+    }
+
+    @ValueClassify("浜哄憳鑰冭瘎")
+    @ApiOperation(value = "瀵煎嚭鑰冭瘎")
+    @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/EvaluateGroupController.java b/performance-server/src/main/java/com/yuanchu/mom/controller/EvaluateGroupController.java
index 4586c0c..4c095b4 100644
--- a/performance-server/src/main/java/com/yuanchu/mom/controller/EvaluateGroupController.java
+++ b/performance-server/src/main/java/com/yuanchu/mom/controller/EvaluateGroupController.java
@@ -1,8 +1,22 @@
 package com.yuanchu.mom.controller;
 
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.yuanchu.mom.annotation.ValueClassify;
+import com.yuanchu.mom.dto.EvaluateGroupDto;
+import com.yuanchu.mom.pojo.Evaluate;
+import com.yuanchu.mom.pojo.EvaluateGroup;
+import com.yuanchu.mom.service.EvaluateGroupService;
+import com.yuanchu.mom.utils.JackSonUtil;
+import com.yuanchu.mom.vo.Result;
 import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import java.util.Map;
 
 /**
  * <p>
@@ -17,4 +31,22 @@
 @RequestMapping("/evaluateGroup")
 public class EvaluateGroupController {
 
+
+    @Resource
+    private EvaluateGroupService evaluateGroupService;
+
+    @ValueClassify("浜哄憳鑰冭瘎")
+    @ApiOperation(value="鏌ヨ鍛樺伐浜掕瘎")
+    @PostMapping("/getEvaluateGroup")
+    public Result getEvaluateGroup(@RequestBody EvaluateGroupDto evaluateGroupDto)  {
+        return Result.success(evaluateGroupService.getEvaluateGroup(evaluateGroupDto));
+    }
+
+    @ValueClassify("浜哄憳鑰冭瘎")
+    @ApiOperation(value="濉啓鍛樺伐浜掕瘎")
+    @PostMapping("/writeEvaluateGroup")
+    public Result writeEvaluateGroup(@RequestBody EvaluateGroup evaluateGroup)  {
+        return Result.success(evaluateGroupService.writeEvaluateGroup(evaluateGroup));
+    }
+
 }
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 5b8abde..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
@@ -1,8 +1,19 @@
 package com.yuanchu.mom.controller;
 
+import com.yuanchu.mom.annotation.ValueClassify;
+import com.yuanchu.mom.dto.EvaluateGroupDto;
+import com.yuanchu.mom.pojo.EvaluateGroup;
+import com.yuanchu.mom.pojo.EvaluateLeader;
+import com.yuanchu.mom.service.EvaluateGroupService;
+import com.yuanchu.mom.service.EvaluateLeaderService;
+import com.yuanchu.mom.vo.Result;
 import io.swagger.annotations.Api;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
 
 /**
  * <p>
@@ -17,4 +28,28 @@
 @RequestMapping("/evaluateLeader")
 public class EvaluateLeaderController {
 
+    @Resource
+    private EvaluateLeaderService evaluateLeaderService;
+
+    @ValueClassify("浜哄憳鑰冭瘎")
+    @ApiOperation(value="鏌ヨ缁勯暱璇勫垎")
+    @PostMapping("/getEvaluateLeader")
+    public Result getEvaluateLeader(@RequestBody EvaluateGroupDto evaluateGroupDto)  {
+        return Result.success(evaluateLeaderService.getEvaluateLeader(evaluateGroupDto));
+    }
+
+    @ValueClassify("浜哄憳鑰冭瘎")
+    @ApiOperation(value="濉啓缁勯暱璇勫垎")
+    @PostMapping("/writeEvaluateLeader")
+    public Result writeEvaluateLeader(@RequestBody EvaluateLeader evaluateLeader)  {
+        return Result.success(evaluateLeaderService.writeEvaluateLeader(evaluateLeader));
+    }
+
+    @ValueClassify("浜哄憳鑰冭瘎")
+    @ApiOperation(value = "瀵煎嚭缁勯暱鎵撳垎")
+    @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/dto/EvaluateGroupDto.java b/performance-server/src/main/java/com/yuanchu/mom/dto/EvaluateGroupDto.java
new file mode 100644
index 0000000..ff5acfb
--- /dev/null
+++ b/performance-server/src/main/java/com/yuanchu/mom/dto/EvaluateGroupDto.java
@@ -0,0 +1,17 @@
+package com.yuanchu.mom.dto;
+
+import lombok.Data;
+
+@Data
+//鍛樺伐浜掕瘎鏌ヨ鏉′欢
+public class EvaluateGroupDto {
+
+    //鏈堜唤
+    private String month;
+
+    //瀹為獙瀹�
+    private String departLims;
+
+    //浜哄憳鍚嶇О
+    private String name;
+}
diff --git a/performance-server/src/main/java/com/yuanchu/mom/mapper/EvaluateCompetentMapper.java b/performance-server/src/main/java/com/yuanchu/mom/mapper/EvaluateCompetentMapper.java
index 244d9a2..a884bf3 100644
--- a/performance-server/src/main/java/com/yuanchu/mom/mapper/EvaluateCompetentMapper.java
+++ b/performance-server/src/main/java/com/yuanchu/mom/mapper/EvaluateCompetentMapper.java
@@ -2,6 +2,9 @@
 
 import com.yuanchu.mom.pojo.EvaluateCompetent;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 /**
  * <p>
@@ -13,4 +16,5 @@
  */
 public interface EvaluateCompetentMapper extends BaseMapper<EvaluateCompetent> {
 
+    List<EvaluateCompetent> getEvaluateCompetent(@Param("month") String month, @Param("departLims") String departLims, @Param("name") String name);
 }
diff --git a/performance-server/src/main/java/com/yuanchu/mom/mapper/EvaluateGroupMapper.java b/performance-server/src/main/java/com/yuanchu/mom/mapper/EvaluateGroupMapper.java
index 324a88d..bf132a6 100644
--- a/performance-server/src/main/java/com/yuanchu/mom/mapper/EvaluateGroupMapper.java
+++ b/performance-server/src/main/java/com/yuanchu/mom/mapper/EvaluateGroupMapper.java
@@ -1,7 +1,11 @@
 package com.yuanchu.mom.mapper;
 
+import com.yuanchu.mom.dto.EvaluateGroupDto;
 import com.yuanchu.mom.pojo.EvaluateGroup;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 /**
  * <p>
@@ -13,4 +17,6 @@
  */
 public interface EvaluateGroupMapper extends BaseMapper<EvaluateGroup> {
 
+
+    List<EvaluateGroup> getEvaluateGroup(@Param("month") String month, @Param("departLims") String departLims, @Param("name") String name);
 }
diff --git a/performance-server/src/main/java/com/yuanchu/mom/mapper/EvaluateLeaderMapper.java b/performance-server/src/main/java/com/yuanchu/mom/mapper/EvaluateLeaderMapper.java
index b3c5739..26ba7fe 100644
--- a/performance-server/src/main/java/com/yuanchu/mom/mapper/EvaluateLeaderMapper.java
+++ b/performance-server/src/main/java/com/yuanchu/mom/mapper/EvaluateLeaderMapper.java
@@ -2,6 +2,9 @@
 
 import com.yuanchu.mom.pojo.EvaluateLeader;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
 
 /**
  * <p>
@@ -13,4 +16,5 @@
  */
 public interface EvaluateLeaderMapper extends BaseMapper<EvaluateLeader> {
 
+    List<EvaluateLeader> getEvaluateLeader(@Param("month") String month, @Param("departLims") String departLims, @Param("name") String name);
 }
diff --git a/performance-server/src/main/java/com/yuanchu/mom/mapper/EvaluateMapper.java b/performance-server/src/main/java/com/yuanchu/mom/mapper/EvaluateMapper.java
index b9423a0..e5831be 100644
--- a/performance-server/src/main/java/com/yuanchu/mom/mapper/EvaluateMapper.java
+++ b/performance-server/src/main/java/com/yuanchu/mom/mapper/EvaluateMapper.java
@@ -1,7 +1,11 @@
 package com.yuanchu.mom.mapper;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.yuanchu.mom.pojo.Evaluate;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * <p>
@@ -13,4 +17,5 @@
  */
 public interface EvaluateMapper extends BaseMapper<Evaluate> {
 
+    IPage<Evaluate> getPage(@Param("page") Page page, @Param("ew") QueryWrapper<Evaluate> ew);
 }
diff --git a/performance-server/src/main/java/com/yuanchu/mom/pojo/Evaluate.java b/performance-server/src/main/java/com/yuanchu/mom/pojo/Evaluate.java
index 8de043a..27031dd 100644
--- a/performance-server/src/main/java/com/yuanchu/mom/pojo/Evaluate.java
+++ b/performance-server/src/main/java/com/yuanchu/mom/pojo/Evaluate.java
@@ -1,5 +1,7 @@
 package com.yuanchu.mom.pojo;
 
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.alibaba.excel.annotation.ExcelProperty;
 import com.baomidou.mybatisplus.annotation.FieldFill;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
@@ -28,51 +30,69 @@
 public class Evaluate extends OrderBy implements Serializable {
 
     @TableId(value = "id", type = IdType.AUTO)
+    @ExcelIgnore
     private Integer id;
 
     @ApiModelProperty("澶栭敭 鍏宠仈鐢ㄦ埛id")
+    @ExcelIgnore
     private Integer userId;
 
     @ValueTableShow(value = 1, name = "宸ュ彿")
     @TableField(exist = false,select = false)
+    @ExcelProperty(value = "宸ュ彿")
     private String account;
 
     @ValueTableShow(value = 2, name = "濮撳悕")
     @TableField(exist = false,select = false)
+    @ExcelProperty(value = "濮撳悕")
     private String name;
+
+    @TableField(exist = false,select = false)
+    //瀹為獙瀹�
+    private String departLims;
 
     @ValueTableShow(value = 3, name = "鍛樺伐浜掕瘎")
     @TableField(exist = false,select = false)
+    @ExcelProperty(value = "鍛樺伐浜掕瘎")
     private Double groupTotal;
 
     @ValueTableShow(value = 4, name = "缁勯暱璇勫垎")
     @TableField(exist = false,select = false)
+    @ExcelProperty(value = "鍛樺伐浜掕瘎")
     private Double leaderTotal;
 
     @ValueTableShow(value = 5, name = "涓荤璇勫垎")
     @TableField(exist = false,select = false)
+    @ExcelProperty(value = "涓荤璇勫垎")
     private Double competentTotal;
 
     @ApiModelProperty("鑰冭瘎寰楀垎")
     @ValueTableShow(6)
+    @ExcelProperty(value = "鑰冭瘎寰楀垎")
     private Double score;
 
     @ApiModelProperty("鑰冭瘎绛夌骇")
     @ValueTableShow(7)
+    @ExcelProperty(value = "鑰冭瘎绛夌骇")
     private String grade;
 
     @ApiModelProperty("鏈堜唤")
+    @ExcelIgnore
     private String month;
 
     @TableField(fill = FieldFill.INSERT)
+    @ExcelIgnore
     private LocalDateTime createTime;
 
     @TableField(fill = FieldFill.INSERT_UPDATE)
+    @ExcelIgnore
     private LocalDateTime updateTime;
 
     @TableField(fill = FieldFill.INSERT)
+    @ExcelIgnore
     private Integer createUser;
 
     @TableField(fill = FieldFill.INSERT_UPDATE)
+    @ExcelIgnore
     private Integer updateUser;
 }
diff --git a/performance-server/src/main/java/com/yuanchu/mom/pojo/EvaluateCompetent.java b/performance-server/src/main/java/com/yuanchu/mom/pojo/EvaluateCompetent.java
index 6b681ea..2fff441 100644
--- a/performance-server/src/main/java/com/yuanchu/mom/pojo/EvaluateCompetent.java
+++ b/performance-server/src/main/java/com/yuanchu/mom/pojo/EvaluateCompetent.java
@@ -1,10 +1,13 @@
 package com.yuanchu.mom.pojo;
 
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.alibaba.excel.annotation.ExcelProperty;
 import com.baomidou.mybatisplus.annotation.FieldFill;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
+
 import java.io.Serializable;
 import java.time.LocalDateTime;
 
@@ -31,56 +34,75 @@
 
 
     @TableId(value = "id", type = IdType.AUTO)
+    @ExcelIgnore
     private Integer id;
 
     @ApiModelProperty("澶栭敭 鍏宠仈浜哄憳鑰冭瘎琛╥d")
+    @ExcelIgnore
     private Integer evaluateId;
 
     @ValueTableShow(value = 1, name = "濮撳悕")
-    @TableField(exist = false,select = false)
+    @TableField(exist = false, select = false)
+    @ExcelProperty(value = "濮撳悕")
     private String name;
 
+    @TableField(exist = false,select = false)
+    //瀹為獙瀹�
+    private String departLims;
+
     @TableField(fill = FieldFill.INSERT)
+    @ExcelIgnore
     private LocalDateTime createTime;
 
     @TableField(fill = FieldFill.INSERT_UPDATE)
+    @ExcelIgnore
     private LocalDateTime updateTime;
 
     @TableField(fill = FieldFill.INSERT)
+    @ExcelIgnore
     private Integer createUser;
 
     @TableField(fill = FieldFill.INSERT_UPDATE)
+    @ExcelIgnore
     private Integer updateUser;
 
     @ApiModelProperty("鎶�鑳芥按骞�")
     @ValueTableShow(2)
+    @ExcelProperty(value = {"鎶�鑳芥按骞�", "20"})
     private Double skill;
 
     @ApiModelProperty("鏈嶄粠鍒嗗伐")
     @ValueTableShow(3)
+    @ExcelProperty(value = {"鏈嶄粠鍒嗗伐", "20"})
     private Double compliance;
 
     @ApiModelProperty("绉瀬鎬�")
     @ValueTableShow(4)
+    @ExcelProperty(value = {"绉瀬鎬�", "20"})
     private Double positive;
 
     @ApiModelProperty("5S-3瀹�")
     @ValueTableShow(5)
+    @ExcelProperty(value = {"5S-3瀹�", "10"})
     private Double tidy;
 
     @ApiModelProperty("瑙勭珷鍒跺害")
     @ValueTableShow(6)
+    @ExcelProperty(value = {"瑙勭珷鍒跺害", "10"})
     private Double discipline;
 
     @ApiModelProperty("鍥㈢粨鍗忎綔")
     @ValueTableShow(7)
+    @ExcelProperty(value = {"鍥㈢粨鍗忎綔", "10"})
     private Double solidarity;
 
     @ApiModelProperty("鎻愭绉垎")
     @ValueTableShow(8)
+    @ExcelProperty(value = {"鎻愭绉垎", "10"})
     private Double proposal;
 
     @ApiModelProperty("寰楀垎")
     @ValueTableShow(9)
+    @ExcelProperty(value = {"寰楀垎", "100"})
     private Double total;
 }
diff --git a/performance-server/src/main/java/com/yuanchu/mom/pojo/EvaluateGroup.java b/performance-server/src/main/java/com/yuanchu/mom/pojo/EvaluateGroup.java
index 6c672a8..2a17bc7 100644
--- a/performance-server/src/main/java/com/yuanchu/mom/pojo/EvaluateGroup.java
+++ b/performance-server/src/main/java/com/yuanchu/mom/pojo/EvaluateGroup.java
@@ -40,6 +40,10 @@
     @TableField(exist = false,select = false)
     private String name;
 
+    @TableField(exist = false,select = false)
+    //瀹為獙瀹�
+    private String departLims;
+
     @ApiModelProperty("鍙婃椂鎬�")
     @ValueTableShow(2)
     private Double seasonable;
diff --git a/performance-server/src/main/java/com/yuanchu/mom/pojo/EvaluateLeader.java b/performance-server/src/main/java/com/yuanchu/mom/pojo/EvaluateLeader.java
index 7d278cc..8033803 100644
--- a/performance-server/src/main/java/com/yuanchu/mom/pojo/EvaluateLeader.java
+++ b/performance-server/src/main/java/com/yuanchu/mom/pojo/EvaluateLeader.java
@@ -1,5 +1,7 @@
 package com.yuanchu.mom.pojo;
 
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.alibaba.excel.annotation.ExcelProperty;
 import com.baomidou.mybatisplus.annotation.FieldFill;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
@@ -30,52 +32,70 @@
 public class EvaluateLeader extends OrderBy implements Serializable {
 
     @TableId(value = "id", type = IdType.AUTO)
+    @ExcelIgnore
     private Integer id;
 
     @ApiModelProperty("澶栭敭 鍏宠仈浜哄憳鑰冭瘎琛╥d")
+    @ExcelIgnore
     private Integer evaluateId;
 
     @ValueTableShow(value = 1, name = "濮撳悕")
     @TableField(exist = false,select = false)
+    @ExcelProperty(value = "濮撳悕")
     private String name;
 
+    @TableField(exist = false,select = false)
+    //瀹為獙瀹�
+    private String departLims;
+
     @TableField(fill = FieldFill.INSERT)
+    @ExcelIgnore
     private LocalDateTime createTime;
 
     @TableField(fill = FieldFill.INSERT_UPDATE)
+    @ExcelIgnore
     private LocalDateTime updateTime;
 
     @TableField(fill = FieldFill.INSERT)
+    @ExcelIgnore
     private Integer createUser;
 
     @TableField(fill = FieldFill.INSERT_UPDATE)
+    @ExcelIgnore
     private Integer updateUser;
 
     @ApiModelProperty("宸ヤ綔璐d换蹇�")
     @ValueTableShow(2)
+    @ExcelProperty(value = {"宸ヤ綔璐d换蹇�", "25"})
     private Double responsibility;
 
     @ApiModelProperty("鏈嶄粠鍒嗗伐")
     @ValueTableShow(3)
+    @ExcelProperty(value = {"鏈嶄粠鍒嗗伐", "25"})
     private Double compliance;
 
     @ApiModelProperty("绉瀬鎬�")
     @ValueTableShow(4)
+    @ExcelProperty(value = {"绉瀬鎬�", "20"})
     private Double positive;
 
     @ApiModelProperty("鍥㈢粨鍚屼簨")
     @ValueTableShow(5)
+    @ExcelProperty(value = {"鍥㈢粨鍚屼簨", "10"})
     private Double solidarity;
 
     @ApiModelProperty("鍙婃椂鎬�")
     @ValueTableShow(6)
+    @ExcelProperty(value = {"璇曢獙鍙婃椂鎬�", "10"})
     private Double seasonable;
 
     @ApiModelProperty("鍑嗙‘鎬�")
     @ValueTableShow(7)
+    @ExcelProperty(value = {"缁撴灉鍑嗙‘鎬�", "10"})
     private Double exact;
 
     @ApiModelProperty("寰楀垎")
     @ValueTableShow(8)
+    @ExcelProperty(value = {"寰楀垎", "100"})
     private Double total;
 }
diff --git a/performance-server/src/main/java/com/yuanchu/mom/service/AuxiliaryOriginalHoursService.java b/performance-server/src/main/java/com/yuanchu/mom/service/AuxiliaryOriginalHoursService.java
index 9a6a477..439a93f 100644
--- a/performance-server/src/main/java/com/yuanchu/mom/service/AuxiliaryOriginalHoursService.java
+++ b/performance-server/src/main/java/com/yuanchu/mom/service/AuxiliaryOriginalHoursService.java
@@ -17,5 +17,5 @@
      *
      * @param response
      */
-    void exportWorkingHours(AuxiliaryOriginalHoursLookDto auxiliaryOriginalHoursLookDto, HttpServletResponse response) throws IOException;
+    void exportWorkingHours(String month, String name, String departLims,HttpServletResponse response) throws IOException;
 }
diff --git a/performance-server/src/main/java/com/yuanchu/mom/service/EvaluateCompetentService.java b/performance-server/src/main/java/com/yuanchu/mom/service/EvaluateCompetentService.java
index 4a20cf4..0987b94 100644
--- a/performance-server/src/main/java/com/yuanchu/mom/service/EvaluateCompetentService.java
+++ b/performance-server/src/main/java/com/yuanchu/mom/service/EvaluateCompetentService.java
@@ -1,7 +1,12 @@
 package com.yuanchu.mom.service;
 
+import com.yuanchu.mom.dto.EvaluateGroupDto;
 import com.yuanchu.mom.pojo.EvaluateCompetent;
 import com.baomidou.mybatisplus.extension.service.IService;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.List;
 
 /**
  * <p>
@@ -13,4 +18,9 @@
  */
 public interface EvaluateCompetentService extends IService<EvaluateCompetent> {
 
+    List<EvaluateCompetent> getEvaluateCompetent(EvaluateGroupDto evaluateGroupDto);
+
+    Double writeEvaluateCompetent(EvaluateCompetent evaluateCompetent);
+
+    void export(String month, String name, String departLims, HttpServletResponse response)throws IOException;
 }
diff --git a/performance-server/src/main/java/com/yuanchu/mom/service/EvaluateGroupService.java b/performance-server/src/main/java/com/yuanchu/mom/service/EvaluateGroupService.java
index f2f2cd1..25c6223 100644
--- a/performance-server/src/main/java/com/yuanchu/mom/service/EvaluateGroupService.java
+++ b/performance-server/src/main/java/com/yuanchu/mom/service/EvaluateGroupService.java
@@ -1,7 +1,10 @@
 package com.yuanchu.mom.service;
 
+import com.yuanchu.mom.dto.EvaluateGroupDto;
 import com.yuanchu.mom.pojo.EvaluateGroup;
 import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
 
 /**
  * <p>
@@ -13,4 +16,17 @@
  */
 public interface EvaluateGroupService extends IService<EvaluateGroup> {
 
+    /**
+     * 鏌ヨ鍛樺伐浜掕瘎
+     * @param evaluateGroupDto
+     * @return
+     */
+    List<EvaluateGroup> getEvaluateGroup(EvaluateGroupDto evaluateGroupDto);
+
+    /**
+     * 濉啓鍛樺伐浜掕瘎
+     * @param evaluateGroup
+     * @return
+     */
+    Double writeEvaluateGroup(EvaluateGroup evaluateGroup);
 }
diff --git a/performance-server/src/main/java/com/yuanchu/mom/service/EvaluateLeaderService.java b/performance-server/src/main/java/com/yuanchu/mom/service/EvaluateLeaderService.java
index c881cef..ac17bfb 100644
--- a/performance-server/src/main/java/com/yuanchu/mom/service/EvaluateLeaderService.java
+++ b/performance-server/src/main/java/com/yuanchu/mom/service/EvaluateLeaderService.java
@@ -1,7 +1,12 @@
 package com.yuanchu.mom.service;
 
+import com.yuanchu.mom.dto.EvaluateGroupDto;
 import com.yuanchu.mom.pojo.EvaluateLeader;
 import com.baomidou.mybatisplus.extension.service.IService;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.List;
 
 /**
  * <p>
@@ -13,4 +18,15 @@
  */
 public interface EvaluateLeaderService extends IService<EvaluateLeader> {
 
+    /**
+     * 鏌ヨ缁勯暱璇勫垎
+     * @param evaluateGroupDto
+     * @return
+     */
+    List<EvaluateLeader> getEvaluateLeader(EvaluateGroupDto evaluateGroupDto);
+
+    Double writeEvaluateLeader(EvaluateLeader evaluateLeader);
+
+    void export(String month, String name, String departLims, HttpServletResponse response) throws IOException;
+
 }
diff --git a/performance-server/src/main/java/com/yuanchu/mom/service/EvaluateService.java b/performance-server/src/main/java/com/yuanchu/mom/service/EvaluateService.java
index b214969..7f72214 100644
--- a/performance-server/src/main/java/com/yuanchu/mom/service/EvaluateService.java
+++ b/performance-server/src/main/java/com/yuanchu/mom/service/EvaluateService.java
@@ -4,6 +4,8 @@
 import com.yuanchu.mom.pojo.Evaluate;
 import com.baomidou.mybatisplus.extension.service.IService;
 
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
 import java.util.Map;
 
 /**
@@ -16,5 +18,8 @@
  */
 public interface EvaluateService extends IService<Evaluate> {
 
-    Map<String,Object> getPage(Page page, Evaluate entity);
+    Map<String, Object> getPage(Page page, Evaluate entity);
+
+
+    void export(String month, String name, String departLims, HttpServletResponse response) throws IOException;
 }
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/AuxiliaryOriginalHoursServiceImpl.java b/performance-server/src/main/java/com/yuanchu/mom/service/impl/AuxiliaryOriginalHoursServiceImpl.java
index 89d187b..c09609b 100644
--- a/performance-server/src/main/java/com/yuanchu/mom/service/impl/AuxiliaryOriginalHoursServiceImpl.java
+++ b/performance-server/src/main/java/com/yuanchu/mom/service/impl/AuxiliaryOriginalHoursServiceImpl.java
@@ -57,7 +57,8 @@
     @Override
     public Map<String, Object> selectAuxiliaryOriginalHours(Page page, AuxiliaryOriginalHoursLookDto auxiliaryOriginalHoursLookDto) {
         Map<String, Object> map = new HashMap<>();
-        List<Integer> ids = new ArrayList<>();  ;
+        List<Integer> ids = new ArrayList<>();
+        ;
         map.put("head", PrintChina.printChina(AuxiliaryCorrectionHoursDto.class));
         //鍒ゆ柇缁勯暱,缁勫憳,绠$悊鍛樻潈闄�
         Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("selectAuxiliaryOriginalHours");
@@ -147,12 +148,22 @@
 
     //瀵煎嚭鍘熷宸ユ椂
     @Override
-    public void exportWorkingHours(AuxiliaryOriginalHoursLookDto auxiliaryOriginalHoursLookDto, HttpServletResponse response) throws IOException {
+    public void exportWorkingHours(String month, String name, String departLims, HttpServletResponse response) throws IOException {
         List<AuxiliaryOriginalHoursDto> auxiliaryOriginalHoursDtos = new ArrayList<AuxiliaryOriginalHoursDto>();
 
         //鏌ヨ鍘熷宸ユ椂(浣跨敤鍒嗛〉鏌ヨ)
+        AuxiliaryOriginalHoursLookDto auxiliaryOriginalHoursLookDto = new AuxiliaryOriginalHoursLookDto();
+        if (ObjectUtils.isNotEmpty(month)) {
+            auxiliaryOriginalHoursLookDto.setMonth(month);
+        }
+        if (ObjectUtils.isNotEmpty(name)) {
+            auxiliaryOriginalHoursLookDto.setName(name);
+        }
+        if (ObjectUtils.isNotEmpty(departLims)) {
+            auxiliaryOriginalHoursLookDto.setDepartLims(departLims);
+        }
         IPage<AuxiliaryOriginalHoursDto> body = (IPage<AuxiliaryOriginalHoursDto>) selectAuxiliaryOriginalHours(new Page(-1, -1), auxiliaryOriginalHoursLookDto).get("body");
-        auxiliaryOriginalHoursDtos=body.getRecords();
+        auxiliaryOriginalHoursDtos = body.getRecords();
         response.setContentType("application/vnd.ms-excel");
         response.setCharacterEncoding("UTF-8");
         // 杩欓噷URLEncoder.encode鍙互闃叉涓枃涔辩爜 褰撶劧鍜宔asyexcel娌℃湁鍏崇郴
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 a835915..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
@@ -1,10 +1,29 @@
 package com.yuanchu.mom.service.impl;
 
+import com.alibaba.excel.EasyExcel;
+import com.alibaba.excel.ExcelWriter;
+import com.alibaba.excel.write.metadata.WriteSheet;
+import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.yuanchu.mom.dto.EvaluateGroupDto;
+import com.yuanchu.mom.mapper.EvaluateLeaderMapper;
+import com.yuanchu.mom.mapper.EvaluateMapper;
+import com.yuanchu.mom.pojo.Evaluate;
 import com.yuanchu.mom.pojo.EvaluateCompetent;
 import com.yuanchu.mom.mapper.EvaluateCompetentMapper;
+import com.yuanchu.mom.pojo.EvaluateGroup;
 import com.yuanchu.mom.service.EvaluateCompetentService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.net.URLEncoder;
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * <p>
@@ -17,4 +36,48 @@
 @Service
 public class EvaluateCompetentServiceImpl extends ServiceImpl<EvaluateCompetentMapper, EvaluateCompetent> implements EvaluateCompetentService {
 
+    @Resource
+    EvaluateCompetentMapper evaluateCompetentMapper;
+
+    @Resource
+    EvaluateMapper evaluateMapper;
+
+    @Override
+    public List<EvaluateCompetent> getEvaluateCompetent(EvaluateGroupDto evaluateGroupDto) {
+        return evaluateCompetentMapper.getEvaluateCompetent(evaluateGroupDto.getMonth(), evaluateGroupDto.getDepartLims(), evaluateGroupDto.getName());
+    }
+
+    @Override
+    public Double writeEvaluateCompetent(EvaluateCompetent evaluateCompetent) {
+        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() * 0.5 + newTotal * 0.5);
+        evaluateMapper.updateById(evaluate);
+        evaluateCompetent.setTotal(newTotal);
+        evaluateCompetentMapper.updateById(evaluateCompetent);
+        return newTotal;
+    }
+
+    //瀵煎嚭
+    @Override
+    public void export(String month, String name, String departLims, HttpServletResponse response) throws IOException {
+        List<EvaluateCompetent> evaluateCompetents = new ArrayList<EvaluateCompetent>();
+        evaluateCompetents = evaluateCompetentMapper.getEvaluateCompetent(month, departLims, name);
+        response.setContentType("application/vnd.ms-excel");
+        response.setCharacterEncoding("UTF-8");
+        // 杩欓噷URLEncoder.encode鍙互闃叉涓枃涔辩爜 褰撶劧鍜宔asyexcel娌℃湁鍏崇郴
+        String fileName = URLEncoder.encode("涓荤鎵撳垎瀵煎嚭", "UTF-8");
+        response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
+        try {
+            // 鏂板缓ExcelWriter
+            ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()).registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()).build();
+            WriteSheet mainSheet = EasyExcel.writerSheet(0, "涓荤鎵撳垎瀵煎嚭").head(EvaluateCompetent.class).build();
+            excelWriter.write(evaluateCompetents, mainSheet);
+            // 鍏抽棴娴�
+            excelWriter.finish();
+        } catch (IOException e) {
+            throw new RuntimeException("瀵煎嚭澶辫触");
+        }
+    }
 }
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 d16bc28..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
@@ -1,10 +1,18 @@
 package com.yuanchu.mom.service.impl;
 
+import com.yuanchu.mom.dto.EvaluateGroupDto;
+import com.yuanchu.mom.mapper.EvaluateCompetentMapper;
+import com.yuanchu.mom.mapper.EvaluateLeaderMapper;
+import com.yuanchu.mom.mapper.EvaluateMapper;
+import com.yuanchu.mom.pojo.Evaluate;
 import com.yuanchu.mom.pojo.EvaluateGroup;
 import com.yuanchu.mom.mapper.EvaluateGroupMapper;
 import com.yuanchu.mom.service.EvaluateGroupService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
 
 /**
  * <p>
@@ -17,4 +25,28 @@
 @Service
 public class EvaluateGroupServiceImpl extends ServiceImpl<EvaluateGroupMapper, EvaluateGroup> implements EvaluateGroupService {
 
+    @Resource
+    EvaluateGroupMapper evaluateGroupMapper;
+
+    @Resource
+    EvaluateMapper evaluateMapper;
+
+    //鏌ヨ鍛樺伐浜掕瘎
+    @Override
+    public List<EvaluateGroup> getEvaluateGroup(EvaluateGroupDto evaluateGroupDto) {
+        return evaluateGroupMapper.getEvaluateGroup(evaluateGroupDto.getMonth(), evaluateGroupDto.getDepartLims(), evaluateGroupDto.getName());
+    }
+
+    //濉啓鍛樺伐浜掕瘎
+    @Override
+    public Double writeEvaluateGroup(EvaluateGroup evaluateGroup) {
+        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()*0.2 + newTotal*0.2);
+        evaluateMapper.updateById(evaluate);
+        evaluateGroup.setTotal(newTotal);
+        evaluateGroupMapper.updateById(evaluateGroup);
+        return newTotal;
+    }
 }
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 0ca74c5..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
@@ -1,10 +1,27 @@
 package com.yuanchu.mom.service.impl;
 
+import com.alibaba.excel.EasyExcel;
+import com.alibaba.excel.ExcelWriter;
+import com.alibaba.excel.write.metadata.WriteSheet;
+import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy;
+import com.yuanchu.mom.dto.EvaluateGroupDto;
+import com.yuanchu.mom.mapper.EvaluateGroupMapper;
+import com.yuanchu.mom.mapper.EvaluateMapper;
+import com.yuanchu.mom.pojo.Evaluate;
+import com.yuanchu.mom.pojo.EvaluateCompetent;
+import com.yuanchu.mom.pojo.EvaluateGroup;
 import com.yuanchu.mom.pojo.EvaluateLeader;
 import com.yuanchu.mom.mapper.EvaluateLeaderMapper;
 import com.yuanchu.mom.service.EvaluateLeaderService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.net.URLEncoder;
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * <p>
@@ -17,4 +34,48 @@
 @Service
 public class EvaluateLeaderServiceImpl extends ServiceImpl<EvaluateLeaderMapper, EvaluateLeader> implements EvaluateLeaderService {
 
+    @Resource
+    EvaluateLeaderMapper evaluateLeaderMapper;
+
+    @Resource
+    EvaluateMapper evaluateMapper;
+
+
+    @Override
+    public List<EvaluateLeader> getEvaluateLeader(EvaluateGroupDto evaluateGroupDto) {
+        return evaluateLeaderMapper.getEvaluateLeader(evaluateGroupDto.getMonth(), evaluateGroupDto.getDepartLims(), evaluateGroupDto.getName());
+    }
+
+    @Override
+    public Double writeEvaluateLeader(EvaluateLeader evaluateLeader) {
+        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() * 0.3 + newTotal * 0.3);
+        evaluateMapper.updateById(evaluate);
+        evaluateLeader.setTotal(newTotal);
+        evaluateLeaderMapper.updateById(evaluateLeader);
+        return newTotal;
+    }
+
+    @Override
+    public void export(String month, String name, String departLims, HttpServletResponse response) throws IOException {
+        List<EvaluateLeader> evaluateLeaders = new ArrayList<EvaluateLeader>();
+        evaluateLeaders = evaluateLeaderMapper.getEvaluateLeader(month, departLims, name);
+        response.setContentType("application/vnd.ms-excel");
+        response.setCharacterEncoding("UTF-8");
+        // 杩欓噷URLEncoder.encode鍙互闃叉涓枃涔辩爜 褰撶劧鍜宔asyexcel娌℃湁鍏崇郴
+        String fileName = URLEncoder.encode("缁勯暱鎵撳垎瀵煎嚭", "UTF-8");
+        response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
+        try {
+            // 鏂板缓ExcelWriter
+            ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()).registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()).build();
+            WriteSheet mainSheet = EasyExcel.writerSheet(0, "缁勯暱鎵撳垎瀵煎嚭").head(EvaluateLeader.class).build();
+            excelWriter.write(evaluateLeaders, mainSheet);
+            // 鍏抽棴娴�
+            excelWriter.finish();
+        } catch (IOException e) {
+            throw new RuntimeException("瀵煎嚭澶辫触");
+        }
+    }
 }
diff --git a/performance-server/src/main/java/com/yuanchu/mom/service/impl/EvaluateServiceImpl.java b/performance-server/src/main/java/com/yuanchu/mom/service/impl/EvaluateServiceImpl.java
index 6d9ec81..470fb51 100644
--- a/performance-server/src/main/java/com/yuanchu/mom/service/impl/EvaluateServiceImpl.java
+++ b/performance-server/src/main/java/com/yuanchu/mom/service/impl/EvaluateServiceImpl.java
@@ -1,8 +1,16 @@
 package com.yuanchu.mom.service.impl;
 
+import com.alibaba.excel.EasyExcel;
+import com.alibaba.excel.ExcelWriter;
+import com.alibaba.excel.write.metadata.WriteSheet;
+import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.yuanchu.mom.common.GetLook;
 import com.yuanchu.mom.common.PrintChina;
+import com.yuanchu.mom.dto.AuxiliaryOriginalHoursDto;
 import com.yuanchu.mom.pojo.Evaluate;
 import com.yuanchu.mom.mapper.EvaluateMapper;
 import com.yuanchu.mom.service.EvaluateService;
@@ -11,7 +19,12 @@
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.net.URLEncoder;
+import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -36,8 +49,42 @@
         Map<String, Object> map = new HashMap<>();
         map.put("head", PrintChina.printChina(Evaluate.class));
         Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("getPage");
-        if(map1.get("look")==1) evaluate.setCreateUser(map1.get("userId"));
-        //map.put("body", evaluateMapper.getPage(page, QueryWrappers.queryWrappers(evaluate)));
+        if (map1.get("look") == 1) evaluate.setCreateUser(map1.get("userId"));
+        map.put("body", evaluateMapper.getPage(page, QueryWrappers.queryWrappers(evaluate)));
         return map;
     }
+
+    //瀵煎嚭鑰冭瘎
+    @Override
+    public void export(String month, String name, String departLims, HttpServletResponse response) throws IOException {
+        List<Evaluate> evaluates = new ArrayList<Evaluate>();
+        //鏌ヨ鍘熷宸ユ椂(浣跨敤鍒嗛〉鏌ヨ)
+        Evaluate evaluate = new Evaluate();
+        if (ObjectUtils.isNotEmpty(month)) {
+            evaluate.setMonth(month);
+        }
+        if (ObjectUtils.isNotEmpty(name)) {
+            evaluate.setName(name);
+        }
+        if (ObjectUtils.isNotEmpty(departLims)) {
+            evaluate.setDepartLims(departLims);
+        }
+        IPage<Evaluate> body = (IPage<Evaluate>) getPage(new Page(-1, -1), evaluate).get("body");
+        evaluates = body.getRecords();
+        response.setContentType("application/vnd.ms-excel");
+        response.setCharacterEncoding("UTF-8");
+        // 杩欓噷URLEncoder.encode鍙互闃叉涓枃涔辩爜 褰撶劧鍜宔asyexcel娌℃湁鍏崇郴
+        String fileName = URLEncoder.encode("鑰冭瘎瀵煎嚭", "UTF-8");
+        response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
+        try {
+            // 鏂板缓ExcelWriter
+            ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()).registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()).build();
+            WriteSheet mainSheet = EasyExcel.writerSheet(0, "鑰冭瘎瀵煎嚭").head(Evaluate.class).build();
+            excelWriter.write(evaluates, mainSheet);
+            // 鍏抽棴娴�
+            excelWriter.finish();
+        } catch (IOException e) {
+            throw new RuntimeException("瀵煎嚭澶辫触");
+        }
+    }
 }
diff --git a/performance-server/src/main/resources/mapper/EvaluateCompetentMapper.xml b/performance-server/src/main/resources/mapper/EvaluateCompetentMapper.xml
index 7d5b982..e3adc2f 100644
--- a/performance-server/src/main/resources/mapper/EvaluateCompetentMapper.xml
+++ b/performance-server/src/main/resources/mapper/EvaluateCompetentMapper.xml
@@ -18,6 +18,25 @@
         <result column="solidarity" property="solidarity" />
         <result column="proposal" property="proposal" />
         <result column="total" property="total" />
+        <result column="name" property="name" />
+        <result column="depart_lims" property="departLims" />
     </resultMap>
-
+    <select id="getEvaluateCompetent" resultType="com.yuanchu.mom.pojo.EvaluateCompetent">
+        select ec.*,u.name,
+        dl.name depart_lims
+        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 FIND_IN_SET(dl.id, depart_lims_id)
+        where 1=1
+        <if test="month!=null and month!=''">
+            and e.month=#{month}
+        </if>
+        <if test="departLims!=null and departLims!=''">
+            and dl.name like concat ('%',#{departLims},'%')
+        </if>
+        <if test="name!=null and name!=''">
+            and u.name like concat ('%',#{name},'%')
+        </if>
+    </select>
 </mapper>
diff --git a/performance-server/src/main/resources/mapper/EvaluateGroupMapper.xml b/performance-server/src/main/resources/mapper/EvaluateGroupMapper.xml
index 3f05f98..50c8939 100644
--- a/performance-server/src/main/resources/mapper/EvaluateGroupMapper.xml
+++ b/performance-server/src/main/resources/mapper/EvaluateGroupMapper.xml
@@ -1,23 +1,40 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.yuanchu.mom.mapper.EvaluateGroupMapper">
-
     <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 -->
     <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.EvaluateGroup">
-        <id column="id" property="id" />
-        <result column="evaluate_id" property="evaluateId" />
-        <result column="seasonable" property="seasonable" />
-        <result column="exact" property="exact" />
-        <result column="skill" property="skill" />
-        <result column="preserve" property="preserve" />
-        <result column="discipline" property="discipline" />
-        <result column="solidarity" property="solidarity" />
-        <result column="tidy" property="tidy" />
-        <result column="total" property="total" />
-        <result column="create_time" property="createTime" />
-        <result column="update_time" property="updateTime" />
-        <result column="create_user" property="createUser" />
-        <result column="update_user" property="updateUser" />
+        <id column="id" property="id"/>
+        <result column="name" property="name"/>
+        <result column="depart_lims" property="departLims"/>
+        <result column="evaluate_id" property="evaluateId"/>
+        <result column="seasonable" property="seasonable"/>
+        <result column="exact" property="exact"/>
+        <result column="skill" property="skill"/>
+        <result column="preserve" property="preserve"/>
+        <result column="discipline" property="discipline"/>
+        <result column="solidarity" property="solidarity"/>
+        <result column="tidy" property="tidy"/>
+        <result column="total" property="total"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="create_user" property="createUser"/>
+        <result column="update_user" property="updateUser"/>
     </resultMap>
-
+    <select id="getEvaluateGroup" resultType="com.yuanchu.mom.pojo.EvaluateGroup">
+        select eg.*,u.name,dl.name depart_lims
+        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 FIND_IN_SET(dl.id, depart_lims_id)
+        where 1=1
+        <if test="month!=null and month!=''">
+            and e.month=#{month}
+        </if>
+        <if test="departLims!=null and departLims!=''">
+            and dl.name like concat ('%',#{departLims},'%')
+        </if>
+        <if test="name!=null and name!=''">
+            and u.name like concat ('%',#{name},'%')
+        </if>
+    </select>
 </mapper>
diff --git a/performance-server/src/main/resources/mapper/EvaluateLeaderMapper.xml b/performance-server/src/main/resources/mapper/EvaluateLeaderMapper.xml
index a5009fb..d30a997 100644
--- a/performance-server/src/main/resources/mapper/EvaluateLeaderMapper.xml
+++ b/performance-server/src/main/resources/mapper/EvaluateLeaderMapper.xml
@@ -17,6 +17,24 @@
         <result column="seasonable" property="seasonable" />
         <result column="exact" property="exact" />
         <result column="total" property="total" />
+        <result column="name" property="name" />
+        <result column="depart_lims" property="departLims"/>
     </resultMap>
-
+    <select id="getEvaluateLeader" resultType="com.yuanchu.mom.pojo.EvaluateLeader">
+        select el.*,u.name,dl.name depart_lims
+        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 FIND_IN_SET(dl.id, depart_lims_id)
+        where 1=1
+        <if test="month!=null and month!=''">
+            and e.month=#{month}
+        </if>
+        <if test="departLims!=null and departLims!=''">
+            and dl.name like concat ('%',#{departLims},'%')
+        </if>
+        <if test="name!=null and name!=''">
+            and u.name like concat ('%',#{name},'%')
+        </if>
+    </select>
 </mapper>
diff --git a/performance-server/src/main/resources/mapper/EvaluateMapper.xml b/performance-server/src/main/resources/mapper/EvaluateMapper.xml
index 126f445..92ad065 100644
--- a/performance-server/src/main/resources/mapper/EvaluateMapper.xml
+++ b/performance-server/src/main/resources/mapper/EvaluateMapper.xml
@@ -1,14 +1,36 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.yuanchu.mom.mapper.EvaluateMapper">
-
     <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 -->
     <resultMap id="BaseResultMap" type="com.yuanchu.mom.pojo.Evaluate">
-        <id column="id" property="id" />
-        <result column="user_id" property="userId" />
-        <result column="score" property="score" />
-        <result column="grade" property="grade" />
-        <result column="month" property="month" />
+        <id column="id" property="id"/>
+        <result column="user_id" property="userId"/>
+        <result column="account" property="account"/>
+        <result column="name" property="name"/>
+        <result column="depart_lims" property="departLims"/>
+        <result column="score" property="score"/>
+        <result column="grade" property="grade"/>
+        <result column="month" property="month"/>
+        <result column="competentTotal" property="competentTotal"/>
+        <result column="groupTotal" property="groupTotal"/>
+        <result column="leaderTotal" property="leaderTotal"/>
     </resultMap>
-
+    <select id="getPage" resultType="com.yuanchu.mom.pojo.Evaluate">
+        select * from(select e.*,
+        account,
+        u.name name,
+        dl.name depart_lims,
+        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  FIND_IN_SET(dl.id, depart_lims_id) ) A
+        <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
+            ${ew.customSqlSegment}
+        </if>
+    </select>
 </mapper>
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