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
1e915792
Commit
1e915792
authored
May 08, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.数据集支持初始化参数
parent
e3d7c1fd
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
90 additions
and
15 deletions
+90
-15
DdynamicEnum.java
src/main/java/com/baosight/hggp/common/DdynamicEnum.java
+73
-4
CommonMethod.java
src/main/java/com/baosight/hggp/util/CommonMethod.java
+14
-0
ServiceXS3002.java
...java/com/baosight/xservices/xs/service/ServiceXS3002.java
+3
-11
No files found.
src/main/java/com/baosight/hggp/common/DdynamicEnum.java
View file @
1e915792
package
com
.
baosight
.
hggp
.
common
;
package
com
.
baosight
.
hggp
.
common
;
import
com.baosight.hggp.core.enums.OrgTypeEnum
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
/**
* @Author wwl
* @Author wwl
* @Date 2024/1/9 19:35
* @Date 2024/1/9 19:35
...
@@ -70,7 +75,9 @@ public enum DdynamicEnum {
...
@@ -70,7 +75,9 @@ public enum DdynamicEnum {
* 编写:ly
* 编写:ly
*/
*/
DEPT_CODE_BLOCK_ID
(
"dept_code_block_id"
,
"orgId"
,
"orgCname"
,
"factoryCode"
,
"factoryName"
,
"companyCode"
,
DEPT_CODE_BLOCK_ID
(
"dept_code_block_id"
,
"orgId"
,
"orgCname"
,
"factoryCode"
,
"factoryName"
,
"companyCode"
,
"companyName"
,
"HGXSOrg.queryAll"
),
"companyName"
,
"HGXSOrg.queryAll"
,
new
HashMap
()
{{
put
(
"orgType"
,
OrgTypeEnum
.
DEPT
.
getCode
());
}}),
/**
/**
* 模块:系统管理
* 模块:系统管理
...
@@ -78,14 +85,20 @@ public enum DdynamicEnum {
...
@@ -78,14 +85,20 @@ public enum DdynamicEnum {
* 编写:ly
* 编写:ly
*/
*/
FACTORY_CODE_BLOCK_ID
(
"factory_code_block_id"
,
"orgId"
,
"orgCname"
,
"companyCode"
,
FACTORY_CODE_BLOCK_ID
(
"factory_code_block_id"
,
"orgId"
,
"orgCname"
,
"companyCode"
,
"companyName"
,
"HGXSOrg.queryAll"
),
"companyName"
,
"HGXSOrg.queryAll"
,
new
HashMap
()
{{
put
(
"orgType"
,
OrgTypeEnum
.
FACTORY
.
getCode
());
}}),
/**
/**
* 模块:系统管理
* 模块:系统管理
* 用途:公司查询
* 用途:公司查询
* 编写:ly
* 编写:ly
*/
*/
COMPANY_CODE_BLOCK_ID
(
"company_code_block_id"
,
"orgId"
,
"orgCname"
,
"HGXSOrg.queryAll"
),
COMPANY_CODE_BLOCK_ID
(
"company_code_block_id"
,
"orgId"
,
"orgCname"
,
"HGXSOrg.queryAll"
,
new
HashMap
()
{{
put
(
"orgType"
,
OrgTypeEnum
.
COMPANY
.
getCode
());
}}
),
/**
/**
* 模块:公司名称
* 模块:公司名称
...
@@ -132,6 +145,8 @@ public enum DdynamicEnum {
...
@@ -132,6 +145,8 @@ public enum DdynamicEnum {
/** 数据源 */
/** 数据源 */
private
final
String
dbSource
;
private
final
String
dbSource
;
private
Map
paramMap
;
DdynamicEnum
(
String
blockId
,
String
value
,
String
text
,
String
param1
,
String
dbSource
)
{
DdynamicEnum
(
String
blockId
,
String
value
,
String
text
,
String
param1
,
String
dbSource
)
{
this
.
blockId
=
blockId
;
this
.
blockId
=
blockId
;
this
.
value
=
value
;
this
.
value
=
value
;
...
@@ -149,6 +164,17 @@ public enum DdynamicEnum {
...
@@ -149,6 +164,17 @@ public enum DdynamicEnum {
this
.
dbSource
=
dbSource
;
this
.
dbSource
=
dbSource
;
}
}
DdynamicEnum
(
String
blockId
,
String
value
,
String
text
,
String
param1
,
String
param2
,
String
dbSource
,
Map
paramMap
)
{
this
.
blockId
=
blockId
;
this
.
value
=
value
;
this
.
text
=
text
;
this
.
param1
=
param1
;
this
.
param2
=
param2
;
this
.
dbSource
=
dbSource
;
this
.
paramMap
=
paramMap
;
}
DdynamicEnum
(
String
blockId
,
String
value
,
String
text
,
String
param1
,
String
param2
,
String
param3
,
String
dbSource
)
{
DdynamicEnum
(
String
blockId
,
String
value
,
String
text
,
String
param1
,
String
param2
,
String
param3
,
String
dbSource
)
{
this
.
blockId
=
blockId
;
this
.
blockId
=
blockId
;
this
.
value
=
value
;
this
.
value
=
value
;
...
@@ -170,6 +196,19 @@ public enum DdynamicEnum {
...
@@ -170,6 +196,19 @@ public enum DdynamicEnum {
this
.
dbSource
=
dbSource
;
this
.
dbSource
=
dbSource
;
}
}
DdynamicEnum
(
String
blockId
,
String
value
,
String
text
,
String
param1
,
String
param2
,
String
param3
,
String
param4
,
String
dbSource
,
Map
paramMap
)
{
this
.
blockId
=
blockId
;
this
.
value
=
value
;
this
.
text
=
text
;
this
.
param1
=
param1
;
this
.
param2
=
param2
;
this
.
param3
=
param3
;
this
.
param4
=
param4
;
this
.
dbSource
=
dbSource
;
this
.
paramMap
=
paramMap
;
}
DdynamicEnum
(
String
blockId
,
String
value
,
String
text
,
String
param1
,
String
param2
,
String
param3
,
String
param4
,
String
param5
,
String
dbSource
)
{
DdynamicEnum
(
String
blockId
,
String
value
,
String
text
,
String
param1
,
String
param2
,
String
param3
,
String
param4
,
String
param5
,
String
dbSource
)
{
this
.
blockId
=
blockId
;
this
.
blockId
=
blockId
;
this
.
value
=
value
;
this
.
value
=
value
;
...
@@ -213,14 +252,39 @@ public enum DdynamicEnum {
...
@@ -213,14 +252,39 @@ public enum DdynamicEnum {
this
.
dbSource
=
dbSource
;
this
.
dbSource
=
dbSource
;
}
}
DdynamicEnum
(
String
blockId
,
String
value
,
String
text
,
String
dbSource
){
DdynamicEnum
(
String
blockId
,
String
value
,
String
text
,
String
param1
,
String
param2
,
String
param3
,
String
param4
,
String
param5
,
String
param6
,
String
param7
,
String
param8
,
String
param9
,
String
dbSource
,
Map
paramMap
)
{
this
.
blockId
=
blockId
;
this
.
blockId
=
blockId
;
this
.
value
=
value
;
this
.
value
=
value
;
this
.
text
=
text
;
this
.
text
=
text
;
this
.
param1
=
param1
;
this
.
param2
=
param2
;
this
.
param3
=
param3
;
this
.
param4
=
param4
;
this
.
param5
=
param5
;
this
.
param6
=
param6
;
this
.
param7
=
param7
;
this
.
param8
=
param8
;
this
.
param9
=
param9
;
this
.
dbSource
=
dbSource
;
this
.
dbSource
=
dbSource
;
this
.
paramMap
=
paramMap
;
}
}
DdynamicEnum
(
String
blockId
,
String
value
,
String
text
,
String
dbSource
){
this
.
blockId
=
blockId
;
this
.
value
=
value
;
this
.
text
=
text
;
this
.
dbSource
=
dbSource
;
}
DdynamicEnum
(
String
blockId
,
String
value
,
String
text
,
String
dbSource
,
Map
paramMap
)
{
this
.
blockId
=
blockId
;
this
.
value
=
value
;
this
.
text
=
text
;
this
.
dbSource
=
dbSource
;
this
.
paramMap
=
paramMap
;
}
public
String
getDbSource
()
{
public
String
getDbSource
()
{
return
dbSource
;
return
dbSource
;
...
@@ -309,4 +373,9 @@ public enum DdynamicEnum {
...
@@ -309,4 +373,9 @@ public enum DdynamicEnum {
public
void
setParam9
(
String
param9
)
{
public
void
setParam9
(
String
param9
)
{
this
.
param9
=
param9
;
this
.
param9
=
param9
;
}
}
public
Map
getParamMap
()
{
return
paramMap
;
}
}
}
src/main/java/com/baosight/hggp/util/CommonMethod.java
View file @
1e915792
...
@@ -34,6 +34,15 @@ public class CommonMethod {
...
@@ -34,6 +34,15 @@ public class CommonMethod {
/**
/**
* @param inInfo 前后台交互对象
* @param inInfo 前后台交互对象
* @param tableParams 表信息
* @param tableParams 表信息
* 公用下拉方法
*/
public
static
void
initBlock
(
EiInfo
inInfo
,
List
<
DdynamicEnum
>
tableParams
){
initBlock
(
inInfo
,
tableParams
,
null
,
false
);
}
/**
* @param inInfo 前后台交互对象
* @param tableParams 表信息
* @param selectParams 筛选条件
* @param selectParams 筛选条件
* 公用下拉方法
* 公用下拉方法
*/
*/
...
@@ -69,6 +78,11 @@ public class CommonMethod {
...
@@ -69,6 +78,11 @@ public class CommonMethod {
for
(
DdynamicEnum
tableParam
:
tableParams
)
{
for
(
DdynamicEnum
tableParam
:
tableParams
)
{
/* 编辑块名称 */
/* 编辑块名称 */
eiBlock
=
new
EiBlock
(
tableParam
.
getBlockId
());
eiBlock
=
new
EiBlock
(
tableParam
.
getBlockId
());
// 合并参数
Map
paramMap
=
tableParam
.
getParamMap
();
if
(
MapUtils
.
isNotEmpty
(
paramMap
))
{
selectParams
.
putAll
(
paramMap
);
}
/* 将所有查询到的结果放到暂存变量中 */
/* 将所有查询到的结果放到暂存变量中 */
results
=
dao
.
query
(
tableParam
.
getDbSource
(),
selectParams
,
EiConstant
.
defaultOffset
,
-
999999
);
results
=
dao
.
query
(
tableParam
.
getDbSource
(),
selectParams
,
EiConstant
.
defaultOffset
,
-
999999
);
List
<
LinkedHashMap
>
resultRows
=
new
ArrayList
<>();
List
<
LinkedHashMap
>
resultRows
=
new
ArrayList
<>();
...
...
src/main/java/com/baosight/xservices/xs/service/ServiceXS3002.java
View file @
1e915792
package
com
.
baosight
.
xservices
.
xs
.
service
;
package
com
.
baosight
.
xservices
.
xs
.
service
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.core.enums.OrgTypeEnum
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.pz.domain.HGPZ009
;
import
com.baosight.hggp.hg.pz.domain.HGPZ009
;
import
com.baosight.hggp.hg.pz.tools.HGPZTools
;
import
com.baosight.hggp.hg.pz.tools.HGPZTools
;
...
@@ -27,7 +26,6 @@ import com.baosight.xservices.xs.util.UserSession;
...
@@ -27,7 +26,6 @@ import com.baosight.xservices.xs.util.UserSession;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
...
@@ -50,15 +48,9 @@ public class ServiceXS3002 extends ServiceEPBase {
...
@@ -50,15 +48,9 @@ public class ServiceXS3002 extends ServiceEPBase {
*/
*/
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
try
{
try
{
Map
queryMap
=
new
HashMap
();
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
DEPT_CODE_BLOCK_ID
));
queryMap
.
put
(
"orgType"
,
OrgTypeEnum
.
DEPT
.
getCode
());
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
FACTORY_CODE_BLOCK_ID
));
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
DEPT_CODE_BLOCK_ID
),
queryMap
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_CODE_BLOCK_ID
));
queryMap
=
new
HashMap
();
queryMap
.
put
(
"orgType"
,
OrgTypeEnum
.
FACTORY
.
getCode
());
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
FACTORY_CODE_BLOCK_ID
),
queryMap
);
queryMap
=
new
HashMap
();
queryMap
.
put
(
"orgType"
,
OrgTypeEnum
.
COMPANY
.
getCode
());
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_CODE_BLOCK_ID
),
queryMap
);
}
catch
(
PlatException
e
)
{
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
}
...
...
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