|
@@ -6,12 +6,11 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.dragon.tj.portal.auth.model.LoginUser;
|
|
|
import com.dragon.tj.portal.common.base.R;
|
|
|
-import com.dragon.tj.portal.entity.AppInfo;
|
|
|
-import com.dragon.tj.portal.entity.InstallInfo;
|
|
|
-import com.dragon.tj.portal.entity.PageParam;
|
|
|
+import com.dragon.tj.portal.entity.*;
|
|
|
import com.dragon.tj.portal.mapper.app.AppInfoMapper;
|
|
|
import com.dragon.tj.portal.mapper.app.InstallInfoMapper;
|
|
|
import com.dragon.tj.portal.service.AppService;
|
|
|
+import com.dragon.tj.portal.service.SysDictItemService;
|
|
|
import com.dragon.tj.portal.service.SysDictService;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -35,6 +34,17 @@ public class AppServiceImpl implements AppService {
|
|
|
@Autowired
|
|
|
private SysDictService sysDictService;
|
|
|
|
|
|
+
|
|
|
+ private static List<SysDict> appTypeDict;
|
|
|
+
|
|
|
+ public List<SysDict> getAppTypeDict(){
|
|
|
+ if (appTypeDict == null || appTypeDict.size() == 0) {
|
|
|
+ appTypeDict = sysDictService.getDict("app_type");
|
|
|
+ }
|
|
|
+
|
|
|
+ return appTypeDict;
|
|
|
+ }
|
|
|
+
|
|
|
/*
|
|
|
* CRUD
|
|
|
* */
|
|
@@ -69,7 +79,7 @@ public class AppServiceImpl implements AppService {
|
|
|
* */
|
|
|
@Override
|
|
|
public R getType() {
|
|
|
- return sysDictService.getDict("app_type");
|
|
|
+ return R.ok(sysDictService.getDict("app_type"));
|
|
|
}
|
|
|
|
|
|
/*
|
|
@@ -149,6 +159,17 @@ public class AppServiceImpl implements AppService {
|
|
|
Map map = new HashMap();
|
|
|
|
|
|
map.put("delFlag", params.getDelFlag());
|
|
|
+ Integer appType = params.getAppType();
|
|
|
+ if (appType != null){
|
|
|
+ List<SysDict> appTypeList = getAppTypeDict();
|
|
|
+ SysDict specialToolDict = appTypeList.stream().filter(item -> "专项工具".equals(item.getDescription())).findFirst().get();
|
|
|
+ map.put("std", specialToolDict.getId());//专项工具
|
|
|
+
|
|
|
+ if (appType == specialToolDict.getId()){
|
|
|
+ map.put("isSt", 1);//专项工具查询
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
map.put("idcard", loginUser.getIdCard());
|
|
|
|
|
|
return appInfoMapper.getInstalledApp(iPage,map);
|