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
d66e8e93
Commit
d66e8e93
authored
Jun 06, 2020
by
zhangkb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改删除目录关联的数据项问题bug
parent
8f2f3cee
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
22 additions
and
20 deletions
+22
-20
IndCatalogCtrl.java
...om/keymobile/indicators/api/hytobacco/IndCatalogCtrl.java
+6
-4
DriveIndCatalog.java
...e/indicators/model/entity/indicators/DriveIndCatalog.java
+2
-2
IndCatalog.java
...mobile/indicators/model/entity/indicators/IndCatalog.java
+2
-2
DriveIndCatalogRepository.java
...s/persistence/hyindicators/DriveIndCatalogRepository.java
+1
-1
IndCatalogRepository.java
...cators/persistence/hyindicators/IndCatalogRepository.java
+1
-1
DriveIndCatalogService.java
.../indicators/service/hytobacco/DriveIndCatalogService.java
+3
-3
IndCatalogService.java
...obile/indicators/service/hytobacco/IndCatalogService.java
+3
-3
BaseIndDefMapper.xml
src/main/resources/mybatis/mapping/BaseIndDefMapper.xml
+2
-2
DriveIndDefMapper.xml
src/main/resources/mybatis/mapping/DriveIndDefMapper.xml
+2
-2
No files found.
src/main/java/com/keymobile/indicators/api/hytobacco/IndCatalogCtrl.java
View file @
d66e8e93
...
@@ -41,8 +41,9 @@ public class IndCatalogCtrl {
...
@@ -41,8 +41,9 @@ public class IndCatalogCtrl {
@ApiOperation
(
value
=
"获取基础指标目录"
,
notes
=
"获取基础指标目录"
)
@ApiOperation
(
value
=
"获取基础指标目录"
,
notes
=
"获取基础指标目录"
)
@PostMapping
(
value
=
"/getBaseIndCatalog"
)
@PostMapping
(
value
=
"/getBaseIndCatalog"
)
public
List
<
IndCatalog
>
getBaseIndCatalog
(
@RequestParam
String
parentId
,
@RequestParam
String
type
){
public
List
<
IndCatalog
>
getBaseIndCatalog
(
@RequestParam
(
required
=
false
)
String
parentId
,
return
indCatalogService
.
getCatalog
(
parentId
,
type
);
@RequestParam
List
<
String
>
codes
){
return
indCatalogService
.
getCatalog
(
parentId
,
codes
);
}
}
//考核指标目录
//考核指标目录
...
@@ -61,7 +62,8 @@ public class IndCatalogCtrl {
...
@@ -61,7 +62,8 @@ public class IndCatalogCtrl {
@ApiOperation
(
value
=
"获取考核指标目录"
,
notes
=
"获取考核指标目录"
)
@ApiOperation
(
value
=
"获取考核指标目录"
,
notes
=
"获取考核指标目录"
)
@PostMapping
(
value
=
"/getDriveIndCatalog"
)
@PostMapping
(
value
=
"/getDriveIndCatalog"
)
public
List
<
DriveIndCatalog
>
getDriveIndCatalog
(
@RequestParam
String
parentId
,
@RequestParam
String
type
){
public
List
<
DriveIndCatalog
>
getDriveIndCatalog
(
@RequestParam
(
required
=
false
)
String
parentId
,
return
driveIndCatalogService
.
getCatalog
(
parentId
,
type
);
@RequestParam
List
<
String
>
codes
){
return
driveIndCatalogService
.
getCatalog
(
parentId
,
codes
);
}
}
}
}
src/main/java/com/keymobile/indicators/model/entity/indicators/DriveIndCatalog.java
View file @
d66e8e93
...
@@ -24,8 +24,8 @@ public class DriveIndCatalog implements Serializable{
...
@@ -24,8 +24,8 @@ public class DriveIndCatalog implements Serializable{
@Id
@Id
private
String
id
;
private
String
id
;
private
String
catalogName
;
private
String
catalogName
;
private
String
type
;
//
private String type;
private
String
catalogType
;
//分为数据项级别和数据项类别 0:数据项级别 1:数据项类别
private
String
catalogType
;
//分为数据项级别和数据项类别 0:数据项级别 1:数据项类别
2:普通目录
private
String
parentId
;
//顶层节点parentId为0
private
String
parentId
;
//顶层节点parentId为0
private
String
idPath
;
private
String
idPath
;
private
String
code
;
//目录编码
private
String
code
;
//目录编码
...
...
src/main/java/com/keymobile/indicators/model/entity/indicators/IndCatalog.java
View file @
d66e8e93
...
@@ -25,8 +25,8 @@ public class IndCatalog implements Serializable{
...
@@ -25,8 +25,8 @@ public class IndCatalog implements Serializable{
@Id
@Id
private
String
id
;
private
String
id
;
private
String
catalogName
;
private
String
catalogName
;
private
String
type
;
//
private String type;
private
String
catalogType
;
//分为数据项级别和数据项类别 0:数据项级别 1:数据项类别
private
String
catalogType
;
//分为数据项级别和数据项类别 0:数据项级别 1:数据项类别
2:普通目录
private
String
parentId
;
//顶层节点parentId为0
private
String
parentId
;
//顶层节点parentId为0
private
String
idPath
;
private
String
idPath
;
private
String
code
;
//目录编码
private
String
code
;
//目录编码
...
...
src/main/java/com/keymobile/indicators/persistence/hyindicators/DriveIndCatalogRepository.java
View file @
d66e8e93
...
@@ -9,7 +9,7 @@ import com.keymobile.indicators.model.entity.indicators.DriveIndCatalog;
...
@@ -9,7 +9,7 @@ import com.keymobile.indicators.model.entity.indicators.DriveIndCatalog;
public
interface
DriveIndCatalogRepository
extends
MongoRepository
<
DriveIndCatalog
,
String
>{
public
interface
DriveIndCatalogRepository
extends
MongoRepository
<
DriveIndCatalog
,
String
>{
public
void
deleteByIdIn
(
List
<
String
>
ids
);
public
void
deleteByIdIn
(
List
<
String
>
ids
);
public
List
<
DriveIndCatalog
>
findByParentIdAnd
TypeOrderByLastUpdateTimeDesc
(
String
pid
,
String
type
);
public
List
<
DriveIndCatalog
>
findByParentIdAnd
CodeInOrderByLastUpdateTimeDesc
(
String
pid
,
List
<
String
>
codes
);
public
List
<
DriveIndCatalog
>
findByParentId
(
String
pid
);
public
List
<
DriveIndCatalog
>
findByParentId
(
String
pid
);
}
}
src/main/java/com/keymobile/indicators/persistence/hyindicators/IndCatalogRepository.java
View file @
d66e8e93
...
@@ -10,7 +10,7 @@ public interface IndCatalogRepository extends MongoRepository<IndCatalog,String>
...
@@ -10,7 +10,7 @@ public interface IndCatalogRepository extends MongoRepository<IndCatalog,String>
public
void
deleteByIdIn
(
List
<
String
>
ids
);
public
void
deleteByIdIn
(
List
<
String
>
ids
);
public
List
<
IndCatalog
>
findByParentIdAnd
TypeOrderByLastUpdateTimeDesc
(
String
pid
,
String
type
);
public
List
<
IndCatalog
>
findByParentIdAnd
CodeInOrderByLastUpdateTimeDesc
(
String
pid
,
List
<
String
>
codes
);
public
List
<
IndCatalog
>
findByParentId
(
String
pid
);
public
List
<
IndCatalog
>
findByParentId
(
String
pid
);
}
}
src/main/java/com/keymobile/indicators/service/hytobacco/DriveIndCatalogService.java
View file @
d66e8e93
...
@@ -75,10 +75,10 @@ public class DriveIndCatalogService {
...
@@ -75,10 +75,10 @@ public class DriveIndCatalogService {
}
}
//获取目录树
//获取目录树
public
List
<
DriveIndCatalog
>
getCatalog
(
String
parentId
,
String
type
){
public
List
<
DriveIndCatalog
>
getCatalog
(
String
parentId
,
List
<
String
>
codes
){
if
(
StringUtils
.
isBlank
(
parentId
)
||
"0"
.
equals
(
parentId
))
{
if
(
StringUtils
.
isBlank
(
parentId
)
||
"0"
.
equals
(
parentId
))
{
return
driveIndCatalogRepo
.
findByParentIdAnd
TypeOrderByLastUpdateTimeDesc
(
"0"
,
type
);
return
driveIndCatalogRepo
.
findByParentIdAnd
CodeInOrderByLastUpdateTimeDesc
(
"0"
,
codes
);
}
}
return
driveIndCatalogRepo
.
findByParentIdAnd
TypeOrderByLastUpdateTimeDesc
(
parentId
,
type
);
return
driveIndCatalogRepo
.
findByParentIdAnd
CodeInOrderByLastUpdateTimeDesc
(
parentId
,
codes
);
}
}
}
}
src/main/java/com/keymobile/indicators/service/hytobacco/IndCatalogService.java
View file @
d66e8e93
...
@@ -74,10 +74,10 @@ public class IndCatalogService {
...
@@ -74,10 +74,10 @@ public class IndCatalogService {
}
}
//获取目录树
//获取目录树
public
List
<
IndCatalog
>
getCatalog
(
String
parentId
,
String
type
){
public
List
<
IndCatalog
>
getCatalog
(
String
parentId
,
List
<
String
>
codes
){
if
(
StringUtils
.
isBlank
(
parentId
)
||
"0"
.
equals
(
parentId
))
{
if
(
StringUtils
.
isBlank
(
parentId
)
||
"0"
.
equals
(
parentId
))
{
return
indCatalogRepo
.
findByParentIdAnd
TypeOrderByLastUpdateTimeDesc
(
"0"
,
type
);
return
indCatalogRepo
.
findByParentIdAnd
CodeInOrderByLastUpdateTimeDesc
(
"0"
,
codes
);
}
}
return
indCatalogRepo
.
findByParentIdAnd
TypeOrderByLastUpdateTimeDesc
(
parentId
,
type
);
return
indCatalogRepo
.
findByParentIdAnd
CodeInOrderByLastUpdateTimeDesc
(
parentId
,
codes
);
}
}
}
}
src/main/resources/mybatis/mapping/BaseIndDefMapper.xml
View file @
d66e8e93
...
@@ -28,8 +28,8 @@
...
@@ -28,8 +28,8 @@
<delete
id=
"deleteByCatalogIdIn"
parameterType=
"java.util.List"
>
<delete
id=
"deleteByCatalogIdIn"
parameterType=
"java.util.List"
>
delete
delete
from base_ind_def
t
from base_ind_def
where
t.
catalog_id in
where catalog_id in
<foreach
item=
"id"
collection=
"list"
open=
"("
close=
")"
separator=
","
>
<foreach
item=
"id"
collection=
"list"
open=
"("
close=
")"
separator=
","
>
#{id}
#{id}
</foreach>
</foreach>
...
...
src/main/resources/mybatis/mapping/DriveIndDefMapper.xml
View file @
d66e8e93
...
@@ -28,8 +28,8 @@
...
@@ -28,8 +28,8 @@
<delete
id=
"deleteByCatalogIdIn"
parameterType=
"java.util.List"
>
<delete
id=
"deleteByCatalogIdIn"
parameterType=
"java.util.List"
>
delete
delete
from drive_ind_def
t
from drive_ind_def
where
t.
catalog_id in
where catalog_id in
<foreach
item=
"id"
collection=
"list"
open=
"("
close=
")"
separator=
","
>
<foreach
item=
"id"
collection=
"list"
open=
"("
close=
")"
separator=
","
>
#{id}
#{id}
</foreach>
</foreach>
...
...
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