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
33c98c37
Commit
33c98c37
authored
Jul 02, 2020
by
zhangkb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
考核指标目录添加获取第一个有效目录接口
parent
bfe8127f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
1 deletion
+34
-1
IndCatalogCtrl.java
...om/keymobile/indicators/api/hytobacco/IndCatalogCtrl.java
+8
-1
DriveIndCatalogMapper.java
...icators/model/mapper/indmapper/DriveIndCatalogMapper.java
+2
-0
DriveIndCatalogService.java
.../indicators/service/hytobacco/DriveIndCatalogService.java
+11
-0
DriveIndCatalogMapper.xml
src/main/resources/mybatis/mapping/DriveIndCatalogMapper.xml
+13
-0
No files found.
src/main/java/com/keymobile/indicators/api/hytobacco/IndCatalogCtrl.java
View file @
33c98c37
...
...
@@ -53,7 +53,7 @@ public class IndCatalogCtrl {
return
indCatalogService
.
getCatalogByKeyword
(
keyword
,
codes
);
}
@ApiOperation
(
value
=
"获取第一个有效的
目录节点"
,
notes
=
"获取第一个有效的
目录节点"
)
@ApiOperation
(
value
=
"获取第一个有效的
基础目录节点"
,
notes
=
"获取第一个有效的基础
目录节点"
)
@PostMapping
(
value
=
"/getFirstVaildBaseIndCatalog"
)
public
IndCatalog
getFirstVaildBaseIndCatalog
(
@RequestParam
Integer
pid
,
@RequestParam
List
<
String
>
codes
){
...
...
@@ -87,4 +87,11 @@ public class IndCatalogCtrl {
@RequestParam
List
<
String
>
codes
){
return
driveIndCatalogService
.
getCatalogByKeyword
(
keyword
,
codes
);
}
@ApiOperation
(
value
=
"获取第一个有效的考核目录节点"
,
notes
=
"获取第一个有效的考核目录节点"
)
@PostMapping
(
value
=
"/getFirstVaildDriveIndCatalog"
)
public
DriveIndCatalog
getFirstVaildDriveIndCatalog
(
@RequestParam
Integer
pid
,
@RequestParam
List
<
String
>
codes
){
return
driveIndCatalogService
.
getFirstVaildCatalog
(
pid
,
codes
);
}
}
src/main/java/com/keymobile/indicators/model/mapper/indmapper/DriveIndCatalogMapper.java
View file @
33c98c37
...
...
@@ -18,4 +18,6 @@ public interface DriveIndCatalogMapper extends BaseMapper<DriveIndCatalog>{
public
List
<
DriveIndCatalog
>
findByParentId
(
@Param
(
"pid"
)
Integer
pid
);
public
List
<
DriveIndCatalog
>
findByKeyword
(
Map
<
String
,
Object
>
params
);
public
List
<
DriveIndCatalog
>
findFirstVaildCatalog
(
Map
<
String
,
Object
>
params
);
}
src/main/java/com/keymobile/indicators/service/hytobacco/DriveIndCatalogService.java
View file @
33c98c37
...
...
@@ -93,4 +93,15 @@ public class DriveIndCatalogService {
params
.
put
(
"codes"
,
codes
);
return
driveIndCatalogMapper
.
findByKeyword
(
params
);
}
public
DriveIndCatalog
getFirstVaildCatalog
(
Integer
pid
,
List
<
String
>
codes
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"pidPath"
,
pid
+
";"
+
"%"
);
params
.
put
(
"codes"
,
codes
);
List
<
DriveIndCatalog
>
resultList
=
driveIndCatalogMapper
.
findFirstVaildCatalog
(
params
);
if
(!
resultList
.
isEmpty
())
{
return
resultList
.
get
(
0
);
}
return
null
;
}
}
src/main/resources/mybatis/mapping/DriveIndCatalogMapper.xml
View file @
33c98c37
...
...
@@ -36,4 +36,16 @@
#{id}
</foreach>
</select>
<select
id=
"findFirstVaildCatalog"
resultType=
"com.keymobile.indicators.model.entity.indicators.DriveIndCatalog"
>
select *
from drive_ind_catalog
where id_path like #{pidPath} and
catalog_type = '1' and
code in
<foreach
item=
"id"
collection=
"codes"
open=
"("
close=
")"
separator=
","
>
#{id}
</foreach>
order by last_update_time desc
</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