Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hg-smart
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
platform
hg-smart
Commits
cd364bb0
Commit
cd364bb0
authored
Aug 21, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.生产任务根据名称进行过滤
parent
70908f2b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
7 deletions
+34
-7
UserSessionUtils.java
...ava/com/baosight/hggp/core/security/UserSessionUtils.java
+21
-0
ServiceHGSC007.java
.../java/com/baosight/hggp/hg/sc/service/ServiceHGSC007.java
+4
-4
ServiceHGSC008.java
.../java/com/baosight/hggp/hg/sc/service/ServiceHGSC008.java
+3
-3
HGSC007.xml
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC007.xml
+3
-0
HGSC008.xml
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC008.xml
+3
-0
No files found.
src/main/java/com/baosight/hggp/core/security/UserSessionUtils.java
View file @
cd364bb0
...
@@ -154,6 +154,27 @@ public class UserSessionUtils extends UserSession {
...
@@ -154,6 +154,27 @@ public class UserSessionUtils extends UserSession {
}
}
/**
/**
* 获取登录用户的所有组名称
*
* @return
*/
public
static
List
<
String
>
getAllGroupName
()
{
List
<
Org
>
orgs
=
HGXSTools
.
XsOrg
.
queryByUser
();
if
(
CollectionUtils
.
isEmpty
(
orgs
))
{
return
new
ArrayList
<>();
}
List
<
String
>
allGroupNames
=
new
ArrayList
<>();
for
(
Org
org
:
orgs
)
{
if
(
OrgTypeEnum
.
PROD_GROUP
.
getCode
().
equals
(
org
.
getOrgType
())
||
OrgTypeEnum
.
CUT_GROUP
.
getCode
().
equals
(
org
.
getOrgType
())
||
OrgTypeEnum
.
SYN_GROUP
.
getCode
().
equals
(
org
.
getOrgType
()))
{
allGroupNames
.
add
(
org
.
getOrgCname
());
}
}
return
allGroupNames
.
stream
().
distinct
().
collect
(
Collectors
.
toList
());
}
/**
* 获取登录用户所有角色
* 获取登录用户所有角色
*
*
* @return
* @return
...
...
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC007.java
View file @
cd364bb0
...
@@ -92,10 +92,10 @@ public class ServiceHGSC007 extends ServiceEPBase {
...
@@ -92,10 +92,10 @@ public class ServiceHGSC007 extends ServiceEPBase {
queryMap
.
put
(
HGSC007
.
FIELD_created_time
,
StringUtil
.
removeHorizontalLine
(
creatTime
));
queryMap
.
put
(
HGSC007
.
FIELD_created_time
,
StringUtil
.
removeHorizontalLine
(
creatTime
));
}
}
// 仅查询自己所在组的任务 added by songx at 20240820
// 仅查询自己所在组的任务 added by songx at 20240820
List
<
String
>
allGroup
Codes
=
UserSessionUtils
.
getAllGroupCod
e
();
List
<
String
>
allGroup
Names
=
UserSessionUtils
.
getAllGroupNam
e
();
// 当用户无组的时候,集合中添加
一个不存在的组
用于查询,如果不加会查询出所有的数据
// 当用户无组的时候,集合中添加
空字符串
用于查询,如果不加会查询出所有的数据
allGroup
Codes
.
add
(
"GROUP_CODE
"
);
allGroup
Names
.
add
(
"
"
);
queryMap
.
put
(
"group
Codes"
,
allGroupCod
es
);
queryMap
.
put
(
"group
Names"
,
allGroupNam
es
);
inInfo
=
super
.
query
(
inInfo
,
HGSC007
.
QUERY
,
new
HGSC007
());
inInfo
=
super
.
query
(
inInfo
,
HGSC007
.
QUERY
,
new
HGSC007
());
}
catch
(
PlatException
e
)
{
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
...
...
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC008.java
View file @
cd364bb0
...
@@ -40,10 +40,10 @@ public class ServiceHGSC008 extends ServiceEPBase {
...
@@ -40,10 +40,10 @@ public class ServiceHGSC008 extends ServiceEPBase {
try
{
try
{
Map
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
Map
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
// 仅查询自己所在组的任务 added by songx at 20240820
// 仅查询自己所在组的任务 added by songx at 20240820
List
<
String
>
allGroup
Codes
=
UserSessionUtils
.
getAllGroupCod
e
();
List
<
String
>
allGroup
Names
=
UserSessionUtils
.
getAllGroupNam
e
();
// 当用户无组的时候,集合中添加一个不存在的组用于查询,如果不加会查询出所有的数据
// 当用户无组的时候,集合中添加一个不存在的组用于查询,如果不加会查询出所有的数据
allGroup
Codes
.
add
(
"GROUP_CODE
"
);
allGroup
Names
.
add
(
"
"
);
queryMap
.
put
(
"group
Codes"
,
allGroupCod
es
);
queryMap
.
put
(
"group
Names"
,
allGroupNam
es
);
inInfo
=
super
.
query
(
inInfo
,
HGSC008
.
QUERY
,
new
HGSC008
());
inInfo
=
super
.
query
(
inInfo
,
HGSC008
.
QUERY
,
new
HGSC008
());
}
catch
(
PlatException
e
)
{
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
...
...
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC007.xml
View file @
cd364bb0
...
@@ -165,6 +165,9 @@
...
@@ -165,6 +165,9 @@
<isNotEmpty
prepend=
" AND "
property=
"groupCodes"
>
<isNotEmpty
prepend=
" AND "
property=
"groupCodes"
>
A.GROUP_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"groupCodes"
>
#groupCodes[]#
</iterate>
A.GROUP_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"groupCodes"
>
#groupCodes[]#
</iterate>
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"groupNames"
>
A.GROUP_NAME IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"groupNames"
>
#groupNames[]#
</iterate>
</isNotEmpty>
</sql>
</sql>
<sql
id=
"appCondition"
>
<sql
id=
"appCondition"
>
...
...
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC008.xml
View file @
cd364bb0
...
@@ -140,6 +140,9 @@
...
@@ -140,6 +140,9 @@
<isNotEmpty
prepend=
" AND "
property=
"groupCodes"
>
<isNotEmpty
prepend=
" AND "
property=
"groupCodes"
>
A.GROUP_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"groupCodes"
>
#groupCodes[]#
</iterate>
A.GROUP_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"groupCodes"
>
#groupCodes[]#
</iterate>
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"groupNames"
>
A.GROUP_NAME IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"groupNames"
>
#groupNames[]#
</iterate>
</isNotEmpty>
</sql>
</sql>
<select
id=
"query"
resultClass=
"com.baosight.hggp.hg.sc.domain.HGSC008"
>
<select
id=
"query"
resultClass=
"com.baosight.hggp.hg.sc.domain.HGSC008"
>
...
...
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