Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sv-springboot
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bsoft
sv-springboot
Commits
b74abfcf
Commit
b74abfcf
authored
Apr 27, 2020
by
Suvalue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
板块指数接口调整
parent
bed28007
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
7 deletions
+18
-7
bsoft-api/src/main/java/com/bsoft/api/controller/BlockValuesController.java
+8
-4
bsoft-api/src/main/java/com/bsoft/api/service/BlockValuesService.java
+2
-2
bsoft-api/src/main/java/com/bsoft/api/service/Impl/BlockValuesServiceImpl.java
+8
-1
No files found.
bsoft-api/src/main/java/com/bsoft/api/controller/BlockValuesController.java
View file @
b74abfcf
package
com
.
bsoft
.
api
.
controller
;
package
com
.
bsoft
.
api
.
controller
;
import
com.bsoft.api.common.Result
;
import
com.bsoft.api.common.Result
;
import
com.bsoft.api.common.annotations.CurrentUser
;
import
com.bsoft.api.common.annotations.Token
;
import
com.bsoft.api.common.annotations.Token
;
import
com.bsoft.api.model.reqmodel.BlockValues
;
import
com.bsoft.api.model.reqmodel.BlockValues
;
import
com.bsoft.api.model.reqmodel.BlockValuesNew
;
import
com.bsoft.api.model.reqmodel.BlockValuesNew
;
...
@@ -28,6 +29,7 @@ public class BlockValuesController {
...
@@ -28,6 +29,7 @@ public class BlockValuesController {
/**
/**
* 根据pageId查询板块数值
* 根据pageId查询板块数值
*
* @return
* @return
* @throws Exception
* @throws Exception
*/
*/
...
@@ -37,22 +39,23 @@ public class BlockValuesController {
...
@@ -37,22 +39,23 @@ public class BlockValuesController {
@ApiOperation
(
"根据Page查询板块数值"
)
@ApiOperation
(
"根据Page查询板块数值"
)
public
Object
getBlockValuesByPageID
(
@RequestBody
BlockValues
blockValues
)
throws
InterruptedException
{
public
Object
getBlockValuesByPageID
(
@RequestBody
BlockValues
blockValues
)
throws
InterruptedException
{
List
<
BlockValue
>
list
=
blockValuesService
.
getBlockValuesByPageCode
(
blockValues
.
getPageCode
(),
List
<
BlockValue
>
list
=
blockValuesService
.
getBlockValuesByPageCode
(
blockValues
.
getPageCode
(),
blockValues
.
getDisease
(),
blockValues
.
getDoctor
(),
blockValues
.
getDepartment
(),
blockValues
.
getTime
());
blockValues
.
getDisease
(),
blockValues
.
getDoctor
(),
blockValues
.
getDepartment
(),
blockValues
.
getTime
());
return
Result
.
success
(
list
);
return
Result
.
success
(
list
);
}
}
/**
/**
* 根据pageId查询板块数值
* 根据pageId查询板块数值
*
* @return
* @return
* @throws Exception
* @throws Exception
*/
*/
@PostMapping
(
"blockValuesNew"
)
@PostMapping
(
"blockValuesNew"
)
@Token
@Token
@ApiOperation
(
"根据Page查询板块数值"
)
@ApiOperation
(
"根据Page查询板块数值"
)
public
Object
getBlockValuesByPageIDNew
(
@RequestBody
BlockValuesNew
blockValues
)
throws
InterruptedException
{
public
Object
getBlockValuesByPageIDNew
(
@ApiIgnore
@CurrentUser
Long
userId
,
@RequestBody
BlockValuesNew
blockValues
)
throws
InterruptedException
{
List
<
BlockValue
>
list
=
blockValuesService
.
getBlockValuesByPageCodeNew
(
blockValues
.
getPageCode
(),
blockValues
.
getDim
());
List
<
BlockValue
>
list
=
blockValuesService
.
getBlockValuesByPageCodeNew
(
userId
,
blockValues
.
getPageCode
(),
blockValues
.
getDim
());
return
Result
.
success
(
list
);
return
Result
.
success
(
list
);
}
}
}
}
\ No newline at end of file
bsoft-api/src/main/java/com/bsoft/api/service/BlockValuesService.java
View file @
b74abfcf
...
@@ -6,7 +6,7 @@ import java.util.List;
...
@@ -6,7 +6,7 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map
;
public
interface
BlockValuesService
{
public
interface
BlockValuesService
{
List
<
BlockValue
>
getBlockValuesByPageCode
(
Integer
pageCode
,
Integer
disease
,
Integer
doctor
,
Integer
department
,
Integer
time
)
throws
InterruptedException
;
List
<
BlockValue
>
getBlockValuesByPageCode
(
Integer
pageCode
,
Integer
disease
,
Integer
doctor
,
Integer
department
,
Integer
time
)
throws
InterruptedException
;
List
<
BlockValue
>
getBlockValuesByPageCodeNew
(
Integer
pageCode
,
Map
<
String
,
String
>
dim
)
throws
InterruptedException
;
List
<
BlockValue
>
getBlockValuesByPageCodeNew
(
Long
userId
,
Integer
pageCode
,
Map
<
String
,
String
>
dim
)
throws
InterruptedException
;
}
}
bsoft-api/src/main/java/com/bsoft/api/service/Impl/BlockValuesServiceImpl.java
View file @
b74abfcf
...
@@ -98,7 +98,7 @@ public class BlockValuesServiceImpl implements BlockValuesService {
...
@@ -98,7 +98,7 @@ public class BlockValuesServiceImpl implements BlockValuesService {
}
}
@Override
@Override
public
List
<
BlockValue
>
getBlockValuesByPageCodeNew
(
Integer
pageCode
,
Map
<
String
,
String
>
dim
)
throws
InterruptedException
{
public
List
<
BlockValue
>
getBlockValuesByPageCodeNew
(
Long
userId
,
Integer
pageCode
,
Map
<
String
,
String
>
dim
)
throws
InterruptedException
{
/**
/**
* 1.根据pageCode查询所有对应的pageId
* 1.根据pageCode查询所有对应的pageId
* 查询要求为pageCode为当前pageCode,相同pageId的所有数据有且仅有DIM_ID为
* 查询要求为pageCode为当前pageCode,相同pageId的所有数据有且仅有DIM_ID为
...
@@ -122,6 +122,10 @@ public class BlockValuesServiceImpl implements BlockValuesService {
...
@@ -122,6 +122,10 @@ public class BlockValuesServiceImpl implements BlockValuesService {
for
(
Iterator
iterator
=
inFields
.
iterator
();
iterator
.
hasNext
();){
for
(
Iterator
iterator
=
inFields
.
iterator
();
iterator
.
hasNext
();){
Object
obj
=
iterator
.
next
();
Object
obj
=
iterator
.
next
();
Object
value
=
dim
.
get
(
obj
);
Object
value
=
dim
.
get
(
obj
);
if
(
value
instanceof
String
){
String
valueNew
=
dim
.
get
(
obj
);
dim
.
put
(
String
.
valueOf
(
obj
),
valueNew
.
trim
());
}
remove
(
value
,
iterator
);
remove
(
value
,
iterator
);
}
}
...
@@ -131,6 +135,9 @@ public class BlockValuesServiceImpl implements BlockValuesService {
...
@@ -131,6 +135,9 @@ public class BlockValuesServiceImpl implements BlockValuesService {
throw
new
DBConfigurationError
(
"页面维度配置表错误,请联系管理员"
);
throw
new
DBConfigurationError
(
"页面维度配置表错误,请联系管理员"
);
}
}
//将用户信息配置进参数
dim
.
put
(
"USER"
,
String
.
valueOf
(
userId
));
SerPage
page
=
pageList
.
get
(
0
);
SerPage
page
=
pageList
.
get
(
0
);
//根据pageId查询所有板块
//根据pageId查询所有板块
...
...
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