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
97de8883
Commit
97de8883
authored
Oct 16, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
4339bff4
ed5f3254
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
254 additions
and
66 deletions
+254
-66
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
ServiceHGWD003A.java
...java/com/baosight/hggp/hg/wd/service/ServiceHGWD003A.java
+17
-2
HGWD001.xml
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD001.xml
+57
-2
HGWD001.js
src/main/webapp/HG/WD/HGWD001.js
+66
-27
HGWD001.jsp
src/main/webapp/HG/WD/HGWD001.jsp
+45
-15
HGWD001F.jsp
src/main/webapp/HG/WD/HGWD001F.jsp
+5
-5
HGWD001H.js
src/main/webapp/HG/WD/HGWD001H.js
+11
-3
No files found.
src/main/java/com/baosight/hggp/hg/wd/constant/HgWdSqlConstant.java
View file @
97de8883
...
...
@@ -22,6 +22,8 @@ public class HgWdSqlConstant {
public
static
final
String
SEARCH_TREE_NODE
=
"HGWD001.searchTreeNode"
;
// 修改项目
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 @
97de8883
...
...
@@ -59,6 +59,12 @@ public class ServiceHGWD001 extends ServiceEPBase {
@Override
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
);
return
super
.
query
(
inInfo
,
HGWD001
.
QUERY
,
new
HGWD001
());
}
...
...
@@ -396,7 +402,7 @@ public class ServiceHGWD001 extends ServiceEPBase {
if
(!
HgWdUtils
.
HgWd009
.
isManager
(
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
);
}
catch
(
Exception
e
)
{
LogUtils
.
setMsg
(
inInfo
,
e
,
"查询失败"
);
...
...
@@ -445,7 +451,7 @@ public class ServiceHGWD001 extends ServiceEPBase {
}
/**
* 复制
项目
列表
* 复制
目录
列表
*
* @param inInfo
* @return
...
...
@@ -459,7 +465,7 @@ public class ServiceHGWD001 extends ServiceEPBase {
if
(!
HgWdUtils
.
HgWd009
.
isManager
(
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
);
}
catch
(
Exception
e
)
{
LogUtils
.
setMsg
(
inInfo
,
e
,
"查询失败"
);
...
...
@@ -467,26 +473,47 @@ public class ServiceHGWD001 extends ServiceEPBase {
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
=
"文档库-复制项目-复制项目操作"
)
public
EiInfo
save2
(
EiInfo
inInfo
)
{
try
{
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));
if (queryMap.get("leafType").equals(HgWdConstant.LeafType.P)) {
hgwd001List = HGWDTools.HgWd001.queryByProjCode(queryMap.get(HGWD001.FIELD_PROJ_CODE),
queryMap.get(HGWD001.FIELD_PARENT_ID));
}
// 要复制
项目
String
parentId
=
result1Rows
.
get
(
0
).
getParentId
();
if
(!
StringUtils
.
isNull
(
hgwd001List
))
{
hgwd001List
.
forEach
(
hgwd001
->
{
}
*/
// 要复制
目录集合
if
(
Objects
.
nonNull
(
detail2Rows
)){
String
parentId
=
detail2Rows
.
get
(
0
).
getFileId
().
length
()>
0
?
detail2Rows
.
get
(
0
).
getFileId
():
detail2Rows
.
get
(
0
).
getProjCode
();
if
(!
StringUtils
.
isNull
(
result2Rows
))
{
result2Rows
.
forEach
(
hgwd001
->
{
hgwd001
.
setParentId
(
parentId
);
});
// 查询添加子节点
addNode
(
hgwd001List
);
addNode
(
result2Rows
);
}
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
...
...
@@ -499,6 +526,7 @@ public class ServiceHGWD001 extends ServiceEPBase {
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
);
...
...
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD001D.java
View file @
97de8883
...
...
@@ -9,6 +9,7 @@ import com.baosight.hggp.hg.sc.enums.ProjectSourceEnum;
import
com.baosight.hggp.hg.sc.tools.HGSCTools
;
import
com.baosight.hggp.hg.wd.constant.HgWdConstant
;
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.utils.HgWdUtils
;
import
com.baosight.hggp.util.EiInfoUtils
;
...
...
@@ -32,6 +33,7 @@ import java.util.HashMap;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* @author LiuYang
...
...
@@ -276,14 +278,19 @@ public class ServiceHGWD001D extends TreeService {
if
(
CollectionUtils
.
isEmpty
(
dbSc001s
))
{
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
)
{
String
text
=
dbSc001
.
getProjName
()
+
"("
+
dbSc001
.
getProjCode
()
+
")"
;
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
(
"projName"
,
dbSc001
.
getProjName
());
leafMap
.
put
(
"ename"
,
dbSc001
.
getProjCode
());
leafMap
.
put
(
"type"
,
"1"
);
leafMap
.
put
(
"leafLevel"
,
"0"
);
leafMap
.
put
(
"count"
,
count
);
leafMap
.
put
(
"isAuth"
,
isAuth
?
"1"
:
"0"
);
results
.
add
(
leafMap
);
}
...
...
@@ -312,13 +319,17 @@ public class ServiceHGWD001D extends TreeService {
if
(
CollectionUtils
.
isEmpty
(
dbWd001s
))
{
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
)
{
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
(
"projName"
,
dbWd001
.
getProjName
());
leafMap
.
put
(
"ename"
,
dbWd001
.
getProjCode
());
leafMap
.
put
(
"type"
,
dbWd001
.
getFileType
());
leafMap
.
put
(
"leafLevel"
,
dbWd001
.
getLeafLevel
());
leafMap
.
put
(
"count"
,
count
);
leafMap
.
put
(
"isAuth"
,
isAuth
?
"1"
:
"0"
);
results
.
add
(
leafMap
);
}
...
...
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD003A.java
View file @
97de8883
package
com
.
baosight
.
hggp
.
hg
.
wd
.
service
;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.core.dao.DaoBase
;
import
com.baosight.hggp.core.dao.DaoUtils
;
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.utils.HgWdUtils
;
import
com.baosight.hggp.hg.xs.domain.User
;
import
com.baosight.hggp.util.AssertUtils
;
...
...
@@ -13,8 +16,10 @@ import com.baosight.iplat4j.core.ei.EiConstant;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* @author:songx
...
...
@@ -68,13 +73,23 @@ public class ServiceHGWD003A extends ServiceEPBase {
// 获取FILE_ID
String
fileId
=
MapUtils
.
getString
(
queryMap
,
HGWD003
.
FIELD_FILE_ID
);
AssertUtils
.
isEmpty
(
fileId
,
"请选择目录"
);
List
<
Map
>
mapList
=
DaoBase
.
getInstance
().
query
(
"HGWD001.queryFileChild"
,
new
HashMap
<
String
,
String
>(){{
put
(
"parentId"
,
fileId
);
}});
List
<
String
>
fileIds
=
mapList
.
stream
().
map
(
map
->
MapUtils
.
getString
(
map
,
HGWD001
.
FIELD_FILE_ID
)).
collect
(
Collectors
.
toList
());
List
<
HGWD003
>
hgwd003s
=
HGWDTools
.
HgWd003
.
list
(
fileIds
);
// 判断是否是管理员或项目经理
AssertUtils
.
isTrue
(!
HgWdUtils
.
HgWd003
.
isManager
(
fileId
),
"操作失败,非项目经理不能授权人员"
);
List
<
HGWD003
>
fWd003s
=
MapUtils
.
toDaoEPBases
(
inInfo
,
HGWD003
.
class
);
for
(
HGWD003
fWd003
:
fWd003s
)
{
fWd003
.
setFileId
(
fileId
);
for
(
Map
resultMap:
mapList
)
{
for
(
HGWD003
fWd003:
fWd003s
)
{
long
count
=
hgwd003s
.
stream
().
filter
(
hgwd003
->
hgwd003
.
getFileId
().
equals
(
resultMap
.
get
(
HGWD003
.
FIELD_FILE_ID
))
&&
hgwd003
.
getUserId
().
equals
(
fWd003
.
getUserId
())).
count
();
if
(
count
==
0
){
fWd003
.
setFileId
(
resultMap
.
get
(
HGWD003
.
FIELD_FILE_ID
).
toString
());
DaoUtils
.
insert
(
HGWD003
.
INSERT
,
fWd003
);
}
}
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
fWd003s
.
size
()
+
"]条数据授权成功!"
);
...
...
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD001.xml
View file @
97de8883
...
...
@@ -61,7 +61,7 @@
COMPANY_NAME LIKE CONCAT('%', #companyName#, '%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projCode"
>
PROJ_CODE
= #projCode#
PROJ_CODE
like concat('%', #projCode#, '%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projName"
>
PROJ_NAME LIKE CONCAT('%', #projName#, '%')
...
...
@@ -215,10 +215,10 @@
#deleteFlag#, #companyCode#, #companyName#, #projCode#, #projName#, #projectSource#,
#leafLevel#, #parentId#, #fileId#, #fileType#, #fileName#,
#docVersion#, #status#, #remark#, #releaseDate#
)
<selectKey
resultClass=
"long"
keyProperty=
"id"
>
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGWD001
</selectKey>
)
</insert>
<delete
id=
"delete"
>
...
...
@@ -273,6 +273,9 @@
FILE_NAME as "fileName"
<!-- 文件名称 -->
FROM ${hggpSchema}.HGWD001
WHERE 1=1
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"pEname"
>
PARENT_ID = #pEname#
</isNotEmpty>
...
...
@@ -364,4 +367,56 @@
WHERE PROJ_CODE = #projCode#
</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>
src/main/webapp/HG/WD/HGWD001.js
View file @
97de8883
...
...
@@ -15,7 +15,8 @@ $(function () {
$
(
"#QUERY1"
).
on
(
"click"
,
query1
);
$
(
"#QUERY2"
).
on
(
"click"
,
function
(
e
)
{
result2Grid
.
dataSource
.
page
(
1
);
//result2Grid.dataSource.page(1);
detail2Grid
.
dataSource
.
page
(
1
);
});
// 分割线组件
(
function
()
{
...
...
@@ -120,13 +121,20 @@ $(function () {
template
:
function
(
node
)
{
var
item
=
node
.
item
;
var
title
=
item
.
text
;
let
count
=
item
.
count
;
let
icon
=
'fa fa-globe'
switch
(
item
.
leafType
)
{
case
'P'
:
icon
=
'fa fa-clipboard'
if
(
count
>
0
){
icon
=
'fa fa-clipboard text-success'
}
break
;
case
'C'
:
icon
=
'fa fa-folder'
if
(
count
>
0
){
icon
=
'fa fa-folder text-success'
}
break
;
}
return
' <span class="'
+
icon
+
'" style="padding-right: 8px"> </span> <span class="titleClass" title="'
+
item
.
label
+
'">'
+
title
+
'</span>'
...
...
@@ -439,7 +447,7 @@ $(function () {
onSuccess
(
ei
)
{
if
(
!
isBlank
(
ei
.
getBlock
(
"result"
))){
let
rows
=
ei
.
getBlock
(
"result"
).
getMappedRows
();
if
(
rows
.
length
<=
1
){
if
(
rows
.
length
<=
0
){
message
(
"文件未分配人员,请先分配人员!"
);
return
;
}
else
{
...
...
@@ -463,7 +471,7 @@ $(function () {
$
(
"#CHANGE_RECORD"
).
on
(
"click"
,
changeResord
);
// 复制附件
$
(
"#COPY_FILE"
).
on
(
"click"
,
copyFile
);
// 复制
文件
// 复制
目录
$
(
"#COPY_PROT_FILE"
).
on
(
"click"
,
copyProtFile
);
// 预览
$
(
"#PREVIEW"
).
on
(
"click"
,
preview
);
...
...
@@ -505,6 +513,34 @@ $(function () {
pageable
:
{
pageSize
:
10
,
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
],
},
}
};
IPLATUI
.
EFWindow
=
{
"selectProjWindow"
:
{
close
:
function
(
e
)
{
// 刷新表格
resultGrid
.
dataSource
.
page
(
1
);
}
},
"releaseWindow"
:
{
close
:
function
(
e
)
{
// 刷新表格
resultGrid
.
dataSource
.
page
(
1
);
}
}
};
...
...
@@ -561,7 +597,9 @@ let addCallback = function (rows) {
*/
let
editCallback
=
function
(
parentOrgId
)
{
// 回填父级ID
//$("#inqu_status-0-orgParentId").val(parentOrgId);
if
(
parentOrgId
!=
null
){
$
(
"#inqu_status-0-orgParentId"
).
val
(
parentOrgId
);
}
refreshTree
();
}
...
...
@@ -864,7 +902,7 @@ function changeResord() {
}
/**
* 复制
文
件
* 复制
附
件
*/
let
copyFile
=
function
()
{
let
rowsDate
=
resultGrid
.
getCheckedRows
();
...
...
@@ -879,7 +917,7 @@ let copyFile = function () {
}
/**
* 复制
文
件
* 复制
附
件
*/
function
saveFunc
()
{
var
rows
=
result1Grid
.
getCheckedRows
();
...
...
@@ -915,7 +953,7 @@ function saveFunc() {
}
/**
* 复制
项目
* 复制
目录
*/
let
copyProtFile
=
function
()
{
let
parentId
=
IPLATUI
.
EFTree
.
categoryTree
.
selectTreeNode
.
parentId
;
...
...
@@ -927,20 +965,27 @@ let copyProtFile = function () {
selectOrgWindow
.
data
(
"kendoWindow"
).
center
();
selectOrgWindow
.
data
(
"kendoWindow"
).
open
();
result2Grid
.
dataSource
.
page
(
1
);
detail2Grid
.
dataSource
.
page
(
1
);
}
/**
* 复制
项目
* 复制
目录
*/
function
saveProtFunc
()
{
var
rows
=
result2Grid
.
getCheckedRows
();
if
(
rows
.
length
==
0
)
{
message
(
"请勾选数据文件!"
);
let
resultRows
=
result2Grid
.
getCheckedRows
();
let
detailRows
=
detail2Grid
.
getCheckedRows
();
if
(
resultRows
.
length
==
0
)
{
message
(
"请勾选来源项目目录文件!"
);
return
;
}
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据
\"
确认
\"
操作?"
,
{
if
(
detailRows
.
length
==
0
){
message
(
"请勾选目标项目目录文件!"
);
return
;
}
let
parentId
=
detailRows
[
0
].
parentId
JSUtils
.
confirm
(
"确定对勾选中的["
+
resultRows
.
length
+
"]条数据
\"
确认
\"
操作?"
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result2"
,
"HGWD001"
,
"save2"
,
true
,
JSUtils
.
submitGridsData
(
"result2
,detail2
"
,
"HGWD001"
,
"save2"
,
true
,
function
(
ei
)
{
if
(
ei
.
getStatus
()
>=
0
)
{
try
{
...
...
@@ -948,8 +993,9 @@ function saveProtFunc() {
$
(
"#inqu_status2-0-projName"
).
val
(
''
);
const
tree
=
$
(
'#categoryTree'
).
data
(
'kendoTreeView'
);
// 刷新树节点
tree
.
reload
(
parentId
)
tree
.
select
();
refreshTree
();
}
catch
(
e
)
{
// TODO: handle exception
}
...
...
@@ -980,33 +1026,26 @@ let isProjectManager = function (parentId) {
inEiInfo
.
set
(
"inqu_status-0-fileId"
,
parentId
);
$
(
"#COPY_PROT_FILE"
).
show
();
$
(
"#BATCH_DOWNLOAD"
).
show
();
$
(
"#RELEASE"
).
show
();
$
(
"#UPLOAD_FILE"
).
show
();
$
(
"#COPY_FILE"
).
show
();
$
(
"#PREVIEW"
).
show
();
EiCommunicator
.
send
(
"HGWD001"
,
"queryProjectManager"
,
inEiInfo
,
{
onSuccess
(
ei
)
{
if
(
ei
.
status
!=
-
1
){
switch
(
ei
.
extAttr
.
isManager
)
{
case
1
:
$
(
"#RELEASE"
).
show
();
$
(
"#UPLOAD_FILE"
).
show
();
$
(
"#COPY_FILE"
).
show
();
$
(
"#PREVIEW"
).
show
();
break
;
case
2
:
$
(
"#RELEASE"
).
show
();
$
(
"#UPLOAD_FILE"
).
show
();
$
(
"#COPY_FILE"
).
show
();
$
(
"#PREVIEW"
).
show
();
break
;
break
case
3
:
$
(
"#RELEASE"
).
hide
();
$
(
"#UPLOAD_FILE"
).
show
();
$
(
"#COPY_FILE"
).
show
();
$
(
"#PREVIEW"
).
show
();
break
default
:
$
(
"#RELEASE"
).
hide
();
$
(
"#UPLOAD_FILE"
).
hide
();
$
(
"#COPY_FILE"
).
hide
();
$
(
"#PREVIEW"
).
hide
();
$
(
"#COPY_PROT_FILE"
).
hide
();
}
}
}
...
...
src/main/webapp/HG/WD/HGWD001.jsp
View file @
97de8883
...
...
@@ -65,7 +65,7 @@
<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=
"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:EFOption
label=
"全部"
value=
""
/>
<EF:EFCodeOption
codeName=
"hggp.hgwd.status"
/>
...
...
@@ -82,8 +82,8 @@
<EF:EFColumn
ename=
"id"
cname=
"ID"
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=
"docName"
cname=
"
文
件名称"
enable=
"false"
width=
"180"
/>
<EF:EFColumn
ename=
"docType"
cname=
"
文
件类型"
enable=
"false"
width=
"110"
align=
"center"
/>
<EF:EFColumn
ename=
"docName"
cname=
"
附
件名称"
enable=
"false"
width=
"180"
/>
<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:EFComboColumn
ename=
"status"
cname=
"状态"
enable=
"false"
width=
"100"
align=
"center"
defaultValue=
"0"
hidden=
"false"
>
...
...
@@ -113,7 +113,7 @@
</div>
</EF:EFWindow>
<
%
--
复制
选中文
件
--
%
>
<
%
--
复制
附
件
--
%
>
<EF:EFWindow
id=
"selectOrgWindow"
width=
"70%"
height=
"70%"
title=
"选择文档"
>
<EF:EFRegion
id=
"inqu1"
title=
"查询条件"
>
<div
class=
"row"
>
...
...
@@ -149,32 +149,62 @@
</EF:EFRegion>
</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=
"查询条件"
>
<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=
"fileName"
cname=
"目录名称"
colWidth=
"3"
placeholder=
"模糊查询目录名称"
/>
</div>
</EF:EFRegion>
<EF:EFRegion
id=
"result2"
title=
"明细信息"
>
<EF:EFGrid
blockId=
"result2"
autoDraw=
"override"
autoBind=
"false"
isFloat=
"true"
checkMode=
"single"
queryMethod=
"query2"
>
<EF:EFRegion
id=
"detail2"
title=
"目标目录信息"
>
<EF:EFGrid
blockId=
"detail2"
autoDraw=
"override"
autoBind=
"false"
isFloat=
"true"
checkMode=
"single"
queryMethod=
"queryDetail2"
>
<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"
<
%
--
<
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=
"left"
filter=
"contains"
sort=
"true"
/>
<EF:EFColumn
ename=
"projName"
cname=
"项目名称"
width=
"160"
enable=
"true"
readonly=
"true"
align=
"left"
required=
"true"
hidden=
"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:EFRegion>
<EF:EFRegion
id=
"result2"
title=
"来源目录信息"
>
<EF:EFGrid
blockId=
"result2"
autoDraw=
"override"
autoBind=
"false"
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:EFRegion>
</EF:EFWindow>
<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:EFRegion>
<div
style=
"display: flex;justify-content: flex-end;"
>
...
...
src/main/webapp/HG/WD/HGWD001F.jsp
View file @
97de8883
...
...
@@ -24,11 +24,11 @@
<EF:EFInput cname="组织编码" blockId="inqu_status" ename="fileId" row="0" type="hidden"/>
<EF:EFInput cname="项目代码" blockId="inqu_status" ename="projCode" row="0" type="hidden"/>
<EF:EFInput cname="层级" blockId="inqu_status" ename="leafLevel" row="0" type="hidden"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="fileType" cname="
文件
类型" colWidth="3" filter="contains">
<EF:EFSelect blockId="inqu_status" row="0" ename="fileType" cname="
目录
类型" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.hgwd.fileType"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="fileName" cname="
文件
名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="fileName" cname="
目录
名称" placeholder="模糊查询" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息" fitHeight="true">
...
...
@@ -45,13 +45,13 @@
align="left" filter="contains" sort="true"/>
<EF:EFColumn ename="projName" cname="所属项目" width="160" enable="true" readonly="true" align="center"
required="true" hidden="true"/>
<EF:EFComboColumn ename="fileType" cname="
文件
类型" width="100" align="center" readonly="false" 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="left"
<EF:EFColumn ename="fileName" cname="
目录
名称" width="160" enable="true" readonly="false" align="left"
required="true"/>
<EF:EFColumn ename="fileId" cname="
文件
号" width="100" enable="false" readonly="true" align="center"
<EF:EFColumn ename="fileId" cname="
目录
号" width="100" enable="false" readonly="true" align="center"
required="false"/>
<EF:EFColumn ename="createdName" cname="创建人" align="center" width="100" readonly="true" required="false"
enable="false"/>
...
...
src/main/webapp/HG/WD/HGWD001H.js
View file @
97de8883
...
...
@@ -34,8 +34,6 @@ $(function () {
$
(
window
).
load
(
function
()
{
// 查询
query
();
// 授权按钮是否可用
showAuthButton
();
});
/**
...
...
@@ -60,7 +58,14 @@ let save = function () {
}
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HGWD003"
,
"save"
,
true
);
JSUtils
.
submitGridsData
(
"result"
,
"HGWD003"
,
"save"
,
true
,
function
(
e
)
{
var
status
=
e
.
status
;
if
(
status
!==
-
1
)
{
let
fileId
=
$
(
"#inqu_status-0-fileId"
).
val
();
parent
.
JSColorbox
.
setValueCallback
(
fileId
);
}
});
}
});
}
...
...
@@ -91,8 +96,11 @@ let auth = function () {
* 授权回调
*/
let
authCallback
=
function
(
res
)
{
let
fileId
=
$
(
"#inqu_status-0-fileId"
).
val
();
parent
.
JSColorbox
.
setValueCallback
(
fileId
);
// 刷新页面
query
();
}
/**
...
...
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