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
fc93070f
Commit
fc93070f
authored
Aug 29, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-08-29 文档库
parent
2ed3b447
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
148 additions
and
3 deletions
+148
-3
HGWD001.java
src/main/java/com/baosight/hggp/hg/wd/domain/HGWD001.java
+47
-0
ServiceHGWD001.java
.../java/com/baosight/hggp/hg/wd/service/ServiceHGWD001.java
+21
-0
HGWD001.xml
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD001.xml
+75
-1
HGWDTools.java
src/main/java/com/baosight/hggp/hg/wd/tools/HGWDTools.java
+5
-2
HGWD001.js
src/main/webapp/HG/WD/HGWD001.js
+0
-0
HGWD001.jsp
src/main/webapp/HG/WD/HGWD001.jsp
+0
-0
No files found.
src/main/java/com/baosight/hggp/hg/wd/domain/HGWD001.java
View file @
fc93070f
...
...
@@ -35,6 +35,8 @@ public class HGWD001 extends DaoEPBase {
public
static
final
String
FIELD_COMPANY_NAME
=
"companyName"
;
/* 公司名称*/
public
static
final
String
FIELD_PROJ_CODE
=
"projCode"
;
/* 项目编码*/
public
static
final
String
FIELD_PROJ_NAME
=
"projName"
;
/* 项目名称*/
public
static
final
String
FIELD_LEAF_LEVEL
=
"leafLevel"
;
/* 节点层级*/
public
static
final
String
FIELD_PARENT_ID
=
"parentId"
;
/* 父级ID*/
public
static
final
String
FIELD_FILE_ID
=
"fileId"
;
/* 文件ID*/
public
static
final
String
FIELD_FILE_TYPE
=
"fileType"
;
/* 文件类型*/
public
static
final
String
FIELD_FILE_NAME
=
"fileName"
;
/* 文件名称*/
...
...
@@ -86,6 +88,8 @@ public class HGWD001 extends DaoEPBase {
private
String
companyName
=
" "
;
/* 公司名称*/
private
String
projCode
=
" "
;
/* 项目编码*/
private
String
projName
=
" "
;
/* 项目名称*/
private
Integer
leafLevel
=
new
Integer
(
0
);
private
String
parentId
=
" "
;
private
String
fileId
=
" "
;
/* 文件ID*/
private
String
fileType
=
" "
;
/* 文件类型*/
private
String
fileName
=
" "
;
/* 文件名称*/
...
...
@@ -157,6 +161,14 @@ public class HGWD001 extends DaoEPBase {
eiColumn
.
setDescName
(
"项目名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_LEAF_LEVEL
);
eiColumn
.
setDescName
(
"节点层级"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PARENT_ID
);
eiColumn
.
setDescName
(
"父级ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_FILE_ID
);
eiColumn
.
setDescName
(
"文件ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
...
...
@@ -419,6 +431,37 @@ public class HGWD001 extends DaoEPBase {
public
void
setProjName
(
String
projName
)
{
this
.
projName
=
projName
;
}
/**
* get the leafLevel - 层级
* @return 层级
*/
public
Integer
getLeafLevel
()
{
return
leafLevel
;
}
/**
* set the leafLevel - 层级
* @param leafLevel - 层级
*/
public
void
setLeafLevel
(
Integer
leafLevel
)
{
this
.
leafLevel
=
leafLevel
;
}
/**
* get the parentId - 父级
* @return 父级
*/
public
String
getParentId
()
{
return
parentId
;
}
/**
* set the parentId - 层级
* @param parentId - 层级
*/
public
void
setParentId
(
String
parentId
)
{
this
.
parentId
=
parentId
;
}
/**
* get the fileId - 文件ID.
* @return the fileId
...
...
@@ -553,6 +596,8 @@ public class HGWD001 extends DaoEPBase {
setCompanyName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_COMPANY_NAME
)),
companyName
));
setProjCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PROJ_CODE
)),
projCode
));
setProjName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PROJ_NAME
)),
projName
));
setLeafLevel
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_LEAF_LEVEL
)),
leafLevel
));
setParentId
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PARENT_ID
)),
parentId
));
setFileId
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_FILE_ID
)),
fileId
));
setFileType
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_FILE_TYPE
)),
fileType
));
setFileName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_FILE_NAME
)),
fileName
));
...
...
@@ -583,6 +628,8 @@ public class HGWD001 extends DaoEPBase {
map
.
put
(
FIELD_COMPANY_NAME
,
StringUtils
.
toString
(
companyName
,
eiMetadata
.
getMeta
(
FIELD_COMPANY_NAME
)));
map
.
put
(
FIELD_PROJ_CODE
,
StringUtils
.
toString
(
projCode
,
eiMetadata
.
getMeta
(
FIELD_PROJ_CODE
)));
map
.
put
(
FIELD_PROJ_NAME
,
StringUtils
.
toString
(
projName
,
eiMetadata
.
getMeta
(
FIELD_PROJ_NAME
)));
map
.
put
(
FIELD_LEAF_LEVEL
,
StringUtils
.
toString
(
leafLevel
,
eiMetadata
.
getMeta
(
FIELD_LEAF_LEVEL
)));
map
.
put
(
FIELD_PARENT_ID
,
StringUtils
.
toString
(
parentId
,
eiMetadata
.
getMeta
(
FIELD_PARENT_ID
)));
map
.
put
(
FIELD_FILE_ID
,
StringUtils
.
toString
(
fileId
,
eiMetadata
.
getMeta
(
FIELD_FILE_ID
)));
map
.
put
(
FIELD_FILE_TYPE
,
StringUtils
.
toString
(
fileType
,
eiMetadata
.
getMeta
(
FIELD_FILE_TYPE
)));
map
.
put
(
FIELD_FILE_NAME
,
StringUtils
.
toString
(
fileName
,
eiMetadata
.
getMeta
(
FIELD_FILE_NAME
)));
...
...
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD001.java
View file @
fc93070f
...
...
@@ -212,5 +212,26 @@ public class ServiceHGWD001 extends ServiceEPBase {
return
inInfo
;
}
//树查询服务
public
EiInfo
queryTreeNode
(
EiInfo
inInfo
)
{
Map
queryRow
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
String
node
=
MapUtils
.
getString
(
queryRow
,
"fileId"
);
//获取物料详情数据
String
projCode
=
inInfo
.
getString
(
"projCode"
);
String
companyCode
=
inInfo
.
getString
(
"companyCode"
);
String
parentId
=
inInfo
.
getString
(
"parentId"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"companyCode"
,
StringUtils
.
isNotBlank
(
companyCode
)
?
companyCode
:
"null"
);
queryMap
.
put
(
"projCode"
,
StringUtils
.
isNotBlank
(
projCode
)
?
projCode
:
"null"
);
queryMap
.
put
(
"parentId"
,
StringUtils
.
isNotBlank
(
parentId
)
?
parentId
:
"null"
);
queryMap
.
put
(
"pEname"
,
"$"
.
equals
(
node
)
?
"root"
:
node
);
//2 查询节点
List
rows
=
dao
.
query
(
"HGWD001.queryTree"
,
queryMap
);
//3 增加节点block块
EiInfo
outInfo
=
new
EiInfo
();
EiBlock
outBlock
=
outInfo
.
addBlock
(
node
);
outBlock
.
addRows
(
rows
);
return
outInfo
;
}
}
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD001.xml
View file @
fc93070f
...
...
@@ -17,6 +17,8 @@
COMPANY_NAME as "companyName",
<!-- 公司名称 -->
PROJ_CODE as "projCode",
<!-- 项目编码 -->
PROJ_NAME as "projName",
<!-- 项目名称 -->
LEAF_LEVEL as "leafLevel",
<!--节点层级-->
PARENT_ID as "parentId",
<!--父级ID-->
FILE_ID as "fileId",
<!-- 文件ID -->
FILE_TYPE as "fileType",
<!-- 文件类型 -->
FILE_NAME as "fileName",
<!-- 文件名称 -->
...
...
@@ -69,6 +71,12 @@
<isNotEmpty
prepend=
" AND "
property=
"projName"
>
PROJ_NAME LIKE CONCAT('%', #projName#, '%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"leafLevel"
>
LEAF_LEVEL = #leafLevel#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"parentId"
>
PARENT_ID = #parentId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"fileId"
>
FILE_ID = #fileId#
</isNotEmpty>
...
...
@@ -130,6 +138,8 @@
COMPANY_NAME,
<!-- 公司名称 -->
PROJ_CODE,
<!-- 项目编码 -->
PROJ_NAME,
<!-- 项目名称 -->
LEAF_LEVEL,
<!--节点层级-->
PARENT_ID,
<!--父级ID-->
FILE_ID,
<!-- 文件ID -->
FILE_TYPE,
<!-- 文件类型 -->
FILE_NAME,
<!-- 文件名称 -->
...
...
@@ -139,7 +149,7 @@
RELEASE_DATE
) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #companyCode#, #companyName#, #projCode#, #projName#,
#deleteFlag#, #companyCode#, #companyName#, #projCode#, #projName#,
#leafLevel#,#parentId#
#fileId#, #fileType#, #fileName#,
#docVersion#, #status#, #remark#, #releaseDate#
<selectKey
resultClass=
"long"
keyProperty=
"id"
>
...
...
@@ -185,4 +195,68 @@
WHERE ID = #id#
</update>
<select
id=
"queryTree"
resultClass=
"java.util.HashMap"
>
SELECT
COMPANY_CODE as "companyCode",
<!-- 公司编码 -->
COMPANY_NAME as "companyName",
<!-- 公司名称 -->
PROJ_CODE as "projCode",
<!-- 项目编码 -->
PROJ_NAME as "projName",
<!-- 项目名称 -->
LEAF_LEVEL as "leafLevel",
<!--节点层级-->
PARENT_ID as "pId",
<!--父级ID-->
FILE_ID as "fileId",
<!-- 文件ID -->
FILE_TYPE as "fileType",
<!-- 文件类型 -->
FILE_NAME as "fileName"
<!-- 文件名称 -->
FROM ${hggpSchema}.HGWD001
WHERE 1=1
<isNotEmpty
prepend=
" AND "
property=
"pEname"
>
PARENT_ID = #pEname#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projCode"
>
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"parentId"
>
PARENT_ID = #parentId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"fileId"
>
FILE_ID = #fileId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"leafLevel"
>
LEAF_LEVEL = #leafLevel#
</isNotEmpty>
ORDER BY CREATED_TIME DESC
</select>
<!-- 组织机构子节点树查询 -->
<select
id=
"queryOrganiation"
resultClass=
"java.util.HashMap"
>
SELECT
A.FILE_ID as "label",
A.FILE_ID as "ename",
A.FILE_NAME as "text",
A.FILE_TYPE as "leaf",
A.FILE_TYPE as "type",
A.PARENT_ID as "parentId",
A.DELETE_FLAG as "isDeleted"
FROM ${hggpSchema}.HGWD001 A INNER JOIN ${hggpSchema}.HGWD003 B ON A.FILE_ID = B.FILE_ID
WHERE 1=1
<isEmpty
prepend=
" AND "
property=
"deletedQuery"
>
A.DELETE_FLAG = '0'
</isEmpty>
<isNotEmpty
prepend=
" AND "
property=
"node"
>
A.PARENT_ID = #node#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
A.ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"userId"
>
B.USER_ID = #userId#
</isNotEmpty>
order by A.CREATED_TIME asc
</select>
</sqlMap>
src/main/java/com/baosight/hggp/hg/wd/tools/HGWDTools.java
View file @
fc93070f
...
...
@@ -30,9 +30,12 @@ public class HGWDTools {
* @return
*/
public
static
HGWD001
get
(
String
fileId
)
{
AssertUtils
.
isEmpty
(
fileId
,
"文件ID不能为空"
);
//
AssertUtils.isEmpty(fileId, "文件ID不能为空");
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
HGWD001
.
FIELD_FILE_ID
,
fileId
);
if
(
fileId
!=
null
)
{
queryMap
.
put
(
HGWD001
.
FIELD_FILE_ID
,
fileId
);
}
List
<
HGWD001
>
results
=
DaoBase
.
getInstance
().
query
(
HGWD001
.
QUERY
,
queryMap
);
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
.
get
(
0
);
}
...
...
src/main/webapp/HG/WD/HGWD001.js
View file @
fc93070f
This diff is collapsed.
Click to expand it.
src/main/webapp/HG/WD/HGWD001.jsp
View file @
fc93070f
This diff is collapsed.
Click to expand it.
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