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
ceedd548
Commit
ceedd548
authored
Sep 22, 2020
by
zhangkb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据项稽核接口代码提交
parent
7066b49c
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
443 additions
and
0 deletions
+443
-0
BaseDataCheckCtrl.java
...obile/indicators/api/basedatacheck/BaseDataCheckCtrl.java
+53
-0
IndiDataCheck.java
.../indicators/model/entity/basedatacheck/IndiDataCheck.java
+64
-0
IndiDataCheckLog.java
...dicators/model/entity/basedatacheck/IndiDataCheckLog.java
+27
-0
IndiDataCheckLogMapper.java
...rs/model/mapper/basedatacheck/IndiDataCheckLogMapper.java
+18
-0
IndiDataCheckMapper.java
...ators/model/mapper/basedatacheck/IndiDataCheckMapper.java
+22
-0
IndicatorsDataMapper.java
...dicators/model/mapper/indmapper/IndicatorsDataMapper.java
+7
-0
BaseDataCheckService.java
...ndicators/service/basedatacheck/BaseDataCheckService.java
+140
-0
IndiDataCheckLogMapper.xml
...main/resources/mybatis/mapping/IndiDataCheckLogMapper.xml
+19
-0
IndiDataCheckMapper.xml
src/main/resources/mybatis/mapping/IndiDataCheckMapper.xml
+64
-0
IndicatorsDataMapper.xml
src/main/resources/mybatis/mapping/IndicatorsDataMapper.xml
+29
-0
No files found.
src/main/java/com/keymobile/indicators/api/basedatacheck/BaseDataCheckCtrl.java
0 → 100644
View file @
ceedd548
package
com
.
keymobile
.
indicators
.
api
.
basedatacheck
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
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.service.basedatacheck.BaseDataCheckService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
@Api
(
tags
={
"数据项稽核接口"
})
@RestController
@RequestMapping
(
value
=
"/baseDataCheck"
)
public
class
BaseDataCheckCtrl
{
@Autowired
private
BaseDataCheckService
baseDataCheckService
;
@ApiOperation
(
value
=
"根据机构编码获取基础表日期list"
,
notes
=
"根据机构编码获取基础表日期list"
)
@PostMapping
(
value
=
"/getIndiDateDefDates"
)
public
List
<
Integer
>
getIndiDateDefDates
(
@RequestParam
String
code
)
throws
Exception
{
return
baseDataCheckService
.
getIndiDateDefDates
(
code
);
}
@ApiOperation
(
value
=
"启动数据项稽核"
,
notes
=
"启动数据项稽核"
)
@PostMapping
(
value
=
"/startBaseDataCheck"
)
public
String
startBaseDataCheck
(
@RequestParam
String
user
,
@RequestParam
String
code
,
@RequestParam
(
required
=
false
)
List
<
Integer
>
dates
)
{
baseDataCheckService
.
startBaseIndDataCheck
(
user
,
code
,
dates
);
return
"开始稽核数据项......"
;
}
@ApiOperation
(
value
=
"根据机构编码和年份分页加载稽核数据"
,
notes
=
"根据机构编码和年份分页加载稽核数据"
)
@PostMapping
(
value
=
"/getPageByCodeAndDatesIn"
)
public
Map
<
String
,
Object
>
getPageByCodeAndDatesIn
(
@RequestParam
String
code
,
@RequestParam
List
<
Integer
>
dates
,
@RequestParam
(
defaultValue
=
"0"
)
int
page
,
@RequestParam
(
defaultValue
=
"10"
)
int
rows
)
throws
Exception
{
return
baseDataCheckService
.
getPageByCodeAndDatesIn
(
code
,
dates
,
page
,
rows
);
}
@ApiOperation
(
value
=
"根据机构编码分页获取稽核日志"
,
notes
=
"根据机构编码分页获取稽核日志"
)
@PostMapping
(
value
=
"/getLogPageByCode"
)
public
Map
<
String
,
Object
>
getLogPageByCode
(
@RequestParam
String
code
,
@RequestParam
(
defaultValue
=
"0"
)
int
page
,
@RequestParam
(
defaultValue
=
"10"
)
int
rows
)
throws
Exception
{
return
baseDataCheckService
.
getLogPageByCode
(
code
,
page
,
rows
);
}
}
src/main/java/com/keymobile/indicators/model/entity/basedatacheck/IndiDataCheck.java
0 → 100644
View file @
ceedd548
package
com
.
keymobile
.
indicators
.
model
.
entity
.
basedatacheck
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GenerationType
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
lombok.Data
;
/**
*author:zhangkb time:2020-9-22 desc:数据项稽查实体
*/
@Data
@Table
(
name
=
"indi_data_check"
)
public
class
IndiDataCheck
{
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
Integer
id
;
private
String
indId
;
//数据项id
private
String
indDesc
;
//数据项描述
private
String
unit
;
//单位
private
String
compareObj
;
//对标对象编号
private
String
compareObjDesc
;
//对标对象描述
private
Integer
compareDate
;
//年份
private
String
value
;
//值
private
String
code
;
//机构编码
private
String
codeDesc
;
//机构编码描述
private
String
checkIndId
;
//稽核数据项id
private
String
checkIndDesc
;
//稽核数据项描述
private
String
checkUnit
;
//稽核单位
private
String
checkCompareObj
;
//稽核对标对象编号
private
String
checkCompareObjDesc
;
//稽核对标对象描述
private
Integer
checkCompareDate
;
//稽核年份
private
String
checkValue
;
//稽核值
private
String
checkCode
;
//稽核机构编码
private
String
checkCodeDesc
;
//稽核机构编码描述
private
String
startCheckDate
;
//开始稽查时间
public
IndiDataCheck
(
Integer
id
,
String
indId
,
String
indDesc
,
String
unit
,
String
compareObj
,
String
compareObjDesc
,
Integer
compareDate
,
String
value
,
String
code
,
String
codeDesc
,
String
checkIndId
,
String
checkIndDesc
,
String
checkUnit
,
String
checkCompareObj
,
String
checkCompareObjDesc
,
Integer
checkCompareDate
,
String
checkValue
,
String
checkCode
,
String
checkCodeDesc
,
String
startCheckDate
)
{
this
.
id
=
id
;
this
.
indId
=
indId
;
this
.
indDesc
=
indDesc
;
this
.
unit
=
unit
;
this
.
compareObj
=
compareObj
;
this
.
compareObjDesc
=
compareObjDesc
;
this
.
compareDate
=
compareDate
;
this
.
value
=
value
;
this
.
code
=
code
;
this
.
codeDesc
=
codeDesc
;
this
.
checkIndId
=
checkIndId
;
this
.
checkIndDesc
=
checkIndDesc
;
this
.
checkUnit
=
checkUnit
;
this
.
checkCompareObj
=
checkCompareObj
;
this
.
checkCompareObjDesc
=
checkCompareObjDesc
;
this
.
checkCompareDate
=
checkCompareDate
;
this
.
checkValue
=
checkValue
;
this
.
checkCode
=
checkCode
;
this
.
checkCodeDesc
=
checkCodeDesc
;
this
.
startCheckDate
=
startCheckDate
;
}
}
src/main/java/com/keymobile/indicators/model/entity/basedatacheck/IndiDataCheckLog.java
0 → 100644
View file @
ceedd548
package
com
.
keymobile
.
indicators
.
model
.
entity
.
basedatacheck
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GenerationType
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
lombok.Data
;
/**
*author:zhangkb time:2020-9-22 desc:数据项稽查日志
*/
@Data
@Table
(
name
=
"indi_data_check_log"
)
public
class
IndiDataCheckLog
{
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
Integer
id
;
private
String
checkUser
;
//稽查用户
private
String
code
;
//机构编码
private
String
codeDesc
;
//机构编码描述
private
String
startTime
;
//开始时间
private
String
endTime
;
//结束时间
private
String
status
;
//稽查状态 0:稽查进行中 1:稽查完成 2:稽查发生未知错误
private
String
logDetail
;
//日志详情
}
src/main/java/com/keymobile/indicators/model/mapper/basedatacheck/IndiDataCheckLogMapper.java
0 → 100644
View file @
ceedd548
package
com
.
keymobile
.
indicators
.
model
.
mapper
.
basedatacheck
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
com.keymobile.indicators.model.entity.basedatacheck.IndiDataCheckLog
;
import
tk.mybatis.mapper.common.BaseMapper
;
@Mapper
public
interface
IndiDataCheckLogMapper
extends
BaseMapper
<
IndiDataCheckLog
>{
public
List
<
IndiDataCheckLog
>
getLogPageByCode
(
@Param
(
"code"
)
String
code
,
@Param
(
"start"
)
int
start
,
@Param
(
"end"
)
int
end
);
public
int
countLogByCode
(
@Param
(
"code"
)
String
code
);
}
src/main/java/com/keymobile/indicators/model/mapper/basedatacheck/IndiDataCheckMapper.java
0 → 100644
View file @
ceedd548
package
com
.
keymobile
.
indicators
.
model
.
mapper
.
basedatacheck
;
import
java.util.List
;
import
java.util.Map
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
com.keymobile.indicators.model.entity.basedatacheck.IndiDataCheck
;
import
tk.mybatis.mapper.common.BaseMapper
;
@Mapper
public
interface
IndiDataCheckMapper
extends
BaseMapper
<
IndiDataCheck
>{
public
void
deleteByCodeAndDateIn
(
Map
<
String
,
Object
>
param
);
public
void
batchSave
(
@Param
(
"datas"
)
List
<
IndiDataCheck
>
datas
);
public
List
<
IndiDataCheck
>
getPageByCodeAndDateIn
(
Map
<
String
,
Object
>
param
);
public
int
getCountByCodeAndDateIn
(
Map
<
String
,
Object
>
param
);
}
src/main/java/com/keymobile/indicators/model/mapper/indmapper/IndicatorsDataMapper.java
View file @
ceedd548
...
@@ -15,6 +15,13 @@ public interface IndicatorsDataMapper extends BaseMapper<IndicatorsData>{
...
@@ -15,6 +15,13 @@ public interface IndicatorsDataMapper extends BaseMapper<IndicatorsData>{
public
List
<
IndicatorsData
>
getDataByDimension
(
Map
<
String
,
Object
>
param
);
public
List
<
IndicatorsData
>
getDataByDimension
(
Map
<
String
,
Object
>
param
);
public
List
<
IndicatorsData
>
getIndDataByParam
(
Map
<
String
,
Object
>
param
);
public
List
<
IndicatorsData
>
getIndDataByParam
(
Map
<
String
,
Object
>
param
);
public
List
<
IndicatorsData
>
getIndDataByCodeAndDateIn
(
Map
<
String
,
Object
>
param
);
public
List
<
IndicatorsData
>
getCheckIndData
(
@Param
(
"indId"
)
String
indId
,
@Param
(
"dim1"
)
String
dim1
,
@Param
(
"dim2"
)
Integer
dim2
,
@Param
(
"code"
)
String
code
);
public
List
<
Integer
>
getCheckDates
(
@Param
(
"code"
)
String
code
);
void
batchCreateIndData
(
@Param
(
"datas"
)
List
<
IndicatorsData
>
datas
);
void
batchCreateIndData
(
@Param
(
"datas"
)
List
<
IndicatorsData
>
datas
);
...
...
src/main/java/com/keymobile/indicators/service/basedatacheck/BaseDataCheckService.java
0 → 100644
View file @
ceedd548
package
com
.
keymobile
.
indicators
.
service
.
basedatacheck
;
import
java.io.ByteArrayOutputStream
;
import
java.io.PrintStream
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
org.apache.commons.lang.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Service
;
import
com.keymobile.indicators.model.entity.basedatacheck.IndiDataCheck
;
import
com.keymobile.indicators.model.entity.basedatacheck.IndiDataCheckLog
;
import
com.keymobile.indicators.model.entity.indicators.IndicatorsData
;
import
com.keymobile.indicators.model.mapper.basedatacheck.IndiDataCheckLogMapper
;
import
com.keymobile.indicators.model.mapper.basedatacheck.IndiDataCheckMapper
;
import
com.keymobile.indicators.model.mapper.indmapper.IndicatorsDataMapper
;
import
com.keymobile.indicators.utils.DateUtils
;
@Service
public
class
BaseDataCheckService
{
private
Logger
logger
=
LoggerFactory
.
getLogger
(
BaseDataCheckService
.
class
);
@Autowired
private
IndicatorsDataMapper
indicatorsDataMapper
;
@Autowired
private
IndiDataCheckLogMapper
indiDataCheckLogMapper
;
@Autowired
private
IndiDataCheckMapper
indiDataCheckMapper
;
//根据机构编码获取基础表中的年份list
public
List
<
Integer
>
getIndiDateDefDates
(
String
code
)
throws
Exception
{
return
indicatorsDataMapper
.
getCheckDates
(
code
);
}
//根据机构编码分页获取稽核日志
public
Map
<
String
,
Object
>
getLogPageByCode
(
String
code
,
int
page
,
int
rows
)
throws
Exception
{
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
//计算总数
int
count
=
indiDataCheckLogMapper
.
countLogByCode
(
code
);
//计算start
int
start
=
page
*
rows
;
List
<
IndiDataCheckLog
>
resultList
=
indiDataCheckLogMapper
.
getLogPageByCode
(
code
,
start
,
rows
);
resultMap
.
put
(
"resultList"
,
resultList
);
resultMap
.
put
(
"total"
,
count
);
return
resultMap
;
}
//根据机构编码和年份分页加载稽核数据
public
Map
<
String
,
Object
>
getPageByCodeAndDatesIn
(
String
code
,
List
<
Integer
>
dates
,
int
page
,
int
rows
)
throws
Exception
{
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
param
.
put
(
"code"
,
code
);
param
.
put
(
"dates"
,
dates
);
//计算总数
int
count
=
indiDataCheckMapper
.
getCountByCodeAndDateIn
(
param
);
//计算start
int
start
=
page
*
rows
;
param
.
put
(
"start"
,
start
);
param
.
put
(
"end"
,
rows
);
List
<
IndiDataCheck
>
resultList
=
indiDataCheckMapper
.
getPageByCodeAndDateIn
(
param
);
resultMap
.
put
(
"resultList"
,
resultList
);
resultMap
.
put
(
"total"
,
count
);
return
resultMap
;
}
//启动数据项稽核
@Async
public
void
startBaseIndDataCheck
(
String
user
,
String
code
,
List
<
Integer
>
dates
)
{
//生成稽查日志
IndiDataCheckLog
checkLog
=
new
IndiDataCheckLog
();
checkLog
.
setCheckUser
(
user
);
checkLog
.
setCode
(
code
);
checkLog
.
setStartTime
(
DateUtils
.
formatDate
(
new
Date
(),
"yyyy-MM-dd HH:mm:ss"
));
checkLog
.
setStatus
(
"0"
);
//保存
indiDataCheckLogMapper
.
insert
(
checkLog
);
List
<
IndiDataCheck
>
results
=
new
ArrayList
<>();
try
{
//根据code获取稽查数据
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
param
.
put
(
"code"
,
code
);
param
.
put
(
"dates"
,
dates
);
List
<
IndicatorsData
>
indiDatas
=
indicatorsDataMapper
.
getIndDataByCodeAndDateIn
(
param
);
if
(!
indiDatas
.
isEmpty
())
{
//循环判断同时间,同地区,同数据项编码但是机构编码不同的数据项,记录到表中
for
(
IndicatorsData
indiData
:
indiDatas
)
{
if
(
StringUtils
.
isNotBlank
(
indiData
.
getDim1
())
&&
indiData
.
getDim2
()!=
null
&&
StringUtils
.
isNotBlank
(
indiData
.
getIndId
())
&&
StringUtils
.
isNotBlank
(
indiData
.
getCode
()))
{
List
<
IndicatorsData
>
checkIndDatas
=
indicatorsDataMapper
.
getCheckIndData
(
indiData
.
getIndId
(),
indiData
.
getDim1
(),
indiData
.
getDim2
(),
code
);
if
(!
checkIndDatas
.
isEmpty
())
{
for
(
IndicatorsData
checkIndData
:
checkIndDatas
)
{
IndiDataCheck
data
=
new
IndiDataCheck
(
null
,
indiData
.
getIndId
(),
indiData
.
getIndDesc
(),
indiData
.
getUnit
(),
indiData
.
getDim1
(),
indiData
.
getDim1Desc
(),
indiData
.
getDim2
(),
indiData
.
getValue
(),
code
,
null
,
checkIndData
.
getIndId
(),
checkIndData
.
getIndDesc
(),
checkIndData
.
getUnit
(),
checkIndData
.
getDim1
(),
checkIndData
.
getDim1Desc
(),
checkIndData
.
getDim2
(),
checkIndData
.
getValue
(),
checkIndData
.
getCode
(),
null
,
DateUtils
.
formatDate
(
new
Date
(),
"yyyy-MM-dd HH:mm:ss"
));
results
.
add
(
data
);
}
}
}
}
}
if
(!
results
.
isEmpty
())
{
//先清除相关数据
indiDataCheckMapper
.
deleteByCodeAndDateIn
(
param
);
//批量保存
indiDataCheckMapper
.
batchSave
(
results
);
}
checkLog
.
setLogDetail
(
"稽核完成"
);
checkLog
.
setStatus
(
"1"
);
checkLog
.
setEndTime
(
DateUtils
.
formatDate
(
new
Date
(),
"yyyy-MM-dd HH:mm:ss"
));
indiDataCheckLogMapper
.
updateByPrimaryKey
(
checkLog
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"稽查数据项异常 user:"
+
user
+
";code="
+
code
+
":"
,
e
);
//截取异常信息
ByteArrayOutputStream
baos
=
new
ByteArrayOutputStream
();
e
.
printStackTrace
(
new
PrintStream
(
baos
));
StringBuilder
exception
=
new
StringBuilder
(
""
);
exception
.
append
(
baos
.
toString
()
+
"\n"
);
String
exc
=
exception
.
toString
();
checkLog
.
setLogDetail
(
exc
);
checkLog
.
setStatus
(
"2"
);
checkLog
.
setEndTime
(
DateUtils
.
formatDate
(
new
Date
(),
"yyyy-MM-dd HH:mm:ss"
));
indiDataCheckLogMapper
.
updateByPrimaryKey
(
checkLog
);
}
}
}
src/main/resources/mybatis/mapping/IndiDataCheckLogMapper.xml
0 → 100644
View file @
ceedd548
<?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.basedatacheck.IndiDataCheckLogMapper"
>
<select
id=
"getLogPageByCode"
resultType=
"com.keymobile.indicators.model.entity.basedatacheck.IndiDataCheckLog"
>
select *
from indi_data_check_log
where
code = #{code}
limit #{start},#{end}
</select>
<select
id=
"countLogByCode"
resultType=
"java.lang.Integer"
>
select count(1)
from indi_data_check_log
where
code = #{code}
</select>
</mapper>
\ No newline at end of file
src/main/resources/mybatis/mapping/IndiDataCheckMapper.xml
0 → 100644
View file @
ceedd548
<?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.basedatacheck.IndiDataCheckMapper"
>
<delete
id=
"deleteByCodeAndDateIn"
>
delete from
indi_data_check
where
code = #{code}
<if
test=
"dates != null and dates.size() >0"
>
and compare_date in
<foreach
item=
"date"
collection=
"dates"
open=
"("
close=
")"
separator=
","
>
#{date}
</foreach>
</if>
</delete>
<insert
id=
"batchSave"
parameterType=
"list"
>
insert into indi_data_check(
ind_id, ind_desc, unit, compare_obj, compare_obj_desc, compare_date, value, code, code_desc,
check_ind_id, check_ind_desc, check_unit, check_compare_obj, check_compare_obj_desc,
check_compare_date, check_value,check_code, check_code_desc, start_check_date)
values
<foreach
collection=
"datas"
item=
"val"
separator=
","
>
(
#{val.indId}, #{val.indDesc},#{val.unit},#{val.compareObj},#{val.compareObjDesc},#{val.compareDate},
#{val.value},#{val.code},#{val.codeDesc},#{val.checkIndId}, #{val.checkIndDesc},
#{val.checkUnit},#{val.checkCompareObj},#{val.checkCompareObjDesc},#{val.checkCompareDate},#{val.checkValue},
#{val.checkCode},#{val.checkCodeDesc},#{val.startCheckDate}
)
</foreach>
</insert>
<select
id=
"getPageByCodeAndDateIn"
parameterType=
"map"
resultType=
"com.keymobile.indicators.model.entity.basedatacheck.IndiDataCheck"
>
select
id, ind_id, ind_desc, unit, compare_obj, compare_obj_desc, compare_date, value, code, code_desc,
check_ind_id, check_ind_desc, check_unit, check_compare_obj, check_compare_obj_desc,
check_compare_date, check_value,check_code, check_code_desc, start_check_date
from
indi_data_check
where
code = #{code}
<if
test=
"dates != null and dates.size() >0"
>
and compare_date in
<foreach
item=
"date"
collection=
"dates"
open=
"("
close=
")"
separator=
","
>
#{date}
</foreach>
</if>
limit #{start},#{end}
</select>
<select
id=
"getCountByCodeAndDateIn"
parameterType=
"map"
resultType=
"java.lang.Integer"
>
select count(1)
from indi_data_check
where
code = #{code}
<if
test=
"dates != null and dates.size() >0"
>
and compare_date in
<foreach
item=
"date"
collection=
"dates"
open=
"("
close=
")"
separator=
","
>
#{date}
</foreach>
</if>
</select>
</mapper>
\ No newline at end of file
src/main/resources/mybatis/mapping/IndicatorsDataMapper.xml
View file @
ceedd548
...
@@ -27,6 +27,35 @@
...
@@ -27,6 +27,35 @@
</foreach>
</foreach>
</if>
</if>
</select>
</select>
<select
id=
"getIndDataByCodeAndDateIn"
parameterType=
"map"
resultType=
"com.keymobile.indicators.model.entity.indicators.IndicatorsData"
>
select *
from indi_data_def
where
code = #{code}
<if
test=
"dates != null and dates.size() >0"
>
and dim2 in
<foreach
item=
"date"
collection=
"dates"
open=
"("
close=
")"
separator=
","
>
#{date}
</foreach>
</if>
</select>
<select
id=
"getCheckIndData"
resultType=
"com.keymobile.indicators.model.entity.indicators.IndicatorsData"
>
select *
from indi_data_def
where
ind_id = #{indId} and
dim1 = #{dim1} and
dim2 = #{dim2} and
code != #{code}
</select>
<select
id=
"getCheckDates"
resultType=
"java.lang.Integer"
>
select distinct(dim2)
from indi_data_def
where code = #{code}
</select>
<delete
id=
"deleteData"
>
<delete
id=
"deleteData"
>
delete from
delete from
...
...
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