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
c3d1aa21
Commit
c3d1aa21
authored
Aug 30, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-08-29 文档库变更
parent
93f6895c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
69 deletions
+54
-69
ServiceHGWD001D.java
...java/com/baosight/hggp/hg/wd/service/ServiceHGWD001D.java
+24
-18
HGWD001.js
src/main/webapp/HG/WD/HGWD001.js
+30
-51
No files found.
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD001D.java
View file @
c3d1aa21
package
com
.
baosight
.
hggp
.
hg
.
wd
.
service
;
package
com
.
baosight
.
hggp
.
hg
.
wd
.
service
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.dao.DaoBase
;
import
com.baosight.hggp.core.enums.OrgTypeEnum
;
import
com.baosight.hggp.core.enums.OrgTypeEnum
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.sc.domain.HGSC001
;
import
com.baosight.hggp.hg.xs.domain.Org
;
import
com.baosight.hggp.hg.xs.domain.Org
;
import
com.baosight.hggp.hg.xs.tools.HGXSTools
;
import
com.baosight.hggp.hg.xs.tools.HGXSTools
;
import
com.baosight.iplat4j.core.ei.*
;
import
com.baosight.iplat4j.core.ei.*
;
...
@@ -36,14 +38,26 @@ public class ServiceHGWD001D extends TreeService {
...
@@ -36,14 +38,26 @@ public class ServiceHGWD001D extends TreeService {
if
(
StringUtils
.
isEmpty
(
accountCode
)
||
CommonConstant
.
Field
.
ADMIN
.
equals
(
accountCode
))
{
if
(
StringUtils
.
isEmpty
(
accountCode
)
||
CommonConstant
.
Field
.
ADMIN
.
equals
(
accountCode
))
{
map
.
put
(
"label"
,
"root"
);
map
.
put
(
"label"
,
"root"
);
map
.
put
(
"text"
,
"组织机构"
);
map
.
put
(
"text"
,
"组织机构"
);
list
.
add
(
map
);
}
else
{
}
else
{
Org
org
=
HGXSTools
.
XsOrg
.
get
(
accountCode
);
//Org org = HGXSTools.XsOrg.get(accountCode);
map
.
put
(
"label"
,
org
==
null
?
"root"
:
org
.
getOrgId
());
List
<
HGSC001
>
hgsc001List
=
DaoBase
.
getInstance
().
query
(
"HGSC001.query"
,
new
HashMap
<
String
,
String
>(){{
put
(
"accountCode"
,
accountCode
);}},
0
,
-
999999
);
map
.
put
(
"text"
,
org
==
null
?
"文档库"
:
org
.
getOrgCname
());
//map.put("label", org == null ? "root" : org.getOrgId());
//map.put("text", org == null ? "文档库" : org.getOrgCname());
for
(
HGSC001
hgsc001
:
hgsc001List
)
{
HashMap
<
String
,
String
>
hashMap
=
new
HashMap
<>();
hashMap
.
put
(
"label"
,
hgsc001
.
getProjCode
());
hashMap
.
put
(
"text"
,
hgsc001
.
getProjName
());
hashMap
.
put
(
"projCode"
,
hgsc001
.
getProjCode
());
hashMap
.
put
(
"projName"
,
hgsc001
.
getProjName
());
hashMap
.
put
(
"type"
,
"1"
);
hashMap
.
put
(
"leaf"
,
"0"
);
hashMap
.
put
(
"leafLevel"
,
"0"
);
hashMap
.
put
(
"parentId"
,
"0"
);
list
.
add
(
hashMap
);
}
}
map
.
put
(
"leaf"
,
"0"
);
}
map
.
put
(
"parent"
,
"0"
);
list
.
add
(
map
);
return
list
;
return
list
;
}
}
...
@@ -57,27 +71,17 @@ public class ServiceHGWD001D extends TreeService {
...
@@ -57,27 +71,17 @@ public class ServiceHGWD001D extends TreeService {
// 非管理员仅查询所属企业用户 added by songx at 2024-01-16
// 非管理员仅查询所属企业用户 added by songx at 2024-01-16
queryMap
.
put
(
"accountCode"
,
LoginUserDetails
.
isUserAdmin
(
UserSessionUtils
.
getLoginName
())
queryMap
.
put
(
"accountCode"
,
LoginUserDetails
.
isUserAdmin
(
UserSessionUtils
.
getLoginName
())
?
null
:
UserSessionUtils
.
getAccountCode
());
?
null
:
UserSessionUtils
.
getAccountCode
());
List
<
Map
>
ret
=
new
ArrayList
<>();
if
(
parentLabel
.
indexOf
(
"Q"
)==
0
){
queryMap
.
put
(
"node"
,
parentLabel
);
ret
=
this
.
dao
.
query
(
"XSOG01.queryOrganiation"
,
queryMap
,
0
,
-
999999
);
ret
=
ret
.
stream
().
filter
(
map
->
map
.
get
(
"type"
).
equals
(
OrgTypeEnum
.
COMPANY
.
getCode
())).
collect
(
Collectors
.
toList
());
}
else
{
queryMap
.
put
(
"userId"
,
LoginUserDetails
.
isUserAdmin
(
UserSessionUtils
.
getLoginName
())
queryMap
.
put
(
"userId"
,
LoginUserDetails
.
isUserAdmin
(
UserSessionUtils
.
getLoginName
())
?
null
:
UserSessionUtils
.
getUserId
());
?
null
:
UserSessionUtils
.
getUserId
());
ret
=
this
.
dao
.
query
(
"HGWD001.queryOrganiation"
,
queryMap
,
0
,
-
999999
);
List
<
Map
>
ret
=
this
.
dao
.
query
(
"HGWD001.queryOrganiation"
,
queryMap
,
0
,
-
999999
);
}
Map
parentOrgMap
=
new
HashMap
();
Map
parentOrgMap
=
new
HashMap
();
String
orgId
;
String
orgId
;
for
(
int
i
=
0
;
i
<
ret
.
size
();
++
i
)
{
for
(
int
i
=
0
;
i
<
ret
.
size
();
++
i
)
{
Map
org
=
(
Map
)
ret
.
get
(
i
);
Map
org
=
(
Map
)
ret
.
get
(
i
);
if
(
parentLabel
.
indexOf
(
"Q"
)==
0
){
orgId
=
(
String
)
org
.
get
(
"parentOrgId"
);
}
else
{
orgId
=
(
String
)
org
.
get
(
"parentId"
);
orgId
=
(
String
)
org
.
get
(
"parentId"
);
}
if
(
parentOrgMap
.
get
(
orgId
)
==
null
)
{
if
(
parentOrgMap
.
get
(
orgId
)
==
null
)
{
parentOrgMap
.
put
(
orgId
,
new
ArrayList
());
parentOrgMap
.
put
(
orgId
,
new
ArrayList
());
}
}
...
@@ -86,9 +90,11 @@ public class ServiceHGWD001D extends TreeService {
...
@@ -86,9 +90,11 @@ public class ServiceHGWD001D extends TreeService {
}
}
List
result
=
(
List
)
parentOrgMap
.
get
(
parentLabel
);
List
result
=
(
List
)
parentOrgMap
.
get
(
parentLabel
);
if
(
CollectionUtils
.
isEmpty
(
result
)){
if
(
CollectionUtils
.
isEmpty
(
result
)){
return
result
;
return
result
;
}
}
for
(
int
i
=
0
;
i
<
result
.
size
();
++
i
)
{
for
(
int
i
=
0
;
i
<
result
.
size
();
++
i
)
{
orgId
=
(
String
)((
Map
)
result
.
get
(
i
)).
get
(
"label"
);
orgId
=
(
String
)((
Map
)
result
.
get
(
i
)).
get
(
"label"
);
String
hasChild
=
parentOrgMap
.
get
(
orgId
)
!=
null
?
"2"
:
"1"
;
String
hasChild
=
parentOrgMap
.
get
(
orgId
)
!=
null
?
"2"
:
"1"
;
...
...
src/main/webapp/HG/WD/HGWD001.js
View file @
c3d1aa21
...
@@ -15,14 +15,6 @@ $(function () {
...
@@ -15,14 +15,6 @@ $(function () {
resultGrid
.
dataSource
.
page
(
1
);
resultGrid
.
dataSource
.
page
(
1
);
});
});
$
(
"#QUERY_1"
).
on
(
"click"
,
function
(
e
)
{
result1Grid
.
dataSource
.
page
(
1
);
});
// 查询
$
(
"#QUERY_2"
).
on
(
"click"
,
function
(
e
)
{
result2Grid
.
dataSource
.
page
(
1
);
});
// 分割线组件
// 分割线组件
(
function
()
{
(
function
()
{
splitter
=
$
(
"#splitter"
).
kendoSplitter
({
splitter
=
$
(
"#splitter"
).
kendoSplitter
({
...
@@ -137,17 +129,12 @@ $(function () {
...
@@ -137,17 +129,12 @@ $(function () {
// title = title + ' [岗位]';
// title = title + ' [岗位]';
icon
=
'fa fa-user'
icon
=
'fa fa-user'
break
;
break
;
case
'
'
:
case
'
1
'
:
icon
=
'fa fa-folder'
icon
=
'fa fa-folder'
break
;
break
;
case
'10'
:
icon
=
'fa fa-clipboard'
break
;
case
'20'
:
icon
=
'fa fa-clipboard'
break
;
default
:
default
:
icon
=
'fa fa-home'
icon
=
'fa fa-clipboard'
//icon = 'fa fa-home'
}
}
}
}
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>'
...
@@ -214,18 +201,10 @@ $(function () {
...
@@ -214,18 +201,10 @@ $(function () {
let
leafLevel
=
parseInt
(
$
(
"#inqu_status-0-leafLevel"
).
val
())
+
1
;
let
leafLevel
=
parseInt
(
$
(
"#inqu_status-0-leafLevel"
).
val
())
+
1
;
let
type
=
$
(
"#inqu_status-0-type"
).
val
();
let
type
=
$
(
"#inqu_status-0-type"
).
val
();
if
(
null
==
parentId
||
""
===
parentId
)
{
if
(
null
==
parentId
||
""
===
parentId
)
{
message
2
(
"文档库"
,
"请在文档库树选择公司节点后编辑
文档库"
);
message
(
"请在文档库树选择任意节点后新增
文档库"
);
return
return
}
}
if
(
null
==
companyCode
||
""
===
companyCode
||
"root"
===
companyCode
)
{
/*if (type == "company"){
message2
(
"文档库"
,
"请在文档库树选择公司节点后编辑文档库"
);
return
}
if
(
leafLevel
==
3
)
{
message2
(
"文档库"
,
"无法在当前节点新增"
);
return
}
if
(
type
==
"company"
){
let params = "&inqu_status-0-parentId=" + parentId+"&inqu_status-0-companyCode="+companyCode+"" +
let params = "&inqu_status-0-parentId=" + parentId+"&inqu_status-0-companyCode="+companyCode+"" +
"&inqu_status-0-projCode="+projCode+"&inqu_status-0-leafLevel="+leafLevel;
"&inqu_status-0-projCode="+projCode+"&inqu_status-0-leafLevel="+leafLevel;
JSColorbox.open({
JSColorbox.open({
...
@@ -235,8 +214,9 @@ $(function () {
...
@@ -235,8 +214,9 @@ $(function () {
height: "70%",
height: "70%",
callbackName: addCallback
callbackName: addCallback
});
});
}
else
{
}*/
let
params
=
"&inqu_status-0-parentId="
+
parentId
+
"&inqu_status-0-companyCode="
+
companyCode
+
""
+
let
params
=
"&inqu_status-0-parentId="
+
parentId
+
""
+
"&inqu_status-0-companyCode="
+
companyCode
+
""
+
"&inqu_status-0-projCode="
+
projCode
+
"&inqu_status-0-leafLevel="
+
leafLevel
;
"&inqu_status-0-projCode="
+
projCode
+
"&inqu_status-0-leafLevel="
+
leafLevel
;
JSColorbox
.
open
({
JSColorbox
.
open
({
href
:
"HGWD001E?methodName=initLoad"
+
params
,
href
:
"HGWD001E?methodName=initLoad"
+
params
,
...
@@ -245,7 +225,7 @@ $(function () {
...
@@ -245,7 +225,7 @@ $(function () {
height
:
"70%"
,
height
:
"70%"
,
callbackName
:
addCallback
callbackName
:
addCallback
});
});
}
})
})
/**
/**
...
@@ -316,27 +296,13 @@ $(function () {
...
@@ -316,27 +296,13 @@ $(function () {
let
leafLevel
=
parseInt
(
$
(
"#inqu_status-0-leafLevel"
).
val
())
+
1
;
let
leafLevel
=
parseInt
(
$
(
"#inqu_status-0-leafLevel"
).
val
())
+
1
;
let
type
=
$
(
"#inqu_status-0-type"
).
val
();
let
type
=
$
(
"#inqu_status-0-type"
).
val
();
if
(
null
==
orgId
||
""
===
orgId
||
"root"
===
orgId
)
{
if
(
null
==
orgId
||
""
===
orgId
||
"root"
===
orgId
)
{
message2
(
"文档库"
,
"请在文档库树选择公司节点后编辑文档库"
);
message2
(
"提示"
,
"请在文档库树选择公司节点后编辑文档库"
);
return
}
if
(
null
==
companyCode
||
""
===
companyCode
||
"root"
===
companyCode
)
{
message2
(
"文档库"
,
"请在文档库树选择公司节点后编辑文档库"
);
return
return
}
}
if
(
leafLevel
==
1
)
{
if
(
type
==
"1"
)
{
message2
(
"
文档库"
,
"无法在当前节点编辑
"
);
message2
(
"
提示"
,
"项目无法编辑!
"
);
return
return
}
}
if
(
leafLevel
==
"2"
){
let
params
=
"&inqu_status-0-fileId="
+
orgId
+
"&inqu_status-0-companyCode="
+
companyCode
+
"&inqu_status-0-projCode="
+
projCode
;
JSColorbox
.
open
({
href
:
"HGWD001G?methodName=initLoad"
+
params
,
title
:
"<div style='text-align: center;'>编辑项目</div>"
,
width
:
"70%"
,
height
:
"70%"
,
callbackName
:
addCallback
});
}
else
if
(
leafLevel
==
3
){
let
params
=
"&inqu_status-0-fileId="
+
orgId
+
"&inqu_status-0-companyCode="
+
companyCode
+
"&inqu_status-0-projCode="
+
projCode
;
let
params
=
"&inqu_status-0-fileId="
+
orgId
+
"&inqu_status-0-companyCode="
+
companyCode
+
"&inqu_status-0-projCode="
+
projCode
;
JSColorbox
.
open
({
JSColorbox
.
open
({
href
:
"HGWD001F?methodName=initLoad"
+
params
,
href
:
"HGWD001F?methodName=initLoad"
+
params
,
...
@@ -345,7 +311,16 @@ $(function () {
...
@@ -345,7 +311,16 @@ $(function () {
height
:
"70%"
,
height
:
"70%"
,
callbackName
:
editCallback
callbackName
:
editCallback
});
});
}
/*if (leafLevel == "2"){
let params = "&inqu_status-0-fileId="+orgId+"&inqu_status-0-companyCode="+companyCode+"&inqu_status-0-projCode="+projCode;
JSColorbox.open({
href: "HGWD001G?methodName=initLoad" + params,
title: "<div style='text-align: center;'>编辑项目</div>",
width: "70%",
height: "70%",
callbackName: addCallback
});
}*/
})
})
...
@@ -401,7 +376,7 @@ $(function () {
...
@@ -401,7 +376,7 @@ $(function () {
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
expandPath
([
'root'
]);
this
.
expandPath
([
'root'
]);
},
1000
)
},
1000
)
;
},
},
selectTreeNode
:
{},
selectTreeNode
:
{},
// expandLevel:1,
// expandLevel:1,
...
@@ -830,9 +805,13 @@ function showPreview() {
...
@@ -830,9 +805,13 @@ function showPreview() {
* @param id
* @param id
*/
*/
function
uploadFile
()
{
function
uploadFile
()
{
let
projCode
=
$
(
"#inqu_status-0-projCode"
).
val
();
let
lv
=
$
(
"#inqu_status-0-leafLevel"
).
val
();
if
(
isBlank
(
projCode
)){
if
(
isBlank
(
lv
)){
message
(
"请先选择项目!"
);
message
(
"请选择文件节点!"
);
return
;
}
if
(
lv
===
"0"
){
message
(
"当前节点不可上传附件!"
);
return
;
return
;
}
}
JSColorbox
.
open
({
JSColorbox
.
open
({
...
...
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