浏览代码

ly 查询人员去重

ly 9 月之前
父节点
当前提交
68e6446b6f

+ 1 - 1
master/pom.xml

@@ -6,7 +6,7 @@
     <groupId>com.cpms</groupId>
     <artifactId>cpms</artifactId>
     <version>3.2.0</version>
-    <packaging>war</packaging>
+    <packaging>jar</packaging>
 
     <name>cpms</name>
     <description>cpms管理系统</description>

+ 10 - 0
master/src/main/java/com/ruoyi/project/plant/controller/TStaffmgrController.java

@@ -264,6 +264,16 @@ public class TStaffmgrController extends BaseController {
                     }
                 }
             }
+
+            // 使用一个 HashMap 来存储去重后的结果
+            Map<String, TStaffmgr> map = new HashMap<>();
+
+            // 遍历列表并将每个 TStaffmgr 实例放入 Map 中
+            for (TStaffmgr staffmgr : list) {
+                map.put(staffmgr.getStaffid(), staffmgr);
+            }
+            // 从 Map 中提取去重后的结果
+            list = new ArrayList<>(map.values());
         } catch (Exception e) {
             logger.error(e.toString());
         }

+ 1 - 1
master/src/main/resources/mybatis/plant/TStaffmgrMapper.xml

@@ -265,7 +265,7 @@
         </where>
         <!-- 数据范围过滤 -->
         ${params.dataScope}
-        ORDER BY s0.DICT_SORT, s1.DICT_SORT ,s.DICT_SORT
+        ORDER BY d.del_flag, s0.DICT_SORT, s1.DICT_SORT ,s.DICT_SORT
     </select>
 
     <select id="selectTStaffmgrListAll" parameterType="TStaffmgr" resultMap="TStaffmgrResult">

+ 2 - 2
ui/src/views/login.vue

@@ -260,8 +260,8 @@ export default {
   justify-content: center;
   align-items: center;
   height: 100%;
-  background-image: url("../assets/image/CPMS20210107.jpg");
-  //background-image: url("../assets/image/cpms-test.jpg");
+  //background-image: url("../assets/image/CPMS20210107.jpg");
+  background-image: url("../assets/image/cpms-test.jpg");
   background-size: cover;
 }
 

+ 1 - 0
ui/src/views/training/bccregular/index.vue

@@ -437,6 +437,7 @@ export default {
       });
     },
     getLecturer(year) {
+      console.log("年份========" +year)
       this.staffmgrQueryParams.leftYear = year
       listAllStaffmgr(this.staffmgrQueryParams).then(response => {
         this.lecturerOptions = response.rows;