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
7bcd537d
Commit
7bcd537d
authored
Apr 16, 2020
by
zhangkb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交考核指标curd接口和考核指标计分信息curd接口
parent
589d6ffc
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
321 additions
and
16 deletions
+321
-16
IndAcsDefCtrl.java
...va/com/keymobile/indicators/api/cmbkpi/IndAcsDefCtrl.java
+36
-10
IndAcsScoreInfoCtrl.java
.../keymobile/indicators/api/cmbkpi/IndAcsScoreInfoCtrl.java
+69
-0
IndAcsData.java
...ava/com/keymobile/indicators/model/entity/IndAcsData.java
+1
-1
IndAcsDef.java
...java/com/keymobile/indicators/model/entity/IndAcsDef.java
+1
-1
IndAcsScoreInfo.java
...om/keymobile/indicators/model/entity/IndAcsScoreInfo.java
+1
-1
IndAnaData.java
...ava/com/keymobile/indicators/model/entity/IndAnaData.java
+1
-1
IndAcsDefMapper.java
...om/keymobile/indicators/model/mapper/IndAcsDefMapper.java
+8
-1
IndAcsScoreInfoMapper.java
...mobile/indicators/model/mapper/IndAcsScoreInfoMapper.java
+5
-1
IndAnaDefMapper.java
...om/keymobile/indicators/model/mapper/IndAnaDefMapper.java
+2
-0
IndAcsDefService.java
...keymobile/indicators/service/cmbkpi/IndAcsDefService.java
+53
-0
IndAcsScoreInfoService.java
...ile/indicators/service/cmbkpi/IndAcsScoreInfoService.java
+113
-0
IndAcsDefMapper.xml
src/main/resources/mybatis/mapping/IndAcsDefMapper.xml
+23
-0
IndAnaDefMapper.xml
src/main/resources/mybatis/mapping/IndAnaDefMapper.xml
+8
-0
No files found.
src/main/java/com/keymobile/indicators/api/cmbkpi/IndAcsDefCtrl.java
View file @
7bcd537d
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.GeneralParm
;
import
com.keymobile.indicators.model.entity.IndAcsDef
;
import
com.keymobile.indicators.service.cmbkpi.GeneralParmService
;
import
com.keymobile.indicators.service.cmbkpi.IndAcsDefService
;
import
com.keymobile.indicators.utils.DateUtils
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -22,24 +25,47 @@ import io.swagger.annotations.ApiOperation;
public
class
IndAcsDefCtrl
{
@Autowired
private
IndAcsDefService
indAcsDefService
;
@Autowired
private
GeneralParmService
generalParmService
;
@ApiOperation
(
value
=
"获取所有考核指标定义"
,
notes
=
"获取所有考核指标定义"
)
@PostMapping
(
value
=
"/getAll"
)
public
List
<
IndAcsDef
>
getAll
()
throws
Exception
{
return
indAcsDefService
.
getAll
();
}
@ApiOperation
(
value
=
"获取所有参数"
,
notes
=
"获取所有参数"
)
@PostMapping
(
value
=
"/getAllParm"
)
public
List
<
GeneralParm
>
getAllParm
()
throws
Exception
{
return
generalParmService
.
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
0 → 100644
View file @
7bcd537d
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.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
);
}
}
src/main/java/com/keymobile/indicators/model/entity/IndAcsData.java
View file @
7bcd537d
...
...
@@ -16,5 +16,5 @@ public class IndAcsData {
private
String
indId
;
//指标编号
private
String
indName
;
//指标名称
private
String
indType
;
//指标类型
private
d
ouble
statVal
;
//统计值
private
D
ouble
statVal
;
//统计值
}
src/main/java/com/keymobile/indicators/model/entity/IndAcsDef.java
View file @
7bcd537d
...
...
@@ -27,7 +27,7 @@ public class IndAcsDef {
private
String
markType
;
//计分类型
private
String
freqCd
;
//频率代码
private
String
freqName
;
//频率名称
private
d
ouble
weight
;
//权重
private
D
ouble
weight
;
//权重
private
String
cltCmt
;
//口径说明(汉字描述)
private
String
markRule
;
//计分规则(汉字描述)
private
String
dataSrc
;
//数据来源
...
...
src/main/java/com/keymobile/indicators/model/entity/IndAcsScoreInfo.java
View file @
7bcd537d
...
...
@@ -19,7 +19,7 @@ public class IndAcsScoreInfo {
private
String
indexAttrId
;
//指标属性编号001 目标002 市场003 实际值004 参考值…
private
String
scoreMode
;
//计分方式
private
String
scoreFormula
;
//计分公式
private
d
ouble
weight
;
// double comment "权重"
private
D
ouble
weight
;
// double comment "权重"
private
String
isValid
;
//是否有效Y N
private
String
updateUserId
;
//更新人id
private
String
updateUserName
;
//更新人姓名
...
...
src/main/java/com/keymobile/indicators/model/entity/IndAnaData.java
View file @
7bcd537d
...
...
@@ -18,5 +18,5 @@ public class IndAnaData {
private
String
indType
;
//指标类型
private
String
indName
;
//指标名称
private
String
orgId
;
//机构编号
private
d
ouble
statVal
;
//统计值
private
D
ouble
statVal
;
//统计值
}
src/main/java/com/keymobile/indicators/model/mapper/IndAcsDefMapper.java
View file @
7bcd537d
package
com
.
keymobile
.
indicators
.
model
.
mapper
;
import
java.util.List
;
import
java.util.Map
;
import
org.apache.ibatis.annotations.Mapper
;
...
...
@@ -9,5 +10,11 @@ import tk.mybatis.mapper.common.BaseMapper;
@Mapper
public
interface
IndAcsDefMapper
extends
BaseMapper
<
IndAcsDef
>
{
List
<
IndAcsDef
>
getAll
();
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
View file @
7bcd537d
...
...
@@ -2,7 +2,11 @@ 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
{
public
interface
IndAcsScoreInfoMapper
extends
BaseMapper
<
IndAcsScoreInfo
>
{
}
src/main/java/com/keymobile/indicators/model/mapper/IndAnaDefMapper.java
View file @
7bcd537d
...
...
@@ -14,4 +14,6 @@ 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/service/cmbkpi/IndAcsDefService.java
View file @
7bcd537d
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
();
...
...
@@ -22,4 +28,51 @@ public class IndAcsDefService {
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
View file @
7bcd537d
package
com
.
keymobile
.
indicators
.
service
.
cmbkpi
;
import
java.util.ArrayList
;
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.entity.IndAnaDef
;
import
com.keymobile.indicators.model.mapper.IndAcsDefMapper
;
import
com.keymobile.indicators.model.mapper.IndAcsScoreInfoMapper
;
import
com.keymobile.indicators.model.mapper.IndAnaDefMapper
;
@Service
public
class
IndAcsScoreInfoService
{
@Autowired
private
IndAcsScoreInfoMapper
indAcsScoreInfoMapper
;
@Autowired
private
IndAnaDefMapper
indAnaDefMapper
;
@Autowired
private
IndAcsDefMapper
indAcsDefMapper
;
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
;
}
}
src/main/resources/mybatis/mapping/IndAcsDefMapper.xml
View file @
7bcd537d
...
...
@@ -4,4 +4,26 @@
<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/IndAnaDefMapper.xml
View file @
7bcd537d
...
...
@@ -15,4 +15,11 @@
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
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