Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-data-cloud
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
base_platform_enterprise
gic-data-cloud
Commits
c427a178
Commit
c427a178
authored
Nov 23, 2020
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
好办关联
parent
7e00a9ec
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
7 deletions
+23
-7
LogAndUpdateTipsTypeEnum.java
...ava/com/gic/cloud/constants/LogAndUpdateTipsTypeEnum.java
+2
-0
IndexApiService.java
.../src/main/java/com/gic/cloud/service/IndexApiService.java
+2
-2
IndexApiServiceImpl.java
...com/gic/cloud/service/outer/impl/IndexApiServiceImpl.java
+19
-5
No files found.
gic-data-cloud-api/src/main/java/com/gic/cloud/constants/LogAndUpdateTipsTypeEnum.java
View file @
c427a178
...
@@ -10,6 +10,8 @@ public enum LogAndUpdateTipsTypeEnum {
...
@@ -10,6 +10,8 @@ public enum LogAndUpdateTipsTypeEnum {
INDEX
(
1
),
INDEX
(
1
),
// 数据解读
// 数据解读
DATA_EXPLAIN
(
2
),
DATA_EXPLAIN
(
2
),
// 好办
HAOBAN
(
3
),
;
;
private
Integer
code
;
private
Integer
code
;
...
...
gic-data-cloud-api/src/main/java/com/gic/cloud/service/IndexApiService.java
View file @
c427a178
...
@@ -102,9 +102,9 @@ public interface IndexApiService {
...
@@ -102,9 +102,9 @@ public interface IndexApiService {
* @Title: listByModule
* @Title: listByModule
* @Description:
* @Description:
* @author zhiwj
* @author zhiwj
* @param
moduleId
* @param
indexDescCode
* @return com.gic.api.base.commons.ServiceResponse<java.util.List<com.gic.cloud.dto.IndexDTO>>
* @return com.gic.api.base.commons.ServiceResponse<java.util.List<com.gic.cloud.dto.IndexDTO>>
* @throws
* @throws
*/
*/
ServiceResponse
<
List
<
IndexDTO
>>
listByModule
(
String
moduleId
);
ServiceResponse
<
IndexDTO
>
getByIndexDescCode
(
String
indexDescCode
);
}
}
gic-data-cloud-service/src/main/java/com/gic/cloud/service/outer/impl/IndexApiServiceImpl.java
View file @
c427a178
...
@@ -6,6 +6,7 @@ import com.gic.cloud.constants.LogAndUpdateTipsTypeEnum;
...
@@ -6,6 +6,7 @@ import com.gic.cloud.constants.LogAndUpdateTipsTypeEnum;
import
com.gic.cloud.constants.UpdateTypeEnum
;
import
com.gic.cloud.constants.UpdateTypeEnum
;
import
com.gic.cloud.dto.IndexDTO
;
import
com.gic.cloud.dto.IndexDTO
;
import
com.gic.cloud.entity.TabIndex
;
import
com.gic.cloud.entity.TabIndex
;
import
com.gic.cloud.entity.TabIndexDesc
;
import
com.gic.cloud.entity.TabIndexGroup
;
import
com.gic.cloud.entity.TabIndexGroup
;
import
com.gic.cloud.qo.IndexQo
;
import
com.gic.cloud.qo.IndexQo
;
import
com.gic.cloud.service.*
;
import
com.gic.cloud.service.*
;
...
@@ -31,6 +32,8 @@ import java.util.stream.Stream;
...
@@ -31,6 +32,8 @@ import java.util.stream.Stream;
@Service
(
"indexApiService"
)
@Service
(
"indexApiService"
)
public
class
IndexApiServiceImpl
implements
IndexApiService
{
public
class
IndexApiServiceImpl
implements
IndexApiService
{
private
static
final
String
HAOBAN_NAME
=
"haoban"
;
@Autowired
@Autowired
private
IndexService
indexService
;
private
IndexService
indexService
;
@Autowired
@Autowired
...
@@ -41,6 +44,8 @@ public class IndexApiServiceImpl implements IndexApiService {
...
@@ -41,6 +44,8 @@ public class IndexApiServiceImpl implements IndexApiService {
private
UpdateTipService
updateTipService
;
private
UpdateTipService
updateTipService
;
@Autowired
@Autowired
private
IndexGroupService
indexGroupService
;
private
IndexGroupService
indexGroupService
;
@Autowired
private
IndexDescService
indexDescService
;
@Override
@Override
public
ServiceResponse
<
Void
>
saveIndex
(
IndexDTO
indexDTO
)
{
public
ServiceResponse
<
Void
>
saveIndex
(
IndexDTO
indexDTO
)
{
...
@@ -182,10 +187,19 @@ public class IndexApiServiceImpl implements IndexApiService {
...
@@ -182,10 +187,19 @@ public class IndexApiServiceImpl implements IndexApiService {
}
}
@Override
@Override
public
ServiceResponse
<
List
<
IndexDTO
>>
listByModule
(
String
moduleId
)
{
public
ServiceResponse
<
IndexDTO
>
getByIndexDescCode
(
String
indexDescCode
)
{
IndexQo
indexQo
=
new
IndexQo
();
TabIndexDesc
indexDesc
=
indexDescService
.
getIndexDesc
(
HAOBAN_NAME
,
indexDescCode
,
null
);
indexQo
.
setModuleId
(
moduleId
);
if
(
indexDesc
==
null
)
{
List
<
TabIndex
>
indexList
=
indexService
.
listAllIndex
(
indexQo
);
return
EnterpriseServiceResponse
.
failure
(
ErrorCode
.
NOTEXISTS
.
getCode
(),
ErrorCode
.
NOTEXISTS
.
getMsg
());
return
EnterpriseServiceResponse
.
success
(
EntityUtil
.
changeEntityListByJSON
(
IndexDTO
.
class
,
indexList
));
}
List
<
Integer
>
list
=
indexModuleRelService
.
listBusinessIdByModuleId
(
indexDesc
.
getIndexDescId
().
toString
(),
LogAndUpdateTipsTypeEnum
.
HAOBAN
.
getCode
());
if
(
CollectionUtils
.
isEmpty
(
list
))
{
return
EnterpriseServiceResponse
.
failure
(
ErrorCode
.
NOTEXISTS
.
getCode
(),
ErrorCode
.
NOTEXISTS
.
getMsg
());
}
TabIndex
index
=
indexService
.
getByIndexId
(
list
.
get
(
0
));
if
(
index
==
null
)
{
return
EnterpriseServiceResponse
.
failure
(
ErrorCode
.
NOTEXISTS
.
getCode
(),
ErrorCode
.
NOTEXISTS
.
getMsg
());
}
return
EnterpriseServiceResponse
.
success
(
EntityUtil
.
changeEntityByJSON
(
IndexDTO
.
class
,
index
));
}
}
}
}
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