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
bd88399b
Commit
bd88399b
authored
Jun 09, 2020
by
zhangkb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加单位计分计算接口
parent
8c23199a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
IndScorecardCtrl.java
.../keymobile/indicators/api/hytobacco/IndScorecardCtrl.java
+12
-0
ScoreRuleService.java
...mobile/indicators/service/hytobacco/ScoreRuleService.java
+2
-2
No files found.
src/main/java/com/keymobile/indicators/api/hytobacco/IndScorecardCtrl.java
View file @
bd88399b
...
@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.RestController;
import
com.keymobile.indicators.model.entity.scorecard.IndScorecard
;
import
com.keymobile.indicators.model.entity.scorecard.IndScorecard
;
import
com.keymobile.indicators.service.hytobacco.IndScorecardService
;
import
com.keymobile.indicators.service.hytobacco.IndScorecardService
;
import
com.keymobile.indicators.service.hytobacco.ScoreRuleService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -22,6 +23,8 @@ import io.swagger.annotations.ApiOperation;
...
@@ -22,6 +23,8 @@ import io.swagger.annotations.ApiOperation;
public
class
IndScorecardCtrl
{
public
class
IndScorecardCtrl
{
@Autowired
@Autowired
private
IndScorecardService
indScorecardService
;
private
IndScorecardService
indScorecardService
;
@Autowired
private
ScoreRuleService
scoreRuleService
;
@ApiOperation
(
value
=
"新增/修改"
,
notes
=
"新增/修改"
)
@ApiOperation
(
value
=
"新增/修改"
,
notes
=
"新增/修改"
)
@PostMapping
(
value
=
"/saveOrUpdate"
)
@PostMapping
(
value
=
"/saveOrUpdate"
)
...
@@ -55,4 +58,13 @@ public class IndScorecardCtrl {
...
@@ -55,4 +58,13 @@ public class IndScorecardCtrl {
return
indScorecardService
.
calculateIndiScore
(
indId
,
date
,
compareObj
,
return
indScorecardService
.
calculateIndiScore
(
indId
,
date
,
compareObj
,
indScorecardId
,
compareId
,
compareObjs
);
indScorecardId
,
compareId
,
compareObjs
);
}
}
@ApiOperation
(
value
=
"根据单位评分规则计算单位评分"
,
notes
=
"根据单位评分规则计算单位评分"
)
@PostMapping
(
value
=
"/calculateObjectScore"
)
public
List
<
Map
<
String
,
String
>>
calculateObjectScore
(
@RequestParam
String
reportId
,
@RequestParam
String
compareId
,
@RequestParam
List
<
String
>
indIds
,
@RequestParam
List
<
String
>
compareObjs
,
@RequestParam
int
date
,
@RequestParam
String
scoreRuleId
){
return
scoreRuleService
.
calObjScore
(
reportId
,
compareId
,
indIds
,
compareObjs
,
date
,
scoreRuleId
);
};
}
}
src/main/java/com/keymobile/indicators/service/hytobacco/ScoreRuleService.java
View file @
bd88399b
...
@@ -256,7 +256,7 @@ public class ScoreRuleService {
...
@@ -256,7 +256,7 @@ public class ScoreRuleService {
}
}
//根据单位评分规则计算单位分数
//根据单位评分规则计算单位分数
public
void
calObjScore
(
String
reportId
,
String
compareId
,
List
<
String
>
indIds
,
public
List
<
Map
<
String
,
String
>>
calObjScore
(
String
reportId
,
String
compareId
,
List
<
String
>
indIds
,
List
<
String
>
compareObjs
,
int
date
,
String
scoreRuleId
)
{
List
<
String
>
compareObjs
,
int
date
,
String
scoreRuleId
)
{
List
<
Map
<
String
,
String
>>
results
=
new
ArrayList
<>();
List
<
Map
<
String
,
String
>>
results
=
new
ArrayList
<>();
//根据单位得分评分卡id获取评分卡详情
//根据单位得分评分卡id获取评分卡详情
...
@@ -284,6 +284,6 @@ public class ScoreRuleService {
...
@@ -284,6 +284,6 @@ public class ScoreRuleService {
}
else
{
}
else
{
logger
.
info
(
"单位评分卡id:"
+
scoreRuleId
+
" 不存在"
);
logger
.
info
(
"单位评分卡id:"
+
scoreRuleId
+
" 不存在"
);
}
}
System
.
out
.
println
(
results
)
;
return
results
;
}
}
}
}
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