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
21a1ca21
Commit
21a1ca21
authored
4 weeks ago
by
wangxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
6aa876b1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
66 deletions
+37
-66
SystemParameterController.java
...om/yiboshi/science/rest/v1/SystemParameterController.java
+2
-3
SystemParameterService.java
...a/com/yiboshi/science/service/SystemParameterService.java
+1
-2
SystemParameterServiceImpl.java
...oshi/science/service/impl/SystemParameterServiceImpl.java
+12
-21
SelectCodeListItem.java
...n/java/com/yiboshi/science/entity/SelectCodeListItem.java
+0
-28
SelectListItem.java
.../main/java/com/yiboshi/science/entity/SelectListItem.java
+22
-12
No files found.
science-admin/src/main/java/com/yiboshi/science/rest/v1/SystemParameterController.java
View file @
21a1ca21
...
...
@@ -4,7 +4,6 @@ import com.yiboshi.arch.base.ResponseDataModel;
import
com.yiboshi.science.base.Pagination
;
import
com.yiboshi.science.config.annotation.Anonymous
;
import
com.yiboshi.science.config.annotation.Logs
;
import
com.yiboshi.science.entity.SelectCodeListItem
;
import
com.yiboshi.science.entity.SelectListItem
;
import
com.yiboshi.science.entity.SystemParameter
;
import
com.yiboshi.science.enumeration.CommonEnum
;
...
...
@@ -165,8 +164,8 @@ public class SystemParameterController extends BaseController<SystemParameterSer
@ApiOperation
(
value
=
"获取学科代码树列表"
,
httpMethod
=
"GET"
,
notes
=
"获取学科代码树列表"
)
@GetMapping
@RequestMapping
(
"/getKnowledgeInfoList2"
)
public
ResponseDataModel
<
List
<
Select
Code
ListItem
>>
getKnowledgeInfoList2
()
{
List
<
Select
Code
ListItem
>
list
=
systemParameterService
.
getKnowledgeInfoList2
();
public
ResponseDataModel
<
List
<
SelectListItem
>>
getKnowledgeInfoList2
()
{
List
<
SelectListItem
>
list
=
systemParameterService
.
getKnowledgeInfoList2
();
return
ResponseDataModel
.
ok
(
list
);
}
...
...
This diff is collapsed.
Click to expand it.
science-admin/src/main/java/com/yiboshi/science/service/SystemParameterService.java
View file @
21a1ca21
package
com
.
yiboshi
.
science
.
service
;
import
com.yiboshi.science.base.BaseService
;
import
com.yiboshi.science.entity.SelectCodeListItem
;
import
com.yiboshi.science.entity.SelectListItem
;
import
com.yiboshi.science.entity.SystemParameter
;
import
com.yiboshi.science.param.dto.SpecDTO
;
...
...
@@ -109,7 +108,7 @@ public interface SystemParameterService extends BaseService<SystemParameterQuery
* 获取学科代码树列表1
* @return
*/
List
<
Select
Code
ListItem
>
getKnowledgeInfoList2
();
List
<
SelectListItem
>
getKnowledgeInfoList2
();
/**
* 专业数组代码列表
...
...
This diff is collapsed.
Click to expand it.
science-admin/src/main/java/com/yiboshi/science/service/impl/SystemParameterServiceImpl.java
View file @
21a1ca21
...
...
@@ -6,7 +6,6 @@ import com.yiboshi.arch.exception.BusinessException;
import
com.yiboshi.science.base.BaseServiceImpl
;
import
com.yiboshi.science.base.Pagination
;
import
com.yiboshi.science.dao.SystemParameterDAO
;
import
com.yiboshi.science.entity.SelectCodeListItem
;
import
com.yiboshi.science.entity.SelectListItem
;
import
com.yiboshi.science.entity.SystemParameter
;
import
com.yiboshi.science.entity.SystemParameterType
;
...
...
@@ -351,11 +350,11 @@ public class SystemParameterServiceImpl extends BaseServiceImpl<SystemParameterD
return
list
;
}
public
List
<
Select
Code
ListItem
>
getKnowledgeInfoList2
()
{
List
<
Select
Code
ListItem
>
list
=
null
;
public
List
<
SelectListItem
>
getKnowledgeInfoList2
()
{
List
<
SelectListItem
>
list
=
null
;
Object
obj
=
redisUtils
.
get
(
RedisKey
.
KnowledgeCodeList2
);
if
(
null
!=
obj
)
list
=
(
List
<
Select
Code
ListItem
>)
redisUtils
.
get
(
RedisKey
.
KnowledgeCodeList2
);
list
=
(
List
<
SelectListItem
>)
redisUtils
.
get
(
RedisKey
.
KnowledgeCodeList2
);
if
(
null
==
list
||
list
.
size
()
==
0
)
{
list
=
getKnowledgeParameterTreeList2
();
redisUtils
.
set
(
RedisKey
.
KnowledgeCodeList2
,
list
,
7
,
TimeUnit
.
DAYS
);
...
...
@@ -385,31 +384,22 @@ public class SystemParameterServiceImpl extends BaseServiceImpl<SystemParameterD
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
;
}
private
List
<
Select
Code
ListItem
>
getKnowledgeParameterTreeList2
()
{
private
List
<
SelectListItem
>
getKnowledgeParameterTreeList2
()
{
List
<
SystemParameter
>
parentList
=
this
.
getListByType
(
68
);
List
<
Select
Code
ListItem
>
list
=
new
ArrayList
<>();
List
<
SelectListItem
>
list
=
new
ArrayList
<>();
List
<
SystemParameter
>
FirstList
=
parentList
.
stream
().
filter
(
e
->
e
.
getSystemCode
().
equals
(
"C"
)
||
e
.
getSystemCode
().
equals
(
"G"
)
||
e
.
getSystemCode
().
equals
(
"H"
)
||
e
.
getSystemCode
().
equals
(
"F"
)).
collect
(
Collectors
.
toList
());
FirstList
.
forEach
(
e
->
{
Select
CodeListItem
treeListItem
=
new
SelectCode
ListItem
(
e
.
getName
(),
e
.
getId
(),
e
.
getSystemCode
(),
false
,
false
,
new
ArrayList
<>());
Select
ListItem
treeListItem
=
new
Select
ListItem
(
e
.
getName
(),
e
.
getId
(),
e
.
getSystemCode
(),
false
,
false
,
new
ArrayList
<>());
list
.
add
(
treeListItem
);
});
list
.
forEach
(
e
->
{
List
<
Select
Code
ListItem
>
SecondList
=
AddChildList
(
parentList
,
e
,
3
);
List
<
SelectListItem
>
SecondList
=
AddChildList
(
parentList
,
e
,
3
);
e
.
setChildren
(
SecondList
);
SecondList
.
forEach
(
f
->
{
List
<
Select
Code
ListItem
>
ThirdList
=
AddChildList
(
parentList
,
f
,
5
);
List
<
SelectListItem
>
ThirdList
=
AddChildList
(
parentList
,
f
,
5
);
f
.
setChildren
(
ThirdList
);
});
});
...
...
@@ -417,16 +407,17 @@ public class SystemParameterServiceImpl extends BaseServiceImpl<SystemParameterD
return
list
;
}
private
List
<
Select
CodeListItem
>
AddChildList
(
List
<
SystemParameter
>
parentList
,
SelectCode
ListItem
s
,
int
CodeLenght
)
{
List
<
Select
Code
ListItem
>
SelectList
=
new
ArrayList
<>();
private
List
<
Select
ListItem
>
AddChildList
(
List
<
SystemParameter
>
parentList
,
Select
ListItem
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
->
{
Select
CodeListItem
treeListItem
=
new
SelectCode
ListItem
(
e
.
getName
(),
e
.
getId
(),
e
.
getSystemCode
(),
false
,
false
,
new
ArrayList
<>());
Select
ListItem
treeListItem
=
new
Select
ListItem
(
e
.
getName
(),
e
.
getId
(),
e
.
getSystemCode
(),
false
,
false
,
new
ArrayList
<>());
SelectList
.
add
(
treeListItem
);
});
return
SelectList
;
}
public
List
<
SpecDTO
>
getSpecArray
()
{
List
<
SpecDTO
>
list
=
null
;
Object
obj
=
redisUtils
.
get
(
RedisKey
.
SpecArrayList
);
...
...
This diff is collapsed.
Click to expand it.
science-base/src/main/java/com/yiboshi/science/entity/SelectCodeListItem.java
deleted
100644 → 0
View file @
6aa876b1
package
com
.
yiboshi
.
science
.
entity
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
import
lombok.NoArgsConstructor
;
import
lombok.Setter
;
import
java.io.Serializable
;
import
java.util.List
;
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public
class
SelectCodeListItem
implements
Serializable
{
/** 获取或设置选定项的文本 */
private
String
label
;
/** 获取或设置选定项的值 */
private
String
value
;
/** description */
private
String
description
;
/** 获取或设置选定项的文本 */
private
boolean
selected
;
/** 获取或设置一个值,该值指示是否禁用 */
private
boolean
disabled
;
/** 子选项 */
private
List
<
SelectCodeListItem
>
children
;
}
This diff is collapsed.
Click to expand it.
science-base/src/main/java/com/yiboshi/science/entity/SelectListItem.java
View file @
21a1ca21
...
...
@@ -6,6 +6,7 @@ import lombok.NoArgsConstructor;
import
lombok.Setter
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
...
...
@@ -21,16 +22,25 @@ import java.util.List;
@NoArgsConstructor
@AllArgsConstructor
public
class
SelectListItem
implements
Serializable
{
/** 获取或设置选定项的文本 */
private
String
title
;
/** 获取或设置选定项的值 */
private
String
key
;
/** description */
private
String
description
;
/** 获取或设置选定项的文本 */
private
boolean
selected
;
/** 获取或设置一个值,该值指示是否禁用 */
private
boolean
disabled
;
/** 子选项 */
private
List
<
SelectListItem
>
children
;
public
SelectListItem
(
String
a
,
String
b
,
String
d
,
boolean
s
,
boolean
e
,
List
<
SelectListItem
>
ar
)
{
title
=
a
;
label
=
a
;
key
=
b
;
value
=
b
;
description
=
d
;
selected
=
s
;
disabled
=
e
;
children
=
ar
;
}
private
String
title
;
private
String
key
;
private
String
label
;
private
String
value
;
private
String
description
;
private
boolean
selected
;
private
boolean
disabled
;
private
List
<
SelectListItem
>
children
;
}
This diff is collapsed.
Click to expand it.
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