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
b3321b23
Commit
b3321b23
authored
Dec 19, 2024
by
徐俊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xujun
parent
78a823fe
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
82 additions
and
21 deletions
+82
-21
SystemParameterController.java
...om/yiboshi/science/rest/v1/SystemParameterController.java
+12
-3
SystemParameterService.java
...a/com/yiboshi/science/service/SystemParameterService.java
+9
-2
SystemParameterServiceImpl.java
...oshi/science/service/impl/SystemParameterServiceImpl.java
+51
-6
RedisKey.java
...min/src/main/java/com/yiboshi/science/utils/RedisKey.java
+4
-2
SelectCodeListItem.java
...n/java/com/yiboshi/science/entity/SelectCodeListItem.java
+6
-8
No files found.
science-admin/src/main/java/com/yiboshi/science/rest/v1/SystemParameterController.java
View file @
b3321b23
...
@@ -4,6 +4,7 @@ import com.yiboshi.arch.base.ResponseDataModel;
...
@@ -4,6 +4,7 @@ import com.yiboshi.arch.base.ResponseDataModel;
import
com.yiboshi.science.base.Pagination
;
import
com.yiboshi.science.base.Pagination
;
import
com.yiboshi.science.config.annotation.Anonymous
;
import
com.yiboshi.science.config.annotation.Anonymous
;
import
com.yiboshi.science.config.annotation.Logs
;
import
com.yiboshi.science.config.annotation.Logs
;
import
com.yiboshi.science.entity.SelectCodeListItem
;
import
com.yiboshi.science.entity.SelectListItem
;
import
com.yiboshi.science.entity.SelectListItem
;
import
com.yiboshi.science.entity.SystemParameter
;
import
com.yiboshi.science.entity.SystemParameter
;
import
com.yiboshi.science.enumeration.CommonEnum
;
import
com.yiboshi.science.enumeration.CommonEnum
;
...
@@ -155,9 +156,17 @@ public class SystemParameterController extends BaseController<SystemParameterSer
...
@@ -155,9 +156,17 @@ public class SystemParameterController extends BaseController<SystemParameterSer
@ApiOperation
(
value
=
"获取学科代码树列表"
,
httpMethod
=
"GET"
,
notes
=
"获取学科代码树列表"
)
@ApiOperation
(
value
=
"获取学科代码树列表"
,
httpMethod
=
"GET"
,
notes
=
"获取学科代码树列表"
)
@GetMapping
@GetMapping
@RequestMapping
(
"/getKnowledgeParameterTreeList"
)
@RequestMapping
(
"/getKnowledgeInfoList1"
)
public
ResponseDataModel
<
List
<
SelectListItem
>>
getKnowledgeParameterTreeList
()
{
public
ResponseDataModel
<
List
<
SelectListItem
>>
getKnowledgeInfoList1
()
{
List
<
SelectListItem
>
list
=
systemParameterService
.
getKnowledgeInfoList
();
List
<
SelectListItem
>
list
=
systemParameterService
.
getKnowledgeInfoList1
();
return
ResponseDataModel
.
ok
(
list
);
}
@ApiOperation
(
value
=
"获取学科代码树列表"
,
httpMethod
=
"GET"
,
notes
=
"获取学科代码树列表"
)
@GetMapping
@RequestMapping
(
"/getKnowledgeInfoList2"
)
public
ResponseDataModel
<
List
<
SelectCodeListItem
>>
getKnowledgeInfoList2
()
{
List
<
SelectCodeListItem
>
list
=
systemParameterService
.
getKnowledgeInfoList2
();
return
ResponseDataModel
.
ok
(
list
);
return
ResponseDataModel
.
ok
(
list
);
}
}
...
...
science-admin/src/main/java/com/yiboshi/science/service/SystemParameterService.java
View file @
b3321b23
package
com
.
yiboshi
.
science
.
service
;
package
com
.
yiboshi
.
science
.
service
;
import
com.yiboshi.science.base.BaseService
;
import
com.yiboshi.science.base.BaseService
;
import
com.yiboshi.science.entity.SelectCodeListItem
;
import
com.yiboshi.science.entity.SelectListItem
;
import
com.yiboshi.science.entity.SelectListItem
;
import
com.yiboshi.science.entity.SystemParameter
;
import
com.yiboshi.science.entity.SystemParameter
;
import
com.yiboshi.science.param.dto.SpecDTO
;
import
com.yiboshi.science.param.dto.SpecDTO
;
...
@@ -99,10 +100,16 @@ public interface SystemParameterService extends BaseService<SystemParameterQuery
...
@@ -99,10 +100,16 @@ public interface SystemParameterService extends BaseService<SystemParameterQuery
List
<
SystemParameter
>
getParameterListBySystemCode
(
String
SystemCodeOrName
);
List
<
SystemParameter
>
getParameterListBySystemCode
(
String
SystemCodeOrName
);
/**
/**
* 获取学科代码树列表
* 获取学科代码树列表
1
* @return
* @return
*/
*/
List
<
SelectListItem
>
getKnowledgeInfoList
();
List
<
SelectListItem
>
getKnowledgeInfoList1
();
/**
* 获取学科代码树列表1
* @return
*/
List
<
SelectCodeListItem
>
getKnowledgeInfoList2
();
/**
/**
* 专业数组代码列表
* 专业数组代码列表
...
...
science-admin/src/main/java/com/yiboshi/science/service/impl/SystemParameterServiceImpl.java
View file @
b3321b23
...
@@ -6,6 +6,7 @@ import com.yiboshi.arch.exception.BusinessException;
...
@@ -6,6 +6,7 @@ import com.yiboshi.arch.exception.BusinessException;
import
com.yiboshi.science.base.BaseServiceImpl
;
import
com.yiboshi.science.base.BaseServiceImpl
;
import
com.yiboshi.science.base.Pagination
;
import
com.yiboshi.science.base.Pagination
;
import
com.yiboshi.science.dao.SystemParameterDAO
;
import
com.yiboshi.science.dao.SystemParameterDAO
;
import
com.yiboshi.science.entity.SelectCodeListItem
;
import
com.yiboshi.science.entity.SelectListItem
;
import
com.yiboshi.science.entity.SelectListItem
;
import
com.yiboshi.science.entity.SystemParameter
;
import
com.yiboshi.science.entity.SystemParameter
;
import
com.yiboshi.science.entity.SystemParameterType
;
import
com.yiboshi.science.entity.SystemParameterType
;
...
@@ -333,19 +334,31 @@ public class SystemParameterServiceImpl extends BaseServiceImpl<SystemParameterD
...
@@ -333,19 +334,31 @@ public class SystemParameterServiceImpl extends BaseServiceImpl<SystemParameterD
return
findList
;
return
findList
;
}
}
public
List
<
SelectListItem
>
getKnowledgeInfoList
()
{
public
List
<
SelectListItem
>
getKnowledgeInfoList
1
()
{
List
<
SelectListItem
>
list
=
null
;
List
<
SelectListItem
>
list
=
null
;
Object
obj
=
redisUtils
.
get
(
RedisKey
.
KnowledgeCodeList
);
Object
obj
=
redisUtils
.
get
(
RedisKey
.
KnowledgeCodeList
1
);
if
(
null
!=
obj
)
if
(
null
!=
obj
)
list
=
(
List
<
SelectListItem
>)
redisUtils
.
get
(
RedisKey
.
KnowledgeCodeList
);
list
=
(
List
<
SelectListItem
>)
redisUtils
.
get
(
RedisKey
.
KnowledgeCodeList
1
);
if
(
null
==
list
||
list
.
size
()
==
0
)
{
if
(
null
==
list
||
list
.
size
()
==
0
)
{
list
=
getKnowledgeParameterTreeList
();
list
=
getKnowledgeParameterTreeList
1
();
redisUtils
.
set
(
RedisKey
.
KnowledgeCodeList
,
list
,
7
,
TimeUnit
.
DAYS
);
redisUtils
.
set
(
RedisKey
.
KnowledgeCodeList
1
,
list
,
7
,
TimeUnit
.
DAYS
);
}
}
return
list
;
return
list
;
}
}
private
List
<
SelectListItem
>
getKnowledgeParameterTreeList
()
{
public
List
<
SelectCodeListItem
>
getKnowledgeInfoList2
()
{
List
<
SelectCodeListItem
>
list
=
null
;
Object
obj
=
redisUtils
.
get
(
RedisKey
.
KnowledgeCodeList2
);
if
(
null
!=
obj
)
list
=
(
List
<
SelectCodeListItem
>)
redisUtils
.
get
(
RedisKey
.
KnowledgeCodeList2
);
if
(
null
==
list
||
list
.
size
()
==
0
)
{
list
=
getKnowledgeParameterTreeList2
();
redisUtils
.
set
(
RedisKey
.
KnowledgeCodeList2
,
list
,
7
,
TimeUnit
.
DAYS
);
}
return
list
;
}
private
List
<
SelectListItem
>
getKnowledgeParameterTreeList1
()
{
List
<
SystemParameter
>
parentList
=
this
.
getListByType
(
68
);
List
<
SystemParameter
>
parentList
=
this
.
getListByType
(
68
);
List
<
SelectListItem
>
list
=
new
ArrayList
<>();
List
<
SelectListItem
>
list
=
new
ArrayList
<>();
...
@@ -377,6 +390,38 @@ public class SystemParameterServiceImpl extends BaseServiceImpl<SystemParameterD
...
@@ -377,6 +390,38 @@ public class SystemParameterServiceImpl extends BaseServiceImpl<SystemParameterD
return
SelectList
;
return
SelectList
;
}
}
private
List
<
SelectCodeListItem
>
getKnowledgeParameterTreeList2
()
{
List
<
SystemParameter
>
parentList
=
this
.
getListByType
(
68
);
List
<
SelectCodeListItem
>
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
->
{
SelectCodeListItem
treeListItem
=
new
SelectCodeListItem
(
e
.
getName
(),
e
.
getId
(),
e
.
getSystemCode
(),
false
,
false
,
new
ArrayList
<>());
list
.
add
(
treeListItem
);
});
list
.
forEach
(
e
->
{
List
<
SelectCodeListItem
>
SecondList
=
AddChildList
(
parentList
,
e
,
3
);
e
.
setChildren
(
SecondList
);
SecondList
.
forEach
(
f
->
{
List
<
SelectCodeListItem
>
ThirdList
=
AddChildList
(
parentList
,
f
,
5
);
f
.
setChildren
(
ThirdList
);
});
});
return
list
;
}
private
List
<
SelectCodeListItem
>
AddChildList
(
List
<
SystemParameter
>
parentList
,
SelectCodeListItem
s
,
int
CodeLenght
)
{
List
<
SelectCodeListItem
>
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
->
{
SelectCodeListItem
treeListItem
=
new
SelectCodeListItem
(
e
.
getName
(),
e
.
getId
(),
e
.
getSystemCode
(),
false
,
false
,
new
ArrayList
<>());
SelectList
.
add
(
treeListItem
);
});
return
SelectList
;
}
public
List
<
SpecDTO
>
getSpecArray
()
{
public
List
<
SpecDTO
>
getSpecArray
()
{
List
<
SpecDTO
>
list
=
null
;
List
<
SpecDTO
>
list
=
null
;
Object
obj
=
redisUtils
.
get
(
RedisKey
.
SpecArrayList
);
Object
obj
=
redisUtils
.
get
(
RedisKey
.
SpecArrayList
);
...
...
science-admin/src/main/java/com/yiboshi/science/utils/RedisKey.java
View file @
b3321b23
...
@@ -18,8 +18,10 @@ public class RedisKey {
...
@@ -18,8 +18,10 @@ 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"
;
//学科代码列表
//学科代码列表1
public
final
static
String
KnowledgeCodeList
=
"knowledge-code-list"
;
public
final
static
String
KnowledgeCodeList1
=
"knowledge-code-list1"
;
//学科代码列表2
public
final
static
String
KnowledgeCodeList2
=
"knowledge-code-list2"
;
//专业数组代码列表
//专业数组代码列表
public
final
static
String
SpecArrayList
=
"spec-array-list"
;
public
final
static
String
SpecArrayList
=
"spec-array-list"
;
}
}
science-base/src/main/java/com/yiboshi/science/entity/SelectCodeListItem.java
View file @
b3321b23
...
@@ -14,17 +14,15 @@ import java.util.List;
...
@@ -14,17 +14,15 @@ import java.util.List;
@AllArgsConstructor
@AllArgsConstructor
public
class
SelectCodeListItem
implements
Serializable
{
public
class
SelectCodeListItem
implements
Serializable
{
/** 获取或设置选定项的文本 */
/** 获取或设置选定项的文本 */
private
String
title
;
private
String
label
;
/** 获取或设置选定项的值 */
/** 获取或设置选定项的值 */
private
String
key
;
private
String
value
;
private
String
pkey
;
private
String
ppkey
;
/** description */
/** description */
private
String
description
;
private
String
description
;
/** 获取或设置选定项的文本 */
/** 获取或设置选定项的文本 */
private
boolean
selected
;
private
boolean
selected
;
/** 获取或设置一个值,该值指示是否禁用 */
/** 获取或设置一个值,该值指示是否禁用 */
private
boolean
disabled
;
private
boolean
disabled
;
/** 子选项 */
/** 子选项 */
private
List
<
Select
ListItem
>
children
;
private
List
<
Select
CodeListItem
>
children
;
}
}
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