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
18b7910e
Commit
18b7910e
authored
Nov 05, 2019
by
Suvalue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
维度板块数值接口修改
parent
69accf28
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
101 additions
and
4 deletions
+101
-4
bsoft-api/src/main/java/com/bsoft/api/controller/BlockValuesController.java
+16
-0
bsoft-api/src/main/java/com/bsoft/api/controller/DimController.java
+2
-1
bsoft-api/src/main/java/com/bsoft/api/controller/IndController.java
+2
-1
bsoft-api/src/main/java/com/bsoft/api/controller/SerDiseaseDocController.java
+1
-1
bsoft-api/src/main/java/com/bsoft/api/model/reqmodel/BlockValuesNew.java
+28
-0
bsoft-api/src/main/java/com/bsoft/api/service/BlockValuesService.java
+3
-1
bsoft-api/src/main/java/com/bsoft/api/service/Impl/BlockValuesServiceImpl.java
+49
-0
No files found.
bsoft-api/src/main/java/com/bsoft/api/controller/BlockValuesController.java
View file @
18b7910e
...
@@ -3,6 +3,7 @@ package com.bsoft.api.controller;
...
@@ -3,6 +3,7 @@ package com.bsoft.api.controller;
import
com.bsoft.api.common.Result
;
import
com.bsoft.api.common.Result
;
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.respmodel.BlockValue
;
import
com.bsoft.api.model.respmodel.BlockValue
;
import
com.bsoft.api.service.BlockValuesService
;
import
com.bsoft.api.service.BlockValuesService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -37,4 +38,18 @@ public class BlockValuesController {
...
@@ -37,4 +38,18 @@ public class BlockValuesController {
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查询板块数值
* @return
* @throws Exception
*/
@PostMapping
(
"blockValuesNew"
)
@Token
@ApiOperation
(
"根据Page查询板块数值"
)
public
Object
getBlockValuesByPageIDNew
(
@RequestBody
BlockValuesNew
blockValues
)
throws
InterruptedException
{
List
<
BlockValue
>
list
=
blockValuesService
.
getBlockValuesByPageCodeNew
(
blockValues
.
getPageCode
(),
blockValues
.
getDim
());
return
Result
.
success
(
list
);
}
}
}
\ No newline at end of file
bsoft-api/src/main/java/com/bsoft/api/controller/DimController.java
View file @
18b7910e
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.Token
;
import
com.bsoft.api.model.reqmodel.ReqDimValue
;
import
com.bsoft.api.model.reqmodel.ReqDimValue
;
import
com.bsoft.api.model.respmodel.DimValue
;
import
com.bsoft.api.model.respmodel.DimValue
;
import
com.bsoft.api.service.DicDimService
;
import
com.bsoft.api.service.DicDimService
;
...
@@ -25,7 +26,7 @@ public class DimController {
...
@@ -25,7 +26,7 @@ public class DimController {
* @throws Exception
* @throws Exception
*/
*/
@PostMapping
(
"dimValue"
)
@PostMapping
(
"dimValue"
)
//
@Token
@Token
@ApiOperation
(
"根据pageCode查询维度数值"
)
@ApiOperation
(
"根据pageCode查询维度数值"
)
public
Object
getdimValueByPageCode
(
@RequestBody
ReqDimValue
reqDimValue
)
{
public
Object
getdimValueByPageCode
(
@RequestBody
ReqDimValue
reqDimValue
)
{
List
<
DimValue
>
dimValueList
=
dicDimService
.
getByPageCode
(
reqDimValue
.
getPageCode
(),
reqDimValue
.
getOrgId
(),
reqDimValue
.
getDate
());
List
<
DimValue
>
dimValueList
=
dicDimService
.
getByPageCode
(
reqDimValue
.
getPageCode
(),
reqDimValue
.
getOrgId
(),
reqDimValue
.
getDate
());
...
...
bsoft-api/src/main/java/com/bsoft/api/controller/IndController.java
View file @
18b7910e
...
@@ -8,9 +8,10 @@ import org.springframework.web.bind.annotation.GetMapping;
...
@@ -8,9 +8,10 @@ import org.springframework.web.bind.annotation.GetMapping;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.servlet.ModelAndView
;
import
org.springframework.web.servlet.ModelAndView
;
import
springfox.documentation.annotations.ApiIgnore
;
@ApiIgnore
@RequestMapping
(
"ind"
)
@RequestMapping
(
"ind"
)
@Controller
@Controller
public
class
IndController
{
public
class
IndController
{
...
...
bsoft-api/src/main/java/com/bsoft/api/controller/SerDiseaseDocController.java
View file @
18b7910e
...
@@ -22,7 +22,7 @@ public class SerDiseaseDocController {
...
@@ -22,7 +22,7 @@ public class SerDiseaseDocController {
private
SerDiseaseDocService
serDiseaseDocService
;
private
SerDiseaseDocService
serDiseaseDocService
;
@PostMapping
(
"diseaseDoc"
)
@PostMapping
(
"diseaseDoc"
)
//
@Token
@Token
@ApiOperation
(
"根据Code查询疾病关系信息"
)
@ApiOperation
(
"根据Code查询疾病关系信息"
)
public
Object
getDiseaseDoc
(
@RequestBody
DiseaseDoc
disease
)
throws
InterruptedException
{
public
Object
getDiseaseDoc
(
@RequestBody
DiseaseDoc
disease
)
throws
InterruptedException
{
List
<
SerDiseaseDocRs
>
list
=
serDiseaseDocService
.
getDiseaseDoc
(
disease
.
getDocCode
(),
disease
.
getMdcCode
(),
List
<
SerDiseaseDocRs
>
list
=
serDiseaseDocService
.
getDiseaseDoc
(
disease
.
getDocCode
(),
disease
.
getMdcCode
(),
...
...
bsoft-api/src/main/java/com/bsoft/api/model/reqmodel/BlockValuesNew.java
0 → 100644
View file @
18b7910e
package
com
.
bsoft
.
api
.
model
.
reqmodel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.util.Map
;
public
class
BlockValuesNew
{
@ApiModelProperty
(
value
=
"pageCode"
,
required
=
true
)
private
Integer
pageCode
;
@ApiModelProperty
(
"维度查询值"
)
private
Map
<
String
,
String
>
dim
;
public
Integer
getPageCode
()
{
return
pageCode
;
}
public
void
setPageCode
(
Integer
pageCode
)
{
this
.
pageCode
=
pageCode
;
}
public
Map
<
String
,
String
>
getDim
()
{
return
dim
;
}
public
void
setDim
(
Map
<
String
,
String
>
dim
)
{
this
.
dim
=
dim
;
}
}
bsoft-api/src/main/java/com/bsoft/api/service/BlockValuesService.java
View file @
18b7910e
...
@@ -6,5 +6,7 @@ import java.util.List;
...
@@ -6,5 +6,7 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map
;
public
interface
BlockValuesService
{
public
interface
BlockValuesService
{
List
<
BlockValue
>
getBlockValuesByPageCode
(
Integer
pageId
,
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
;
}
}
bsoft-api/src/main/java/com/bsoft/api/service/Impl/BlockValuesServiceImpl.java
View file @
18b7910e
...
@@ -97,4 +97,53 @@ public class BlockValuesServiceImpl implements BlockValuesService {
...
@@ -97,4 +97,53 @@ public class BlockValuesServiceImpl implements BlockValuesService {
return
list
;
return
list
;
}
}
@Override
public
List
<
BlockValue
>
getBlockValuesByPageCodeNew
(
Integer
pageCode
,
Map
<
String
,
String
>
dim
)
throws
InterruptedException
{
/**
* 1.根据pageCode查询所有对应的pageId
* 查询要求为pageCode为当前pageCode,相同pageId的所有数据有且仅有DIM_ID为
* dim中键值对的数据
* 2.根据pageId获取所有block
* 3.根据block拼接表名及where语句
*/
List
<
BlockValue
>
list
=
new
ArrayList
<>();
int
count
=
0
;
String
inField
=
""
;
String
whereClause
=
"where 1=1"
;
for
(
Map
.
Entry
<
String
,
String
>
entry
:
dim
.
entrySet
())
{
whereClause
+=
String
.
format
(
" and "
+
entry
.
getKey
()+
"='%s'"
,
entry
.
getValue
());
inField
+=
"'"
+
entry
.
getKey
()+
"',"
;
count
++;
}
if
(
count
>
0
){
inField
=
inField
.
substring
(
0
,
inField
.
length
()-
1
);
}
List
<
SerPage
>
pageList
=
serPageMapper
.
selectByCodeAndDim
(
pageCode
,
inField
,
count
);
if
(
pageList
.
size
()
==
0
){
throw
new
DBConfigurationError
(
"页面维度配置表错误,请联系管理员"
);
}
SerPage
page
=
pageList
.
get
(
0
);
//根据pageId查询所有板块
List
<
SerPageBlockRs
>
pageBlocklist
=
serPageBlockRsMapper
.
selectByPageId
(
page
.
getId
());
//循环获取数据
CountDownLatch
latch
=
new
CountDownLatch
(
pageBlocklist
.
size
());
for
(
SerPageBlockRs
data
:
pageBlocklist
)
{
//获取表名
Long
blockId
=
data
.
getBlockId
();
String
tableName
=
"VAL_BLOCK_VALUES_"
+
blockId
;
asynBlockValuesServiceImpl
.
getBlockValues
(
list
,
blockId
,
tableName
,
whereClause
,
latch
);
}
latch
.
await
();
return
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