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
d395155a
Commit
d395155a
authored
Sep 24, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-09-24
1.文档库:复制功能需支持按项目和文件夹复制附件和子节点
parent
ce5e99e2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
14 deletions
+52
-14
ServiceHGWD001.java
.../java/com/baosight/hggp/hg/wd/service/ServiceHGWD001.java
+29
-10
HGWDTools.java
src/main/java/com/baosight/hggp/hg/wd/tools/HGWDTools.java
+22
-0
HGWD001.js
src/main/webapp/HG/WD/HGWD001.js
+1
-4
No files found.
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD001.java
View file @
d395155a
...
@@ -462,23 +462,42 @@ public class ServiceHGWD001 extends ServiceEPBase {
...
@@ -462,23 +462,42 @@ public class ServiceHGWD001 extends ServiceEPBase {
String
parentId
=
result1Rows
.
get
(
0
).
getParentId
();
String
parentId
=
result1Rows
.
get
(
0
).
getParentId
();
if
(!
StringUtils
.
isNull
(
hgwd001List
)){
if
(!
StringUtils
.
isNull
(
hgwd001List
)){
// 写入数据
hgwd001List
.
forEach
(
hgwd001
->
{
for
(
HGWD001
hgwd001:
hgwd001List
)
{
hgwd001
.
setParentId
(
parentId
);
String
fileId
=
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
WD_FILE_ID
);
});
addCopyFile
(
hgwd001
,
parentId
,
fileId
);
// 查询添加子节点
addNode
(
hgwd001List
);
}
}
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作
成功!本次对["
+
hgwd001List
==
null
?
String
.
valueOf
(
0
)
:
hgwd001List
.
size
()
+
"]条数据保存
成功!"
);
inInfo
.
setMsg
(
"操作
复制文件
成功!"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"
保存
失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"
复制文件
失败"
);
}
}
return
inInfo
;
return
inInfo
;
}
}
private
void
addCopyFile
(
HGWD001
hgwd001
,
String
parentId
,
String
fileId
){
public
void
addNode
(
List
<
HGWD001
>
hgwd001List
){
List
<
String
>
fileIds
=
hgwd001List
.
stream
().
map
(
HGWD001:
:
getFileId
).
collect
(
Collectors
.
toList
());
List
<
HGWD001
>
hgwd001s
=
HGWDTools
.
HgWd001
.
listByParentIds
(
fileIds
);
for
(
HGWD001
hgwd001:
hgwd001List
)
{
String
fileId
=
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
WD_FILE_ID
);
if
(!
StringUtils
.
isNull
(
hgwd001s
)){
hgwd001s
.
forEach
(
o
->
{
if
(
o
.
getParentId
().
equals
(
hgwd001
.
getFileId
())){
o
.
setParentId
(
fileId
);
}
});
}
addCopyFile
(
hgwd001
,
fileId
);
}
if
(
hgwd001s
!=
null
&&
hgwd001s
.
size
()
>
0
){
addNode
(
hgwd001s
);
}
}
private
void
addCopyFile
(
HGWD001
hgwd001
,
String
fileId
){
List
<
HGWD099
>
hgwd099List
=
HGWDTools
.
HgWd099
.
queryByBiz
(
"WD"
,
hgwd001
.
getFileId
());
List
<
HGWD099
>
hgwd099List
=
HGWDTools
.
HgWd099
.
queryByBiz
(
"WD"
,
hgwd001
.
getFileId
());
StringBuilder
strFileName
=
new
StringBuilder
();
StringBuilder
strFileName
=
new
StringBuilder
();
...
@@ -498,7 +517,7 @@ public class ServiceHGWD001 extends ServiceEPBase {
...
@@ -498,7 +517,7 @@ public class ServiceHGWD001 extends ServiceEPBase {
hgwd001a
.
setChangeEnd
(
hgwd099
.
getDocName
());
hgwd001a
.
setChangeEnd
(
hgwd099
.
getDocName
());
HGWDTools
.
HgWd001
.
addHGWD001A
(
hgwd001a
);
HGWDTools
.
HgWd001
.
addHGWD001A
(
hgwd001a
);
}
}
hgwd001
.
setParentId
(
parentId
);
//
hgwd001.setParentId(parentId);
hgwd001
.
setFileId
(
fileId
);
hgwd001
.
setFileId
(
fileId
);
hgwd001
.
setStatus
(
HgWdConstant
.
FileStatus
.
S_0
);
hgwd001
.
setStatus
(
HgWdConstant
.
FileStatus
.
S_0
);
cleanBaseInfo
(
hgwd001
);
cleanBaseInfo
(
hgwd001
);
...
...
src/main/java/com/baosight/hggp/hg/wd/tools/HGWDTools.java
View file @
d395155a
...
@@ -181,6 +181,28 @@ public class HGWDTools {
...
@@ -181,6 +181,28 @@ public class HGWDTools {
List
<
HGWD001
>
results
=
DaoBase
.
getInstance
().
query
(
HGWD001
.
QUERY
,
queryMap
);
List
<
HGWD001
>
results
=
DaoBase
.
getInstance
().
query
(
HGWD001
.
QUERY
,
queryMap
);
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
;
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
;
}
}
/**
* 根据父节点统计
*
* @param parentIds
* @return
*/
public
static
List
<
HGWD001
>
listByParentIds
(
List
<
String
>
parentIds
)
{
AssertUtils
.
isEmpty
(
parentIds
,
"文件ID不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"parentIds"
,
parentIds
);
// 非管理员仅查询自己有权限的项目
String
userId
=
UserSessionUtils
.
getLoginName
();
if
(!
HgWdUtils
.
HgWd009
.
isManager
(
userId
))
{
queryMap
.
put
(
User
.
FIELD_USER_ID
,
userId
);
}
List
<
HGWD001
>
results
=
DaoBase
.
getInstance
().
query
(
HGWD001
.
QUERY
,
queryMap
);
if
(
CollectionUtils
.
isEmpty
(
results
))
{
return
null
;
}
return
results
;
}
}
}
...
...
src/main/webapp/HG/WD/HGWD001.js
View file @
d395155a
...
@@ -967,11 +967,8 @@ function saveProtFunc() {
...
@@ -967,11 +967,8 @@ function saveProtFunc() {
$
(
"#inqu_status2-0-companyCode"
).
val
(
''
);
$
(
"#inqu_status2-0-companyCode"
).
val
(
''
);
$
(
"#inqu_status2-0-projName"
).
val
(
''
);
$
(
"#inqu_status2-0-projName"
).
val
(
''
);
const
tree
=
$
(
'#categoryTree'
).
data
(
'kendoTreeView'
);
const
tree
=
$
(
'#categoryTree'
).
data
(
'kendoTreeView'
);
const
parentId
=
$
(
"#inqu_status-0-orgParentId"
).
val
();
// 刷新树节点
// 刷新树节点
tree
.
reload
(
parentId
);
tree
.
select
();
// 展开树
expandTreeNode
(
tree
,
parentId
);
refreshTree
();
refreshTree
();
}
catch
(
e
)
{
}
catch
(
e
)
{
// TODO: handle exception
// TODO: handle exception
...
...
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