Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
Y
yn-health-science
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
徐俊
yn-health-science
Commits
953d6e81
Commit
953d6e81
authored
Dec 11, 2024
by
徐俊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xujun
parent
b240a96f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
86 additions
and
0 deletions
+86
-0
SystemParameterController.java
...om/yiboshi/science/rest/v1/SystemParameterController.java
+21
-0
SystemParameterService.java
...a/com/yiboshi/science/service/SystemParameterService.java
+13
-0
SystemParameterServiceImpl.java
...oshi/science/service/impl/SystemParameterServiceImpl.java
+50
-0
RedisKey.java
...min/src/main/java/com/yiboshi/science/utils/RedisKey.java
+2
-0
No files found.
science-admin/src/main/java/com/yiboshi/science/rest/v1/SystemParameterController.java
View file @
953d6e81
...
@@ -138,4 +138,25 @@ public class SystemParameterController extends BaseController<SystemParameterSer
...
@@ -138,4 +138,25 @@ public class SystemParameterController extends BaseController<SystemParameterSer
public
ResponseDataModel
<
String
>
refreshSystemParameter
()
{
public
ResponseDataModel
<
String
>
refreshSystemParameter
()
{
return
ResponseDataModel
.
ok
(
systemParameterService
.
refreshSystemParameter
());
return
ResponseDataModel
.
ok
(
systemParameterService
.
refreshSystemParameter
());
}
}
@ApiOperation
(
value
=
"根据参数获取参数列表"
,
httpMethod
=
"GET"
,
notes
=
"根据参数获取参数列表"
)
@GetMapping
@RequestMapping
(
"/getParameterListBySystemCode"
)
public
ResponseDataModel
<
List
<
SelectListItem
>>
getParameterListBySystemCode
(
String
SystemCodeOrName
)
{
List
<
SelectListItem
>
list
=
new
ArrayList
<>();
List
<
SystemParameter
>
paraList
=
systemParameterService
.
getParameterListBySystemCode
(
SystemCodeOrName
);
paraList
.
forEach
((
e
)
->
{
SelectListItem
selectListItem
=
new
SelectListItem
(
e
.
getName
(),
e
.
getId
(),
""
,
true
,
true
,
null
);
list
.
add
(
selectListItem
);
});
return
ResponseDataModel
.
ok
(
list
);
}
@ApiOperation
(
value
=
"获取学科代码树列表"
,
httpMethod
=
"GET"
,
notes
=
"获取学科代码树列表"
)
@GetMapping
@RequestMapping
(
"/getKnowledgeParameterTreeList"
)
public
ResponseDataModel
<
List
<
SelectListItem
>>
getKnowledgeParameterTreeList
()
{
List
<
SelectListItem
>
list
=
systemParameterService
.
getKnowledgeInfoList
();
return
ResponseDataModel
.
ok
(
list
);
}
}
}
science-admin/src/main/java/com/yiboshi/science/service/SystemParameterService.java
View file @
953d6e81
...
@@ -89,4 +89,17 @@ public interface SystemParameterService extends BaseService<SystemParameterQuery
...
@@ -89,4 +89,17 @@ public interface SystemParameterService extends BaseService<SystemParameterQuery
String
refreshSystemParameter
();
String
refreshSystemParameter
();
String
judgmentTitleLevel
(
String
titleId
);
String
judgmentTitleLevel
(
String
titleId
);
/**
* 根据systemCodeOrName获取学科列表
* @param SystemCodeOrName
* @return
*/
List
<
SystemParameter
>
getParameterListBySystemCode
(
String
SystemCodeOrName
);
/**
* 获取学科代码树列表
* @return
*/
List
<
SelectListItem
>
getKnowledgeInfoList
();
}
}
science-admin/src/main/java/com/yiboshi/science/service/impl/SystemParameterServiceImpl.java
View file @
953d6e81
...
@@ -325,4 +325,54 @@ public class SystemParameterServiceImpl extends BaseServiceImpl<SystemParameterD
...
@@ -325,4 +325,54 @@ public class SystemParameterServiceImpl extends BaseServiceImpl<SystemParameterD
}
}
}
}
}
}
public
List
<
SystemParameter
>
getParameterListBySystemCode
(
String
SystemCodeOrName
)
{
List
<
SystemParameter
>
list
=
getListByType
(
68
);
List
<
SystemParameter
>
findList
=
list
.
stream
().
filter
(
e
->
e
.
getSystemCode
().
contains
(
SystemCodeOrName
)
||
e
.
getName
().
contains
(
SystemCodeOrName
)).
collect
(
Collectors
.
toList
());
return
findList
;
}
public
List
<
SelectListItem
>
getKnowledgeInfoList
()
{
List
<
SelectListItem
>
list
=
null
;
Object
obj
=
redisUtils
.
get
(
RedisKey
.
KnowledgeCodeList
);
if
(
null
!=
obj
)
list
=
(
List
<
SelectListItem
>)
redisUtils
.
get
(
RedisKey
.
KnowledgeCodeList
);
if
(
null
==
list
||
list
.
size
()
==
0
)
{
list
=
getKnowledgeParameterTreeList
();
redisUtils
.
set
(
RedisKey
.
KnowledgeCodeList
,
list
,
7
,
TimeUnit
.
DAYS
);
}
return
list
;
}
private
List
<
SelectListItem
>
getKnowledgeParameterTreeList
()
{
List
<
SystemParameter
>
parentList
=
this
.
getListByType
(
68
);
List
<
SelectListItem
>
list
=
new
ArrayList
<>();
List
<
SystemParameter
>
FirstList
=
parentList
.
stream
().
filter
(
e
->
e
.
getSystemCode
().
equals
(
"C"
)
||
e
.
getSystemCode
().
equals
(
"G"
)
||
e
.
getSystemCode
().
equals
(
"H"
)).
collect
(
Collectors
.
toList
());
FirstList
.
forEach
(
e
->
{
SelectListItem
treeListItem
=
new
SelectListItem
(
e
.
getName
(),
e
.
getId
(),
e
.
getSystemCode
(),
false
,
false
,
new
ArrayList
<>());
list
.
add
(
treeListItem
);
});
list
.
forEach
(
e
->
{
List
<
SelectListItem
>
SecondList
=
AddChildList
(
parentList
,
e
,
3
);
e
.
setChildren
(
SecondList
);
SecondList
.
forEach
(
f
->
{
List
<
SelectListItem
>
ThirdList
=
AddChildList
(
parentList
,
f
,
5
);
f
.
setChildren
(
ThirdList
);
});
});
return
list
;
}
private
List
<
SelectListItem
>
AddChildList
(
List
<
SystemParameter
>
parentList
,
SelectListItem
s
,
int
CodeLenght
)
{
List
<
SelectListItem
>
SelectList
=
new
ArrayList
<>();
List
<
SystemParameter
>
itemList
=
parentList
.
stream
().
filter
(
f
->
f
.
getSystemCode
().
contains
(
s
.
getDescription
())
&&
f
.
getSystemCode
().
length
()
==
CodeLenght
).
collect
(
Collectors
.
toList
());
itemList
.
forEach
(
e
->
{
SelectListItem
treeListItem
=
new
SelectListItem
(
e
.
getName
(),
e
.
getId
(),
e
.
getSystemCode
(),
false
,
false
,
new
ArrayList
<>());
SelectList
.
add
(
treeListItem
);
});
return
SelectList
;
}
}
}
science-admin/src/main/java/com/yiboshi/science/utils/RedisKey.java
View file @
953d6e81
...
@@ -18,4 +18,6 @@ public class RedisKey {
...
@@ -18,4 +18,6 @@ public class RedisKey {
public
final
static
String
RoleList
=
"role-list"
;
public
final
static
String
RoleList
=
"role-list"
;
//项目KPI绩效指标
//项目KPI绩效指标
public
final
static
String
ProjectKPIList
=
"project-kpi-list"
;
public
final
static
String
ProjectKPIList
=
"project-kpi-list"
;
//学科代码列表
public
final
static
String
KnowledgeCodeList
=
"knowledge-code-list"
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment