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
ac2163ba
Commit
ac2163ba
authored
Nov 12, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://git.pseer.com:8800/platform/hg-smart
into dev-ly
parents
7226d331
8f6dbc4e
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
343 additions
and
158 deletions
+343
-158
ServiceHGCW002.java
.../java/com/baosight/hggp/hg/cw/service/ServiceHGCW002.java
+18
-7
HGPZUtils.java
src/main/java/com/baosight/hggp/hg/pz/utils/HGPZUtils.java
+20
-1
ProjectSourceEnum.java
...java/com/baosight/hggp/hg/sc/enums/ProjectSourceEnum.java
+1
-1
ServiceHGSC001.java
.../java/com/baosight/hggp/hg/sc/service/ServiceHGSC001.java
+0
-6
HGSC001.xml
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC001.xml
+1
-2
HgWdSqlConstant.java
...ava/com/baosight/hggp/hg/wd/constant/HgWdSqlConstant.java
+4
-0
ServiceHGWD001D.java
...java/com/baosight/hggp/hg/wd/service/ServiceHGWD001D.java
+54
-21
ServiceHGWD003B.java
...java/com/baosight/hggp/hg/wd/service/ServiceHGWD003B.java
+1
-1
ServiceHGWD099.java
.../java/com/baosight/hggp/hg/wd/service/ServiceHGWD099.java
+13
-9
HGWD001.xml
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD001.xml
+36
-32
HGWDTools.java
src/main/java/com/baosight/hggp/hg/wd/tools/HGWDTools.java
+28
-0
HgWdUtils.java
src/main/java/com/baosight/hggp/hg/wd/utils/HgWdUtils.java
+48
-4
hgpz021.xls
...in/resources/META-INF/resources/file/template/hgpz021.xls
+0
-0
HGCW002.js
src/main/webapp/HG/CW/HGCW002.js
+7
-5
HGCW002.jsp
src/main/webapp/HG/CW/HGCW002.jsp
+57
-33
HGPZ020.jsp
src/main/webapp/HG/PZ/HGPZ020.jsp
+1
-1
HGPZ021.js
src/main/webapp/HG/PZ/HGPZ021.js
+1
-1
HGSC001.js
src/main/webapp/HG/SC/HGSC001.js
+9
-13
HGSC001.jsp
src/main/webapp/HG/SC/HGSC001.jsp
+43
-20
HGWD001.js
src/main/webapp/HG/WD/HGWD001.js
+1
-1
No files found.
src/main/java/com/baosight/hggp/hg/cw/service/ServiceHGCW002.java
View file @
ac2163ba
...
@@ -8,20 +8,25 @@ import com.baosight.hggp.core.dao.DaoBase;
...
@@ -8,20 +8,25 @@ 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.core.security.UserSessionUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.cw.domain.*
;
import
com.baosight.hggp.hg.cw.domain.HGCW002
;
import
com.baosight.hggp.hg.cw.domain.HGCW003
;
import
com.baosight.hggp.hg.cw.domain.HGCW006
;
import
com.baosight.hggp.hg.cw.tools.HGCWTools
;
import
com.baosight.hggp.hg.cw.tools.HGCWTools
;
import
com.baosight.hggp.hg.cw.vo.UserVO
;
import
com.baosight.hggp.hg.pz.domain.HGPZ001
;
import
com.baosight.hggp.hg.pz.domain.HGPZ001
;
import
com.baosight.hggp.hg.pz.domain.HGPZ002
;
import
com.baosight.hggp.hg.sb.tools.HGSBTools
;
import
com.baosight.hggp.hg.sb.tools.HGSBTools
;
import
com.baosight.hggp.hg.sc.domain.HGSC001
;
import
com.baosight.hggp.hg.sc.domain.HGSC001
;
import
com.baosight.hggp.hg.sc.tools.HGSCTools
;
import
com.baosight.hggp.hg.sc.tools.HGSCTools
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.hg.xs.domain.Org
;
import
com.baosight.hggp.hg.xs.domain.Org
;
import
com.baosight.hggp.hg.xs.utils.HGXSUtils
;
import
com.baosight.hggp.hg.xs.utils.HGXSUtils
;
import
com.baosight.hggp.util.*
;
import
com.baosight.hggp.util.AssertUtils
;
import
com.baosight.hggp.util.CommonMethod
;
import
com.baosight.hggp.util.DateUtils
;
import
com.baosight.hggp.util.EiInfoUtils
;
import
com.baosight.hggp.util.ExcelUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.MapUtils
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
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.exception.PlatException
;
import
com.baosight.iplat4j.core.exception.PlatException
;
...
@@ -32,7 +37,13 @@ import org.apache.commons.collections.CollectionUtils;
...
@@ -32,7 +37,13 @@ import org.apache.commons.collections.CollectionUtils;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.text.DecimalFormat
;
import
java.text.DecimalFormat
;
import
java.util.*
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.Optional
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -54,7 +65,6 @@ public class ServiceHGCW002 extends ServiceBase {
...
@@ -54,7 +65,6 @@ public class ServiceHGCW002 extends ServiceBase {
try
{
try
{
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_BOX_BLOCK_ID
),
null
,
false
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_BOX_BLOCK_ID
),
null
,
false
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HGCW002
().
eiMetadata
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HGCW002
().
eiMetadata
);
outInfo
=
super
.
query
(
inInfo
,
HGCW002
.
QUERY
,
new
HGCW002
());
Map
<
String
,
Object
>
qarma
=
new
HashMap
<>();
Map
<
String
,
Object
>
qarma
=
new
HashMap
<>();
EiInfoUtils
.
addBlock
(
outInfo
,
"roleCompany"
,
UserSessionUtils
.
getRoleCompany
(),
Company
.
class
);
EiInfoUtils
.
addBlock
(
outInfo
,
"roleCompany"
,
UserSessionUtils
.
getRoleCompany
(),
Company
.
class
);
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
GROUP_RECORD_BLOCK_ID
,
DdynamicEnum
.
CONTRACT_BLOCK_ID
));
CommonMethod
.
initBlock
(
outInfo
,
Arrays
.
asList
(
DdynamicEnum
.
GROUP_RECORD_BLOCK_ID
,
DdynamicEnum
.
CONTRACT_BLOCK_ID
));
...
@@ -88,6 +98,7 @@ public class ServiceHGCW002 extends ServiceBase {
...
@@ -88,6 +98,7 @@ public class ServiceHGCW002 extends ServiceBase {
@OperationLogAnnotation
(
operModul
=
"账期维护"
,
operType
=
"查询"
,
operDesc
=
"查询"
)
@OperationLogAnnotation
(
operModul
=
"账期维护"
,
operType
=
"查询"
,
operDesc
=
"查询"
)
@Override
@Override
public
EiInfo
query
(
EiInfo
inInfo
)
{
public
EiInfo
query
(
EiInfo
inInfo
)
{
Map
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
List
<
String
>
roleCompanyCode
=
HGSBTools
.
getRoleCompanyCode
();
List
<
String
>
roleCompanyCode
=
HGSBTools
.
getRoleCompanyCode
();
if
(!
roleCompanyCode
.
isEmpty
())
{
if
(!
roleCompanyCode
.
isEmpty
())
{
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGCW002
.
FIELD_COMPANY_CODES
,
roleCompanyCode
);
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGCW002
.
FIELD_COMPANY_CODES
,
roleCompanyCode
);
...
...
src/main/java/com/baosight/hggp/hg/pz/utils/HGPZUtils.java
View file @
ac2163ba
package
com
.
baosight
.
hggp
.
hg
.
pz
.
utils
;
package
com
.
baosight
.
hggp
.
hg
.
pz
.
utils
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.hg.pz.domain.HGPZ020
;
import
com.baosight.hggp.hg.pz.domain.HGPZ020A
;
import
com.baosight.hggp.hg.pz.domain.HGPZ020A
;
import
com.baosight.hggp.hg.pz.domain.HGPZ021
;
import
com.baosight.hggp.hg.pz.domain.HGPZ021
;
import
com.baosight.hggp.hg.pz.enums.DynamicTableEnum
;
import
com.baosight.hggp.hg.pz.enums.DynamicTableEnum
;
...
@@ -69,7 +70,7 @@ public class HGPZUtils {
...
@@ -69,7 +70,7 @@ public class HGPZUtils {
List
<
HGPZ020A
>
dbPz020as
=
HGPZTools
.
HgPz020A
.
listByTable
(
dynamicTableEnum
.
getCode
());
List
<
HGPZ020A
>
dbPz020as
=
HGPZTools
.
HgPz020A
.
listByTable
(
dynamicTableEnum
.
getCode
());
if
(
CollectionUtils
.
isNotEmpty
(
dbPz020as
))
{
if
(
CollectionUtils
.
isNotEmpty
(
dbPz020as
))
{
return
dbPz020as
.
stream
().
map
(
item
->
{
return
dbPz020as
.
stream
().
map
(
item
->
{
if
(
StringUtils
.
is
Empty
(
item
.
getViewSql
()))
{
if
(
StringUtils
.
is
Blank
(
item
.
getViewSql
()))
{
return
item
.
getFieldCode
()
+
" as \""
+
item
.
getAliasName
()
+
"\""
;
return
item
.
getFieldCode
()
+
" as \""
+
item
.
getAliasName
()
+
"\""
;
}
else
{
}
else
{
return
item
.
getViewSql
()
+
" as \""
+
item
.
getAliasName
()
+
"\""
;
return
item
.
getViewSql
()
+
" as \""
+
item
.
getAliasName
()
+
"\""
;
...
@@ -90,6 +91,24 @@ public class HGPZUtils {
...
@@ -90,6 +91,24 @@ public class HGPZUtils {
}
}
/**
/**
* 设置动态列
*
* @param dynamicTableEnum 动态表
*/
public
static
List
<
String
>
listDynamicColumnAlias
(
DynamicTableEnum
dynamicTableEnum
)
{
// 查询企业配置的字段,如果未配置使用默认字段
List
<
HGPZ020A
>
dbPz020as
=
HGPZTools
.
HgPz020A
.
listByTable
(
dynamicTableEnum
.
getCode
());
if
(
CollectionUtils
.
isNotEmpty
(
dbPz020as
))
{
return
dbPz020as
.
stream
().
map
(
HGPZ020:
:
getAliasName
).
collect
(
Collectors
.
toList
());
}
List
<
HGPZ021
>
dbPz021s
=
HGPZTools
.
HgPz021
.
listDefaultByTable
(
dynamicTableEnum
.
getCode
());
if
(
CollectionUtils
.
isNotEmpty
(
dbPz021s
))
{
return
dbPz021s
.
stream
().
map
(
HGPZ021:
:
getAliasName
).
collect
(
Collectors
.
toList
());
}
return
new
ArrayList
<>();
}
/**
* 填充EiMetadata
* 填充EiMetadata
*
*
* @param inInfo
* @param inInfo
...
...
src/main/java/com/baosight/hggp/hg/sc/enums/ProjectSourceEnum.java
View file @
ac2163ba
...
@@ -7,7 +7,7 @@ package com.baosight.hggp.hg.sc.enums;
...
@@ -7,7 +7,7 @@ package com.baosight.hggp.hg.sc.enums;
public
enum
ProjectSourceEnum
{
public
enum
ProjectSourceEnum
{
ENGINEERING
(
"engineering"
,
"工程设计图"
),
ENGINEERING
(
"engineering"
,
"工程设计图"
),
FOREIGN
(
"foreign"
,
"
生产
制造图"
),
FOREIGN
(
"foreign"
,
"
工程
制造图"
),
SPARE
(
"spare"
,
"备件制造图"
),
SPARE
(
"spare"
,
"备件制造图"
),
OTHER
(
"other"
,
"其他"
),
OTHER
(
"other"
,
"其他"
),
;
;
...
...
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC001.java
View file @
ac2163ba
...
@@ -7,8 +7,6 @@ import com.baosight.hggp.core.dao.DaoBase;
...
@@ -7,8 +7,6 @@ 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.core.security.UserSessionUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.pz.domain.HGPZ001
;
import
com.baosight.hggp.hg.pz.domain.HGPZ001
;
import
com.baosight.hggp.hg.pz.enums.DynamicTableEnum
;
import
com.baosight.hggp.hg.pz.utils.HGPZUtils
;
import
com.baosight.hggp.hg.sc.constant.HgScSqlConstant
;
import
com.baosight.hggp.hg.sc.constant.HgScSqlConstant
;
import
com.baosight.hggp.hg.sc.domain.HGSC001
;
import
com.baosight.hggp.hg.sc.domain.HGSC001
;
import
com.baosight.hggp.hg.sc.domain.HGSC001A
;
import
com.baosight.hggp.hg.sc.domain.HGSC001A
;
...
@@ -68,11 +66,7 @@ public class ServiceHGSC001 extends ServiceBase {
...
@@ -68,11 +66,7 @@ public class ServiceHGSC001 extends ServiceBase {
@OperationLogAnnotation
(
operModul
=
"项目立项"
,
operType
=
"查询"
,
operDesc
=
"查询"
)
@OperationLogAnnotation
(
operModul
=
"项目立项"
,
operType
=
"查询"
,
operDesc
=
"查询"
)
public
EiInfo
query
(
EiInfo
inInfo
)
{
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
try
{
// 设置动态列
HGPZUtils
.
HgPz020
.
buildDynamicColumn
(
inInfo
,
DynamicTableEnum
.
HGSC001
);
inInfo
=
super
.
query
(
inInfo
,
HGSC001
.
QUERY
,
new
HGSC001
());
inInfo
=
super
.
query
(
inInfo
,
HGSC001
.
QUERY
,
new
HGSC001
());
// 根据结果集填充eiMetadata
HGPZUtils
.
HgPz020
.
buildEiMetaData
(
inInfo
,
HGSC001
.
class
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
}
...
...
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC001.xml
View file @
ac2163ba
...
@@ -238,8 +238,7 @@
...
@@ -238,8 +238,7 @@
<select
id=
"query"
resultClass=
"com.baosight.hggp.hg.sc.domain.HGSC001"
>
<select
id=
"query"
resultClass=
"com.baosight.hggp.hg.sc.domain.HGSC001"
>
SELECT
SELECT
<isEmpty
property=
"dynamicColumn"
><include
refid=
"column"
/></isEmpty>
<include
refid=
"column"
/>
<isNotEmpty
property=
"dynamicColumn"
>
$dynamicColumn$
</isNotEmpty>
FROM ${hggpSchema}.HGSC001 WHERE 1=1
FROM ${hggpSchema}.HGSC001 WHERE 1=1
<include
refid=
"customCondition"
/>
<include
refid=
"customCondition"
/>
<include
refid=
"orderBy"
/>
<include
refid=
"orderBy"
/>
...
...
src/main/java/com/baosight/hggp/hg/wd/constant/HgWdSqlConstant.java
View file @
ac2163ba
...
@@ -26,6 +26,10 @@ public class HgWdSqlConstant {
...
@@ -26,6 +26,10 @@ public class HgWdSqlConstant {
public
static
final
String
QUERY_ALL
=
"HGWD001.queryAll"
;
public
static
final
String
QUERY_ALL
=
"HGWD001.queryAll"
;
// 查询子节点
// 查询子节点
public
static
final
String
QUERY_FILE_CHILD
=
"HGWD001.queryFileChild"
;
public
static
final
String
QUERY_FILE_CHILD
=
"HGWD001.queryFileChild"
;
// 查询子节点
public
static
final
String
QUERY_CHILDREN
=
"HGWD001.queryChildren"
;
// 查询项目来源
public
static
final
String
QUERY_PROJECT_SOURCE
=
"HGWD001.queryProjectSource"
;
public
static
final
String
UPDATE_FILE_PATH
=
"HGWD001.updateFilePath"
;
public
static
final
String
UPDATE_FILE_PATH
=
"HGWD001.updateFilePath"
;
}
}
...
...
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD001D.java
View file @
ac2163ba
...
@@ -9,6 +9,7 @@ import com.baosight.hggp.hg.sc.domain.HGSC001;
...
@@ -9,6 +9,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.sc.tools.HGSCTools
;
import
com.baosight.hggp.hg.sc.tools.HGSCTools
;
import
com.baosight.hggp.hg.wd.constant.HgWdConstant
;
import
com.baosight.hggp.hg.wd.constant.HgWdConstant
;
import
com.baosight.hggp.hg.wd.constant.HgWdSqlConstant
;
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.domain.HGWD003
;
import
com.baosight.hggp.hg.wd.domain.HGWD099
;
import
com.baosight.hggp.hg.wd.domain.HGWD099
;
...
@@ -30,7 +31,12 @@ import com.baosight.xservices.xs.util.LoginUserDetails;
...
@@ -30,7 +31,12 @@ import com.baosight.xservices.xs.util.LoginUserDetails;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
import
java.util.*
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Optional
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -237,25 +243,46 @@ public class ServiceHGWD001D extends TreeService {
...
@@ -237,25 +243,46 @@ public class ServiceHGWD001D extends TreeService {
*/
*/
public
List
queryTopNode
(
String
parentId
)
{
public
List
queryTopNode
(
String
parentId
)
{
List
<
Map
>
results
=
new
ArrayList
();
List
<
Map
>
results
=
new
ArrayList
();
// 管理员不做限制
boolean
isManager
=
HgWdUtils
.
HgWd009
.
isManager
();
List
<
String
>
projectSources
=
isManager
?
null
:
listTopNode
();
// 项目来源小代码
List
<
Map
>
codesetMaps
=
CodeValueTools
.
getCodeValues
(
"app.sc.projectSource"
);
List
<
Map
>
codesetMaps
=
CodeValueTools
.
getCodeValues
(
"app.sc.projectSource"
);
if
(
CollectionUtils
.
isEmpty
(
codesetMaps
))
{
return
results
;
}
for
(
Map
codesetMap
:
codesetMaps
)
{
for
(
Map
codesetMap
:
codesetMaps
)
{
String
label
=
MapUtils
.
getString
(
codesetMap
,
"value"
);
String
id
=
MapUtils
.
getString
(
codesetMap
,
"value"
);
String
text
=
MapUtils
.
getString
(
codesetMap
,
"label"
);
String
text
=
MapUtils
.
getString
(
codesetMap
,
"label"
);
Map
leafMap
=
buildLeaf
(
parentId
,
label
,
text
,
HgWdConstant
.
LeafType
.
P
);
// 不是管理员,且不存在,且不是备件制造图就不显示
if
(!
isManager
&&
!
projectSources
.
contains
(
id
)
&&
!
ProjectSourceEnum
.
SPARE
.
getCode
().
equals
(
id
))
{
continue
;
}
Map
leafMap
=
buildLeaf
(
parentId
,
id
,
text
,
HgWdConstant
.
LeafType
.
P
);
leafMap
.
put
(
"type"
,
"-1"
);
leafMap
.
put
(
"type"
,
"-1"
);
leafMap
.
put
(
"leafLevel"
,
"-1"
);
leafMap
.
put
(
"leafLevel"
,
"-1"
);
leafMap
.
put
(
"filePath"
,
text
);
leafMap
.
put
(
"filePath"
,
text
);
leafMap
.
put
(
"leaf"
,
0
);
results
.
add
(
leafMap
);
results
.
add
(
leafMap
);
}
}
// 设置叶子节点
setTreeNodeLeaf
(
results
,
true
);
return
results
;
return
results
;
}
}
/**
/**
* 查询顶级节点
*
* @return
*/
private
List
<
String
>
listTopNode
()
{
// 查询有权限的顶级目录,管理员不做要求,并且项目是审核通过
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"userId"
,
UserSessionUtils
.
getUserId
());
queryMap
.
put
(
"projectStatusYs"
,
HGConstant
.
ApprovalStatus
.
YS
);
List
<
HGWD001
>
dbWd001s
=
dao
.
query
(
HgWdSqlConstant
.
HgWd001
.
QUERY_PROJECT_SOURCE
,
queryMap
);
if
(
CollectionUtils
.
isEmpty
(
dbWd001s
))
{
return
new
ArrayList
<>();
}
return
dbWd001s
.
stream
().
map
(
HGWD001:
:
getProjectSource
).
collect
(
Collectors
.
toList
());
}
/**
* 查询一级节点
* 查询一级节点
*
*
* @param parentId
* @param parentId
...
@@ -263,15 +290,16 @@ public class ServiceHGWD001D extends TreeService {
...
@@ -263,15 +290,16 @@ public class ServiceHGWD001D extends TreeService {
* @return
* @return
*/
*/
public
List
queryFirstNode
(
String
parentId
,
String
ename
)
{
public
List
queryFirstNode
(
String
parentId
,
String
ename
)
{
boolean
isAuth
=
!
ProjectSourceEnum
.
SPARE
.
getCode
().
equals
(
parentId
);
// SPARE:备件制造图不限制;非管理员仅查询自己有权限的项目
String
userId
=
UserSessionUtils
.
getLoginName
();
boolean
isManager
=
HgWdUtils
.
HgWd009
.
isManager
(
userId
);
boolean
isSourceAuth
=
!
ProjectSourceEnum
.
SPARE
.
getCode
().
equals
(
parentId
);
List
<
Map
>
results
=
new
ArrayList
();
List
<
Map
>
results
=
new
ArrayList
();
Map
queryMap
=
new
HashMap
<>();
Map
queryMap
=
new
HashMap
<>();
queryMap
.
put
(
"ename"
,
ename
);
queryMap
.
put
(
"ename"
,
ename
);
queryMap
.
put
(
HGSC001
.
FIELD_project_source
,
parentId
);
queryMap
.
put
(
HGSC001
.
FIELD_project_source
,
parentId
);
queryMap
.
put
(
HGSC001
.
FIELD_approval_status
,
HGConstant
.
ApprovalStatus
.
YS
);
queryMap
.
put
(
HGSC001
.
FIELD_approval_status
,
HGConstant
.
ApprovalStatus
.
YS
);
// 非管理员仅查询自己有权限的项目
if
(
isSourceAuth
&&
!
isManager
)
{
String
userId
=
UserSessionUtils
.
getLoginName
();
if
(
isAuth
&&
!
HgWdUtils
.
HgWd009
.
isManager
(
userId
))
{
queryMap
.
put
(
"userId"
,
userId
);
queryMap
.
put
(
"userId"
,
userId
);
}
}
List
<
HGSC001
>
dbSc001s
=
dao
.
query
(
"HGSC101.query"
,
queryMap
);
List
<
HGSC001
>
dbSc001s
=
dao
.
query
(
"HGSC101.query"
,
queryMap
);
...
@@ -284,7 +312,7 @@ public class ServiceHGWD001D extends TreeService {
...
@@ -284,7 +312,7 @@ public class ServiceHGWD001D extends TreeService {
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
);
int
count
=
getChildCount
(
dbSc001
.
getProjCode
());
int
count
=
getChildCount
(
dbSc001
.
getProjCode
()
,
isManager
,
isSourceAuth
);
//Long count = hgwd003s.stream().filter(hgwd003 -> hgwd003.getFileId().equals(dbSc001.getProjCode())).count();
//Long count = hgwd003s.stream().filter(hgwd003 -> hgwd003.getFileId().equals(dbSc001.getProjCode())).count();
leafMap
.
put
(
"projCode"
,
dbSc001
.
getProjCode
());
leafMap
.
put
(
"projCode"
,
dbSc001
.
getProjCode
());
...
@@ -293,7 +321,7 @@ public class ServiceHGWD001D extends TreeService {
...
@@ -293,7 +321,7 @@ public class ServiceHGWD001D extends TreeService {
leafMap
.
put
(
"type"
,
"1"
);
leafMap
.
put
(
"type"
,
"1"
);
leafMap
.
put
(
"leafLevel"
,
"0"
);
leafMap
.
put
(
"leafLevel"
,
"0"
);
leafMap
.
put
(
"count"
,
count
);
leafMap
.
put
(
"count"
,
count
);
leafMap
.
put
(
"isAuth"
,
isAuth
?
"1"
:
"0"
);
leafMap
.
put
(
"isAuth"
,
is
Source
Auth
?
"1"
:
"0"
);
leafMap
.
put
(
"filePath"
,
ProjectSourceEnum
.
getByCode
(
parentId
).
getName
()+
"/"
+
text
);
leafMap
.
put
(
"filePath"
,
ProjectSourceEnum
.
getByCode
(
parentId
).
getName
()+
"/"
+
text
);
results
.
add
(
leafMap
);
results
.
add
(
leafMap
);
}
}
...
@@ -315,24 +343,28 @@ public class ServiceHGWD001D extends TreeService {
...
@@ -315,24 +343,28 @@ public class ServiceHGWD001D extends TreeService {
String
userId
=
UserSessionUtils
.
getLoginName
();
String
userId
=
UserSessionUtils
.
getLoginName
();
// 查询项目来源
// 查询项目来源
HGSC001
dbSc001
=
HGSCTools
.
Hgsc001
.
getByCode
(
projCode
);
HGSC001
dbSc001
=
HGSCTools
.
Hgsc001
.
getByCode
(
projCode
);
// true:需要权限
//
备件制造图不需要授权,
true:需要权限
boolean
isSourceAuth
=
!
ProjectSourceEnum
.
SPARE
.
getCode
().
equals
(
dbSc001
.
getProjectSource
());
boolean
isSourceAuth
=
!
ProjectSourceEnum
.
SPARE
.
getCode
().
equals
(
dbSc001
.
getProjectSource
());
// 是否文档管理员
boolean
isManager
=
HgWdUtils
.
HgWd009
.
isManager
();
Map
queryMap
=
new
HashMap
();
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"parentId"
,
parentId
);
queryMap
.
put
(
"parentId"
,
parentId
);
queryMap
.
put
(
"ename"
,
ename
);
queryMap
.
put
(
"ename"
,
ename
);
// 递归查询有权限的文件夹,管理员和备件制造图不限制
if
(!
isManager
&&
isSourceAuth
)
{
queryMap
.
put
(
"treeUserId"
,
userId
);
}
List
<
HGWD001
>
dbWd001s
=
dao
.
query
(
HGWD001
.
QUERY
,
queryMap
);
List
<
HGWD001
>
dbWd001s
=
dao
.
query
(
HGWD001
.
QUERY
,
queryMap
);
if
(
CollectionUtils
.
isEmpty
(
dbWd001s
))
{
if
(
CollectionUtils
.
isEmpty
(
dbWd001s
))
{
return
results
;
return
results
;
}
}
// 是否文档管理员
boolean
isManager
=
HgWdUtils
.
HgWd009
.
isManager
();
List
<
String
>
fileIds
=
dbWd001s
.
stream
().
map
(
HGWD001:
:
getFileId
).
distinct
().
collect
(
Collectors
.
toList
());
List
<
String
>
fileIds
=
dbWd001s
.
stream
().
map
(
HGWD001:
:
getFileId
).
distinct
().
collect
(
Collectors
.
toList
());
// 查询目录授权人数
// 查询目录授权人数
List
<
HGWD003
>
dbWd003s
=
HGWDTools
.
HgWd003
.
list
(
fileIds
);
List
<
HGWD003
>
dbWd003s
=
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
);
int
count
=
getChildCount
(
dbWd001
.
getFileId
());
int
count
=
getChildCount
(
dbWd001
.
getFileId
()
,
isManager
,
isSourceAuth
);
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
());
...
@@ -401,9 +433,10 @@ public class ServiceHGWD001D extends TreeService {
...
@@ -401,9 +433,10 @@ public class ServiceHGWD001D extends TreeService {
* @param fileId 目录ID
* @param fileId 目录ID
* @return 节点数量
* @return 节点数量
*/
*/
public
int
getChildCount
(
String
fileId
){
public
int
getChildCount
(
String
fileId
,
boolean
isManager
,
boolean
isSourceAuth
)
{
List
<
Map
>
hgwd001List
=
HGWDTools
.
HgWd001
.
queryFileChild
(
fileId
);
//查询子级目录
List
<
HGWD001
>
hgwd001List
=
HgWdUtils
.
HgWd001
.
queryChildren
(
fileId
,
isManager
,
isSourceAuth
);
//查询子级目录
List
<
String
>
childIds
=
Optional
.
ofNullable
(
hgwd001List
).
orElse
(
new
ArrayList
<>()).
stream
().
map
(
o
->
o
.
get
(
"fileId"
).
toString
()).
collect
(
Collectors
.
toList
());
List
<
String
>
childIds
=
Optional
.
ofNullable
(
hgwd001List
).
orElse
(
new
ArrayList
<>()).
stream
()
.
map
(
HGWD001:
:
getFileId
).
collect
(
Collectors
.
toList
());
// 已授权人员信息
// 已授权人员信息
List
<
HGWD003
>
dbWd003List
=
HGWDTools
.
HgWd003
.
list
(
childIds
);
List
<
HGWD003
>
dbWd003List
=
HGWDTools
.
HgWd003
.
list
(
childIds
);
List
<
HGWD099
>
fWd099s
=
HGWDTools
.
HgWd099
.
queryByBiz
(
"WD"
,
childIds
);
List
<
HGWD099
>
fWd099s
=
HGWDTools
.
HgWd099
.
queryByBiz
(
"WD"
,
childIds
);
...
...
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD003B.java
View file @
ac2163ba
...
@@ -60,7 +60,7 @@ public class ServiceHGWD003B extends ServiceEPBase {
...
@@ -60,7 +60,7 @@ public class ServiceHGWD003B extends ServiceEPBase {
// 仅查询自己是项目经理的目录
// 仅查询自己是项目经理的目录
String
userId
=
UserSessionUtils
.
getLoginName
();
String
userId
=
UserSessionUtils
.
getLoginName
();
if
(!
HgWdUtils
.
HgWd009
.
isManager
(
userId
))
{
if
(!
HgWdUtils
.
HgWd009
.
isManager
(
userId
))
{
queryMap
.
put
(
"
m
anagerUserId"
,
userId
);
queryMap
.
put
(
"
projectM
anagerUserId"
,
userId
);
}
}
inInfo
=
super
.
query
(
inInfo
,
HGWD001
.
QUERY
,
new
HGWD001
());
inInfo
=
super
.
query
(
inInfo
,
HGWD001
.
QUERY
,
new
HGWD001
());
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD099.java
View file @
ac2163ba
...
@@ -11,10 +11,12 @@ import com.baosight.hggp.hg.wd.domain.HGWD001A;
...
@@ -11,10 +11,12 @@ import com.baosight.hggp.hg.wd.domain.HGWD001A;
import
com.baosight.hggp.hg.wd.domain.HGWD003
;
import
com.baosight.hggp.hg.wd.domain.HGWD003
;
import
com.baosight.hggp.hg.wd.domain.HGWD099
;
import
com.baosight.hggp.hg.wd.domain.HGWD099
;
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.util.EiInfoUtils
;
import
com.baosight.hggp.util.EiInfoUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.MapUtils
;
import
com.baosight.hggp.util.MapUtils
;
import
com.baosight.hggp.util.ObjectUtils
;
import
com.baosight.hggp.util.ObjectUtils
;
import
com.baosight.hggp.util.StringUtils
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
...
@@ -22,10 +24,8 @@ import com.baosight.iplat4j.core.exception.PlatException;
...
@@ -22,10 +24,8 @@ import com.baosight.iplat4j.core.exception.PlatException;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Optional
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -62,18 +62,22 @@ public class ServiceHGWD099 extends ServiceEPBase {
...
@@ -62,18 +62,22 @@ public class ServiceHGWD099 extends ServiceEPBase {
@Override
@Override
public
EiInfo
query
(
EiInfo
inInfo
)
{
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
try
{
Map
queryRow
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
Map
queryRow
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
if
(
ObjectUtils
.
isNotBlank
(
queryRow
.
get
(
HGWD001
.
FIELD_PARENT_ID
))){
String
parentId
=
MapUtils
.
getString
(
queryRow
,
HGWD001
.
FIELD_PARENT_ID
);
List
<
Map
>
childList
=
HGWDTools
.
HgWd001
.
queryFileChild
(
queryRow
.
get
(
HGWD001
.
FIELD_PARENT_ID
).
toString
()
);
String
projCode
=
MapUtils
.
getString
(
queryRow
,
HGWD001
.
FIELD_PROJ_CODE
);
if
(
childList
==
null
)
{
if
(
StringUtils
.
isBlank
(
parentId
))
{
return
inInfo
;
return
inInfo
;
}
}
List
<
String
>
childFileIdList
=
Optional
.
of
(
childList
).
orElse
(
new
ArrayList
<>()).
stream
().
map
(
map
->
map
.
get
(
HGWD001
.
FIELD_FILE_ID
).
toString
()).
collect
(
Collectors
.
toList
());
// 查询子节点
queryRow
.
put
(
"bizIds"
,
childFileIdList
);
List
<
HGWD001
>
children
=
HgWdUtils
.
HgWd001
.
queryChildren
(
parentId
,
projCode
);
if
(
CollectionUtils
.
isEmpty
(
children
))
{
return
inInfo
;
}
// 需要包含自身
queryRow
.
put
(
"bizIds"
,
children
.
stream
().
map
(
HGWD001:
:
getFileId
).
collect
(
Collectors
.
toList
()));
queryRow
.
remove
(
HGWD099
.
FIELD_BIZ_ID
);
queryRow
.
remove
(
HGWD099
.
FIELD_BIZ_ID
);
inInfo
.
getBlock
(
EiConstant
.
queryBlock
).
getRow
(
ACConstants
.
ROW_CODE_0
).
remove
(
HGWD001
.
FIELD_PARENT_ID
);
inInfo
.
getBlock
(
EiConstant
.
queryBlock
).
getRow
(
ACConstants
.
ROW_CODE_0
).
remove
(
HGWD001
.
FIELD_PARENT_ID
);
inInfo
=
super
.
query
(
inInfo
,
HGWD099
.
QUERY
,
new
HGWD099
());
inInfo
=
super
.
query
(
inInfo
,
HGWD099
.
QUERY
,
new
HGWD099
());
}
}
catch
(
Throwable
e
)
{
}
catch
(
Throwable
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
}
...
...
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD001.xml
View file @
ac2163ba
...
@@ -32,29 +32,12 @@
...
@@ -32,29 +32,12 @@
<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=
"createdBy"
>
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdName"
>
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdTime"
>
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"updatedBy"
>
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"updatedName"
>
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"updatedTime"
>
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
COMPANY_CODE = #companyCode#
</isNotEmpty>
</isNotEmpty>
...
@@ -82,18 +65,9 @@
...
@@ -82,18 +65,9 @@
<isNotEmpty
prepend=
" AND "
property=
"fileName"
>
<isNotEmpty
prepend=
" AND "
property=
"fileName"
>
FILE_NAME LIKE CONCAT('%', #fileName#, '%')
FILE_NAME LIKE CONCAT('%', #fileName#, '%')
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"docVersion"
>
DOC_VERSION = #docVersion#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"status"
>
<isNotEmpty
prepend=
" AND "
property=
"status"
>
STATUS = #status#
STATUS = #status#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"remark"
>
REMARK = #remark#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"releaseDate"
>
RELEASE_DATE = #releaseDate#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"filePath"
>
<isNotEmpty
prepend=
" AND "
property=
"filePath"
>
FILE_PATH = #filePath#
FILE_PATH = #filePath#
</isNotEmpty>
</isNotEmpty>
...
@@ -106,17 +80,27 @@
...
@@ -106,17 +80,27 @@
<isNotEmpty
prepend=
" AND "
property=
"parentIds"
>
<isNotEmpty
prepend=
" AND "
property=
"parentIds"
>
PARENT_ID IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"parentIds"
>
#parentIds[]#
</iterate>
PARENT_ID IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"parentIds"
>
#parentIds[]#
</iterate>
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"
m
anagerUserId"
>
<isNotEmpty
prepend=
" AND "
property=
"
projectM
anagerUserId"
>
EXISTS (SELECT FILE_ID FROM ${hggpSchema}.HGWD003 M WHERE
T.FILE_ID = M.FILE_ID
EXISTS (SELECT FILE_ID FROM ${hggpSchema}.HGWD003 M WHERE
M.DELETE_FLAG = 0
AND
M.USER_ID = #m
anagerUserId#
AND
T.FILE_ID = M.FILE_ID AND M.USER_ID = #projectM
anagerUserId#
AND M.IS_PROJECT_MANAGER = 1
AND M.IS_PROJECT_MANAGER = 1
)
)
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"userId"
open=
"("
close=
")"
>
<isNotEmpty
prepend=
" AND "
property=
"userId"
open=
"("
close=
")"
>
EXISTS (SELECT FILE_ID FROM ${hggpSchema}.HGWD003 M WHERE
T.FILE_ID = M.FILE_ID
EXISTS (SELECT FILE_ID FROM ${hggpSchema}.HGWD003 M WHERE
M.DELETE_FLAG = 0
AND M.USER_ID = #userId#
AND T.FILE_ID = M.FILE_ID
AND M.USER_ID = #userId#
) OR PROJECT_SOURCE = 'spare'
) OR PROJECT_SOURCE = 'spare'
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"treeUserId"
>
EXISTS (SELECT FILE_ID FROM ${hggpSchema}.HGWD003 M WHERE M.DELETE_FLAG = 0
AND M.USER_ID = #treeUserId#
AND FIND_IN_SET(M.FILE_ID, (SELECT ${hggpSchema}.queryWdTreeInfo(T.FILE_ID)))
)
</isNotEmpty>
<!-- 项目状态,2-审核通过 -->
<isNotEmpty
prepend=
" AND "
property=
"projectStatusYs"
>
EXISTS (SELECT * FROM ${hggpSchema}.HGSC001 M WHERE T.PROJ_CODE = M.PROJ_CODE AND M.APPROVAL_STATUS = 2)
</isNotEmpty>
</sql>
</sql>
<sql
id=
"orderBy"
>
<sql
id=
"orderBy"
>
...
@@ -145,6 +129,14 @@
...
@@ -145,6 +129,14 @@
<include
refid=
"condition"
/>
<include
refid=
"condition"
/>
</select>
</select>
<select
id=
"queryProjectSource"
resultClass=
"com.baosight.hggp.hg.wd.domain.HGWD001"
>
SELECT
DISTINCT PROJECT_SOURCE as "projectSource"
FROM ${hggpSchema}.HGWD001 T
WHERE 1=1
<include
refid=
"condition"
/>
</select>
<!-- 更具父级节点统计 -->
<!-- 更具父级节点统计 -->
<select
id=
"countByParent"
resultClass=
"java.util.HashMap"
>
<select
id=
"countByParent"
resultClass=
"java.util.HashMap"
>
SELECT PARENT_ID, COUNT(1) AS CNT
SELECT PARENT_ID, COUNT(1) AS CNT
...
@@ -344,6 +336,18 @@
...
@@ -344,6 +336,18 @@
order by CREATED_TIME asc
order by CREATED_TIME asc
</select>
</select>
<!-- 查询字节点,包含自身 -->
<select
id=
"queryChildren"
resultClass=
"com.baosight.hggp.hg.wd.domain.HGWD001"
>
SELECT
<include
refid=
"column"
/>
FROM ${hggpSchema}.HGWD001 T WHERE DELETE_FLAG = 0
AND FIND_IN_SET(FILE_ID, (SELECT ${hggpSchema}.queryWdTreeInfo(#parentId#)))
<isNotEmpty
prepend=
" AND "
property=
"userId"
>
EXISTS (SELECT FILE_ID FROM ${hggpSchema}.HGWD003 M WHERE M.DELETE_FLAG = 0
AND M.FILE_ID = T.FILE_ID AND M.USER_ID = #userId#
)
</isNotEmpty>
</select>
<!--档库所有子节点树查询-->
<!--档库所有子节点树查询-->
<select
id=
"queryFileChild"
resultClass=
"java.util.HashMap"
>
<select
id=
"queryFileChild"
resultClass=
"java.util.HashMap"
>
SELECT
SELECT
...
...
src/main/java/com/baosight/hggp/hg/wd/tools/HGWDTools.java
View file @
ac2163ba
...
@@ -229,6 +229,34 @@ public class HGWDTools {
...
@@ -229,6 +229,34 @@ public class HGWDTools {
List
<
Map
>
results
=
DaoBase
.
getInstance
().
query
(
HgWdSqlConstant
.
HgWd001
.
QUERY_FILE_CHILD
,
queryMap
);
List
<
Map
>
results
=
DaoBase
.
getInstance
().
query
(
HgWdSqlConstant
.
HgWd001
.
QUERY_FILE_CHILD
,
queryMap
);
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
;
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
;
}
}
/**
* 查询有权限的子节点
*
* @param parentId
* @return
*/
public
static
List
<
HGWD001
>
queryChildrenByUser
(
String
parentId
)
{
AssertUtils
.
isEmpty
(
parentId
,
"文件ID不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"parentId"
,
parentId
);
queryMap
.
put
(
"userId"
,
UserSessionUtils
.
getUserId
());
return
DaoBase
.
getInstance
().
query
(
HgWdSqlConstant
.
HgWd001
.
QUERY_CHILDREN
,
queryMap
);
}
/**
* 查询所有的子节点
*
* @param parentId
* @return
*/
public
static
List
<
HGWD001
>
queryChildren
(
String
parentId
)
{
AssertUtils
.
isEmpty
(
parentId
,
"文件ID不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"parentId"
,
parentId
);
return
DaoBase
.
getInstance
().
query
(
HgWdSqlConstant
.
HgWd001
.
QUERY_CHILDREN
,
queryMap
);
}
}
}
...
...
src/main/java/com/baosight/hggp/hg/wd/utils/HgWdUtils.java
View file @
ac2163ba
...
@@ -9,6 +9,8 @@ import com.baosight.hggp.hg.wd.domain.HGWD003;
...
@@ -9,6 +9,8 @@ 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.util.StringUtils
;
import
com.baosight.hggp.util.StringUtils
;
import
java.util.List
;
/**
/**
* @author:songx
* @author:songx
* @date:2024/9/23,14:57
* @date:2024/9/23,14:57
...
@@ -27,14 +29,21 @@ public class HgWdUtils {
...
@@ -27,14 +29,21 @@ public class HgWdUtils {
/**
/**
* 是否备件制造图
* 是否备件制造图
*
*
* @param
fil
eId
* @param
tre
eId
* @return
* @return
*/
*/
public
static
boolean
isSpare
(
String
fileId
)
{
public
static
boolean
isSpare
(
String
treeId
)
{
if
(
StringUtils
.
isBlank
(
fileId
))
{
if
(
ProjectSourceEnum
.
SPARE
.
getCode
().
equals
(
treeId
))
{
return
true
;
}
HGSC001
dbSc001
=
HGSCTools
.
Hgsc001
.
getByCode
(
treeId
);
if
(
dbSc001
!=
null
)
{
if
(
StringUtils
.
isBlank
(
dbSc001
.
getProjectSource
()))
{
return
false
;
return
false
;
}
}
HGWD001
dbWd001
=
HGWDTools
.
HgWd001
.
get
(
fileId
);
return
ProjectSourceEnum
.
SPARE
.
getCode
().
equals
(
dbSc001
.
getProjectSource
());
}
HGWD001
dbWd001
=
HGWDTools
.
HgWd001
.
get
(
treeId
);
if
(
dbWd001
==
null
||
StringUtils
.
isBlank
(
dbWd001
.
getProjectSource
()))
{
if
(
dbWd001
==
null
||
StringUtils
.
isBlank
(
dbWd001
.
getProjectSource
()))
{
return
false
;
return
false
;
}
}
...
@@ -61,6 +70,41 @@ public class HgWdUtils {
...
@@ -61,6 +70,41 @@ public class HgWdUtils {
}
}
return
ProjectSourceEnum
.
SPARE
.
getCode
().
equals
(
dbSc001
.
getProjectSource
());
return
ProjectSourceEnum
.
SPARE
.
getCode
().
equals
(
dbSc001
.
getProjectSource
());
}
}
/**
* 查询子节点
*
* @param parentId
* @param projCode
* @return
*/
public
static
List
<
HGWD001
>
queryChildren
(
String
parentId
,
String
projCode
)
{
// 管理员或者备件制造图查询所有子节点;其余查询当前节点有权限的子节点
boolean
isManager
=
HgWdUtils
.
HgWd009
.
isManager
();
boolean
isSpare
=
HgWdUtils
.
HgWd001
.
isSpare
(
parentId
,
projCode
);
if
(
isManager
||
isSpare
)
{
return
HGWDTools
.
HgWd001
.
queryChildren
(
parentId
);
}
else
{
return
HGWDTools
.
HgWd001
.
queryChildrenByUser
(
parentId
);
}
}
/**
* 查询子节点
*
* @param parentId
* @param isManager
* @param isSpare
* @return
*/
public
static
List
<
HGWD001
>
queryChildren
(
String
parentId
,
boolean
isManager
,
boolean
isSpare
)
{
// 管理员或者备件制造图查询所有子节点;其余查询当前节点有权限的子节点
if
(
isManager
||
isSpare
)
{
return
HGWDTools
.
HgWd001
.
queryChildren
(
parentId
);
}
else
{
return
HGWDTools
.
HgWd001
.
queryChildrenByUser
(
parentId
);
}
}
}
}
...
...
src/main/resources/META-INF/resources/file/template/hgpz021.xls
View file @
ac2163ba
No preview for this file type
src/main/webapp/HG/CW/HGCW002.js
View file @
ac2163ba
$
(
function
()
{
$
(
function
()
{
// 查询
// 查询
$
(
"#QUERY"
).
on
(
"click"
,
function
()
{
$
(
"#QUERY"
).
on
(
"click"
,
query
);
query
();
});
$
(
"#QUERY_MORE"
).
on
(
"click"
,
function
(){
$
(
"#QUERY_MORE"
).
on
(
"click"
,
function
(){
grush
.
queryMore
(
68
)
grush
.
queryMore
(
68
)
})
})
...
@@ -16,15 +15,18 @@ $(function() {
...
@@ -16,15 +15,18 @@ $(function() {
},
},
columns
:
[{
columns
:
[{
field
:
"operator"
,
field
:
"operator"
,
title
:
"操作"
,
template
:
function
(
item
)
{
template
:
function
(
item
)
{
if
(
CommonUtils
.
isBlank
(
item
.
id
)
||
item
.
id
===
"0"
)
{
return
""
;
}
let
template
=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
let
template
=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="contractDetailFunc('
+
item
.
id
+
')">合同详情</a>'
;
+
'onclick="contractDetailFunc('
+
item
.
id
+
')">合同详情</a>'
;
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="fileDetailFunc('
+
item
.
id
+
')">附件详情</a>'
;
+
'onclick="fileDetailFunc('
+
item
.
id
+
')">附件详情</a>'
;
return
template
;
return
template
;
}
}
}
}],
],
exportGrid
:
{
exportGrid
:
{
beforeExport
:
function
(
gridInstance
)
{
beforeExport
:
function
(
gridInstance
)
{
var
validator1
=
IPLAT
.
Validator
({
var
validator1
=
IPLAT
.
Validator
({
...
...
src/main/webapp/HG/CW/HGCW002.jsp
View file @
ac2163ba
<%@ page import="com.baosight.hggp.hg.pz.utils.HGPZUtils" %>
<%@ page import="com.baosight.hggp.hg.pz.enums.DynamicTableEnum" %>
<%@ page import="java.util.List" %>
<%@ page import="org.apache.commons.collections.CollectionUtils" %>
<!DOCTYPE html>
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<style type="text/css">
<style type="text/css">
#more {
#more {
...
@@ -11,11 +15,15 @@
...
@@ -11,11 +15,15 @@
transition: height 0.5s ease-in-out;
transition: height 0.5s ease-in-out;
}
}
</style>
</style>
<script>
<%
var
ctx
=
"${ctx}"
;
// 查询动态显示列的别名
</script>
List<String> dynamicColumnAlias = HGPZUtils.HgPz020.listDynamicColumnAlias(DynamicTableEnum.HGCW002);
<EF:EFPage
title=
"合同管理"
>
// 以#隔开字段别名
request.setAttribute("dynamicColumnAlias", CollectionUtils.isEmpty(dynamicColumnAlias) ? "" :
"#" + String.join("#", dynamicColumnAlias) + "#");
%>
<EF:EFPage title="合同管理">
<EF:EFRegion id="inqu" title="查询条件">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<div class="row">
<EF:EFSelect cname="公司名称" blockId="inqu_status" ename="companyCode" row="0" colWidth="3" filter="contains">
<EF:EFSelect cname="公司名称" blockId="inqu_status" ename="companyCode" row="0" colWidth="3" filter="contains">
...
@@ -61,51 +69,67 @@
...
@@ -61,51 +69,67 @@
</div>
</div>
</EF:EFRegion>
</EF:EFRegion>
<EF:EFRegion
id=
"result"
title=
"记录集
"
>
<EF:EFRegion id="result" title="记录集" fitHeight="true
">
<EF:EFGrid
blockId=
"result"
autoDraw=
"no"
isFloat=
"true"
autoBind=
"false"
autoFit=
"false"
sort=
"all
"
>
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" autoBind="false" sort="single" height="69vh
">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn
ename=
"operator"
cname=
"操作"
locked=
"true"
enable=
"false"
width=
"200"
align=
"center"
sort=
"false"
/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="140" align="center"
<EF:EFColumn
ename=
"companyName"
cname=
"所属公司"
align=
"center"
enable=
"false"
/>
sort="false"/>
<EF:EFColumn
ename=
"projCode"
cname=
"项目编号"
align=
"center"
enable=
"false"
/>
<EF:EFColumn ename="companyName" cname="所属公司" enable="false" width="160" align="left"
<EF:EFColumn
ename=
"projName"
cname=
"项目名称"
align=
"center"
enable=
"false"
/>
hidden="${fn:contains(requestScope.dynamicColumnAlias, '#companyName#')? false: true}"/>
<EF:EFColumn
ename=
"signingDate"
cname=
"签订日期"
align=
"center"
enable=
"false"
editType=
"date"
parseFormats=
"['yyyyMMdd']"
parseFormat=
"yyyy-MM-dd"
/>
<EF:EFColumn ename="projCode" cname="项目编号" align="center" enable="false" width="140"
<EF:EFColumn
ename=
"contractNumber"
cname=
"合同号"
align=
"center"
enable=
"false"
/>
hidden="${fn:contains(requestScope.dynamicColumnAlias, '#projCode#')? false: true}"/>
<EF:EFColumn
ename=
"contractName"
cname=
"合同名称"
align=
"center"
enable=
"false"
/>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="160" align="left"
<EF:EFColumn
ename=
"partyA"
cname=
"甲方名称"
align=
"center"
enable=
"false"
/>
hidden="${fn:contains(requestScope.dynamicColumnAlias, '#projName#')? false: true}"/>
<EF:EFColumn
ename=
"partyB"
cname=
"乙方名称"
align=
"center"
enable=
"false"
/>
<EF:EFColumn ename="signingDate" cname="签订日期" align="center" enable="false" width="120"
<EF:EFComboColumn
ename=
"branchUnit"
cname=
"分支单位"
enable=
"false"
width=
"160"
align=
"center"
required=
"false"
editType="date" parseFormats="['yyyyMMdd']" parseFormat="yyyy-MM-dd"
blockName=
"customer_record_block_id"
textField=
"textField"
valueField=
"valueField"
hidden="${fn:contains(requestScope.dynamicColumnAlias, '#signingDate#')? false: true}"/>
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
readonly=
"false"
<EF:EFColumn ename="contractNumber" cname="合同号" enable="false" width="140" align="center"
filter=
"contains"
>
hidden="${fn:contains(requestScope.dynamicColumnAlias, '#contractNumber#')? false: true}"/>
</EF:EFComboColumn>
<EF:EFColumn ename="contractName" cname="合同名称" enable="false" width="160" align="left"
<EF:EFColumn
ename=
"mainContractNumber"
cname=
"主合同号"
align=
"center"
enable=
"false"
/>
hidden="${fn:contains(requestScope.dynamicColumnAlias, '#contractName#')? false: true}"/>
<EF:EFComboColumn
ename=
"mainContractNumber"
cname=
"主合同名称"
enable=
"false"
width=
"160"
align=
"center"
required=
"false"
<EF:EFColumn ename="partyA" cname="甲方名称" enable="false" width="180" align="left"
blockName=
"contract_block_id"
textField=
"textField"
valueField=
"valueField"
hidden="${fn:contains(requestScope.dynamicColumnAlias, '#partyA#')? false: true}"/>
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
readonly=
"false"
<EF:EFColumn ename="partyB" cname="乙方名称" enable="false" width="180" align="left"
filter=
"contains"
>
hidden="${fn:contains(requestScope.dynamicColumnAlias, '#partyB#')? false: true}"/>
<EF:EFComboColumn ename="branchUnit" cname="分支单位" enable="false" width="160" align="left"
required="false" blockName="customer_record_block_id" textField="textField"
valueField="valueField" columnTemplate="#=textField#" itemTemplate="#=textField#"
readonly="false" filter="contains"
hidden="${fn:contains(requestScope.dynamicColumnAlias, '#branchUnit#')? false: true}">
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFColumn ename="mainContractNumber" cname="主合同号" enable="false" width="140" align="center"
hidden="${fn:contains(requestScope.dynamicColumnAlias, '#mainContractNumber#')? false: true}"/>
<%-- <EF:EFComboColumn ename="mainContractNumber" cname="主合同名称" enable="false" width="160" align="center"--%>
<%-- required="false" blockName="contract_block_id" textField="textField"--%>
<%-- valueField="valueField" columnTemplate="#=textField#" itemTemplate="#=textField#"--%>
<%-- readonly="false" filter="contains"--%>
<%-- hidden="${fn:contains(requestScope.dynamicColumnAlias, '#mainContractNumber#')? false: true}">--%>
<%-- </EF:EFComboColumn>--%>
<EF:EFComboColumn ename="contractType" cname="合同类型" width="100" align="center"
<EF:EFComboColumn ename="contractType" cname="合同类型" width="100" align="center"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
enable=
"false"
>
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false"
hidden="${fn:contains(requestScope.dynamicColumnAlias, '#contractType#')? false: true}">
<EF:EFCodeOption codeName="hggp.cw.contractType" condition="ITEM_CODE IN ('1', '2', '3', '5')"/>
<EF:EFCodeOption codeName="hggp.cw.contractType" condition="ITEM_CODE IN ('1', '2', '3', '5')"/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFComboColumn ename="contractCategory" cname="合同类别" width="100" align="center"
<EF:EFComboColumn ename="contractCategory" cname="合同类别" width="100" align="center"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
enable=
"false"
>
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false"
hidden="${fn:contains(requestScope.dynamicColumnAlias, '#contractCategory#')? false: true}">
<EF:EFCodeOption codeName="hggp.cw.contractCategory"/>
<EF:EFCodeOption codeName="hggp.cw.contractCategory"/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFComboColumn ename="contractStatus" cname="合同状态" width="100" align="center"
<EF:EFComboColumn ename="contractStatus" cname="合同状态" width="100" align="center"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
enable=
"false"
>
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false"
hidden="${fn:contains(requestScope.dynamicColumnAlias, '#contractStatus#')? false: true}">
<EF:EFCodeOption codeName="hggp.cw.contractStatus"/>
<EF:EFCodeOption codeName="hggp.cw.contractStatus"/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFComboColumn ename="reviewStatus" cname="审批状态" width="100" align="center"
<EF:EFComboColumn ename="reviewStatus" cname="审批状态" width="100" align="center"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
enable=
"false"
>
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false"
hidden="${fn:contains(requestScope.dynamicColumnAlias, '#reviewStatus#')? false: true}">
<EF:EFCodeOption codeName="hggp.cw.reviewStatus"/>
<EF:EFCodeOption codeName="hggp.cw.reviewStatus"/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFComboColumn ename="balanceStatus" cname="结算状态" width="100" align="center"
<EF:EFComboColumn ename="balanceStatus" cname="结算状态" width="100" align="center"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
enable=
"false"
>
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false"
hidden="${fn:contains(requestScope.dynamicColumnAlias, '#balanceStatus#')? false: true}">
<EF:EFCodeOption codeName="hggp.cw.balanceStatus"/>
<EF:EFCodeOption codeName="hggp.cw.balanceStatus"/>
</EF:EFComboColumn>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFRegion>
</EF:EFPage>
</EF:EFPage>
<
%
--
<
script
src=
"${ctx}/HG/CW/HGCW002.js"
></script>
--%>
src/main/webapp/HG/PZ/HGPZ020.jsp
View file @
ac2163ba
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFOptions
blockId=
"account_block_id"
textField=
"textField"
valueField=
"valueField"
/>
<EF:EFOptions
blockId=
"account_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFSelect>
</EF:EFSelect>
<EF:EFSelect
ename=
"tableCode"
cname=
"页面名称"
blockId=
"
result
"
row=
"0"
colWidth=
"3"
filter=
"contains"
<EF:EFSelect
ename=
"tableCode"
cname=
"页面名称"
blockId=
"
inqu_status
"
row=
"0"
colWidth=
"3"
filter=
"contains"
required=
"true"
optionLabel=
"全部"
template=
"#=valueField#-#=textField#"
required=
"true"
optionLabel=
"全部"
template=
"#=valueField#-#=textField#"
valueTemplate=
"#=valueField#-#=textField#"
>
valueTemplate=
"#=valueField#-#=textField#"
>
<EF:EFCodeOption
codeName=
"app.pz.dynamicTable"
/>
<EF:EFCodeOption
codeName=
"app.pz.dynamicTable"
/>
...
...
src/main/webapp/HG/PZ/HGPZ021.js
View file @
ac2163ba
...
@@ -101,7 +101,7 @@ function remove() {
...
@@ -101,7 +101,7 @@ function remove() {
* 导入
* 导入
*/
*/
let
importData
=
function
()
{
let
importData
=
function
()
{
CommonUtils
.
importData
(
"HGPZ021"
,
"
表
字段导入"
,
importDataCallback
);
CommonUtils
.
importData
(
"HGPZ021"
,
"
页面
字段导入"
,
importDataCallback
);
}
}
/**
/**
...
...
src/main/webapp/HG/SC/HGSC001.js
View file @
ac2163ba
$
(
function
()
{
$
(
function
()
{
var
projTypeList
=
__eiInfo
.
getBlock
(
"proj_type_block_id"
).
getMappedRows
();
var
projTypeList
=
__eiInfo
.
getBlock
(
"proj_type_block_id"
).
getMappedRows
();
$
(
"#QUERY"
).
on
(
"click"
,
function
()
{
$
(
"#QUERY"
).
on
(
"click"
,
query
);
resultGrid
.
dataSource
.
page
(
1
);
});
$
(
"#QUERY_MORE"
).
on
(
"click"
,
function
(){
$
(
"#QUERY_MORE"
).
on
(
"click"
,
function
(){
grush
.
queryMore
(
34
)
grush
.
queryMore
(
34
)
...
@@ -16,6 +14,7 @@ $(function () {
...
@@ -16,6 +14,7 @@ $(function () {
},
},
columns
:
[{
columns
:
[{
field
:
"projType"
,
field
:
"projType"
,
title
:
"项目性质"
,
template
:
function
(
item
)
{
template
:
function
(
item
)
{
let
template
=
""
;
let
template
=
""
;
if
(
item
.
projType
&&
projTypeList
&&
projTypeList
.
length
>
0
)
{
if
(
item
.
projType
&&
projTypeList
&&
projTypeList
.
length
>
0
)
{
...
@@ -39,13 +38,10 @@ $(function () {
...
@@ -39,13 +38,10 @@ $(function () {
title
:
"操作"
,
title
:
"操作"
,
template
:
function
(
item
)
{
template
:
function
(
item
)
{
let
template
=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
let
template
=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
+
'onclick="showInfo('
+
item
.
id
+
')" >立项详情</a>'
;
'onclick="showInfo('
+
item
.
id
+
')" >立项详情</a>'
;
return
template
;
return
template
;
}
}
}
}],
],
exportGrid
:
{
exportGrid
:
{
beforeExport
:
function
(
gridInstance
)
{
beforeExport
:
function
(
gridInstance
)
{
var
validator1
=
IPLAT
.
Validator
({
var
validator1
=
IPLAT
.
Validator
({
...
@@ -98,6 +94,11 @@ $(function () {
...
@@ -98,6 +94,11 @@ $(function () {
}
}
});
});
$
(
window
).
load
(
function
()
{
// 查
query
();
});
/**
/**
* 查询
* 查询
*/
*/
...
@@ -105,11 +106,6 @@ function query() {
...
@@ -105,11 +106,6 @@ function query() {
resultGrid
.
dataSource
.
page
(
1
);
resultGrid
.
dataSource
.
page
(
1
);
}
}
$
(
window
).
load
(
function
()
{
// 查
query
();
});
function
showInfo
(
id
)
{
function
showInfo
(
id
)
{
JSColorbox
.
open
({
JSColorbox
.
open
({
href
:
"HGSC001D?inqu_status-0-id="
+
id
+
"&efParentFormEname=HGSC001"
,
href
:
"HGSC001D?inqu_status-0-id="
+
id
+
"&efParentFormEname=HGSC001"
,
...
...
src/main/webapp/HG/SC/HGSC001.jsp
View file @
ac2163ba
<%@ page import="com.baosight.hggp.hg.pz.utils.HGPZUtils" %>
<%@ page import="com.baosight.hggp.hg.pz.enums.DynamicTableEnum" %>
<%@ page import="java.util.List" %>
<%@ page import="org.apache.commons.collections.CollectionUtils" %>
<!DOCTYPE html>
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
...
@@ -11,9 +16,14 @@
...
@@ -11,9 +16,14 @@
transition: height 0.5s ease-in-out;
transition: height 0.5s ease-in-out;
}
}
</style>
</style>
<script>
<%
var
ctx
=
"${ctx}"
;
// 查询动态显示列的别名
</script>
List<String> dynamicColumnAlias = HGPZUtils.HgPz020.listDynamicColumnAlias(DynamicTableEnum.HGSC001);
// 以#隔开字段别名
request.setAttribute("dynamicColumnAlias", CollectionUtils.isEmpty(dynamicColumnAlias) ? "" :
"#" + String.join("#", dynamicColumnAlias) + "#");
%>
<EF:EFPage title="项目立项">
<EF:EFPage title="项目立项">
<EF:EFRegion id="inqu" title="查询条件">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<div class="row">
...
@@ -47,31 +57,44 @@
...
@@ -47,31 +57,44 @@
role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
</div>
</div>
</EF:EFRegion>
</EF:EFRegion>
<EF:EFRegion
id=
"result"
title=
"记录集"
>
<EF:EFRegion id="result" title="记录集" fitHeight="true">
<EF:EFGrid
blockId=
"result"
autoDraw=
"mixed"
isFloat=
"true"
copyToAdd=
"false"
sort=
"single"
>
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" autoBind="false" copyToAdd="false" sort="single"
height="69vh">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn
ename=
"operator"
cname=
"操作"
locked=
"true"
enable=
"false"
width=
"100"
align=
"center"
sort=
"false"
/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"
<
%
--
<
EF:EFColumn
ename=
"companyName"
cname=
"公司名称"
enable=
"false"
width=
"120"
align=
"center"
/>
--%>
sort="false"/>
<
%
--
<
EF:EFColumn
ename=
"projCode"
cname=
"项目编码"
enable=
"false"
width=
"120"
align=
"center"
/>
--%>
<EF:EFColumn ename="companyName" cname="公司名称" enable="false" width="120" align="center"
<
%
--
<
EF:EFColumn
ename=
"projName"
cname=
"项目名称"
enable=
"false"
width=
"120"
align=
"center"
/>
--%>
hidden="${fn:contains(requestScope.dynamicColumnAlias, '#companyName#')? false: true}"/>
<
%
--
<
EF:EFColumn
ename=
"subcontractName"
cname=
"分包方"
enable=
"false"
width=
"120"
align=
"center"
/>
--%>
<EF:EFColumn ename="projCode" cname="项目编码" enable="false" width="120" align="center"
<
%
--
<
EF:EFColumn
ename=
"genralContractName"
cname=
"总包方"
enable=
"false"
width=
"120"
align=
"center"
/>
--%>
hidden="${fn:contains(requestScope.dynamicColumnAlias, '#projCode#')? false: true}"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="120" align="center"
hidden="${fn:contains(requestScope.dynamicColumnAlias, '#projName#')? false: true}"/>
<EF:EFColumn ename="subcontractName" cname="分包方" enable="false" width="120" align="center"
hidden="${fn:contains(requestScope.dynamicColumnAlias, '#subcontractName#')? false: true}"/>
<EF:EFColumn ename="genralContractName" cname="总包方" enable="false" width="120" align="center"
hidden="${fn:contains(requestScope.dynamicColumnAlias, '#genralContractName#')? false: true}"/>
<EF:EFComboColumn ename="branchUnit" cname="分支单位" enable="false" width="130" align="left"
<EF:EFComboColumn ename="branchUnit" cname="分支单位" enable="false" width="130" align="left"
columnTemplate="#=textField#" itemTemplate="#=textField#"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField=
"textField"
valueField=
"valueField
"
textField="textField" valueField="valueField" maxLength="16" required="true
"
maxLength=
"16"
readonly=
"false"
required
=
"true"
filter="contains" sort
="true"
filter=
"contains"
sort=
"true
"
>
hidden="${fn:contains(requestScope.dynamicColumnAlias, '#branchUnit#')? false: true}
">
<EF:EFOptions blockId="customer_record_block_id" textField="textField" valueField="valueField"/>
<EF:EFOptions blockId="customer_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<
%
--
<
EF:EFColumn
ename=
"projType"
cname=
"项目性质"
enable=
"false"
width=
"120"
align=
"center"
/>
--%>
<EF:EFColumn ename="projType" cname="项目性质" enable="false" width="120" align="center"
<
%
--
<
EF:EFColumn
ename=
"permissStartDate"
cname=
"准许开工日期"
enable=
"false"
width=
"120"
align=
"center"
/>
--%>
hidden="${fn:contains(requestScope.dynamicColumnAlias, '#projType#')? false: true}"/>
<
%
--
<
EF:EFColumn
ename=
"startDate"
cname=
"开工日期"
enable=
"false"
width=
"120"
align=
"center"
/>
--%>
<EF:EFColumn ename="permissStartDate" cname="准许开工日期" enable="false" width="120" align="center"
<
%
--
<
EF:EFColumn
ename=
"endDate"
cname=
"完工日期"
enable=
"false"
width=
"120"
align=
"center"
/>
--%>
hidden="${fn:contains(requestScope.dynamicColumnAlias, '#permissStartDate#')? false: true}"/>
<EF:EFComboColumn
ename=
"projStatus"
cname=
"项目状态"
width=
"80"
align=
"center"
required=
"true"
<EF:EFColumn ename="startDate" cname="开工日期" enable="false" width="120" align="center"
hidden="${fn:contains(requestScope.dynamicColumnAlias, '#startDate#')? false: true}"/>
<EF:EFColumn ename="endDate" cname="完工日期" enable="false" width="120" align="center"
hidden="${fn:contains(requestScope.dynamicColumnAlias, '#endDate#')? false: true}"/>
<EF:EFComboColumn ename="projStatus" cname="项目状态" width="100" align="center" required="true"
hidden="${fn:contains(requestScope.dynamicColumnAlias, '#projStatus#')? false: true}"
readonly="true">
readonly="true">
<EF:EFCodeOption codeName="hggp.projStatus"/>
<EF:EFCodeOption codeName="hggp.projStatus"/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFComboColumn
ename=
"approvalStatus"
cname=
"提交状态"
width=
"80"
align=
"center"
required=
"true"
<EF:EFComboColumn ename="approvalStatus" cname="提交状态" width="100" align="center" required="true"
hidden="${fn:contains(requestScope.dynamicColumnAlias, '#approvalStatus#')? false: true}"
readonly="true">
readonly="true">
<EF:EFCodeOption codeName="hggp.commitStatus"/>
<EF:EFCodeOption codeName="hggp.commitStatus"/>
</EF:EFComboColumn>
</EF:EFComboColumn>
...
...
src/main/webapp/HG/WD/HGWD001.js
View file @
ac2163ba
...
@@ -903,7 +903,7 @@ let showAuthButton = function () {
...
@@ -903,7 +903,7 @@ let showAuthButton = function () {
return
return
}
}
// 0:不授权
// 0:不授权
if
(
isAuth
===
0
)
{
if
(
isAuth
===
"0"
)
{
notAuthShowButton
();
notAuthShowButton
();
}
else
{
}
else
{
isProjectManager
(
parentId
);
isProjectManager
(
parentId
);
...
...
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