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
83ca9adc
Commit
83ca9adc
authored
Jun 08, 2020
by
zhangkb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
整理衡阳对标系统代码,新建基础项和指标项实体保存,将之前的实体映射改为新的实体映射
parent
51d94765
Hide whitespace changes
Inline
Side-by-side
Showing
38 changed files
with
72 additions
and
1045 deletions
+72
-1045
DriveIndCalculateActor.java
...ymobile/indicators/akka/actor/DriveIndCalculateActor.java
+9
-15
DriveIndCalculateRegionActor.java
...ors/akka/actor/specific/DriveIndCalculateRegionActor.java
+3
-3
IndAcsDefCtrl.java
...va/com/keymobile/indicators/api/cmbkpi/IndAcsDefCtrl.java
+0
-71
IndAcsScoreInfoCtrl.java
.../keymobile/indicators/api/cmbkpi/IndAcsScoreInfoCtrl.java
+0
-77
IndAnaDefCtrl.java
...va/com/keymobile/indicators/api/cmbkpi/IndAnaDefCtrl.java
+0
-59
IndScorecardCtrl.java
.../keymobile/indicators/api/hytobacco/IndScorecardCtrl.java
+1
-2
GeneralParm.java
...va/com/keymobile/indicators/model/entity/GeneralParm.java
+0
-22
IndAcsData.java
...ava/com/keymobile/indicators/model/entity/IndAcsData.java
+0
-20
IndAcsDef.java
...java/com/keymobile/indicators/model/entity/IndAcsDef.java
+0
-40
IndAcsScoreInfo.java
...om/keymobile/indicators/model/entity/IndAcsScoreInfo.java
+0
-27
IndAnaData.java
...ava/com/keymobile/indicators/model/entity/IndAnaData.java
+0
-22
IndAnaDef.java
...java/com/keymobile/indicators/model/entity/IndAnaDef.java
+0
-33
IndRelInf.java
...java/com/keymobile/indicators/model/entity/IndRelInf.java
+0
-21
IndRelTree.java
...ava/com/keymobile/indicators/model/entity/IndRelTree.java
+0
-16
GeneralParmMapper.java
.../keymobile/indicators/model/mapper/GeneralParmMapper.java
+0
-12
IndAcsDataMapper.java
...m/keymobile/indicators/model/mapper/IndAcsDataMapper.java
+0
-8
IndAcsDefMapper.java
...om/keymobile/indicators/model/mapper/IndAcsDefMapper.java
+0
-20
IndAcsScoreInfoMapper.java
...mobile/indicators/model/mapper/IndAcsScoreInfoMapper.java
+0
-12
IndAnaDataMapper.java
...m/keymobile/indicators/model/mapper/IndAnaDataMapper.java
+0
-8
IndAnaDefMapper.java
...om/keymobile/indicators/model/mapper/IndAnaDefMapper.java
+0
-19
IndRelInfMapper.java
...om/keymobile/indicators/model/mapper/IndRelInfMapper.java
+0
-8
GeneralParmService.java
...ymobile/indicators/service/cmbkpi/GeneralParmService.java
+0
-19
IndAcsDataService.java
...eymobile/indicators/service/cmbkpi/IndAcsDataService.java
+0
-12
IndAcsDefService.java
...keymobile/indicators/service/cmbkpi/IndAcsDefService.java
+0
-78
IndAcsScoreInfoService.java
...ile/indicators/service/cmbkpi/IndAcsScoreInfoService.java
+0
-228
IndAnaDataService.java
...eymobile/indicators/service/cmbkpi/IndAnaDataService.java
+0
-12
IndAnaDefService.java
...keymobile/indicators/service/cmbkpi/IndAnaDefService.java
+0
-64
IndRelInfService.java
...keymobile/indicators/service/cmbkpi/IndRelInfService.java
+0
-12
DriveIndDefService.java
...bile/indicators/service/hytobacco/DriveIndDefService.java
+44
-0
IndScorecardService.java
...ile/indicators/service/hytobacco/IndScorecardService.java
+6
-7
IndicatorsValueService.java
.../indicators/service/hytobacco/IndicatorsValueService.java
+9
-10
GeneralParmMapper.xml
src/main/resources/mybatis/mapping/GeneralParmMapper.xml
+0
-8
IndAcsDataMapper.xml
src/main/resources/mybatis/mapping/IndAcsDataMapper.xml
+0
-6
IndAcsDefMapper.xml
src/main/resources/mybatis/mapping/IndAcsDefMapper.xml
+0
-30
IndAcsScoreInfoMapper.xml
src/main/resources/mybatis/mapping/IndAcsScoreInfoMapper.xml
+0
-6
IndAnaDataMapper.xml
src/main/resources/mybatis/mapping/IndAnaDataMapper.xml
+0
-6
IndAnaDefMapper.xml
src/main/resources/mybatis/mapping/IndAnaDefMapper.xml
+0
-26
IndRelInfMapper.xml
src/main/resources/mybatis/mapping/IndRelInfMapper.xml
+0
-6
No files found.
src/main/java/com/keymobile/indicators/akka/actor/DriveIndCalculateActor.java
View file @
83ca9adc
...
@@ -19,11 +19,9 @@ import com.keymobile.indicators.akka.message.IndGetValueMsg;
...
@@ -19,11 +19,9 @@ import com.keymobile.indicators.akka.message.IndGetValueMsg;
import
com.keymobile.indicators.akka.message.IndValueMsg
;
import
com.keymobile.indicators.akka.message.IndValueMsg
;
import
com.keymobile.indicators.akka.message.specific.DriveIndAverageAndRankMsg
;
import
com.keymobile.indicators.akka.message.specific.DriveIndAverageAndRankMsg
;
import
com.keymobile.indicators.model.entity.DriveIndCalResult
;
import
com.keymobile.indicators.model.entity.DriveIndCalResult
;
import
com.keymobile.indicators.model.entity.IndAcsDef
;
import
com.keymobile.indicators.model.entity.indicators.DriveIndDef
;
import
com.keymobile.indicators.model.entity.IndAcsScoreInfo
;
import
com.keymobile.indicators.service.cmbkpi.IndAcsDefService
;
import
com.keymobile.indicators.service.cmbkpi.IndAcsScoreInfoService
;
import
com.keymobile.indicators.service.hytobacco.DriveIndCalResultService
;
import
com.keymobile.indicators.service.hytobacco.DriveIndCalResultService
;
import
com.keymobile.indicators.service.hytobacco.DriveIndDefService
;
import
com.keymobile.indicators.utils.SpringUtil
;
import
com.keymobile.indicators.utils.SpringUtil
;
import
akka.actor.AbstractActor
;
import
akka.actor.AbstractActor
;
...
@@ -34,9 +32,7 @@ public class DriveIndCalculateActor extends AbstractActor{
...
@@ -34,9 +32,7 @@ public class DriveIndCalculateActor extends AbstractActor{
private
Logger
logger
=
LoggerFactory
.
getLogger
(
DriveIndCalculateActor
.
class
);
private
Logger
logger
=
LoggerFactory
.
getLogger
(
DriveIndCalculateActor
.
class
);
private
IndAcsDefService
indAcsDefService
=
SpringUtil
.
getBean
(
IndAcsDefService
.
class
);
private
DriveIndDefService
driveIndDefService
=
SpringUtil
.
getBean
(
DriveIndDefService
.
class
);
private
IndAcsScoreInfoService
indAcsScoreInfoService
=
SpringUtil
.
getBean
(
IndAcsScoreInfoService
.
class
);
private
DriveIndCalResultService
driveIndCalResultService
=
SpringUtil
.
getBean
(
DriveIndCalResultService
.
class
);
private
DriveIndCalResultService
driveIndCalResultService
=
SpringUtil
.
getBean
(
DriveIndCalResultService
.
class
);
...
@@ -90,16 +86,14 @@ public class DriveIndCalculateActor extends AbstractActor{
...
@@ -90,16 +86,14 @@ public class DriveIndCalculateActor extends AbstractActor{
List
<
String
>
indIdList
=
new
ArrayList
<>();
List
<
String
>
indIdList
=
new
ArrayList
<>();
IndAcsDef
indAcsDef
=
indAcs
DefService
.
getById
(
driveIndId
);
DriveIndDef
driveIndDef
=
driveInd
DefService
.
getById
(
driveIndId
);
unit
=
indAcsDef
.
getUnt
();
unit
=
driveIndDef
.
getIndUnit
();
//指标单位
indType
=
indAcsDef
.
getIndType
();
indType
=
driveIndDef
.
getIndType
();
//指标类型:正向 反向
markType
=
indAcsDef
.
getMarkType
();
markType
=
driveIndDef
.
getIndCalScoreRule
();
//指标评分规则
List
<
IndAcsScoreInfo
>
acsSoreInfoList
=
indAcsScoreInfoService
.
getListByIndId
(
driveIndId
);
//获取考核指标的公式
//获取考核指标的公式
driveIndFormula
=
acsSoreInfoList
.
get
(
0
).
getScoreFormula
();
driveIndFormula
=
driveIndDef
.
getIndFormat
();
averageDriveIndFormula
=
acsSoreInfoList
.
get
(
0
).
getScoreFormula
();
averageDriveIndFormula
=
driveIndDef
.
getIndFormat
();
Pattern
p
=
Pattern
.
compile
(
"(\\[[^\\]]*\\])"
);
Pattern
p
=
Pattern
.
compile
(
"(\\[[^\\]]*\\])"
);
Matcher
m
=
p
.
matcher
(
driveIndFormula
);
Matcher
m
=
p
.
matcher
(
driveIndFormula
);
...
...
src/main/java/com/keymobile/indicators/akka/actor/specific/DriveIndCalculateRegionActor.java
View file @
83ca9adc
...
@@ -12,8 +12,8 @@ import com.keymobile.indicators.akka.message.specific.DriveIndAverageAndRankMsg;
...
@@ -12,8 +12,8 @@ import com.keymobile.indicators.akka.message.specific.DriveIndAverageAndRankMsg;
import
com.keymobile.indicators.akka.message.specific.DriveIndCalculateRegionMsg
;
import
com.keymobile.indicators.akka.message.specific.DriveIndCalculateRegionMsg
;
import
com.keymobile.indicators.model.entity.DimValue
;
import
com.keymobile.indicators.model.entity.DimValue
;
import
com.keymobile.indicators.model.entity.DriveIndCalResult
;
import
com.keymobile.indicators.model.entity.DriveIndCalResult
;
import
com.keymobile.indicators.service.cmbkpi.IndAcsScoreInfoService
;
import
com.keymobile.indicators.service.hytobacco.DriveIndCalResultService
;
import
com.keymobile.indicators.service.hytobacco.DriveIndCalResultService
;
import
com.keymobile.indicators.service.hytobacco.DriveIndDefService
;
import
com.keymobile.indicators.service.hytobacco.IndScorecardService
;
import
com.keymobile.indicators.service.hytobacco.IndScorecardService
;
import
com.keymobile.indicators.utils.CalculateUtils
;
import
com.keymobile.indicators.utils.CalculateUtils
;
import
com.keymobile.indicators.utils.SpringUtil
;
import
com.keymobile.indicators.utils.SpringUtil
;
...
@@ -28,7 +28,7 @@ public class DriveIndCalculateRegionActor extends AbstractActor{
...
@@ -28,7 +28,7 @@ public class DriveIndCalculateRegionActor extends AbstractActor{
private
IndScorecardService
indScorecardService
=
SpringUtil
.
getBean
(
IndScorecardService
.
class
);
private
IndScorecardService
indScorecardService
=
SpringUtil
.
getBean
(
IndScorecardService
.
class
);
private
IndAcsScoreInfoService
indAcsScoreInfoService
=
SpringUtil
.
getBean
(
IndAcsScoreInfo
Service
.
class
);
private
DriveIndDefService
driveIndDefService
=
SpringUtil
.
getBean
(
DriveIndDef
Service
.
class
);
private
int
numberOfConfirm
=
0
;
//定义返回确认消息的子actor
private
int
numberOfConfirm
=
0
;
//定义返回确认消息的子actor
...
@@ -88,7 +88,7 @@ public class DriveIndCalculateRegionActor extends AbstractActor{
...
@@ -88,7 +88,7 @@ public class DriveIndCalculateRegionActor extends AbstractActor{
}
}
//算组内平均数
//算组内平均数
//String average = CalculateUtils.averageValue(values);
//String average = CalculateUtils.averageValue(values);
String
average
=
indAcsScoreInfo
Service
.
calGroupAverage
(
String
average
=
driveIndDef
Service
.
calGroupAverage
(
driveIndAverageAndRankMsg
.
getIndFormula
(),
compareObjs
,
driveIndAverageAndRankMsg
.
getIndFormula
(),
compareObjs
,
driveIndAverageAndRankMsg
.
getDate
());
driveIndAverageAndRankMsg
.
getDate
());
...
...
src/main/java/com/keymobile/indicators/api/cmbkpi/IndAcsDefCtrl.java
deleted
100644 → 0
View file @
51d94765
package
com
.
keymobile
.
indicators
.
api
.
cmbkpi
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
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.model.entity.IndAcsDef
;
import
com.keymobile.indicators.service.cmbkpi.IndAcsDefService
;
import
com.keymobile.indicators.utils.DateUtils
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
@Api
(
tags
={
"考核指标接口"
})
@RestController
@RequestMapping
(
value
=
"/indAcs"
)
public
class
IndAcsDefCtrl
{
@Autowired
private
IndAcsDefService
indAcsDefService
;
@ApiOperation
(
value
=
"获取所有考核指标定义"
,
notes
=
"获取所有考核指标定义"
)
@PostMapping
(
value
=
"/getAll"
)
public
List
<
IndAcsDef
>
getAll
()
throws
Exception
{
return
indAcsDefService
.
getAll
();
}
@ApiOperation
(
value
=
"根据指标id(编码)获取分析指标"
,
notes
=
"根据指标id(编码)获取分析指标"
)
@PostMapping
(
value
=
"/getById"
)
public
IndAcsDef
getById
(
@RequestParam
(
"id"
)
String
id
){
return
indAcsDefService
.
getById
(
id
);
}
@ApiOperation
(
value
=
"保存或修改分析指标"
,
notes
=
"保存或修改分析指标"
)
@PostMapping
(
value
=
"/saveOrUpdate"
)
public
String
saveOrUpdate
(
@RequestBody
IndAcsDef
indAcsDef
,
@RequestParam
(
required
=
false
)
String
defTime
,
@RequestParam
(
required
=
false
)
String
updTime
)
throws
Exception
{
if
(
StringUtils
.
isNotBlank
(
defTime
))
{
Date
defDate
=
DateUtils
.
getDate
(
defTime
,
"yyyy-MM-dd HH:mm:ss"
);
indAcsDef
.
setDefTime
(
defDate
);
}
if
(
StringUtils
.
isNotBlank
(
updTime
))
{
Date
updDate
=
DateUtils
.
getDate
(
updTime
,
"yyyy-MM-dd HH:mm:ss"
);
indAcsDef
.
setUpdTime
(
updDate
);
}
return
indAcsDefService
.
saveOrUpdate
(
indAcsDef
);
}
@ApiOperation
(
value
=
"删除考核指标"
,
notes
=
"删除考核指标"
)
@PostMapping
(
value
=
"/delete"
)
public
void
delete
(
@RequestParam
String
indId
)
throws
Exception
{
indAcsDefService
.
delete
(
indId
);
}
@ApiOperation
(
value
=
"根据关键字分页获取考核指标列表(page:0 开始)"
,
notes
=
"根据关键字分页获取考核指标列表(page:0 开始)"
)
@PostMapping
(
value
=
"/getPageListByKeyword"
)
public
Map
<
String
,
Object
>
getPageListByKeyword
(
@RequestParam
(
required
=
false
)
String
keyword
,
@RequestParam
int
page
,
@RequestParam
int
rows
)
throws
Exception
{
return
indAcsDefService
.
getByPageAndKeyword
(
keyword
,
page
,
rows
);
}
}
src/main/java/com/keymobile/indicators/api/cmbkpi/IndAcsScoreInfoCtrl.java
deleted
100644 → 0
View file @
51d94765
package
com
.
keymobile
.
indicators
.
api
.
cmbkpi
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
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.model.entity.IndAcsScoreInfo
;
import
com.keymobile.indicators.model.entity.IndRelTree
;
import
com.keymobile.indicators.service.cmbkpi.IndAcsScoreInfoService
;
import
com.keymobile.indicators.utils.DateUtils
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
@Api
(
tags
={
"考核指标计分信息接口"
})
@RestController
@RequestMapping
(
value
=
"/indAcsScore"
)
public
class
IndAcsScoreInfoCtrl
{
@Autowired
private
IndAcsScoreInfoService
indAscScoreService
;
@ApiOperation
(
value
=
"保存考核指标计分信息"
,
notes
=
"保存考核指标计分信息"
)
@PostMapping
(
value
=
"/save"
)
public
String
save
(
@RequestBody
IndAcsScoreInfo
indAcsScoreInfo
,
@RequestParam
String
updTime
)
throws
Exception
{
if
(
StringUtils
.
isNotBlank
(
updTime
))
{
Date
updDate
=
DateUtils
.
getDate
(
updTime
,
"yyyy-MM-dd HH:mm:ss"
);
indAcsScoreInfo
.
setUpdateTime
(
updDate
);
}
return
indAscScoreService
.
save
(
indAcsScoreInfo
);
}
@ApiOperation
(
value
=
"删除考核指标计分信息"
,
notes
=
"删除考核指标计分信息"
)
@PostMapping
(
value
=
"/delete"
)
public
void
delete
(
@RequestParam
String
orgId
,
@RequestParam
String
indId
,
@RequestParam
String
indAttrId
)
throws
Exception
{
indAscScoreService
.
delete
(
orgId
,
indId
,
indAttrId
);
}
@ApiOperation
(
value
=
"根据考核指标编号获取计分信息"
,
notes
=
"根据考核指标编号获取计分信息"
)
@PostMapping
(
value
=
"/getListByIndId"
)
public
List
<
IndAcsScoreInfo
>
getListByIndId
(
@RequestParam
String
indId
)
throws
Exception
{
return
indAscScoreService
.
getListByIndId
(
indId
);
}
@ApiOperation
(
value
=
"根据组织机构,指标id和指标类型获取考核指标计分信息"
,
notes
=
"根据组织机构,指标id和指标类型获取考核指标计分信息"
)
@PostMapping
(
value
=
"/selectOne"
)
public
IndAcsScoreInfo
selectOne
(
@RequestParam
String
orgId
,
@RequestParam
String
indId
,
@RequestParam
String
indAttrId
)
throws
Exception
{
return
indAscScoreService
.
selectOneByOrgIdAndIndidAndIndtype
(
orgId
,
indId
,
indAttrId
);
}
@ApiOperation
(
value
=
"根据关键字和类型获取考核指标或者分析指标(type:0 分析指标;1 考核指标)"
,
notes
=
"根据关键字和类型获取考核指标或者分析指标(type:0 分析指标;1 考核指标)"
)
@PostMapping
(
value
=
"/getIndByKeywordAndType"
)
public
List
<
Map
<
String
,
Object
>>
getIndByKeywordAndType
(
@RequestParam
(
required
=
false
)
String
keyword
,
@RequestParam
(
required
=
false
)
String
type
)
throws
Exception
{
return
indAscScoreService
.
getIndByKeywordAndType
(
keyword
,
type
);
}
@ApiOperation
(
value
=
"分析考核指标公式脑图"
,
notes
=
"分析考核指标公式脑图"
)
@PostMapping
(
value
=
"/analysisIndTree"
)
public
IndRelTree
analysisIndTree
(
@RequestParam
String
orgId
,
@RequestParam
String
indId
,
@RequestParam
String
indAttrId
)
throws
Exception
{
return
indAscScoreService
.
analysisIndTree
(
orgId
,
indId
,
indAttrId
);
}
}
src/main/java/com/keymobile/indicators/api/cmbkpi/IndAnaDefCtrl.java
deleted
100644 → 0
View file @
51d94765
package
com
.
keymobile
.
indicators
.
api
.
cmbkpi
;
import
java.util.Date
;
import
java.util.Map
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
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.model.entity.IndAnaDef
;
import
com.keymobile.indicators.service.cmbkpi.IndAnaDefService
;
import
com.keymobile.indicators.utils.DateUtils
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
@Api
(
tags
={
"分析指标接口"
})
@RestController
@RequestMapping
(
value
=
"/indAna"
)
public
class
IndAnaDefCtrl
{
@Autowired
private
IndAnaDefService
indAnaDefService
;
@ApiOperation
(
value
=
"保存或修改分析指标(defTime和updTime格式:yyyy-MM-dd HH:mm:ss)"
,
notes
=
"保存或修改分析指标(defTime和updTime格式:yyyy-MM-dd HH:mm:ss)"
)
@PostMapping
(
value
=
"/saveOrUpdate"
)
public
String
saveOrUpdate
(
@RequestBody
IndAnaDef
indAnaDef
,
@RequestParam
(
required
=
false
)
String
defTime
,
@RequestParam
(
required
=
false
)
String
updTime
)
throws
Exception
{
if
(
StringUtils
.
isNotBlank
(
defTime
))
{
Date
defDate
=
DateUtils
.
getDate
(
defTime
,
"yyyy-MM-dd HH:mm:ss"
);
indAnaDef
.
setDefTime
(
defDate
);
}
if
(
StringUtils
.
isNotBlank
(
updTime
))
{
Date
updDate
=
DateUtils
.
getDate
(
updTime
,
"yyyy-MM-dd HH:mm:ss"
);
indAnaDef
.
setUpdTime
(
updDate
);
}
return
indAnaDefService
.
saveOrUpdate
(
indAnaDef
);
}
@ApiOperation
(
value
=
"删除分析指标"
,
notes
=
"删除分析指标"
)
@PostMapping
(
value
=
"/delete"
)
public
void
delete
(
@RequestParam
String
indId
)
throws
Exception
{
indAnaDefService
.
delete
(
indId
);
}
@ApiOperation
(
value
=
"根据关键字分页获取分析指标列表(page:0 开始)"
,
notes
=
"根据关键字分页获取分析指标列表(page:0 开始)"
)
@PostMapping
(
value
=
"/getPageListByKeyword"
)
public
Map
<
String
,
Object
>
getPageListByKeyword
(
@RequestParam
(
required
=
false
)
String
keyword
,
@RequestParam
int
page
,
@RequestParam
int
rows
)
throws
Exception
{
return
indAnaDefService
.
getByPageAndKeyword
(
keyword
,
page
,
rows
);
}
}
src/main/java/com/keymobile/indicators/api/hytobacco/IndScorecardCtrl.java
View file @
83ca9adc
package
com
.
keymobile
.
indicators
.
api
.
hytobacco
;
package
com
.
keymobile
.
indicators
.
api
.
hytobacco
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -52,7 +51,7 @@ public class IndScorecardCtrl {
...
@@ -52,7 +51,7 @@ public class IndScorecardCtrl {
@PostMapping
(
value
=
"/calculateIndiScore"
)
@PostMapping
(
value
=
"/calculateIndiScore"
)
public
Map
<
String
,
String
>
calculateIndiScore
(
@RequestParam
String
indId
,
@RequestParam
int
date
,
public
Map
<
String
,
String
>
calculateIndiScore
(
@RequestParam
String
indId
,
@RequestParam
int
date
,
@RequestParam
String
compareObj
,
@RequestParam
String
indScorecardId
,
@RequestParam
String
compareObj
,
@RequestParam
String
indScorecardId
,
@RequestParam
String
compareId
,
@RequestBody
List
<
String
>
compareObjs
)
{
@RequestParam
String
compareId
,
@RequestBody
List
<
String
>
compareObjs
)
throws
Exception
{
return
indScorecardService
.
calculateIndiScore
(
indId
,
date
,
compareObj
,
return
indScorecardService
.
calculateIndiScore
(
indId
,
date
,
compareObj
,
indScorecardId
,
compareId
,
compareObjs
);
indScorecardId
,
compareId
,
compareObjs
);
}
}
...
...
src/main/java/com/keymobile/indicators/model/entity/GeneralParm.java
deleted
100644 → 0
View file @
51d94765
package
com
.
keymobile
.
indicators
.
model
.
entity
;
import
java.util.Date
;
import
javax.persistence.Table
;
import
lombok.Data
;
/**
* author:zhangkb time:2020-4-15 desc:系统通用参数表
*/
@Data
@Table
(
name
=
"gen_general_parm"
)
public
class
GeneralParm
{
private
String
rootParmId
;
//根参数ID
private
String
prnParmId
;
//父参数ID
private
String
subParmId
;
//子参数ID
private
String
parmNm
;
//参数名
private
String
cmt
;
//备注
private
String
updUserId
;
//更新人用户编号
private
Date
updTime
;
//更新时间
}
src/main/java/com/keymobile/indicators/model/entity/IndAcsData.java
deleted
100644 → 0
View file @
51d94765
package
com
.
keymobile
.
indicators
.
model
.
entity
;
import
javax.persistence.Table
;
import
lombok.Data
;
/**
* author:zhangkb time:2020-4-15 desc:考核指标数据表
*/
@Data
@Table
(
name
=
"ind_acs_ind_data_stat"
)
public
class
IndAcsData
{
private
String
dwStatDt
;
//统计日期
private
Integer
statMonId
;
//统计月份
private
String
orgId
;
//机构编号
private
String
indId
;
//指标编号
private
String
indName
;
//指标名称
private
String
indType
;
//指标类型
private
Double
statVal
;
//统计值
}
src/main/java/com/keymobile/indicators/model/entity/IndAcsDef.java
deleted
100644 → 0
View file @
51d94765
package
com
.
keymobile
.
indicators
.
model
.
entity
;
import
lombok.Data
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
java.util.Date
;
/**
* author:zhangkb time:2020-4-15 desc:考核指标定义表
*/
@Table
(
name
=
"ind_acs_ind_def_inf"
)
@Data
public
class
IndAcsDef
{
@Id
private
String
indId
;
//指标编号
private
String
indName
;
//指标名称
private
String
indTypeCd
;
//指标类型代码1 纯系统直接出数2 系统+手工3 纯手工上传4.系统衍生(从关系类)
private
String
indType
;
//指标类型1 纯系统直接出数2 系统+手工3 纯手工上传4.系统衍生(从关系类)
private
String
acsSysCd
;
//考核体系代码
private
String
acsSysName
;
//考核体系
private
String
acsDimCd
;
//考核维度代码
private
String
acsDimName
;
//考核维度
private
String
undType
;
//单位类型
private
String
unt
;
//单位
private
String
markTypeCd
;
//计分类型代码
private
String
markType
;
//计分类型
private
String
freqCd
;
//频率代码
private
String
freqName
;
//频率名称
private
Double
weight
;
//权重
private
String
cltCmt
;
//口径说明(汉字描述)
private
String
markRule
;
//计分规则(汉字描述)
private
String
dataSrc
;
//数据来源
private
String
dataHbr
;
//数据粒度
private
String
isValid
;
//是否有效
private
String
defUserId
;
//定义人用户编号
private
Date
defTime
;
//定义时间
private
String
updUserId
;
//更新人用户编号
private
Date
updTime
;
//更新时间
}
src/main/java/com/keymobile/indicators/model/entity/IndAcsScoreInfo.java
deleted
100644 → 0
View file @
51d94765
package
com
.
keymobile
.
indicators
.
model
.
entity
;
import
java.util.Date
;
import
javax.persistence.Table
;
import
lombok.Data
;
/**
* author:zhangkb time:2020-4-15 desc:考核指标计分信息表
*/
@Data
@Table
(
name
=
"indsch_kpi_score_info"
)
public
class
IndAcsScoreInfo
{
private
Integer
appraisalsDate
;
//考核月份
private
String
orgId
;
//机构编号
private
String
orgName
;
//机构名称
private
String
indexId
;
//考核指标编号
private
String
indexAttrId
;
//指标属性编号001 目标002 市场003 实际值004 参考值…
private
String
scoreMode
;
//计分方式
private
String
scoreFormula
;
//计分公式
private
Double
weight
;
// double comment "权重"
private
String
isValid
;
//是否有效Y N
private
String
updateUserId
;
//更新人id
private
String
updateUserName
;
//更新人姓名
private
Date
updateTime
;
//更新时间
}
src/main/java/com/keymobile/indicators/model/entity/IndAnaData.java
deleted
100644 → 0
View file @
51d94765
package
com
.
keymobile
.
indicators
.
model
.
entity
;
import
java.util.Date
;
import
javax.persistence.Table
;
import
lombok.Data
;
/**
* author:zhangkb time:2020-4-15 desc:分析指标数据表
*/
@Data
@Table
(
name
=
"ind_ana_ind_data_stat"
)
public
class
IndAnaData
{
private
Date
dwStatDt
;
//统计日期
private
Integer
statMonId
;
//统计月份
private
String
indId
;
//指标编号
private
String
indType
;
//指标类型
private
String
indName
;
//指标名称
private
String
orgId
;
//机构编号
private
Double
statVal
;
//统计值
}
src/main/java/com/keymobile/indicators/model/entity/IndAnaDef.java
deleted
100644 → 0
View file @
51d94765
package
com
.
keymobile
.
indicators
.
model
.
entity
;
import
java.util.Date
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
lombok.Data
;
/**
* author:zhangkb time:2020-4-15 desc:分析指标定义表
*/
@Data
@Table
(
name
=
"ind_ana_ind_def_inf"
)
public
class
IndAnaDef
{
@Id
private
String
indId
;
//指标编号
private
String
indName
;
//指标名称
private
String
indTypeCd
;
//指标类型代码
private
String
indType
;
//指标类型
private
String
cltCmt
;
//口径说明(汉字描述)
private
String
undType
;
//单位类型
private
String
unt
;
//单位
private
String
dataHbr
;
//数据粒度
private
String
isValid
;
//是否有效
private
String
defUserId
;
//定义人用户编号
private
Date
defTime
;
//定义时间
private
String
updUserId
;
//更新人用户编号
private
Date
updTime
;
//更新时间
private
Integer
defStaTime
;
//生效开始年月
private
Integer
defEndTime
;
//生效结束年月
private
String
srcTypCd
;
//来源类型
}
src/main/java/com/keymobile/indicators/model/entity/IndRelInf.java
deleted
100644 → 0
View file @
51d94765
package
com
.
keymobile
.
indicators
.
model
.
entity
;
import
javax.persistence.Table
;
import
lombok.Data
;
/**
* author:zhangkb time:2020-4-15 desc:指标层级关系表
*/
@Data
@Table
(
name
=
"ind_index_hbr_rel_inf"
)
public
class
IndRelInf
{
private
Integer
relId
;
//关系id
private
String
subIndId
;
//子指标编号
private
String
subIndName
;
//子指标名称
private
String
subIndType
;
//子指标类型
private
String
parIndId
;
//父指标编号
private
String
parIndName
;
//父指标名称
private
String
parIndType
;
//父指标类型
private
Integer
relHbr
;
//关系层级
}
src/main/java/com/keymobile/indicators/model/entity/IndRelTree.java
deleted
100644 → 0
View file @
51d94765
package
com
.
keymobile
.
indicators
.
model
.
entity
;
import
java.util.ArrayList
;
import
java.util.List
;
import
lombok.Data
;
@Data
public
class
IndRelTree
{
private
Double
weight
;
private
String
indId
;
private
String
indName
;
private
String
indAttrId
;
private
String
type
;
private
List
<
IndRelTree
>
children
=
new
ArrayList
<>();
}
src/main/java/com/keymobile/indicators/model/mapper/GeneralParmMapper.java
deleted
100644 → 0
View file @
51d94765
package
com
.
keymobile
.
indicators
.
model
.
mapper
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
com.keymobile.indicators.model.entity.GeneralParm
;
@Mapper
public
interface
GeneralParmMapper
{
public
List
<
GeneralParm
>
getAll
();
}
src/main/java/com/keymobile/indicators/model/mapper/IndAcsDataMapper.java
deleted
100644 → 0
View file @
51d94765
package
com
.
keymobile
.
indicators
.
model
.
mapper
;
import
org.apache.ibatis.annotations.Mapper
;
@Mapper
public
interface
IndAcsDataMapper
{
}
src/main/java/com/keymobile/indicators/model/mapper/IndAcsDefMapper.java
deleted
100644 → 0
View file @
51d94765
package
com
.
keymobile
.
indicators
.
model
.
mapper
;
import
java.util.List
;
import
java.util.Map
;
import
org.apache.ibatis.annotations.Mapper
;
import
com.keymobile.indicators.model.entity.IndAcsDef
;
import
tk.mybatis.mapper.common.BaseMapper
;
@Mapper
public
interface
IndAcsDefMapper
extends
BaseMapper
<
IndAcsDef
>
{
public
List
<
IndAcsDef
>
getAll
();
public
List
<
IndAcsDef
>
getPageByKeyword
(
Map
<
String
,
Object
>
param
);
public
int
getByKeywordCount
(
Map
<
String
,
Object
>
param
);
public
List
<
IndAcsDef
>
getByKeyword
(
Map
<
String
,
Object
>
param
);
}
src/main/java/com/keymobile/indicators/model/mapper/IndAcsScoreInfoMapper.java
deleted
100644 → 0
View file @
51d94765
package
com
.
keymobile
.
indicators
.
model
.
mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
com.keymobile.indicators.model.entity.IndAcsScoreInfo
;
import
tk.mybatis.mapper.common.BaseMapper
;
@Mapper
public
interface
IndAcsScoreInfoMapper
extends
BaseMapper
<
IndAcsScoreInfo
>{
}
src/main/java/com/keymobile/indicators/model/mapper/IndAnaDataMapper.java
deleted
100644 → 0
View file @
51d94765
package
com
.
keymobile
.
indicators
.
model
.
mapper
;
import
org.apache.ibatis.annotations.Mapper
;
@Mapper
public
interface
IndAnaDataMapper
{
}
src/main/java/com/keymobile/indicators/model/mapper/IndAnaDefMapper.java
deleted
100644 → 0
View file @
51d94765
package
com
.
keymobile
.
indicators
.
model
.
mapper
;
import
java.util.List
;
import
java.util.Map
;
import
org.apache.ibatis.annotations.Mapper
;
import
com.keymobile.indicators.model.entity.IndAnaDef
;
import
tk.mybatis.mapper.common.BaseMapper
;
@Mapper
public
interface
IndAnaDefMapper
extends
BaseMapper
<
IndAnaDef
>{
public
List
<
IndAnaDef
>
getPageByKeyword
(
Map
<
String
,
Object
>
param
);
public
int
getByKeywordCount
(
Map
<
String
,
Object
>
param
);
public
List
<
IndAnaDef
>
getByKeyword
(
Map
<
String
,
Object
>
param
);
}
src/main/java/com/keymobile/indicators/model/mapper/IndRelInfMapper.java
deleted
100644 → 0
View file @
51d94765
package
com
.
keymobile
.
indicators
.
model
.
mapper
;
import
org.apache.ibatis.annotations.Mapper
;
@Mapper
public
interface
IndRelInfMapper
{
}
src/main/java/com/keymobile/indicators/service/cmbkpi/GeneralParmService.java
deleted
100644 → 0
View file @
51d94765
package
com
.
keymobile
.
indicators
.
service
.
cmbkpi
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.keymobile.indicators.model.entity.GeneralParm
;
import
com.keymobile.indicators.model.mapper.GeneralParmMapper
;
@Service
public
class
GeneralParmService
{
@Autowired
private
GeneralParmMapper
genrealParmMapper
;
public
List
<
GeneralParm
>
getAll
(){
return
genrealParmMapper
.
getAll
();
}
}
src/main/java/com/keymobile/indicators/service/cmbkpi/IndAcsDataService.java
deleted
100644 → 0
View file @
51d94765
package
com
.
keymobile
.
indicators
.
service
.
cmbkpi
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.keymobile.indicators.model.mapper.IndAcsDataMapper
;
@Service
public
class
IndAcsDataService
{
@Autowired
private
IndAcsDataMapper
indAcsDataMapper
;
}
src/main/java/com/keymobile/indicators/service/cmbkpi/IndAcsDefService.java
deleted
100644 → 0
View file @
51d94765
package
com
.
keymobile
.
indicators
.
service
.
cmbkpi
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.keymobile.indicators.model.entity.IndAcsDef
;
import
com.keymobile.indicators.model.entity.IndAcsScoreInfo
;
import
com.keymobile.indicators.model.mapper.IndAcsDefMapper
;
@Service
public
class
IndAcsDefService
{
@Autowired
private
IndAcsDefMapper
indAcsDefMapper
;
@Autowired
private
IndAcsScoreInfoService
indAcsScoreService
;
public
List
<
IndAcsDef
>
getAll
(){
return
indAcsDefMapper
.
getAll
();
}
public
IndAcsDef
getById
(
String
id
)
{
IndAcsDef
def
=
new
IndAcsDef
();
def
.
setIndId
(
id
);
return
indAcsDefMapper
.
selectOne
(
def
);
}
public
String
saveOrUpdate
(
IndAcsDef
indAcsDef
)
throws
Exception
{
if
(
StringUtils
.
isBlank
(
indAcsDef
.
getIndId
()))
{
return
"indId is not be null"
;
}
//根据考核指标编号判断是否已存在
IndAcsDef
dbIndAcsDef
=
this
.
getById
(
indAcsDef
.
getIndId
());
if
(
dbIndAcsDef
==
null
)
{
indAcsDefMapper
.
insert
(
indAcsDef
);
}
else
{
indAcsDefMapper
.
updateByPrimaryKey
(
indAcsDef
);
}
return
indAcsDef
.
getIndId
();
}
public
Map
<
String
,
Object
>
getByPageAndKeyword
(
String
keyword
,
int
page
,
int
rows
)
throws
Exception
{
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
if
(
StringUtils
.
isBlank
(
keyword
))
{
paramMap
.
put
(
"keyword"
,
null
);
}
else
{
paramMap
.
put
(
"keyword"
,
"%"
+
keyword
+
"%"
);
}
//计算总数
int
count
=
indAcsDefMapper
.
getByKeywordCount
(
paramMap
);
//计算start
int
start
=
page
*
rows
;
paramMap
.
put
(
"start"
,
start
);
paramMap
.
put
(
"end"
,
rows
);
List
<
IndAcsDef
>
resultList
=
indAcsDefMapper
.
getPageByKeyword
(
paramMap
);
resultMap
.
put
(
"resultList"
,
resultList
);
resultMap
.
put
(
"total"
,
count
);
return
resultMap
;
}
public
void
delete
(
String
indId
)
throws
Exception
{
indAcsDefMapper
.
deleteByPrimaryKey
(
indId
);
//删除考核指标关联的公式
List
<
IndAcsScoreInfo
>
indAcsScoreInfos
=
indAcsScoreService
.
getListByIndId
(
indId
);
if
(!
indAcsScoreInfos
.
isEmpty
())
{
for
(
IndAcsScoreInfo
acsScore
:
indAcsScoreInfos
)
{
indAcsScoreService
.
delete
(
acsScore
.
getOrgId
(),
acsScore
.
getIndexId
(),
acsScore
.
getIndexAttrId
());
}
}
}
}
src/main/java/com/keymobile/indicators/service/cmbkpi/IndAcsScoreInfoService.java
deleted
100644 → 0
View file @
51d94765
package
com
.
keymobile
.
indicators
.
service
.
cmbkpi
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.google.common.collect.Maps
;
import
com.googlecode.aviator.AviatorEvaluator
;
import
com.keymobile.indicators.model.entity.IndAcsDef
;
import
com.keymobile.indicators.model.entity.IndAcsScoreInfo
;
import
com.keymobile.indicators.model.entity.IndAnaDef
;
import
com.keymobile.indicators.model.entity.IndRelTree
;
import
com.keymobile.indicators.model.mapper.IndAcsDefMapper
;
import
com.keymobile.indicators.model.mapper.IndAcsScoreInfoMapper
;
import
com.keymobile.indicators.model.mapper.IndAnaDefMapper
;
import
com.keymobile.indicators.service.hytobacco.BaseIndDataService
;
import
com.keymobile.indicators.utils.CalculateUtils
;
import
com.keymobile.indicators.utils.FormulaUtils
;
@Service
public
class
IndAcsScoreInfoService
{
@Autowired
private
IndAcsScoreInfoMapper
indAcsScoreInfoMapper
;
@Autowired
private
IndAnaDefMapper
indAnaDefMapper
;
@Autowired
private
IndAcsDefMapper
indAcsDefMapper
;
@Autowired
private
BaseIndDataService
baseIndDataService
;
public
String
save
(
IndAcsScoreInfo
indAcsScoreInfo
)
throws
Exception
{
// if(StringUtils.isBlank(indAcsScoreInfo.getOrgId())||
// StringUtils.isBlank(indAcsScoreInfo.getIndexId())||
// StringUtils.isBlank(indAcsScoreInfo.getIndexAttrId())) {
// return "orgId,indexId,indexAttrId can not be null";
// }else {
// //根据组织机构id,指标编号和指标类型判断是否有公式存在
// IndAcsScoreInfo dbIndAcsScoreInfo = this.selectOneByOrgIdAndIndidAndIndtype(
// indAcsScoreInfo.getOrgId(),indAcsScoreInfo.getIndexId(),indAcsScoreInfo.getIndexAttrId());
// if(dbIndAcsScoreInfo!=null) {
// return "the indicators have exist,can not save to the database";
// }else {
indAcsScoreInfoMapper
.
insert
(
indAcsScoreInfo
);
// }
// }
return
"save success"
;
}
public
void
delete
(
String
orgId
,
String
indId
,
String
indAttrId
)
throws
Exception
{
IndAcsScoreInfo
indAcsScoreInfo
=
this
.
selectOneByOrgIdAndIndidAndIndtype
(
orgId
,
indId
,
indAttrId
);
if
(
indAcsScoreInfo
!=
null
)
{
indAcsScoreInfoMapper
.
delete
(
indAcsScoreInfo
);
}
}
public
List
<
IndAcsScoreInfo
>
getListByIndId
(
String
indId
)
throws
Exception
{
IndAcsScoreInfo
indAcsScoreInfo
=
new
IndAcsScoreInfo
();
indAcsScoreInfo
.
setIndexId
(
indId
);
return
indAcsScoreInfoMapper
.
select
(
indAcsScoreInfo
);
}
public
IndAcsScoreInfo
selectOneByOrgIdAndIndidAndIndtype
(
String
orgId
,
String
indId
,
String
indAttrId
)
throws
Exception
{
IndAcsScoreInfo
indAcsScoreInfo
=
new
IndAcsScoreInfo
();
indAcsScoreInfo
.
setOrgId
(
orgId
);
indAcsScoreInfo
.
setIndexId
(
indId
);
indAcsScoreInfo
.
setIndexAttrId
(
indAttrId
);
return
indAcsScoreInfoMapper
.
selectOne
(
indAcsScoreInfo
);
}
//type:0 分析指标 ;1 考核指标
public
List
<
Map
<
String
,
Object
>>
getIndByKeywordAndType
(
String
keyword
,
String
type
)
throws
Exception
{
List
<
Map
<
String
,
Object
>>
resultList
=
new
ArrayList
<>();
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
if
(
StringUtils
.
isBlank
(
keyword
))
{
paramMap
.
put
(
"keyword"
,
null
);
}
else
{
paramMap
.
put
(
"keyword"
,
"%"
+
keyword
+
"%"
);
}
if
(
StringUtils
.
isNotBlank
(
type
))
{
if
(
"0"
.
equals
(
type
))
{
List
<
IndAnaDef
>
indAnaDefs
=
indAnaDefMapper
.
getByKeyword
(
paramMap
);
if
(!
indAnaDefs
.
isEmpty
())
{
for
(
IndAnaDef
indAnaDef
:
indAnaDefs
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"indId"
,
indAnaDef
.
getIndId
());
map
.
put
(
"indName"
,
indAnaDef
.
getIndName
());
map
.
put
(
"type"
,
"0"
);
resultList
.
add
(
map
);
}
}
}
else
{
List
<
IndAcsDef
>
indAcsDefs
=
indAcsDefMapper
.
getByKeyword
(
paramMap
);
if
(!
indAcsDefs
.
isEmpty
())
{
for
(
IndAcsDef
indAcsDef
:
indAcsDefs
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"indId"
,
indAcsDef
.
getIndId
());
map
.
put
(
"indName"
,
indAcsDef
.
getIndName
());
map
.
put
(
"type"
,
"1"
);
resultList
.
add
(
map
);
}
}
}
}
else
{
List
<
IndAnaDef
>
indAnaDefs
=
indAnaDefMapper
.
getByKeyword
(
paramMap
);
List
<
IndAcsDef
>
indAcsDefs
=
indAcsDefMapper
.
getByKeyword
(
paramMap
);
if
(!
indAnaDefs
.
isEmpty
())
{
for
(
IndAnaDef
indAnaDef
:
indAnaDefs
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"indId"
,
indAnaDef
.
getIndId
());
map
.
put
(
"indName"
,
indAnaDef
.
getIndName
());
map
.
put
(
"type"
,
"0"
);
resultList
.
add
(
map
);
}
}
if
(!
indAcsDefs
.
isEmpty
())
{
for
(
IndAcsDef
indAcsDef
:
indAcsDefs
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"indId"
,
indAcsDef
.
getIndId
());
map
.
put
(
"indName"
,
indAcsDef
.
getIndName
());
map
.
put
(
"type"
,
"1"
);
resultList
.
add
(
map
);
}
}
}
return
resultList
;
}
public
Map
<
String
,
String
>
getIndicatorByInId
(
String
indId
){
Map
<
String
,
String
>
result
=
new
HashMap
<>();
IndAcsDef
indAscDef
=
new
IndAcsDef
();
indAscDef
.
setIndId
(
indId
);
IndAnaDef
indAnaDef
=
new
IndAnaDef
();
indAnaDef
.
setIndId
(
indId
);
IndAcsDef
ascDef
=
indAcsDefMapper
.
selectOne
(
indAscDef
);
if
(
ascDef
!=
null
)
{
result
.
put
(
"indId"
,
ascDef
.
getIndId
());
result
.
put
(
"indName"
,
ascDef
.
getIndName
());
result
.
put
(
"type"
,
"1"
);
}
else
{
IndAnaDef
anaDef
=
indAnaDefMapper
.
selectOne
(
indAnaDef
);
if
(
anaDef
!=
null
)
{
result
.
put
(
"indId"
,
anaDef
.
getIndId
());
result
.
put
(
"indName"
,
anaDef
.
getIndName
());
result
.
put
(
"type"
,
"0"
);
}
}
return
result
;
}
public
IndRelTree
analysisIndTree
(
String
orgId
,
String
indId
,
String
indAttrId
)
throws
Exception
{
IndRelTree
indRelTree
=
new
IndRelTree
();
//获取指标信息
Map
<
String
,
String
>
indInfo
=
this
.
getIndicatorByInId
(
indId
);
if
(
indInfo
.
isEmpty
())
{
indRelTree
.
setIndId
(
indId
+
" has been deleted"
);
indRelTree
.
setIndName
(
indId
+
" 被删除"
);
indRelTree
.
setType
(
indInfo
.
get
(
"unknown"
));
}
else
{
indRelTree
.
setIndId
(
indInfo
.
get
(
"indId"
));
indRelTree
.
setIndName
(
indInfo
.
get
(
"indName"
));
indRelTree
.
setType
(
indInfo
.
get
(
"type"
));
}
indRelTree
.
setChildren
(
new
ArrayList
<
IndRelTree
>());
//根据机构id,指标id和指标类型获取考核指标
IndAcsScoreInfo
indAcsScoreInfo
=
this
.
selectOneByOrgIdAndIndidAndIndtype
(
orgId
,
indId
,
indAttrId
);
if
(
indAcsScoreInfo
!=
null
)
{
indRelTree
.
setIndAttrId
(
indAcsScoreInfo
.
getIndexAttrId
());
indRelTree
.
setWeight
(
indAcsScoreInfo
.
getWeight
());
//分析公式
String
formula
=
indAcsScoreInfo
.
getScoreFormula
();
if
(
StringUtils
.
isNotBlank
(
formula
))
{
List
<
Map
<
String
,
String
>>
formulaInfo
=
FormulaUtils
.
analysisFormula
(
formula
);
for
(
Map
<
String
,
String
>
map
:
formulaInfo
)
{
indRelTree
.
getChildren
().
add
(
analysisIndTree
(
orgId
,
map
.
get
(
"indId"
),
map
.
get
(
"indAttrId"
)));
}
}
}
return
indRelTree
;
}
public
String
calGroupAverage
(
String
driveIndFormula
,
List
<
String
>
compareObjs
,
int
date
)
throws
Exception
{
String
result
=
"0.0"
;
List
<
String
>
indIdList
=
new
ArrayList
<>();
if
(
StringUtils
.
isNotBlank
(
driveIndFormula
))
{
Pattern
p
=
Pattern
.
compile
(
"(\\[[^\\]]*\\])"
);
Matcher
m
=
p
.
matcher
(
driveIndFormula
);
while
(
m
.
find
()){
indIdList
.
add
(
m
.
group
().
substring
(
1
,
m
.
group
().
length
()-
1
));
}
//获取公式中的基础指标id
int
indIdSize
=
indIdList
.
size
();
if
(
indIdSize
!=
0
)
{
if
(
indIdSize
==
1
)
{
List
<
String
>
indDateList
=
baseIndDataService
.
getIndData
(
indIdList
.
get
(
0
),
date
,
compareObjs
);
result
=
CalculateUtils
.
averageValue
(
indDateList
,
0
);
}
else
{
Map
<
String
,
Object
>
env
=
Maps
.
newHashMap
();
for
(
String
indId
:
indIdList
)
{
List
<
String
>
indDateList
=
baseIndDataService
.
getIndData
(
indId
,
date
,
compareObjs
);
String
sumValue
=
CalculateUtils
.
sumValue
(
indDateList
);
env
.
put
(
indId
,
Double
.
valueOf
(
sumValue
));
driveIndFormula
=
driveIndFormula
.
replace
(
"["
+
indId
+
"]"
,
indId
);
}
result
=
AviatorEvaluator
.
execute
(
driveIndFormula
,
env
).
toString
();
//保留四位小数
if
(!
result
.
equals
(
"NaN"
))
{
result
=
String
.
format
(
"%.4f"
,
new
BigDecimal
(
Double
.
valueOf
(
result
)));
}
}
}
}
return
result
;
}
}
src/main/java/com/keymobile/indicators/service/cmbkpi/IndAnaDataService.java
deleted
100644 → 0
View file @
51d94765
package
com
.
keymobile
.
indicators
.
service
.
cmbkpi
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.keymobile.indicators.model.mapper.IndAnaDataMapper
;
@Service
public
class
IndAnaDataService
{
@Autowired
private
IndAnaDataMapper
indAnaDataMapper
;
}
src/main/java/com/keymobile/indicators/service/cmbkpi/IndAnaDefService.java
deleted
100644 → 0
View file @
51d94765
package
com
.
keymobile
.
indicators
.
service
.
cmbkpi
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.keymobile.indicators.model.entity.IndAnaDef
;
import
com.keymobile.indicators.model.mapper.IndAnaDefMapper
;
@Service
public
class
IndAnaDefService
{
@Autowired
private
IndAnaDefMapper
indAnaDefMapper
;
public
String
saveOrUpdate
(
IndAnaDef
indAnaDef
)
throws
Exception
{
if
(
StringUtils
.
isBlank
(
indAnaDef
.
getIndId
()))
{
return
"indId can not be null"
;
}
//根据指标编号判断分析指标是否已存在
IndAnaDef
dbIndAnaDef
=
this
.
getById
(
indAnaDef
.
getIndId
());
if
(
dbIndAnaDef
==
null
)
{
indAnaDefMapper
.
insert
(
indAnaDef
);
}
else
{
indAnaDefMapper
.
updateByPrimaryKey
(
indAnaDef
);
}
return
indAnaDef
.
getIndId
();
}
public
void
delete
(
String
indId
)
throws
Exception
{
indAnaDefMapper
.
deleteByPrimaryKey
(
indId
);
}
public
IndAnaDef
getById
(
String
id
)
throws
Exception
{
IndAnaDef
anaDef
=
new
IndAnaDef
();
anaDef
.
setIndId
(
id
);
return
indAnaDefMapper
.
selectOne
(
anaDef
);
}
public
Map
<
String
,
Object
>
getByPageAndKeyword
(
String
keyword
,
int
page
,
int
rows
)
throws
Exception
{
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
if
(
StringUtils
.
isBlank
(
keyword
))
{
paramMap
.
put
(
"keyword"
,
null
);
}
else
{
paramMap
.
put
(
"keyword"
,
"%"
+
keyword
+
"%"
);
}
//计算总数
int
count
=
indAnaDefMapper
.
getByKeywordCount
(
paramMap
);
//计算start
int
start
=
page
*
rows
;
paramMap
.
put
(
"start"
,
start
);
paramMap
.
put
(
"end"
,
rows
);
List
<
IndAnaDef
>
resultList
=
indAnaDefMapper
.
getPageByKeyword
(
paramMap
);
resultMap
.
put
(
"resultList"
,
resultList
);
resultMap
.
put
(
"total"
,
count
);
return
resultMap
;
}
}
src/main/java/com/keymobile/indicators/service/cmbkpi/IndRelInfService.java
deleted
100644 → 0
View file @
51d94765
package
com
.
keymobile
.
indicators
.
service
.
cmbkpi
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.keymobile.indicators.model.mapper.IndRelInfMapper
;
@Service
public
class
IndRelInfService
{
@Autowired
private
IndRelInfMapper
indRelInfMapper
;
}
src/main/java/com/keymobile/indicators/service/hytobacco/DriveIndDefService.java
View file @
83ca9adc
package
com
.
keymobile
.
indicators
.
service
.
hytobacco
;
package
com
.
keymobile
.
indicators
.
service
.
hytobacco
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.google.common.collect.Maps
;
import
com.googlecode.aviator.AviatorEvaluator
;
import
com.keymobile.indicators.model.entity.indicators.DriveIndDef
;
import
com.keymobile.indicators.model.entity.indicators.DriveIndDef
;
import
com.keymobile.indicators.model.mapper.indicators.DriveIndDefMapper
;
import
com.keymobile.indicators.model.mapper.indicators.DriveIndDefMapper
;
import
com.keymobile.indicators.utils.CalculateUtils
;
@Service
@Service
public
class
DriveIndDefService
{
public
class
DriveIndDefService
{
...
@@ -18,6 +25,8 @@ public class DriveIndDefService {
...
@@ -18,6 +25,8 @@ public class DriveIndDefService {
private
DriveIndDefMapper
driveIndDefMapper
;
private
DriveIndDefMapper
driveIndDefMapper
;
@Autowired
@Autowired
private
DriveIndDefVersionService
driveIndDefVersionService
;
private
DriveIndDefVersionService
driveIndDefVersionService
;
@Autowired
private
BaseIndDataService
baseIndDataService
;
public
String
saveOrUpdate
(
DriveIndDef
driveIndDef
,
String
catalogId
,
String
catalogIdPath
,
String
user
)
public
String
saveOrUpdate
(
DriveIndDef
driveIndDef
,
String
catalogId
,
String
catalogIdPath
,
String
user
)
throws
Exception
{
throws
Exception
{
...
@@ -87,4 +96,39 @@ public class DriveIndDefService {
...
@@ -87,4 +96,39 @@ public class DriveIndDefService {
return
resultMap
;
return
resultMap
;
}
}
public
String
calGroupAverage
(
String
driveIndFormula
,
List
<
String
>
compareObjs
,
int
date
)
throws
Exception
{
String
result
=
"0.0"
;
List
<
String
>
indIdList
=
new
ArrayList
<>();
if
(
StringUtils
.
isNotBlank
(
driveIndFormula
))
{
Pattern
p
=
Pattern
.
compile
(
"(\\[[^\\]]*\\])"
);
Matcher
m
=
p
.
matcher
(
driveIndFormula
);
while
(
m
.
find
()){
indIdList
.
add
(
m
.
group
().
substring
(
1
,
m
.
group
().
length
()-
1
));
}
//获取公式中的基础指标id
int
indIdSize
=
indIdList
.
size
();
if
(
indIdSize
!=
0
)
{
if
(
indIdSize
==
1
)
{
List
<
String
>
indDateList
=
baseIndDataService
.
getIndData
(
indIdList
.
get
(
0
),
date
,
compareObjs
);
result
=
CalculateUtils
.
averageValue
(
indDateList
,
0
);
}
else
{
Map
<
String
,
Object
>
env
=
Maps
.
newHashMap
();
for
(
String
indId
:
indIdList
)
{
List
<
String
>
indDateList
=
baseIndDataService
.
getIndData
(
indId
,
date
,
compareObjs
);
String
sumValue
=
CalculateUtils
.
sumValue
(
indDateList
);
env
.
put
(
indId
,
Double
.
valueOf
(
sumValue
));
driveIndFormula
=
driveIndFormula
.
replace
(
"["
+
indId
+
"]"
,
indId
);
}
result
=
AviatorEvaluator
.
execute
(
driveIndFormula
,
env
).
toString
();
//保留四位小数
if
(!
result
.
equals
(
"NaN"
))
{
result
=
String
.
format
(
"%.4f"
,
new
BigDecimal
(
Double
.
valueOf
(
result
)));
}
}
}
}
return
result
;
}
}
}
src/main/java/com/keymobile/indicators/service/hytobacco/IndScorecardService.java
View file @
83ca9adc
...
@@ -17,13 +17,12 @@ import org.springframework.stereotype.Service;
...
@@ -17,13 +17,12 @@ import org.springframework.stereotype.Service;
import
com.google.common.collect.Maps
;
import
com.google.common.collect.Maps
;
import
com.googlecode.aviator.AviatorEvaluator
;
import
com.googlecode.aviator.AviatorEvaluator
;
import
com.keymobile.indicators.model.entity.DriveIndCalResult
;
import
com.keymobile.indicators.model.entity.DriveIndCalResult
;
import
com.keymobile.indicators.model.entity.
IndAcs
Def
;
import
com.keymobile.indicators.model.entity.
indicators.DriveInd
Def
;
import
com.keymobile.indicators.model.entity.scorecard.ImproveScoreDef
;
import
com.keymobile.indicators.model.entity.scorecard.ImproveScoreDef
;
import
com.keymobile.indicators.model.entity.scorecard.IndScorecard
;
import
com.keymobile.indicators.model.entity.scorecard.IndScorecard
;
import
com.keymobile.indicators.model.entity.scorecard.RankScoreDef
;
import
com.keymobile.indicators.model.entity.scorecard.RankScoreDef
;
import
com.keymobile.indicators.persistence.hyindicators.DriveIndCalResultRepository
;
import
com.keymobile.indicators.persistence.hyindicators.DriveIndCalResultRepository
;
import
com.keymobile.indicators.persistence.hyindicators.IndScorecardRepository
;
import
com.keymobile.indicators.persistence.hyindicators.IndScorecardRepository
;
import
com.keymobile.indicators.service.cmbkpi.IndAcsDefService
;
import
com.keymobile.indicators.utils.CalculateUtils
;
import
com.keymobile.indicators.utils.CalculateUtils
;
@Service
@Service
...
@@ -35,7 +34,7 @@ public class IndScorecardService {
...
@@ -35,7 +34,7 @@ public class IndScorecardService {
@Autowired
@Autowired
private
DriveIndCalResultRepository
driveIndResultRepo
;
private
DriveIndCalResultRepository
driveIndResultRepo
;
@Autowired
@Autowired
private
IndAcsDefService
indAcs
DefService
;
private
DriveIndDefService
driveInd
DefService
;
//id不为空为修改,为空为新增
//id不为空为修改,为空为新增
public
String
saveOrUpdate
(
IndScorecard
indScorecard
)
{
public
String
saveOrUpdate
(
IndScorecard
indScorecard
)
{
...
@@ -62,7 +61,7 @@ public class IndScorecardService {
...
@@ -62,7 +61,7 @@ public class IndScorecardService {
}
}
public
Map
<
String
,
String
>
calculateIndiScore
(
String
indId
,
int
date
,
String
compareObj
,
public
Map
<
String
,
String
>
calculateIndiScore
(
String
indId
,
int
date
,
String
compareObj
,
String
indScorecardId
,
String
compareId
,
List
<
String
>
compareObjs
)
{
String
indScorecardId
,
String
compareId
,
List
<
String
>
compareObjs
)
throws
Exception
{
Map
<
String
,
String
>
result
=
new
HashMap
<>();
Map
<
String
,
String
>
result
=
new
HashMap
<>();
String
indScoreValue
=
"0.0"
;
String
indScoreValue
=
"0.0"
;
String
indImproveScoreValue
=
"0.0"
;
String
indImproveScoreValue
=
"0.0"
;
...
@@ -74,10 +73,10 @@ public class IndScorecardService {
...
@@ -74,10 +73,10 @@ public class IndScorecardService {
IndScorecard
scoreCard
=
this
.
findById
(
indScorecardId
);
IndScorecard
scoreCard
=
this
.
findById
(
indScorecardId
);
double
baseScoreValue
=
0
;
double
baseScoreValue
=
0
;
if
(
scoreCard
!=
null
)
{
if
(
scoreCard
!=
null
)
{
IndAcsDef
acsDef
=
indAcs
DefService
.
getById
(
indId
);
DriveIndDef
driveIndDef
=
driveInd
DefService
.
getById
(
indId
);
//获取指标是正向还是反向类型
//获取指标是正向还是反向类型
String
acsType
=
acs
Def
.
getIndType
();
String
acsType
=
driveInd
Def
.
getIndType
();
String
unit
=
acsDef
.
getUn
t
();
String
unit
=
driveIndDef
.
getIndUni
t
();
List
<
DriveIndCalResult
>
currentDriveResult
=
driveIndResultRepo
List
<
DriveIndCalResult
>
currentDriveResult
=
driveIndResultRepo
.
findByIndIdAndDateAndCompareId
(
indId
,
date
,
compareId
,
.
findByIndIdAndDateAndCompareId
(
indId
,
date
,
compareId
,
...
...
src/main/java/com/keymobile/indicators/service/hytobacco/IndicatorsValueService.java
View file @
83ca9adc
...
@@ -35,9 +35,8 @@ import org.springframework.stereotype.Service;
...
@@ -35,9 +35,8 @@ import org.springframework.stereotype.Service;
import
com.keymobile.indicators.conf.MongoDBConfig
;
import
com.keymobile.indicators.conf.MongoDBConfig
;
import
com.keymobile.indicators.model.entity.DimValue
;
import
com.keymobile.indicators.model.entity.DimValue
;
import
com.keymobile.indicators.model.entity.DriveIndCalResult
;
import
com.keymobile.indicators.model.entity.DriveIndCalResult
;
import
com.keymobile.indicators.model.entity.
IndAcs
Def
;
import
com.keymobile.indicators.model.entity.
indicators.DriveInd
Def
;
import
com.keymobile.indicators.persistence.hyindicators.DriveIndCalResultRepository
;
import
com.keymobile.indicators.persistence.hyindicators.DriveIndCalResultRepository
;
import
com.keymobile.indicators.service.cmbkpi.IndAcsDefService
;
import
com.keymobile.indicators.utils.CalculateUtils
;
import
com.keymobile.indicators.utils.CalculateUtils
;
import
com.mongodb.BasicDBObject
;
import
com.mongodb.BasicDBObject
;
import
com.mongodb.DB
;
import
com.mongodb.DB
;
...
@@ -54,7 +53,7 @@ public class IndicatorsValueService {
...
@@ -54,7 +53,7 @@ public class IndicatorsValueService {
@Autowired
@Autowired
private
DriveIndCalResultRepository
driveIndResultRepo
;
private
DriveIndCalResultRepository
driveIndResultRepo
;
@Autowired
@Autowired
private
IndAcsDefService
indAcs
DefService
;
private
DriveIndDefService
driveInd
DefService
;
@Value
(
"${mongodb.database}"
)
@Value
(
"${mongodb.database}"
)
private
String
database
;
private
String
database
;
...
@@ -187,7 +186,7 @@ public class IndicatorsValueService {
...
@@ -187,7 +186,7 @@ public class IndicatorsValueService {
String
[]
compareObjs
=
compareObjString
.
split
(
";"
);
String
[]
compareObjs
=
compareObjString
.
split
(
";"
);
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
for
(
String
indId
:
indIds
)
{
for
(
String
indId
:
indIds
)
{
IndAcsDef
indAcsDef
=
indAcs
DefService
.
getById
(
indId
);
DriveIndDef
deiveIndDef
=
driveInd
DefService
.
getById
(
indId
);
//计算同期排名
//计算同期排名
Map
<
String
,
String
>
valueMap
=
new
HashMap
<>();
Map
<
String
,
String
>
valueMap
=
new
HashMap
<>();
//计算增幅排名
//计算增幅排名
...
@@ -211,7 +210,7 @@ public class IndicatorsValueService {
...
@@ -211,7 +210,7 @@ public class IndicatorsValueService {
dataMap
.
put
(
"currentValue"
,
driveIndCalResult
.
get
().
getValue
());
dataMap
.
put
(
"currentValue"
,
driveIndCalResult
.
get
().
getValue
());
dataMap
.
put
(
"currentRank"
,
String
.
valueOf
(
driveIndCalResult
.
get
().
getRank
()));
dataMap
.
put
(
"currentRank"
,
String
.
valueOf
(
driveIndCalResult
.
get
().
getRank
()));
dataMap
.
put
(
"sameValue"
,
sameDriveIndCalResult
.
get
().
getValue
());
dataMap
.
put
(
"sameValue"
,
sameDriveIndCalResult
.
get
().
getValue
());
String
calGowth
=
CalculateUtils
.
calGowth
(
indAcsDef
.
getUn
t
(),
String
calGowth
=
CalculateUtils
.
calGowth
(
deiveIndDef
.
getIndUni
t
(),
driveIndCalResult
.
get
().
getValue
(),
sameDriveIndCalResult
.
get
().
getValue
(),
"1"
);
driveIndCalResult
.
get
().
getValue
(),
sameDriveIndCalResult
.
get
().
getValue
(),
"1"
);
dataMap
.
put
(
"calGowth"
,
calGowth
);
dataMap
.
put
(
"calGowth"
,
calGowth
);
...
@@ -219,9 +218,9 @@ public class IndicatorsValueService {
...
@@ -219,9 +218,9 @@ public class IndicatorsValueService {
allComObjDataMap
.
put
(
compareObj
,
dataMap
);
allComObjDataMap
.
put
(
compareObj
,
dataMap
);
}
}
//排列同期指标值
//排列同期指标值
Map
<
String
,
Integer
>
sameValueRank
=
CalculateUtils
.
rankValue
(
valueMap
,
indAcs
Def
.
getIndType
());
Map
<
String
,
Integer
>
sameValueRank
=
CalculateUtils
.
rankValue
(
valueMap
,
deiveInd
Def
.
getIndType
());
//排名增幅排名
//排名增幅排名
Map
<
String
,
Integer
>
gowthValueRank
=
CalculateUtils
.
rankValue
(
gowthMap
,
indAcs
Def
.
getIndType
());
Map
<
String
,
Integer
>
gowthValueRank
=
CalculateUtils
.
rankValue
(
gowthMap
,
deiveInd
Def
.
getIndType
());
for
(
Entry
<
String
,
Object
>
entry:
allComObjDataMap
.
entrySet
())
{
for
(
Entry
<
String
,
Object
>
entry:
allComObjDataMap
.
entrySet
())
{
Map
<
String
,
String
>
dataMap
=
(
Map
<
String
,
String
>)
entry
.
getValue
();
Map
<
String
,
String
>
dataMap
=
(
Map
<
String
,
String
>)
entry
.
getValue
();
Integer
sameRank
=
sameValueRank
.
get
(
entry
.
getKey
());
Integer
sameRank
=
sameValueRank
.
get
(
entry
.
getKey
());
...
@@ -428,15 +427,15 @@ public class IndicatorsValueService {
...
@@ -428,15 +427,15 @@ public class IndicatorsValueService {
}
}
}
}
//根据指标id获取指标信息
//根据指标id获取指标信息
IndAcsDef
acs
=
indAcs
DefService
.
getById
(
indId
);
DriveIndDef
driveIndDef
=
driveInd
DefService
.
getById
(
indId
);
rate
=
CalculateUtils
.
calGowth
(
acs
.
getUn
t
(),
currentValue
,
sameValue
,
"0"
);
rate
=
CalculateUtils
.
calGowth
(
driveIndDef
.
getIndUni
t
(),
currentValue
,
sameValue
,
"0"
);
XSSFRow
row
=
excelSheet
.
getRow
(
rowMap
.
get
(
indId
));
XSSFRow
row
=
excelSheet
.
getRow
(
rowMap
.
get
(
indId
));
row
.
getCell
(
3
).
setCellValue
(
currentValue
);
row
.
getCell
(
3
).
setCellValue
(
currentValue
);
row
.
getCell
(
4
).
setCellValue
(
sameValue
);
row
.
getCell
(
4
).
setCellValue
(
sameValue
);
row
.
getCell
(
5
).
setCellValue
(
rate
);
row
.
getCell
(
5
).
setCellValue
(
rate
);
String
acsType
=
acs
.
getIndType
();
String
acsType
=
driveIndDef
.
getIndType
();
if
(
"0"
.
equals
(
acsType
))
{
if
(
"0"
.
equals
(
acsType
))
{
if
(
Double
.
valueOf
(
rate
)>
0
)
{
if
(
Double
.
valueOf
(
rate
)>
0
)
{
row
.
getCell
(
6
).
setCellValue
(
"同比趋好"
);
row
.
getCell
(
6
).
setCellValue
(
"同比趋好"
);
...
...
src/main/resources/mybatis/mapping/GeneralParmMapper.xml
deleted
100644 → 0
View file @
51d94765
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.keymobile.indicators.model.mapper.GeneralParmMapper"
>
<select
id=
"getAll"
resultType=
"com.keymobile.indicators.model.entity.GeneralParm"
>
select * from gen_general_parm
</select>
</mapper>
\ No newline at end of file
src/main/resources/mybatis/mapping/IndAcsDataMapper.xml
deleted
100644 → 0
View file @
51d94765
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.keymobile.indicators.model.mapper.IndAcsDataMapper"
>
</mapper>
\ No newline at end of file
src/main/resources/mybatis/mapping/IndAcsDefMapper.xml
deleted
100644 → 0
View file @
51d94765
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.keymobile.indicators.model.mapper.IndAcsDefMapper"
>
<select
id=
"getAll"
resultType=
"com.keymobile.indicators.model.entity.IndAcsDef"
>
select * from ind_acs_ind_def_inf
</select>
<select
id=
"getPageByKeyword"
parameterType=
"map"
resultType=
"com.keymobile.indicators.model.entity.IndAcsDef"
>
select * from ind_acs_ind_def_inf
<if
test=
"keyword!=null"
>
where ind_name like #{keyword} or ind_id like #{keyword}
</if>
limit #{start},#{end}
</select>
<select
id=
"getByKeywordCount"
parameterType=
"map"
resultType=
"java.lang.Integer"
>
select count(1) from ind_acs_ind_def_inf
<if
test=
"keyword!=null"
>
where ind_name like #{keyword} or ind_id like #{keyword}
</if>
</select>
<select
id=
"getByKeyword"
parameterType=
"map"
resultType=
"com.keymobile.indicators.model.entity.IndAcsDef"
>
select * from ind_acs_ind_def_inf
<if
test=
"keyword!=null"
>
where ind_name like #{keyword} or ind_id like #{keyword}
</if>
</select>
</mapper>
\ No newline at end of file
src/main/resources/mybatis/mapping/IndAcsScoreInfoMapper.xml
deleted
100644 → 0
View file @
51d94765
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.keymobile.indicators.model.mapper.IndAcsScoreInfoMapper"
>
</mapper>
\ No newline at end of file
src/main/resources/mybatis/mapping/IndAnaDataMapper.xml
deleted
100644 → 0
View file @
51d94765
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.keymobile.indicators.model.mapper.IndAnaDataMapper"
>
</mapper>
\ No newline at end of file
src/main/resources/mybatis/mapping/IndAnaDefMapper.xml
deleted
100644 → 0
View file @
51d94765
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.keymobile.indicators.model.mapper.IndAnaDefMapper"
>
<select
id=
"getPageByKeyword"
parameterType=
"map"
resultType=
"com.keymobile.indicators.model.entity.IndAnaDef"
>
select * from ind_ana_ind_def_inf
<if
test=
"keyword!=null"
>
where ind_name like #{keyword} or ind_id like #{keyword}
</if>
limit #{start},#{end}
</select>
<select
id=
"getByKeywordCount"
parameterType=
"map"
resultType=
"java.lang.Integer"
>
select count(1) from ind_ana_ind_def_inf
<if
test=
"keyword!=null"
>
where ind_name like #{keyword} or ind_id like #{keyword}
</if>
</select>
<select
id=
"getByKeyword"
parameterType=
"map"
resultType=
"com.keymobile.indicators.model.entity.IndAnaDef"
>
select * from ind_ana_ind_def_inf
<if
test=
"keyword!=null"
>
where ind_name like #{keyword} or ind_id like #{keyword}
</if>
</select>
</mapper>
\ No newline at end of file
src/main/resources/mybatis/mapping/IndRelInfMapper.xml
deleted
100644 → 0
View file @
51d94765
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.keymobile.indicators.model.mapper.IndRelInfMapper"
>
</mapper>
\ No newline at end of file
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