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
ba3158b5
Commit
ba3158b5
authored
Jul 02, 2020
by
zhangkb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
基础项目录添加获取第一个有效目录节点接口
parent
69661ba7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
0 deletions
+34
-0
IndCatalogCtrl.java
...om/keymobile/indicators/api/hytobacco/IndCatalogCtrl.java
+7
-0
IndCatalogMapper.java
...e/indicators/model/mapper/indmapper/IndCatalogMapper.java
+2
-0
IndCatalogService.java
...obile/indicators/service/hytobacco/IndCatalogService.java
+12
-0
IndCatalogMapper.xml
src/main/resources/mybatis/mapping/IndCatalogMapper.xml
+13
-0
No files found.
src/main/java/com/keymobile/indicators/api/hytobacco/IndCatalogCtrl.java
View file @
ba3158b5
...
@@ -53,6 +53,13 @@ public class IndCatalogCtrl {
...
@@ -53,6 +53,13 @@ public class IndCatalogCtrl {
return
indCatalogService
.
getCatalogByKeyword
(
keyword
,
codes
);
return
indCatalogService
.
getCatalogByKeyword
(
keyword
,
codes
);
}
}
@ApiOperation
(
value
=
"获取第一个有效的目录节点"
,
notes
=
"获取第一个有效的目录节点"
)
@PostMapping
(
value
=
"/getFirstVaildBaseIndCatalog"
)
public
IndCatalog
getFirstVaildBaseIndCatalog
(
@RequestParam
Integer
pid
,
@RequestParam
List
<
String
>
codes
){
return
indCatalogService
.
getFirstVaildCatalog
(
pid
,
codes
);
}
//考核指标目录
//考核指标目录
@ApiOperation
(
value
=
"新建考核指标目录"
,
notes
=
"新建考核指标目录"
)
@ApiOperation
(
value
=
"新建考核指标目录"
,
notes
=
"新建考核指标目录"
)
@PostMapping
(
value
=
"/createDriveIndCatalog"
)
@PostMapping
(
value
=
"/createDriveIndCatalog"
)
...
...
src/main/java/com/keymobile/indicators/model/mapper/indmapper/IndCatalogMapper.java
View file @
ba3158b5
...
@@ -19,4 +19,6 @@ public interface IndCatalogMapper extends BaseMapper<IndCatalog>{
...
@@ -19,4 +19,6 @@ public interface IndCatalogMapper extends BaseMapper<IndCatalog>{
public
List
<
IndCatalog
>
findByParentId
(
@Param
(
"pid"
)
Integer
pid
);
public
List
<
IndCatalog
>
findByParentId
(
@Param
(
"pid"
)
Integer
pid
);
public
List
<
IndCatalog
>
findByKeyword
(
Map
<
String
,
Object
>
params
);
public
List
<
IndCatalog
>
findByKeyword
(
Map
<
String
,
Object
>
params
);
public
List
<
IndCatalog
>
findFirstVaildCatalog
(
Map
<
String
,
Object
>
params
);
}
}
src/main/java/com/keymobile/indicators/service/hytobacco/IndCatalogService.java
View file @
ba3158b5
...
@@ -92,4 +92,16 @@ public class IndCatalogService {
...
@@ -92,4 +92,16 @@ public class IndCatalogService {
params
.
put
(
"codes"
,
codes
);
params
.
put
(
"codes"
,
codes
);
return
indCatalogMapper
.
findByKeyword
(
params
);
return
indCatalogMapper
.
findByKeyword
(
params
);
}
}
//获取第一个有效目录节点
public
IndCatalog
getFirstVaildCatalog
(
Integer
pid
,
List
<
String
>
codes
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"pidPath"
,
pid
+
";"
+
"%"
);
params
.
put
(
"codes"
,
codes
);
List
<
IndCatalog
>
resultList
=
indCatalogMapper
.
findFirstVaildCatalog
(
params
);
if
(!
resultList
.
isEmpty
())
{
return
resultList
.
get
(
0
);
}
return
null
;
}
}
}
src/main/resources/mybatis/mapping/IndCatalogMapper.xml
View file @
ba3158b5
...
@@ -36,4 +36,16 @@
...
@@ -36,4 +36,16 @@
#{id}
#{id}
</foreach>
</foreach>
</select>
</select>
<select
id=
"findFirstVaildCatalog"
resultType=
"com.keymobile.indicators.model.entity.indicators.IndCatalog"
>
select *
from base_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>
</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