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
ed5f3254
Commit
ed5f3254
authored
Oct 15, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-10-15 文档库:一级授权后同步更新子集,即使子集之前修改后一级调整授权后也更新子集
parent
f0ca3c74
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
58 additions
and
17 deletions
+58
-17
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
+1
-1
HGWD001.js
src/main/webapp/HG/WD/HGWD001.js
+24
-6
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/service/ServiceHGWD003A.java
View file @
ed5f3254
package
com
.
baosight
.
hggp
.
hg
.
wd
.
service
;
package
com
.
baosight
.
hggp
.
hg
.
wd
.
service
;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
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.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.domain.HGWD003
;
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.hg.xs.domain.User
;
import
com.baosight.hggp.hg.xs.domain.User
;
import
com.baosight.hggp.util.AssertUtils
;
import
com.baosight.hggp.util.AssertUtils
;
...
@@ -13,8 +16,10 @@ import com.baosight.iplat4j.core.ei.EiConstant;
...
@@ -13,8 +16,10 @@ import com.baosight.iplat4j.core.ei.EiConstant;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
/**
* @author:songx
* @author:songx
...
@@ -68,13 +73,23 @@ public class ServiceHGWD003A extends ServiceEPBase {
...
@@ -68,13 +73,23 @@ public class ServiceHGWD003A extends ServiceEPBase {
// 获取FILE_ID
// 获取FILE_ID
String
fileId
=
MapUtils
.
getString
(
queryMap
,
HGWD003
.
FIELD_FILE_ID
);
String
fileId
=
MapUtils
.
getString
(
queryMap
,
HGWD003
.
FIELD_FILE_ID
);
AssertUtils
.
isEmpty
(
fileId
,
"请选择目录"
);
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
),
"操作失败,非项目经理不能授权人员"
);
AssertUtils
.
isTrue
(!
HgWdUtils
.
HgWd003
.
isManager
(
fileId
),
"操作失败,非项目经理不能授权人员"
);
List
<
HGWD003
>
fWd003s
=
MapUtils
.
toDaoEPBases
(
inInfo
,
HGWD003
.
class
);
List
<
HGWD003
>
fWd003s
=
MapUtils
.
toDaoEPBases
(
inInfo
,
HGWD003
.
class
);
for
(
HGWD003
fWd003
:
fWd003s
)
{
for
(
Map
resultMap:
mapList
)
{
fWd003
.
setFileId
(
fileId
);
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
);
DaoUtils
.
insert
(
HGWD003
.
INSERT
,
fWd003
);
}
}
}
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
fWd003s
.
size
()
+
"]条数据授权成功!"
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
fWd003s
.
size
()
+
"]条数据授权成功!"
);
...
...
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD001.xml
View file @
ed5f3254
...
@@ -215,10 +215,10 @@
...
@@ -215,10 +215,10 @@
#deleteFlag#, #companyCode#, #companyName#, #projCode#, #projName#, #projectSource#,
#deleteFlag#, #companyCode#, #companyName#, #projCode#, #projName#, #projectSource#,
#leafLevel#, #parentId#, #fileId#, #fileType#, #fileName#,
#leafLevel#, #parentId#, #fileId#, #fileType#, #fileName#,
#docVersion#, #status#, #remark#, #releaseDate#
#docVersion#, #status#, #remark#, #releaseDate#
)
<selectKey
resultClass=
"long"
keyProperty=
"id"
>
<selectKey
resultClass=
"long"
keyProperty=
"id"
>
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGWD001
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGWD001
</selectKey>
</selectKey>
)
</insert>
</insert>
<delete
id=
"delete"
>
<delete
id=
"delete"
>
...
...
src/main/webapp/HG/WD/HGWD001.js
View file @
ed5f3254
...
@@ -126,13 +126,13 @@ $(function () {
...
@@ -126,13 +126,13 @@ $(function () {
switch
(
item
.
leafType
)
{
switch
(
item
.
leafType
)
{
case
'P'
:
case
'P'
:
icon
=
'fa fa-clipboard'
icon
=
'fa fa-clipboard'
if
(
count
>
1
){
if
(
count
>
0
){
icon
=
'fa fa-clipboard text-success'
icon
=
'fa fa-clipboard text-success'
}
}
break
;
break
;
case
'C'
:
case
'C'
:
icon
=
'fa fa-folder'
icon
=
'fa fa-folder'
if
(
count
>
1
){
if
(
count
>
0
){
icon
=
'fa fa-folder text-success'
icon
=
'fa fa-folder text-success'
}
}
break
;
break
;
...
@@ -447,7 +447,7 @@ $(function () {
...
@@ -447,7 +447,7 @@ $(function () {
onSuccess
(
ei
)
{
onSuccess
(
ei
)
{
if
(
!
isBlank
(
ei
.
getBlock
(
"result"
))){
if
(
!
isBlank
(
ei
.
getBlock
(
"result"
))){
let
rows
=
ei
.
getBlock
(
"result"
).
getMappedRows
();
let
rows
=
ei
.
getBlock
(
"result"
).
getMappedRows
();
if
(
rows
.
length
<=
1
){
if
(
rows
.
length
<=
0
){
message
(
"文件未分配人员,请先分配人员!"
);
message
(
"文件未分配人员,请先分配人员!"
);
return
;
return
;
}
else
{
}
else
{
...
@@ -528,8 +528,22 @@ $(function () {
...
@@ -528,8 +528,22 @@ $(function () {
pageSizes
:
[
5
,
10
,
20
,
50
,
100
],
pageSizes
:
[
5
,
10
,
20
,
50
,
100
],
},
},
}
}
};
IPLATUI
.
EFWindow
=
{
"selectProjWindow"
:
{
close
:
function
(
e
)
{
// 刷新表格
resultGrid
.
dataSource
.
page
(
1
);
}
},
"releaseWindow"
:
{
close
:
function
(
e
)
{
// 刷新表格
resultGrid
.
dataSource
.
page
(
1
);
}
}
;
}
};
downKeyUp
();
downKeyUp
();
...
@@ -583,7 +597,9 @@ let addCallback = function (rows) {
...
@@ -583,7 +597,9 @@ let addCallback = function (rows) {
*/
*/
let
editCallback
=
function
(
parentOrgId
)
{
let
editCallback
=
function
(
parentOrgId
)
{
// 回填父级ID
// 回填父级ID
//$("#inqu_status-0-orgParentId").val(parentOrgId);
if
(
parentOrgId
!=
null
){
$
(
"#inqu_status-0-orgParentId"
).
val
(
parentOrgId
);
}
refreshTree
();
refreshTree
();
}
}
...
@@ -966,6 +982,7 @@ function saveProtFunc() {
...
@@ -966,6 +982,7 @@ function saveProtFunc() {
message
(
"请勾选目标项目目录文件!"
);
message
(
"请勾选目标项目目录文件!"
);
return
;
return
;
}
}
let
parentId
=
detailRows
[
0
].
parentId
JSUtils
.
confirm
(
"确定对勾选中的["
+
resultRows
.
length
+
"]条数据
\"
确认
\"
操作?"
,
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
resultRows
.
length
+
"]条数据
\"
确认
\"
操作?"
,
{
ok
:
function
()
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result2,detail2"
,
"HGWD001"
,
"save2"
,
true
,
JSUtils
.
submitGridsData
(
"result2,detail2"
,
"HGWD001"
,
"save2"
,
true
,
...
@@ -976,8 +993,9 @@ function saveProtFunc() {
...
@@ -976,8 +993,9 @@ function saveProtFunc() {
$
(
"#inqu_status2-0-projName"
).
val
(
''
);
$
(
"#inqu_status2-0-projName"
).
val
(
''
);
const
tree
=
$
(
'#categoryTree'
).
data
(
'kendoTreeView'
);
const
tree
=
$
(
'#categoryTree'
).
data
(
'kendoTreeView'
);
// 刷新树节点
// 刷新树节点
tree
.
reload
(
parentId
)
tree
.
select
();
tree
.
select
();
refreshTree
();
}
catch
(
e
)
{
}
catch
(
e
)
{
// TODO: handle exception
// TODO: handle exception
}
}
...
...
src/main/webapp/HG/WD/HGWD001F.jsp
View file @
ed5f3254
...
@@ -24,11 +24,11 @@
...
@@ -24,11 +24,11 @@
<EF:EFInput cname="组织编码" blockId="inqu_status" ename="fileId" row="0" type="hidden"/>
<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="projCode" row="0" type="hidden"/>
<EF:EFInput cname="层级" blockId="inqu_status" ename="leafLevel" 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:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.hgwd.fileType"/>
<EF:EFCodeOption codeName="hggp.hgwd.fileType"/>
</EF:EFSelect>
</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>
</div>
</EF:EFRegion>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息" fitHeight="true">
<EF:EFRegion id="result" title="明细信息" fitHeight="true">
...
@@ -45,13 +45,13 @@
...
@@ -45,13 +45,13 @@
align="left" filter="contains" sort="true"/>
align="left" filter="contains" sort="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" 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">
defaultValue="20">
<EF:EFCodeOption codeName="hggp.hgwd.fileType"/>
<EF:EFCodeOption codeName="hggp.hgwd.fileType"/>
</EF:EFComboColumn>
</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"/>
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"/>
required="false"/>
<EF:EFColumn ename="createdName" cname="创建人" align="center" width="100" readonly="true" required="false"
<EF:EFColumn ename="createdName" cname="创建人" align="center" width="100" readonly="true" required="false"
enable="false"/>
enable="false"/>
...
...
src/main/webapp/HG/WD/HGWD001H.js
View file @
ed5f3254
...
@@ -34,8 +34,6 @@ $(function () {
...
@@ -34,8 +34,6 @@ $(function () {
$
(
window
).
load
(
function
()
{
$
(
window
).
load
(
function
()
{
// 查询
// 查询
query
();
query
();
// 授权按钮是否可用
showAuthButton
();
});
});
/**
/**
...
@@ -60,7 +58,14 @@ let save = function () {
...
@@ -60,7 +58,14 @@ let save = function () {
}
}
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
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 () {
...
@@ -91,8 +96,11 @@ let auth = function () {
* 授权回调
* 授权回调
*/
*/
let
authCallback
=
function
(
res
)
{
let
authCallback
=
function
(
res
)
{
let
fileId
=
$
(
"#inqu_status-0-fileId"
).
val
();
parent
.
JSColorbox
.
setValueCallback
(
fileId
);
// 刷新页面
// 刷新页面
query
();
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