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
c57c8f92
Commit
c57c8f92
authored
Oct 15, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-10-15 文档库,按文件夹批量复制,能复制到文件夹子集
parent
b388ccc0
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
202 additions
and
54 deletions
+202
-54
HgWdSqlConstant.java
...ava/com/baosight/hggp/hg/wd/constant/HgWdSqlConstant.java
+2
-0
ServiceHGWD001.java
.../java/com/baosight/hggp/hg/wd/service/ServiceHGWD001.java
+40
-12
ServiceHGWD001D.java
...java/com/baosight/hggp/hg/wd/service/ServiceHGWD001D.java
+11
-0
HGWD001.xml
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD001.xml
+59
-4
HGWD001.js
src/main/webapp/HG/WD/HGWD001.js
+46
-25
HGWD001.jsp
src/main/webapp/HG/WD/HGWD001.jsp
+44
-13
No files found.
src/main/java/com/baosight/hggp/hg/wd/constant/HgWdSqlConstant.java
View file @
c57c8f92
...
@@ -22,6 +22,8 @@ public class HgWdSqlConstant {
...
@@ -22,6 +22,8 @@ public class HgWdSqlConstant {
public
static
final
String
SEARCH_TREE_NODE
=
"HGWD001.searchTreeNode"
;
public
static
final
String
SEARCH_TREE_NODE
=
"HGWD001.searchTreeNode"
;
// 修改项目
// 修改项目
public
static
final
String
UPDATE_PROJECT
=
"HGWD001.updateProject"
;
public
static
final
String
UPDATE_PROJECT
=
"HGWD001.updateProject"
;
// 查询所以
public
static
final
String
QUERY_ALL
=
"HGWD001.queryAll"
;
}
}
/**
/**
...
...
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD001.java
View file @
c57c8f92
...
@@ -58,6 +58,12 @@ public class ServiceHGWD001 extends ServiceEPBase {
...
@@ -58,6 +58,12 @@ public class ServiceHGWD001 extends ServiceEPBase {
@Override
@Override
public
EiInfo
query
(
EiInfo
inInfo
)
{
public
EiInfo
query
(
EiInfo
inInfo
)
{
Map
queryRow
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
// 未选择文件目录时,返回空
String
fileId
=
MapUtils
.
getString
(
queryRow
,
HGWD001
.
FIELD_FILE_ID
);
if
(
StringUtils
.
isBlank
(
fileId
))
{
return
inInfo
;
}
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGWD001
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGWD001
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
return
super
.
query
(
inInfo
,
HGWD001
.
QUERY
,
new
HGWD001
());
return
super
.
query
(
inInfo
,
HGWD001
.
QUERY
,
new
HGWD001
());
}
}
...
@@ -394,7 +400,7 @@ public class ServiceHGWD001 extends ServiceEPBase {
...
@@ -394,7 +400,7 @@ public class ServiceHGWD001 extends ServiceEPBase {
if
(!
HgWdUtils
.
HgWd009
.
isManager
(
userId
))
{
if
(!
HgWdUtils
.
HgWd009
.
isManager
(
userId
))
{
queryRow
.
put
(
User
.
FIELD_USER_ID
,
userId
);
queryRow
.
put
(
User
.
FIELD_USER_ID
,
userId
);
}
}
return
super
.
query
(
inInfo
,
HGWD001
.
QUERY
,
new
HGWD001
(),
false
,
new
HGWD001
().
eiMetadata
,
"inqu_status1"
,
inInfo
=
super
.
query
(
inInfo
,
HGWD001
.
QUERY
,
new
HGWD001
(),
false
,
new
HGWD001
().
eiMetadata
,
"inqu_status1"
,
"result1"
,
"result1"
,
null
);
"result1"
,
"result1"
,
null
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LogUtils
.
setMsg
(
inInfo
,
e
,
"查询失败"
);
LogUtils
.
setMsg
(
inInfo
,
e
,
"查询失败"
);
...
@@ -443,7 +449,7 @@ public class ServiceHGWD001 extends ServiceEPBase {
...
@@ -443,7 +449,7 @@ public class ServiceHGWD001 extends ServiceEPBase {
}
}
/**
/**
* 复制
项目
列表
* 复制
目录
列表
*
*
* @param inInfo
* @param inInfo
* @return
* @return
...
@@ -457,7 +463,7 @@ public class ServiceHGWD001 extends ServiceEPBase {
...
@@ -457,7 +463,7 @@ public class ServiceHGWD001 extends ServiceEPBase {
if
(!
HgWdUtils
.
HgWd009
.
isManager
(
userId
))
{
if
(!
HgWdUtils
.
HgWd009
.
isManager
(
userId
))
{
queryRow
.
put
(
User
.
FIELD_USER_ID
,
userId
);
queryRow
.
put
(
User
.
FIELD_USER_ID
,
userId
);
}
}
return
super
.
query
(
inInfo
,
HGWD001
.
QUERY
,
new
HGWD001
(),
false
,
new
HGWD001
().
eiMetadata
,
"inqu_status2"
,
inInfo
=
super
.
query
(
inInfo
,
HGWD001
.
QUERY
,
new
HGWD001
(),
false
,
new
HGWD001
().
eiMetadata
,
"inqu_status2"
,
"result2"
,
"result2"
,
null
);
"result2"
,
"result2"
,
null
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LogUtils
.
setMsg
(
inInfo
,
e
,
"查询失败"
);
LogUtils
.
setMsg
(
inInfo
,
e
,
"查询失败"
);
...
@@ -465,26 +471,47 @@ public class ServiceHGWD001 extends ServiceEPBase {
...
@@ -465,26 +471,47 @@ public class ServiceHGWD001 extends ServiceEPBase {
return
inInfo
;
return
inInfo
;
}
}
public
EiInfo
queryDetail2
(
EiInfo
inInfo
)
{
try
{
Map
queryRow
=
EiInfoUtils
.
getFirstRow
(
inInfo
,
"inqu_status2"
);
queryRow
.
put
(
HGWD001
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
// 非管理员仅查询自己有权限的项目
String
userId
=
UserSessionUtils
.
getLoginName
();
if
(!
HgWdUtils
.
HgWd009
.
isManager
(
userId
))
{
queryRow
.
put
(
User
.
FIELD_USER_ID
,
userId
);
}
inInfo
=
super
.
query
(
inInfo
,
HgWdSqlConstant
.
HgWd001
.
QUERY_ALL
,
new
HGWD001
(),
false
,
new
HGWD001
().
eiMetadata
,
"inqu_status2"
,
"detail2"
,
"detail2"
,
null
);
}
catch
(
Exception
e
)
{
LogUtils
.
setMsg
(
inInfo
,
e
,
"查询失败"
);
}
return
inInfo
;
}
@OperationLogAnnotation
(
operModul
=
"文档库"
,
operType
=
"复制项目"
,
operDesc
=
"文档库-复制项目-复制项目操作"
)
@OperationLogAnnotation
(
operModul
=
"文档库"
,
operType
=
"复制项目"
,
operDesc
=
"文档库-复制项目-复制项目操作"
)
public
EiInfo
save2
(
EiInfo
inInfo
)
{
public
EiInfo
save2
(
EiInfo
inInfo
)
{
try
{
try
{
Map
<
String
,
String
>
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
,
EiConstant
.
queryBlock
);
Map
<
String
,
String
>
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
,
EiConstant
.
queryBlock
);
List
<
HGWD001
>
result1Rows
=
MapUtils
.
toDaoEPBases
(
inInfo
.
getBlock
(
"result2"
).
getRows
(),
HGWD001
.
class
);
//来源目录
List
<
HGWD001
>
hgwd001List
=
HGWDTools
.
HgWd001
.
queryByParentId
(
queryMap
.
get
(
HGWD001
.
FIELD_PROJ_CODE
),
List
<
HGWD001
>
result2Rows
=
MapUtils
.
toDaoEPBases
(
inInfo
.
getBlock
(
"result2"
).
getRows
(),
HGWD001
.
class
);
//目标目录
List
<
HGWD001
>
detail2Rows
=
MapUtils
.
toDaoEPBases
(
inInfo
.
getBlock
(
"detail2"
).
getRows
(),
HGWD001
.
class
);
/*List<HGWD001> hgwd001List = HGWDTools.HgWd001.queryByParentId(queryMap.get(HGWD001.FIELD_PROJ_CODE),
queryMap.get(HGWD001.FIELD_PARENT_ID));
queryMap.get(HGWD001.FIELD_PARENT_ID));
if (queryMap.get("leafType").equals(HgWdConstant.LeafType.P)) {
if (queryMap.get("leafType").equals(HgWdConstant.LeafType.P)) {
hgwd001List = HGWDTools.HgWd001.queryByProjCode(queryMap.get(HGWD001.FIELD_PROJ_CODE),
hgwd001List = HGWDTools.HgWd001.queryByProjCode(queryMap.get(HGWD001.FIELD_PROJ_CODE),
queryMap.get(HGWD001.FIELD_PARENT_ID));
queryMap.get(HGWD001.FIELD_PARENT_ID));
}
}
*/
// 要复制
项目
// 要复制
目录集合
if
(
Objects
.
nonNull
(
detail2Rows
)){
String
parentId
=
result1Rows
.
get
(
0
).
getParentId
();
String
parentId
=
detail2Rows
.
get
(
0
).
getFileId
().
length
()>
0
?
detail2Rows
.
get
(
0
).
getFileId
():
detail2Rows
.
get
(
0
).
getProjCode
();
if
(!
StringUtils
.
isNull
(
hgwd001List
))
{
if
(!
StringUtils
.
isNull
(
result2Rows
))
{
hgwd001List
.
forEach
(
hgwd001
->
{
result2Rows
.
forEach
(
hgwd001
->
{
hgwd001
.
setParentId
(
parentId
);
hgwd001
.
setParentId
(
parentId
);
});
});
// 查询添加子节点
// 查询添加子节点
addNode
(
hgwd001List
);
addNode
(
result2Rows
);
}
}
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
...
@@ -497,6 +524,7 @@ public class ServiceHGWD001 extends ServiceEPBase {
...
@@ -497,6 +524,7 @@ public class ServiceHGWD001 extends ServiceEPBase {
public
void
addNode
(
List
<
HGWD001
>
hgwd001List
)
{
public
void
addNode
(
List
<
HGWD001
>
hgwd001List
)
{
List
<
String
>
fileIds
=
hgwd001List
.
stream
().
map
(
HGWD001:
:
getFileId
).
collect
(
Collectors
.
toList
());
List
<
String
>
fileIds
=
hgwd001List
.
stream
().
map
(
HGWD001:
:
getFileId
).
collect
(
Collectors
.
toList
());
//查询子级目录
List
<
HGWD001
>
hgwd001s
=
HGWDTools
.
HgWd001
.
listByParentIds
(
fileIds
);
List
<
HGWD001
>
hgwd001s
=
HGWDTools
.
HgWd001
.
listByParentIds
(
fileIds
);
for
(
HGWD001
hgwd001
:
hgwd001List
)
{
for
(
HGWD001
hgwd001
:
hgwd001List
)
{
String
fileId
=
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
WD_FILE_ID
);
String
fileId
=
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
WD_FILE_ID
);
...
...
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD001D.java
View file @
c57c8f92
...
@@ -8,6 +8,7 @@ import com.baosight.hggp.hg.sc.domain.HGSC001;
...
@@ -8,6 +8,7 @@ import com.baosight.hggp.hg.sc.domain.HGSC001;
import
com.baosight.hggp.hg.sc.enums.ProjectSourceEnum
;
import
com.baosight.hggp.hg.sc.enums.ProjectSourceEnum
;
import
com.baosight.hggp.hg.wd.constant.HgWdConstant
;
import
com.baosight.hggp.hg.wd.constant.HgWdConstant
;
import
com.baosight.hggp.hg.wd.domain.HGWD001
;
import
com.baosight.hggp.hg.wd.domain.HGWD001
;
import
com.baosight.hggp.hg.wd.domain.HGWD003
;
import
com.baosight.hggp.hg.wd.tools.HGWDTools
;
import
com.baosight.hggp.hg.wd.tools.HGWDTools
;
import
com.baosight.hggp.hg.wd.utils.HgWdUtils
;
import
com.baosight.hggp.hg.wd.utils.HgWdUtils
;
import
com.baosight.hggp.util.EiInfoUtils
;
import
com.baosight.hggp.util.EiInfoUtils
;
...
@@ -31,6 +32,7 @@ import java.util.HashMap;
...
@@ -31,6 +32,7 @@ import java.util.HashMap;
import
java.util.Iterator
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
/**
* @author LiuYang
* @author LiuYang
...
@@ -273,14 +275,19 @@ public class ServiceHGWD001D extends TreeService {
...
@@ -273,14 +275,19 @@ public class ServiceHGWD001D extends TreeService {
if
(
CollectionUtils
.
isEmpty
(
dbSc001s
))
{
if
(
CollectionUtils
.
isEmpty
(
dbSc001s
))
{
return
results
;
return
results
;
}
}
List
<
String
>
projCodes
=
dbSc001s
.
stream
().
map
(
HGSC001:
:
getProjCode
).
distinct
().
collect
(
Collectors
.
toList
());
List
<
HGWD003
>
hgwd003s
=
HGWDTools
.
HgWd003
.
list
(
projCodes
);
for
(
HGSC001
dbSc001
:
dbSc001s
)
{
for
(
HGSC001
dbSc001
:
dbSc001s
)
{
String
text
=
dbSc001
.
getProjName
()
+
"("
+
dbSc001
.
getProjCode
()
+
")"
;
String
text
=
dbSc001
.
getProjName
()
+
"("
+
dbSc001
.
getProjCode
()
+
")"
;
Map
leafMap
=
buildLeaf
(
parentId
,
dbSc001
.
getProjCode
(),
text
,
HgWdConstant
.
LeafType
.
P
);
Map
leafMap
=
buildLeaf
(
parentId
,
dbSc001
.
getProjCode
(),
text
,
HgWdConstant
.
LeafType
.
P
);
Long
count
=
hgwd003s
.
stream
().
filter
(
hgwd003
->
hgwd003
.
getFileId
().
equals
(
dbSc001
.
getProjCode
())).
count
();
leafMap
.
put
(
"projCode"
,
dbSc001
.
getProjCode
());
leafMap
.
put
(
"projCode"
,
dbSc001
.
getProjCode
());
leafMap
.
put
(
"projName"
,
dbSc001
.
getProjName
());
leafMap
.
put
(
"projName"
,
dbSc001
.
getProjName
());
leafMap
.
put
(
"ename"
,
dbSc001
.
getProjCode
());
leafMap
.
put
(
"ename"
,
dbSc001
.
getProjCode
());
leafMap
.
put
(
"type"
,
"1"
);
leafMap
.
put
(
"type"
,
"1"
);
leafMap
.
put
(
"leafLevel"
,
"0"
);
leafMap
.
put
(
"leafLevel"
,
"0"
);
leafMap
.
put
(
"count"
,
count
);
results
.
add
(
leafMap
);
results
.
add
(
leafMap
);
}
}
// 设置叶子节点
// 设置叶子节点
...
@@ -303,13 +310,17 @@ public class ServiceHGWD001D extends TreeService {
...
@@ -303,13 +310,17 @@ public class ServiceHGWD001D extends TreeService {
if
(
CollectionUtils
.
isEmpty
(
dbWd001s
))
{
if
(
CollectionUtils
.
isEmpty
(
dbWd001s
))
{
return
results
;
return
results
;
}
}
List
<
String
>
fileIds
=
dbWd001s
.
stream
().
map
(
HGWD001:
:
getFileId
).
distinct
().
collect
(
Collectors
.
toList
());
List
<
HGWD003
>
hgwd003s
=
HGWDTools
.
HgWd003
.
list
(
fileIds
);
for
(
HGWD001
dbWd001
:
dbWd001s
)
{
for
(
HGWD001
dbWd001
:
dbWd001s
)
{
Map
leafMap
=
buildLeaf
(
parentId
,
dbWd001
.
getFileId
(),
dbWd001
.
getFileName
(),
HgWdConstant
.
LeafType
.
C
);
Map
leafMap
=
buildLeaf
(
parentId
,
dbWd001
.
getFileId
(),
dbWd001
.
getFileName
(),
HgWdConstant
.
LeafType
.
C
);
Long
count
=
hgwd003s
.
stream
().
filter
(
hgwd003
->
hgwd003
.
getFileId
().
equals
(
dbWd001
.
getFileId
())).
count
();
leafMap
.
put
(
"projCode"
,
dbWd001
.
getProjCode
());
leafMap
.
put
(
"projCode"
,
dbWd001
.
getProjCode
());
leafMap
.
put
(
"projName"
,
dbWd001
.
getProjName
());
leafMap
.
put
(
"projName"
,
dbWd001
.
getProjName
());
leafMap
.
put
(
"ename"
,
dbWd001
.
getProjCode
());
leafMap
.
put
(
"ename"
,
dbWd001
.
getProjCode
());
leafMap
.
put
(
"type"
,
dbWd001
.
getFileType
());
leafMap
.
put
(
"type"
,
dbWd001
.
getFileType
());
leafMap
.
put
(
"leafLevel"
,
dbWd001
.
getLeafLevel
());
leafMap
.
put
(
"leafLevel"
,
dbWd001
.
getLeafLevel
());
leafMap
.
put
(
"count"
,
count
);
results
.
add
(
leafMap
);
results
.
add
(
leafMap
);
}
}
// 设置叶子节点
// 设置叶子节点
...
...
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD001.xml
View file @
c57c8f92
...
@@ -31,17 +31,17 @@
...
@@ -31,17 +31,17 @@
<sql
id=
"condition"
>
<sql
id=
"condition"
>
AND DELETE_FLAG = 0
AND DELETE_FLAG = 0
<
include
refid=
"HGXSDataAuth.authCondition"
/>
include refid="HGXSDataAuth.authCondition"/>
<include
refid=
"customCondition"
/>
<include
refid=
"customCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
ID = #id#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
<
!--<
isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
DEP_CODE = #depCode#
</isNotEmpty>
</isNotEmpty>
-->
<isNotEmpty
prepend=
" AND "
property=
"createdBy"
>
<isNotEmpty
prepend=
" AND "
property=
"createdBy"
>
CREATED_BY = #createdBy#
CREATED_BY = #createdBy#
</isNotEmpty>
</isNotEmpty>
...
@@ -67,7 +67,7 @@
...
@@ -67,7 +67,7 @@
COMPANY_NAME LIKE CONCAT('%', #companyName#, '%')
COMPANY_NAME LIKE CONCAT('%', #companyName#, '%')
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projCode"
>
<isNotEmpty
prepend=
" AND "
property=
"projCode"
>
PROJ_CODE
= #projCode#
PROJ_CODE
like concat('%', #projCode#, '%')
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projName"
>
<isNotEmpty
prepend=
" AND "
property=
"projName"
>
PROJ_NAME LIKE CONCAT('%', #projName#, '%')
PROJ_NAME LIKE CONCAT('%', #projName#, '%')
...
@@ -279,6 +279,9 @@
...
@@ -279,6 +279,9 @@
FILE_NAME as "fileName"
<!-- 文件名称 -->
FILE_NAME as "fileName"
<!-- 文件名称 -->
FROM ${hggpSchema}.HGWD001
FROM ${hggpSchema}.HGWD001
WHERE 1=1
WHERE 1=1
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"pEname"
>
<isNotEmpty
prepend=
" AND "
property=
"pEname"
>
PARENT_ID = #pEname#
PARENT_ID = #pEname#
</isNotEmpty>
</isNotEmpty>
...
@@ -370,4 +373,56 @@
...
@@ -370,4 +373,56 @@
WHERE PROJ_CODE = #projCode#
WHERE PROJ_CODE = #projCode#
</update>
</update>
<select
id=
"queryAll"
resultClass=
"com.baosight.hggp.hg.wd.domain.HGWD001"
>
select
PROJ_CODE as "projCode",
<!-- 项目编码 -->
PROJ_NAME as "projName",
<!-- 项目名称 -->
PROJECT_SOURCE as "projectSource",
<!-- 项目来源 -->
PARENT_ID as "parentId",
<!--父级ID-->
FILE_ID as "fileId",
<!-- 文件ID -->
FILE_TYPE as "fileType",
<!-- 文件类型 -->
FILE_NAME as "fileName"
<!-- 文件名称 -->
from (
SELECT
PROJ_CODE,
<!-- 项目编码 -->
PROJ_NAME,
<!-- 项目名称 -->
PROJECT_SOURCE,
<!-- 项目来源 -->
PROJ_CODE as "PARENT_ID",
<!--父级ID-->
'' as "FILE_ID",
<!-- 文件ID -->
'' as "FILE_TYPE",
<!-- 文件类型 -->
'' as "FILE_NAME"
<!-- 文件名称 -->
FROM ${hggpSchema}.HGSC001 T WHERE 1=1
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"depCode"
>
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projCode"
>
proj_code like concat('%', #projCode#, '%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projName"
>
proj_name like concat('%', #projName#, '%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"userId"
>
EXISTS (SELECT FILE_ID FROM ${hggpSchema}.HGWD003 M WHERE T.PROJ_CODE = M.FILE_ID
AND M.USER_ID = #userId#
)
</isNotEmpty>
union all
SELECT
PROJ_CODE,
<!-- 项目编码 -->
PROJ_NAME,
<!-- 项目名称 -->
PROJECT_SOURCE,
<!-- 项目来源 -->
PARENT_ID,
<!--父级ID-->
FILE_ID,
<!-- 文件ID -->
FILE_TYPE,
<!-- 文件类型 -->
FILE_NAME
<!-- 文件名称 -->
FROM ${hggpSchema}.HGWD001 T WHERE 1=1
<include
refid=
"condition"
/>
) a
order by a.PROJ_CODE DESC, a.PARENT_ID asc
</select>
</sqlMap>
</sqlMap>
src/main/webapp/HG/WD/HGWD001.js
View file @
c57c8f92
...
@@ -18,7 +18,8 @@ $(function () {
...
@@ -18,7 +18,8 @@ $(function () {
result1Grid
.
dataSource
.
page
(
1
);
result1Grid
.
dataSource
.
page
(
1
);
});
});
$
(
"#QUERY2"
).
on
(
"click"
,
function
(
e
)
{
$
(
"#QUERY2"
).
on
(
"click"
,
function
(
e
)
{
result2Grid
.
dataSource
.
page
(
1
);
//result2Grid.dataSource.page(1);
detail2Grid
.
dataSource
.
page
(
1
);
});
});
// 分割线组件
// 分割线组件
(
function
()
{
(
function
()
{
...
@@ -119,13 +120,20 @@ $(function () {
...
@@ -119,13 +120,20 @@ $(function () {
template
:
function
(
node
)
{
template
:
function
(
node
)
{
var
item
=
node
.
item
;
var
item
=
node
.
item
;
var
title
=
item
.
text
;
var
title
=
item
.
text
;
let
count
=
item
.
count
;
let
icon
=
'fa fa-globe'
let
icon
=
'fa fa-globe'
switch
(
item
.
leafType
)
{
switch
(
item
.
leafType
)
{
case
'P'
:
case
'P'
:
icon
=
'fa fa-clipboard'
icon
=
'fa fa-clipboard'
if
(
count
>
1
){
icon
=
'fa fa-clipboard text-success'
}
break
;
break
;
case
'C'
:
case
'C'
:
icon
=
'fa fa-folder'
icon
=
'fa fa-folder'
if
(
count
>
1
){
icon
=
'fa fa-folder text-success'
}
break
;
break
;
}
}
return
' <span class="'
+
icon
+
'" style="padding-right: 8px"> </span> <span class="titleClass" title="'
+
item
.
label
+
'">'
+
title
+
'</span>'
return
' <span class="'
+
icon
+
'" style="padding-right: 8px"> </span> <span class="titleClass" title="'
+
item
.
label
+
'">'
+
title
+
'</span>'
...
@@ -462,7 +470,7 @@ $(function () {
...
@@ -462,7 +470,7 @@ $(function () {
$
(
"#CHANGE_RECORD"
).
on
(
"click"
,
changeResord
);
$
(
"#CHANGE_RECORD"
).
on
(
"click"
,
changeResord
);
// 复制附件
// 复制附件
$
(
"#COPY_FILE"
).
on
(
"click"
,
copyFile
);
$
(
"#COPY_FILE"
).
on
(
"click"
,
copyFile
);
// 复制
文件
// 复制
目录
$
(
"#COPY_PROT_FILE"
).
on
(
"click"
,
copyProtFile
);
$
(
"#COPY_PROT_FILE"
).
on
(
"click"
,
copyProtFile
);
// 预览
// 预览
$
(
"#PREVIEW"
).
on
(
"click"
,
preview
);
$
(
"#PREVIEW"
).
on
(
"click"
,
preview
);
...
@@ -504,9 +512,23 @@ $(function () {
...
@@ -504,9 +512,23 @@ $(function () {
pageable
:
{
pageable
:
{
pageSize
:
10
,
pageSize
:
10
,
pageSizes
:
[
10
,
20
,
50
,
100
],
pageSizes
:
[
10
,
20
,
50
,
100
],
},
query
:
function
(
e
)
{
let
inEiInfo
=
new
EiInfo
();
let
fileId
=
IPLATUI
.
EFTree
.
categoryTree
.
selectTreeNode
.
fileId
;
inEiInfo
.
set
(
"inqu_status2-0-parentId"
,
fileId
);
return
inEiInfo
;
}
},
"detail2"
:{
exportGrid
:
false
,
// 隐藏右侧自定义导出按钮
pageable
:
{
pageSize
:
5
,
pageSizes
:
[
5
,
10
,
20
,
50
,
100
],
},
}
}
}
}
}
;
;
downKeyUp
();
downKeyUp
();
...
@@ -849,7 +871,7 @@ function changeResord() {
...
@@ -849,7 +871,7 @@ function changeResord() {
}
}
/**
/**
* 复制
文
件
* 复制
附
件
*/
*/
let
copyFile
=
function
()
{
let
copyFile
=
function
()
{
let
rowsDate
=
resultGrid
.
getCheckedRows
();
let
rowsDate
=
resultGrid
.
getCheckedRows
();
...
@@ -864,7 +886,7 @@ let copyFile = function () {
...
@@ -864,7 +886,7 @@ let copyFile = function () {
}
}
/**
/**
* 复制
文
件
* 复制
附
件
*/
*/
function
saveFunc
()
{
function
saveFunc
()
{
var
rows
=
result1Grid
.
getCheckedRows
();
var
rows
=
result1Grid
.
getCheckedRows
();
...
@@ -900,7 +922,7 @@ function saveFunc() {
...
@@ -900,7 +922,7 @@ function saveFunc() {
}
}
/**
/**
* 复制
项目
* 复制
目录
*/
*/
let
copyProtFile
=
function
()
{
let
copyProtFile
=
function
()
{
let
parentId
=
IPLATUI
.
EFTree
.
categoryTree
.
selectTreeNode
.
parentId
;
let
parentId
=
IPLATUI
.
EFTree
.
categoryTree
.
selectTreeNode
.
parentId
;
...
@@ -912,20 +934,26 @@ let copyProtFile = function () {
...
@@ -912,20 +934,26 @@ let copyProtFile = function () {
selectOrgWindow
.
data
(
"kendoWindow"
).
center
();
selectOrgWindow
.
data
(
"kendoWindow"
).
center
();
selectOrgWindow
.
data
(
"kendoWindow"
).
open
();
selectOrgWindow
.
data
(
"kendoWindow"
).
open
();
result2Grid
.
dataSource
.
page
(
1
);
result2Grid
.
dataSource
.
page
(
1
);
detail2Grid
.
dataSource
.
page
(
1
);
}
}
/**
/**
* 复制
项目
* 复制
目录
*/
*/
function
saveProtFunc
()
{
function
saveProtFunc
()
{
var
rows
=
result2Grid
.
getCheckedRows
();
let
resultRows
=
result2Grid
.
getCheckedRows
();
if
(
rows
.
length
==
0
)
{
let
detailRows
=
detail2Grid
.
getCheckedRows
();
message
(
"请勾选数据文件!"
);
if
(
resultRows
.
length
==
0
)
{
message
(
"请勾选来源项目目录文件!"
);
return
;
return
;
}
}
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据
\"
确认
\"
操作?"
,
{
if
(
detailRows
.
length
==
0
){
message
(
"请勾选目标项目目录文件!"
);
return
;
}
JSUtils
.
confirm
(
"确定对勾选中的["
+
resultRows
.
length
+
"]条数据
\"
确认
\"
操作?"
,
{
ok
:
function
()
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result2"
,
"HGWD001"
,
"save2"
,
true
,
JSUtils
.
submitGridsData
(
"result2
,detail2
"
,
"HGWD001"
,
"save2"
,
true
,
function
(
ei
)
{
function
(
ei
)
{
if
(
ei
.
getStatus
()
>=
0
)
{
if
(
ei
.
getStatus
()
>=
0
)
{
try
{
try
{
...
@@ -965,33 +993,26 @@ let isProjectManager = function (parentId) {
...
@@ -965,33 +993,26 @@ let isProjectManager = function (parentId) {
inEiInfo
.
set
(
"inqu_status-0-fileId"
,
parentId
);
inEiInfo
.
set
(
"inqu_status-0-fileId"
,
parentId
);
$
(
"#COPY_PROT_FILE"
).
show
();
$
(
"#COPY_PROT_FILE"
).
show
();
$
(
"#BATCH_DOWNLOAD"
).
show
();
$
(
"#BATCH_DOWNLOAD"
).
show
();
$
(
"#RELEASE"
).
show
();
$
(
"#UPLOAD_FILE"
).
show
();
$
(
"#COPY_FILE"
).
show
();
$
(
"#PREVIEW"
).
show
();
EiCommunicator
.
send
(
"HGWD001"
,
"queryProjectManager"
,
inEiInfo
,
{
EiCommunicator
.
send
(
"HGWD001"
,
"queryProjectManager"
,
inEiInfo
,
{
onSuccess
(
ei
)
{
onSuccess
(
ei
)
{
if
(
ei
.
status
!=
-
1
){
if
(
ei
.
status
!=
-
1
){
switch
(
ei
.
extAttr
.
isManager
)
{
switch
(
ei
.
extAttr
.
isManager
)
{
case
1
:
case
1
:
$
(
"#RELEASE"
).
show
();
$
(
"#UPLOAD_FILE"
).
show
();
$
(
"#COPY_FILE"
).
show
();
$
(
"#PREVIEW"
).
show
();
break
;
case
2
:
case
2
:
$
(
"#RELEASE"
).
show
();
break
$
(
"#UPLOAD_FILE"
).
show
();
$
(
"#COPY_FILE"
).
show
();
$
(
"#PREVIEW"
).
show
();
break
;
case
3
:
case
3
:
$
(
"#RELEASE"
).
hide
();
$
(
"#RELEASE"
).
hide
();
$
(
"#UPLOAD_FILE"
).
show
();
$
(
"#COPY_FILE"
).
show
();
$
(
"#PREVIEW"
).
show
();
break
break
default
:
default
:
$
(
"#RELEASE"
).
hide
();
$
(
"#RELEASE"
).
hide
();
$
(
"#UPLOAD_FILE"
).
hide
();
$
(
"#UPLOAD_FILE"
).
hide
();
$
(
"#COPY_FILE"
).
hide
();
$
(
"#COPY_FILE"
).
hide
();
$
(
"#PREVIEW"
).
hide
();
$
(
"#PREVIEW"
).
hide
();
$
(
"#COPY_PROT_FILE"
).
hide
();
}
}
}
}
}
}
...
...
src/main/webapp/HG/WD/HGWD001.jsp
View file @
c57c8f92
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
<EF:EFInput
cname=
"父级Id"
ename=
"orgParentId"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<EF:EFInput
cname=
"父级Id"
ename=
"orgParentId"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<EF:EFInput
cname=
"登录用户"
ename=
"userId"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
value=
"${loginName}"
type=
"hidden"
/>
<EF:EFInput
cname=
"登录用户"
ename=
"userId"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
value=
"${loginName}"
type=
"hidden"
/>
<EF:EFInput
cname=
"业务类型"
ename=
"bizType"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
value=
"WD"
/>
<EF:EFInput
cname=
"业务类型"
ename=
"bizType"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
value=
"WD"
/>
<EF:EFInput
cname=
"
文
件名称"
ename=
"docName"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
/>
<EF:EFInput
cname=
"
附
件名称"
ename=
"docName"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
/>
<EF:EFSelect
blockId=
"inqu_status"
row=
"0"
ename=
"status"
cname=
"状态"
colWidth=
"3"
>
<EF:EFSelect
blockId=
"inqu_status"
row=
"0"
ename=
"status"
cname=
"状态"
colWidth=
"3"
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFCodeOption
codeName=
"hggp.hgwd.status"
/>
<EF:EFCodeOption
codeName=
"hggp.hgwd.status"
/>
...
@@ -82,8 +82,8 @@
...
@@ -82,8 +82,8 @@
<EF:EFColumn
ename=
"id"
cname=
"ID"
hidden=
"true"
/>
<EF:EFColumn
ename=
"id"
cname=
"ID"
hidden=
"true"
/>
<EF:EFColumn
ename=
"docId"
cname=
"文件ID"
enable=
"false"
width=
"180"
hidden=
"true"
/>
<EF:EFColumn
ename=
"docId"
cname=
"文件ID"
enable=
"false"
width=
"180"
hidden=
"true"
/>
<EF:EFColumn
ename=
"operator"
cname=
"操作"
enable=
"false"
width=
"100"
align=
"center"
sort=
"false"
/>
<EF:EFColumn
ename=
"operator"
cname=
"操作"
enable=
"false"
width=
"100"
align=
"center"
sort=
"false"
/>
<EF:EFColumn
ename=
"docName"
cname=
"
文
件名称"
enable=
"false"
width=
"180"
/>
<EF:EFColumn
ename=
"docName"
cname=
"
附
件名称"
enable=
"false"
width=
"180"
/>
<EF:EFColumn
ename=
"docType"
cname=
"
文
件类型"
enable=
"false"
width=
"110"
align=
"center"
/>
<EF:EFColumn
ename=
"docType"
cname=
"
附
件类型"
enable=
"false"
width=
"110"
align=
"center"
/>
<EF:EFColumn
ename=
"docVersion"
cname=
"版本号"
enable=
"false"
width=
"90"
align=
"center"
sort=
"true"
/>
<EF:EFColumn
ename=
"docVersion"
cname=
"版本号"
enable=
"false"
width=
"90"
align=
"center"
sort=
"true"
/>
<EF:EFComboColumn
ename=
"status"
cname=
"状态"
enable=
"false"
width=
"100"
align=
"center"
<EF:EFComboColumn
ename=
"status"
cname=
"状态"
enable=
"false"
width=
"100"
align=
"center"
defaultValue=
"0"
hidden=
"false"
>
defaultValue=
"0"
hidden=
"false"
>
...
@@ -113,7 +113,7 @@
...
@@ -113,7 +113,7 @@
</div>
</div>
</EF:EFWindow>
</EF:EFWindow>
<
%
--
复制
选中文
件
--
%
>
<
%
--
复制
附
件
--
%
>
<EF:EFWindow
id=
"selectOrgWindow"
width=
"70%"
height=
"70%"
title=
"选择文档"
>
<EF:EFWindow
id=
"selectOrgWindow"
width=
"70%"
height=
"70%"
title=
"选择文档"
>
<EF:EFRegion
id=
"inqu1"
title=
"查询条件"
>
<EF:EFRegion
id=
"inqu1"
title=
"查询条件"
>
<div
class=
"row"
>
<div
class=
"row"
>
...
@@ -148,31 +148,62 @@
...
@@ -148,31 +148,62 @@
</EF:EFRegion>
</EF:EFRegion>
</EF:EFWindow>
</EF:EFWindow>
<
%
--
复制
项目下的所以文件
--
%
>
<
%
--
复制
目录
--
%
>
<EF:EFWindow
id=
"selectProjWindow"
width=
"70%"
height=
"
7
0%"
title=
"选择文档"
>
<EF:EFWindow
id=
"selectProjWindow"
width=
"70%"
height=
"
9
0%"
title=
"选择文档"
>
<EF:EFRegion
id=
"inqu2"
title=
"查询条件"
>
<EF:EFRegion
id=
"inqu2"
title=
"查询条件"
>
<div
class=
"row"
>
<div
class=
"row"
>
<EF:EFInput
blockId=
"inqu_status2"
row=
"0"
ename=
"projCode"
cname=
"项目编码"
colWidth=
"3"
placeholder=
"模糊查询项目编码"
/>
<EF:EFInput
blockId=
"inqu_status2"
row=
"0"
ename=
"projName"
cname=
"项目名称"
colWidth=
"3"
placeholder=
"模糊查询项目名称"
/>
<EF:EFInput
blockId=
"inqu_status2"
row=
"0"
ename=
"projName"
cname=
"项目名称"
colWidth=
"3"
placeholder=
"模糊查询项目名称"
/>
<EF:EFInput
blockId=
"inqu_status2"
row=
"0"
ename=
"fileName"
cname=
"目录名称"
colWidth=
"3"
placeholder=
"模糊查询目录名称"
/>
</div>
</div>
</EF:EFRegion>
</EF:EFRegion>
<EF:EFRegion
id=
"
result2"
title=
"明细
信息"
>
<EF:EFRegion
id=
"
detail2"
title=
"目标目录
信息"
>
<EF:EFGrid
blockId=
"
result2"
autoDraw=
"override"
isFloat=
"true"
checkMode=
"single"
queryMethod=
"query
2"
>
<EF:EFGrid
blockId=
"
detail2"
autoDraw=
"override"
isFloat=
"true"
checkMode=
"single"
queryMethod=
"queryDetail
2"
>
<EF:EFColumn
ename=
"id"
primaryKey=
"true"
cname=
"内码"
hidden=
"true"
/>
<EF:EFColumn
ename=
"id"
primaryKey=
"true"
cname=
"内码"
hidden=
"true"
/>
<EF:EFColumn
ename=
"parentId"
cname=
"上级ID"
hidden=
"true"
/>
<EF:EFColumn
ename=
"parentId"
cname=
"上级ID"
hidden=
"true"
/>
<EF:EFComboColumn
ename=
"projCode"
cname=
"项目名称"
blockName=
"proj_record_block_id"
<
%
--
<
EF:EFComboColumn
ename=
"projCode"
cname=
"项目名称"
blockName=
"proj_record_block_id"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
textField=
"textField"
valueField=
"valueField"
textField=
"textField"
valueField=
"valueField"
maxLength=
"16"
readonly=
"true"
width=
"200"
required=
"true"
maxLength=
"16"
readonly=
"true"
width=
"200"
required=
"true"
align=
"center"
filter=
"contains"
sort=
"true"
/>
align=
"center"
filter=
"contains"
sort=
"true"
/>
--%>
<EF:EFColumn
ename=
"projCode"
cname=
"项目编码"
width=
"160"
enable=
"true"
readonly=
"true"
align=
"center"
required=
"true"
/>
<EF:EFColumn
ename=
"projName"
cname=
"项目名称"
width=
"160"
enable=
"true"
readonly=
"true"
align=
"center"
<EF:EFColumn
ename=
"projName"
cname=
"项目名称"
width=
"160"
enable=
"true"
readonly=
"true"
align=
"center"
required=
"true"
hidden=
"true"
/>
required=
"true"
/>
<EF:EFComboColumn
ename=
"fileType"
cname=
"目录类型"
width=
"100"
align=
"center"
readonly=
"false"
required=
"true"
defaultValue=
"20"
>
<EF:EFCodeOption
codeName=
"hggp.hgwd.fileType"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"fileName"
cname=
"目录名称"
width=
"160"
enable=
"true"
readonly=
"false"
align=
"center"
required=
"true"
/>
<EF:EFColumn
ename=
"fileId"
cname=
"目录号"
width=
"100"
enable=
"false"
readonly=
"true"
align=
"center"
required=
"false"
/>
</EF:EFGrid>
</EF:EFRegion>
<EF:EFRegion
id=
"result2"
title=
"来源目录信息"
>
<EF:EFGrid
blockId=
"result2"
autoDraw=
"override"
isFloat=
"true"
checkMode=
"row "
queryMethod=
"query2"
>
<EF:EFColumn
ename=
"id"
primaryKey=
"true"
cname=
"内码"
hidden=
"true"
/>
<EF:EFColumn
ename=
"parentId"
cname=
"上级ID"
hidden=
"true"
/>
<
%
--
<
EF:EFComboColumn
ename=
"projCode"
cname=
"项目名称"
blockName=
"proj_record_block_id"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
textField=
"textField"
valueField=
"valueField"
maxLength=
"16"
readonly=
"true"
width=
"200"
required=
"true"
align=
"center"
filter=
"contains"
sort=
"true"
/>
--%>
<EF:EFColumn
ename=
"projCode"
cname=
"项目编码"
width=
"160"
enable=
"true"
readonly=
"true"
align=
"center"
required=
"true"
/>
<EF:EFColumn
ename=
"projName"
cname=
"项目名称"
width=
"160"
enable=
"true"
readonly=
"true"
align=
"center"
required=
"true"
/>
<EF:EFComboColumn
ename=
"fileType"
cname=
"目录类型"
width=
"100"
align=
"center"
readonly=
"false"
required=
"true"
defaultValue=
"20"
>
<EF:EFCodeOption
codeName=
"hggp.hgwd.fileType"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"fileName"
cname=
"目录名称"
width=
"160"
enable=
"true"
readonly=
"false"
align=
"center"
required=
"true"
/>
<EF:EFColumn
ename=
"fileId"
cname=
"目录号"
width=
"100"
enable=
"false"
readonly=
"true"
align=
"center"
required=
"false"
/>
</EF:EFGrid>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFRegion>
</EF:EFWindow>
</EF:EFWindow>
<EF:EFWindow
id=
"releaseWindow"
title=
"发布变更"
width=
"50%"
height=
"30%"
>
<EF:EFWindow
id=
"releaseWindow"
title=
"发布变更"
width=
"50%"
height=
"30%"
>
<EF:EFRegion
id=
"inqu
2
"
title=
""
>
<EF:EFRegion
id=
"inqu
3
"
title=
""
>
<EF:EFInput
blockId=
"inqu_status"
row=
"0"
ename=
"changeContent"
cname=
"变更内容"
type=
"textarea"
colWidth=
"12"
ratio=
"2:10"
required=
"true"
/>
<EF:EFInput
blockId=
"inqu_status"
row=
"0"
ename=
"changeContent"
cname=
"变更内容"
type=
"textarea"
colWidth=
"12"
ratio=
"2:10"
required=
"true"
/>
</EF:EFRegion>
</EF:EFRegion>
<div
style=
"display: flex;justify-content: flex-end;"
>
<div
style=
"display: flex;justify-content: flex-end;"
>
...
...
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