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
6008be7a
Commit
6008be7a
authored
Mar 10, 2023
by
dengwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
权重配置,多层权重计算逻辑优化
parent
c2085ae8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
8 deletions
+5
-8
ObjScoreIndWeightCfgCtrl.java
...le/indicators/api/hytobacco/ObjScoreIndWeightCfgCtrl.java
+2
-2
ScoreRuleService.java
...mobile/indicators/service/hytobacco/ScoreRuleService.java
+1
-4
ObjScoreIndWeightDetailMapper.xml
...sources/mybatis/mapping/ObjScoreIndWeightDetailMapper.xml
+2
-2
No files found.
src/main/java/com/keymobile/indicators/api/hytobacco/ObjScoreIndWeightCfgCtrl.java
View file @
6008be7a
...
...
@@ -39,8 +39,8 @@ public class ObjScoreIndWeightCfgCtrl {
@ApiOperation
(
"分页查询权重配置信息"
)
@GetMapping
(
"/findByPage"
)
public
Page
<
ObjScoreIndWeightCfg
>
findByPage
(
@ApiParam
(
"搜索关键字(名字)"
)
@RequestParam
(
value
=
"keyword"
,
required
=
false
)
String
keyword
,
@ApiParam
(
"页码,从1开始"
)
@RequestParam
(
value
=
"page"
,
defaultValue
=
"1
"
)
int
page
,
@ApiParam
(
"每页条数"
)
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"10
"
)
int
pageSize
,
@ApiParam
(
"页码,从1开始"
)
@RequestParam
(
"page
"
)
int
page
,
@ApiParam
(
"每页条数"
)
@RequestParam
(
"pageSize
"
)
int
pageSize
,
@ApiParam
(
"机构编号"
)
@RequestParam
(
value
=
"orgNo"
,
required
=
false
)
String
orgNo
)
{
LogManager
.
logInfo
(
Constants
.
LOG_INDICATOR_WEIGHTCFG_API
,
"根据参数分页查询权重配置信息{}"
,
keyword
);
return
weightCfgService
.
findByPage
(
page
,
pageSize
,
keyword
,
orgNo
);
...
...
src/main/java/com/keymobile/indicators/service/hytobacco/ScoreRuleService.java
View file @
6008be7a
...
...
@@ -545,10 +545,8 @@ public class ScoreRuleService {
objScoreCalResult
=
this
.
calGroupIndAverageOrSum
(
compareCatalog
,
objScoreCalResult
,
scoreRule
,
compareObj
,
date
,
scoreRule
.
getCalType
(),
code
,
dateMark
);
}
else
{
//4:多层权重
logger
.
info
(
"多层权重结果1:"
+
objScoreCalResult
);
objScoreCalResult
=
this
.
calMoreIndWeight
(
compareCatalog
,
objScoreCalResult
,
scoreRule
,
compareObj
,
date
,
code
,
dateMark
);
logger
.
info
(
"多层权重结果2:"
+
objScoreCalResult
);
}
objScoreCalResult
.
setCompareCatalog
(
compareCatalog
);
objScoreCalResult
.
setCompareId
(
compareId
);
...
...
@@ -581,7 +579,6 @@ public class ScoreRuleService {
}
datas
=
null
;
}
logger
.
info
(
"最终存表的结果集合:"
+
dbDatas
);
//批量新增或修改
if
(!
dbDatas
.
isEmpty
())
{
this
.
batchSaveOrUpdateObjScoreCalResult
(
dbDatas
);
...
...
@@ -624,7 +621,7 @@ public class ScoreRuleService {
//根据考核指标id获取考核指标
DriveIndDef
driveIndDef
=
driveIndDefService
.
getIndById
(
calResult
.
getIndId
(),
true
);
WeightIndValue
weightIndValue
=
weightIndValueMapper
.
findByIndIdAndObjId
(
calResult
.
getIndId
(),
compareObj
);
if
(
driveIndDef
!=
null
)
{
if
(
driveIndDef
!=
null
&&
weightIndValue
!=
null
)
{
//如果考核指标是参与单位计分的
if
(
StringUtils
.
isBlank
(
driveIndDef
.
getIsUnitCalScore
())
||
"1"
.
equals
(
driveIndDef
.
getIsUnitCalScore
()))
{
// 判断该指标是否为多合一指标(是:1 否:0)
...
...
src/main/resources/mybatis/mapping/ObjScoreIndWeightDetailMapper.xml
View file @
6008be7a
...
...
@@ -5,12 +5,12 @@
<insert
id=
"batchInsert"
parameterType=
"list"
>
insert into obj_score_ind_weight_detail
(cfg_id, code, level_name, date_value, org_no, org_name, org_type, ind_id, ind_name, weight, ind_weight, ind_improve_weight,
weight_two, weight_one , big_weight)
weight_two, weight_one , big_weight
, create_time
)
values
<foreach
collection=
"valueList"
item=
"val"
separator=
","
>
(#{val.cfgId}, #{val.code}, #{val.levelName}, #{val.dataValue}, #{val.orgNo}, #{val.orgName}, #{val.orgType},
#{val.indId}, #{val.indName}, #{val.weight}, #{val.indWeight}, #{val.indImproveWeight},
#{val.weightTwo}, #{val.weightOne}, #{val.bigWeight})
#{val.weightTwo}, #{val.weightOne}, #{val.bigWeight}
, #{val.createTime}
)
</foreach>
</insert>
...
...
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