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
513f773d
Commit
513f773d
authored
Jul 03, 2020
by
zhangkb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改指标关系接口
parent
cd3d169f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
9 deletions
+7
-9
IndicatorsRelCtrl.java
...keymobile/indicators/api/hytobacco/IndicatorsRelCtrl.java
+3
-2
IndicatorsRelService.java
...le/indicators/service/hytobacco/IndicatorsRelService.java
+2
-6
ShortboardRuleService.java
...e/indicators/service/hytobacco/ShortboardRuleService.java
+1
-0
ShortboardUnitService.java
...e/indicators/service/hytobacco/ShortboardUnitService.java
+1
-1
No files found.
src/main/java/com/keymobile/indicators/api/hytobacco/IndicatorsRelCtrl.java
View file @
513f773d
package
com
.
keymobile
.
indicators
.
api
.
hytobacco
;
package
com
.
keymobile
.
indicators
.
api
.
hytobacco
;
import
java.util.
Map
;
import
java.util.
List
;
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.PostMapping
;
...
@@ -8,6 +8,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
...
@@ -8,6 +8,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.keymobile.indicators.model.entity.indicators.BaseIndDef
;
import
com.keymobile.indicators.service.hytobacco.IndicatorsRelService
;
import
com.keymobile.indicators.service.hytobacco.IndicatorsRelService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -22,7 +23,7 @@ public class IndicatorsRelCtrl {
...
@@ -22,7 +23,7 @@ public class IndicatorsRelCtrl {
@ApiOperation
(
value
=
"根据指标id获取指标关系,type:0 基础指标 1考核指标"
,
notes
=
"根据指标id获取指标关系,type:0 基础指标 1考核指标"
)
@ApiOperation
(
value
=
"根据指标id获取指标关系,type:0 基础指标 1考核指标"
,
notes
=
"根据指标id获取指标关系,type:0 基础指标 1考核指标"
)
@PostMapping
(
value
=
"/getRelByIndId"
)
@PostMapping
(
value
=
"/getRelByIndId"
)
public
Map
<
String
,
Object
>
getRelByIndId
(
@RequestParam
String
indId
,
@RequestParam
String
type
){
public
List
<
BaseIndDef
>
getRelByIndId
(
@RequestParam
String
indId
,
@RequestParam
String
type
){
return
indRelService
.
getRelByIndId
(
indId
,
type
);
return
indRelService
.
getRelByIndId
(
indId
,
type
);
}
}
}
}
src/main/java/com/keymobile/indicators/service/hytobacco/IndicatorsRelService.java
View file @
513f773d
package
com
.
keymobile
.
indicators
.
service
.
hytobacco
;
package
com
.
keymobile
.
indicators
.
service
.
hytobacco
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.regex.Matcher
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
import
java.util.regex.Pattern
;
...
@@ -34,8 +32,7 @@ public class IndicatorsRelService {
...
@@ -34,8 +32,7 @@ public class IndicatorsRelService {
private
IndicatorsRelMapper
indicatorsRelMapper
;
private
IndicatorsRelMapper
indicatorsRelMapper
;
//type:0 基础指标 1:考核指标
//type:0 基础指标 1:考核指标
public
Map
<
String
,
Object
>
getRelByIndId
(
String
indId
,
String
type
){
public
List
<
BaseIndDef
>
getRelByIndId
(
String
indId
,
String
type
){
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
List
<
BaseIndDef
>
resultList
=
new
ArrayList
<>();
List
<
BaseIndDef
>
resultList
=
new
ArrayList
<>();
//先从库里找,找不到再分析公式然后保存进库里
//先从库里找,找不到再分析公式然后保存进库里
List
<
IndicatorsRel
>
indRels
=
indicatorsRelMapper
.
findByIndId
(
indId
);
List
<
IndicatorsRel
>
indRels
=
indicatorsRelMapper
.
findByIndId
(
indId
);
...
@@ -64,8 +61,7 @@ public class IndicatorsRelService {
...
@@ -64,8 +61,7 @@ public class IndicatorsRelService {
}
}
}
}
}
}
resultMap
.
put
(
"indList"
,
resultList
);
return
resultList
;
return
resultMap
;
}
}
public
List
<
BaseIndDef
>
getRelFromFormula
(
String
indId
,
String
type
){
public
List
<
BaseIndDef
>
getRelFromFormula
(
String
indId
,
String
type
){
...
...
src/main/java/com/keymobile/indicators/service/hytobacco/ShortboardRuleService.java
View file @
513f773d
...
@@ -112,6 +112,7 @@ public class ShortboardRuleService {
...
@@ -112,6 +112,7 @@ public class ShortboardRuleService {
map
.
put
(
"driveId"
,
driveId
);
map
.
put
(
"driveId"
,
driveId
);
map
.
put
(
"shortboardRuleId"
,
shortboardRuleIdList
);
map
.
put
(
"shortboardRuleId"
,
shortboardRuleIdList
);
map
.
put
(
"compareCalResults"
,
compareCalResults
);
map
.
put
(
"compareCalResults"
,
compareCalResults
);
map
.
put
(
"date"
,
date
);
result
.
add
(
map
);
result
.
add
(
map
);
}
}
}
}
...
...
src/main/java/com/keymobile/indicators/service/hytobacco/ShortboardUnitService.java
View file @
513f773d
...
@@ -71,7 +71,7 @@ public class ShortboardUnitService {
...
@@ -71,7 +71,7 @@ public class ShortboardUnitService {
//根据短板规则单元获取
//根据短板规则单元获取
public
List
<
Map
<
String
,
Object
>>
getShortboardObjFromUnit
(
Integer
id
)
throws
Exception
{
public
List
<
Map
<
String
,
Object
>>
getShortboardObjFromUnit
(
Integer
id
)
throws
Exception
{
List
<
Map
<
String
,
Object
>>
result
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
result
=
new
ArrayList
<>();
ShortboardUnit
shortboardUnit
=
this
.
getById
(
id
);
ShortboardUnit
shortboardUnit
=
this
.
getById
(
id
);
//根据短板单元id获取短板单元
if
(
shortboardUnit
!=
null
)
{
if
(
shortboardUnit
!=
null
)
{
List
<
String
>
compareObjList
=
new
ArrayList
<>();
List
<
String
>
compareObjList
=
new
ArrayList
<>();
List
<
String
>
driveIndIdList
=
new
ArrayList
<>();
List
<
String
>
driveIndIdList
=
new
ArrayList
<>();
...
...
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