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
9bb7fd0c
Commit
9bb7fd0c
authored
Jul 01, 2020
by
zhangkb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加考核指标结果获取接口
parent
8d43a2b2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
0 deletions
+24
-0
DriveIndCalResultCtrl.java
...obile/indicators/api/hytobacco/DriveIndCalResultCtrl.java
+8
-0
DriveIndCalResultDefMapper.java
...rs/model/mapper/indmapper/DriveIndCalResultDefMapper.java
+3
-0
DriveIndCalResultService.java
...ndicators/service/hytobacco/DriveIndCalResultService.java
+4
-0
DriveIndCalResultDefMapper.xml
.../resources/mybatis/mapping/DriveIndCalResultDefMapper.xml
+9
-0
No files found.
src/main/java/com/keymobile/indicators/api/hytobacco/DriveIndCalResultCtrl.java
View file @
9bb7fd0c
...
...
@@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import
org.springframework.web.bind.annotation.RestController
;
import
com.keymobile.indicators.model.entity.indicators.CompareUnitDef
;
import
com.keymobile.indicators.model.entity.indicators.DriveIndCalResultDef
;
import
com.keymobile.indicators.service.hytobacco.CompareUnitCalLogService
;
import
com.keymobile.indicators.service.hytobacco.DriveIndCalResultService
;
...
...
@@ -45,4 +46,11 @@ public class DriveIndCalResultCtrl {
@RequestParam
(
defaultValue
=
"0"
)
int
page
,
@RequestParam
(
defaultValue
=
"10"
)
int
rows
){
return
compUnitCalLogService
.
findPageByCompareId
(
compareId
,
page
,
rows
);
}
@ApiOperation
(
value
=
"根据对标单元id和年份获取对标指标结果"
,
notes
=
"根据对标单元id和年份获取对标指标结果"
)
@PostMapping
(
value
=
"/findByCompareIdAndDate"
)
public
List
<
DriveIndCalResultDef
>
findByCompareIdAndDate
(
@RequestParam
String
compareId
,
@RequestParam
Integer
date
){
return
driveIndCalResultService
.
findByCompareIdAndDate
(
compareId
,
date
);
}
}
src/main/java/com/keymobile/indicators/model/mapper/indmapper/DriveIndCalResultDefMapper.java
View file @
9bb7fd0c
...
...
@@ -49,4 +49,7 @@ public interface DriveIndCalResultDefMapper extends BaseMapper<DriveIndCalResult
@Param
(
"indId"
)
String
indId
,
@Param
(
"date"
)
int
date
);
public
List
<
DriveIndCalResultDef
>
findByIndIdAndDateAndCompareObjIn
(
Map
<
String
,
Object
>
param
);
public
List
<
DriveIndCalResultDef
>
findByCompareIdAndDate
(
@Param
(
"compareId"
)
String
compareId
,
@Param
(
"date"
)
Integer
date
);
}
src/main/java/com/keymobile/indicators/service/hytobacco/DriveIndCalResultService.java
View file @
9bb7fd0c
...
...
@@ -51,6 +51,10 @@ public class DriveIndCalResultService {
return
driveIndCalResultDefMapper
.
findByCompareIdAndCompareObjAndIndIdAndDate
(
compareId
,
compareObj
,
indId
,
date
);
}
public
List
<
DriveIndCalResultDef
>
findByCompareIdAndDate
(
String
compareId
,
Integer
date
){
return
driveIndCalResultDefMapper
.
findByCompareIdAndDate
(
compareId
,
date
);
}
public
void
calculateComp
(
String
compareId
,
String
compareObjsString
,
String
driveIndIdsString
,
int
date
)
{
String
[]
compareObjs
=
compareObjsString
.
split
(
";"
);
...
...
src/main/resources/mybatis/mapping/DriveIndCalResultDefMapper.xml
View file @
9bb7fd0c
...
...
@@ -129,4 +129,12 @@
</foreach>
order by rank asc
</select>
<select
id=
"findByCompareIdAndDate"
resultType=
"com.keymobile.indicators.model.entity.indicators.DriveIndCalResultDef"
>
select *
from drive_ind_cal_result_def
where
compare_id = #{compareId} and
date = #{date}
</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