Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
indicators
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhangkb
indicators
Commits
5e6cf03a
Commit
5e6cf03a
authored
Sep 15, 2020
by
hzc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加通过配置项查询指标或基础项单位接口
parent
547a31be
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
5 deletions
+31
-5
IndicatorsDefCtrl.java
...keymobile/indicators/api/hytobacco/IndicatorsDefCtrl.java
+31
-5
No files found.
src/main/java/com/keymobile/indicators/api/hytobacco/IndicatorsDefCtrl.java
View file @
5e6cf03a
package
com
.
keymobile
.
indicators
.
api
.
hytobacco
;
package
com
.
keymobile
.
indicators
.
api
.
hytobacco
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
com.keymobile.indicators.model.entity.ConfigInfo
;
import
com.keymobile.indicators.service.ConfigInfoService
;
import
io.swagger.annotations.ApiParam
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.keymobile.indicators.constant.Constants
;
import
com.keymobile.indicators.constant.Constants
;
import
com.keymobile.indicators.model.entity.indicators.BaseIndDef
;
import
com.keymobile.indicators.model.entity.indicators.BaseIndDef
;
...
@@ -39,6 +41,8 @@ public class IndicatorsDefCtrl {
...
@@ -39,6 +41,8 @@ public class IndicatorsDefCtrl {
private
BaseIndDefVersionService
baseIndDefVersionService
;
private
BaseIndDefVersionService
baseIndDefVersionService
;
@Autowired
@Autowired
private
DriveIndDefVersionService
driveIndDefVersionService
;
private
DriveIndDefVersionService
driveIndDefVersionService
;
@Autowired
private
ConfigInfoService
configInfoService
;
@ApiOperation
(
value
=
"根据基础指标id获取基础指标版本信息"
,
notes
=
"根据基础指标id获取基础指标版本信息"
)
@ApiOperation
(
value
=
"根据基础指标id获取基础指标版本信息"
,
notes
=
"根据基础指标id获取基础指标版本信息"
)
@PostMapping
(
value
=
"/getBaseIndDefVersions"
)
@PostMapping
(
value
=
"/getBaseIndDefVersions"
)
...
@@ -183,4 +187,26 @@ public class IndicatorsDefCtrl {
...
@@ -183,4 +187,26 @@ public class IndicatorsDefCtrl {
@RequestParam
(
defaultValue
=
"0"
)
int
page
,
@RequestParam
(
defaultValue
=
"10"
)
int
rows
)
throws
Exception
{
@RequestParam
(
defaultValue
=
"0"
)
int
page
,
@RequestParam
(
defaultValue
=
"10"
)
int
rows
)
throws
Exception
{
return
driveIndDefService
.
getByPageAndKeyword
(
catalogId
,
keyword
,
page
,
rows
);
return
driveIndDefService
.
getByPageAndKeyword
(
catalogId
,
keyword
,
page
,
rows
);
}
}
@ApiOperation
(
value
=
"查询单位 1数据项单位,2指标单位"
,
notes
=
"1数据项单位,2指标单位"
)
@GetMapping
(
value
=
"findUnits"
)
public
List
<
String
>
findUnits
(
@ApiParam
(
value
=
"1数据项单位,2指标单位"
)
@RequestParam
(
"type"
)
Integer
type
){
ConfigInfo
configInfo
=
null
;
if
(
type
.
intValue
()==
1
){
configInfo
=
configInfoService
.
getConfigInfoById
(
Constants
.
BASE_IND_UNIT
);
}
else
{
configInfo
=
configInfoService
.
getConfigInfoById
(
Constants
.
DRIVE_IND_UNIT
);
}
List
<
String
>
value
=
new
ArrayList
<>();
if
(
configInfo
!=
null
){
String
cfValue
=
configInfo
.
getCfValue
();
if
(
StringUtils
.
isNotBlank
(
cfValue
)){
value
=
Arrays
.
asList
(
cfValue
.
split
(
Constants
.
SEP_COMMA
));
}
}
return
value
;
}
}
}
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