ソースを参照

应用搜索专项与非专项

yonghuifan 1 年間 前
コミット
0535f8f972

+ 8 - 0
src/main/java/com/dragon/tj/portal/entity/AppInfo.java

@@ -129,4 +129,12 @@ public class AppInfo implements Serializable {
      */
     @TableField(exist = false)
     private int seq;
+
+    /*
+     * 0: 非专项
+     * 1: 专项
+     * null: 所有任意
+     * */
+    @TableField(exist = false)
+    private Integer isSpecial;
 }

+ 8 - 0
src/main/java/com/dragon/tj/portal/service/impl/AppServiceImpl.java

@@ -114,6 +114,14 @@ public class AppServiceImpl implements AppService {
         //应用事权单位名称
         queryWrapper.like(StringUtils.isNotEmpty(appInfo.getDeptName()), AppInfo::getDeptName, appInfo.getDeptName());
         //应用类型
+        if (appInfo.getIsSpecial() != null) {
+            List<SysDictItem> appTypeDict = getAppTypeDict();
+            SysDictItem specialToolDict = appTypeDict.stream().filter(item -> "专项工具".equals(item.getLabel())).findFirst().get();
+            //专项工具
+            queryWrapper.eq(appInfo.getIsSpecial() == 1, AppInfo::getAppType, specialToolDict.getId());
+            //非专项
+            queryWrapper.ne(appInfo.getIsSpecial() == 0, AppInfo::getAppType, specialToolDict.getId());
+        }
         queryWrapper.eq(appInfo.getAppType() != null, AppInfo::getAppType, appInfo.getAppType());
         queryWrapper.eq(appInfo.getDelFlag() != null, AppInfo::getDelFlag, appInfo.getDelFlag());