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
e1bfde27
Commit
e1bfde27
authored
Nov 07, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
图文管理功能调整
parent
a00cdaff
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
331 additions
and
51 deletions
+331
-51
ProjectSourceEnum.java
...java/com/baosight/hggp/hg/sc/enums/ProjectSourceEnum.java
+14
-0
HgWdSqlConstant.java
...ava/com/baosight/hggp/hg/wd/constant/HgWdSqlConstant.java
+4
-0
HGWD001.java
src/main/java/com/baosight/hggp/hg/wd/domain/HGWD001.java
+15
-1
HGWD002.java
src/main/java/com/baosight/hggp/hg/wd/domain/HGWD002.java
+25
-0
HGWD099.java
src/main/java/com/baosight/hggp/hg/wd/domain/HGWD099.java
+41
-0
ServiceHGWD001.java
.../java/com/baosight/hggp/hg/wd/service/ServiceHGWD001.java
+5
-4
ServiceHGWD001D.java
...java/com/baosight/hggp/hg/wd/service/ServiceHGWD001D.java
+16
-1
ServiceHGWD001E.java
...java/com/baosight/hggp/hg/wd/service/ServiceHGWD001E.java
+22
-6
ServiceHGWD001F.java
...java/com/baosight/hggp/hg/wd/service/ServiceHGWD001F.java
+68
-13
ServiceHGWD002.java
.../java/com/baosight/hggp/hg/wd/service/ServiceHGWD002.java
+6
-0
ServiceHGWD099.java
.../java/com/baosight/hggp/hg/wd/service/ServiceHGWD099.java
+5
-0
HGWD001.xml
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD001.xml
+33
-10
HGWD002.xml
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD002.xml
+1
-0
HGWD099.xml
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD099.xml
+17
-8
HGWDTools.java
src/main/java/com/baosight/hggp/hg/wd/tools/HGWDTools.java
+26
-0
HGWD001.js
src/main/webapp/HG/WD/HGWD001.js
+16
-4
HGWD001.jsp
src/main/webapp/HG/WD/HGWD001.jsp
+6
-0
HGWD001E.js
src/main/webapp/HG/WD/HGWD001E.js
+4
-2
HGWD001F.js
src/main/webapp/HG/WD/HGWD001F.js
+1
-1
HGWD001F.jsp
src/main/webapp/HG/WD/HGWD001F.jsp
+2
-1
HGWD002.jsp
src/main/webapp/HG/WD/HGWD002.jsp
+1
-0
HGWD006.jsp
src/main/webapp/HG/WD/HGWD006.jsp
+3
-0
No files found.
src/main/java/com/baosight/hggp/hg/sc/enums/ProjectSourceEnum.java
View file @
e1bfde27
...
...
@@ -52,6 +52,20 @@ public enum ProjectSourceEnum {
return
null
;
}
/**
* 根据编码查询
* @param code
* @return
*/
public
static
ProjectSourceEnum
getByCode
(
String
code
)
{
for
(
ProjectSourceEnum
value
:
values
())
{
if
(
value
.
getCode
().
equals
(
code
))
{
return
value
;
}
}
return
null
;
}
ProjectSourceEnum
(
String
code
,
String
name
)
{
this
.
code
=
code
;
this
.
name
=
name
;
...
...
src/main/java/com/baosight/hggp/hg/wd/constant/HgWdSqlConstant.java
View file @
e1bfde27
...
...
@@ -24,6 +24,10 @@ public class HgWdSqlConstant {
public
static
final
String
UPDATE_PROJECT
=
"HGWD001.updateProject"
;
// 查询所以
public
static
final
String
QUERY_ALL
=
"HGWD001.queryAll"
;
// 查询子节点
public
static
final
String
QUERY_FILE_CHILD
=
"HGWD001.queryFileChild"
;
public
static
final
String
UPDATE_FILE_PATH
=
"HGWD001.updateFilePath"
;
}
/**
...
...
src/main/java/com/baosight/hggp/hg/wd/domain/HGWD001.java
View file @
e1bfde27
...
...
@@ -45,6 +45,7 @@ public class HGWD001 extends DaoEPBase {
public
static
final
String
FIELD_STATUS
=
"status"
;
/* 状态*/
public
static
final
String
FIELD_REMARK
=
"remark"
;
/* 备注*/
public
static
final
String
FIELD_RELEASE_DATE
=
"releaseDate"
;
/* 发布时间*/
public
static
final
String
FIELD_FILE_PATH
=
"filePath"
;
/* 文件路径*/
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_ACCOUNT_CODE
=
"ACCOUNT_CODE"
;
/* 企业编码*/
...
...
@@ -102,6 +103,7 @@ public class HGWD001 extends DaoEPBase {
private
Integer
status
=
0
;
/* 状态*/
private
String
remark
=
" "
;
/* 备注*/
private
String
releaseDate
=
" "
;
/* 发布时间*/
private
String
filePath
=
" "
;
/**
* initialize the metadata.
...
...
@@ -206,7 +208,9 @@ public class HGWD001 extends DaoEPBase {
eiColumn
.
setDescName
(
"发布时间"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_FILE_PATH
);
eiColumn
.
setDescName
(
"文件路径"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
/**
...
...
@@ -591,6 +595,14 @@ public class HGWD001 extends DaoEPBase {
public
void
setReleaseDate
(
String
releaseDate
)
{
this
.
releaseDate
=
releaseDate
;
}
public
String
getFilePath
()
{
return
filePath
;
}
public
void
setFilePath
(
String
filePath
)
{
this
.
filePath
=
filePath
;
}
/**
* get the value from Map.
*
...
...
@@ -623,6 +635,7 @@ public class HGWD001 extends DaoEPBase {
setStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_STATUS
)),
status
));
setRemark
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_REMARK
)),
remark
));
setReleaseDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_RELEASE_DATE
)),
releaseDate
));
setFilePath
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_FILE_PATH
)),
filePath
));
}
/**
...
...
@@ -656,6 +669,7 @@ public class HGWD001 extends DaoEPBase {
map
.
put
(
FIELD_STATUS
,
StringUtils
.
toString
(
status
,
eiMetadata
.
getMeta
(
FIELD_STATUS
)));
map
.
put
(
FIELD_REMARK
,
StringUtils
.
toString
(
remark
,
eiMetadata
.
getMeta
(
FIELD_REMARK
)));
map
.
put
(
FIELD_RELEASE_DATE
,
StringUtils
.
toString
(
releaseDate
,
eiMetadata
.
getMeta
(
FIELD_RELEASE_DATE
)));
map
.
put
(
FIELD_FILE_PATH
,
StringUtils
.
toString
(
filePath
,
eiMetadata
.
getMeta
(
FIELD_FILE_PATH
)));
return
map
;
}
...
...
src/main/java/com/baosight/hggp/hg/wd/domain/HGWD002.java
View file @
e1bfde27
...
...
@@ -48,6 +48,7 @@ public class HGWD002 extends DaoEPBase {
public
static
final
String
FIELD_PREVIEW_NUM
=
"previewNum"
;
/* 预览次数*/
public
static
final
String
FIELD_DOWNLOAD_NUM
=
"downloadNum"
;
/* 下载次数*/
public
static
final
String
FIELD_DOC_TYPE
=
"docType"
;
/* 文件类型*/
public
static
final
String
FIELD_CHANGE_CONTENT
=
"changeContent"
;
/* 变更内容*/
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_ACCOUNT_CODE
=
"ACCOUNT_CODE"
;
/* 企业编码*/
...
...
@@ -107,6 +108,7 @@ public class HGWD002 extends DaoEPBase {
private
Integer
previewNum
=
new
Integer
(
0
);
/* 预览次数*/
private
Integer
downloadNum
=
new
Integer
(
0
);
/* 下载次数*/
private
String
docType
=
" "
;
/* 文件类型*/
private
String
changeContent
=
" "
;
/* 变更内容*/
/**
* initialize the metadata.
...
...
@@ -218,6 +220,10 @@ public class HGWD002 extends DaoEPBase {
eiColumn
=
new
EiColumn
(
FIELD_DOC_TYPE
);
eiColumn
.
setDescName
(
"文件类型"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CHANGE_CONTENT
);
eiColumn
.
setDescName
(
"变更内容"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
/**
...
...
@@ -635,6 +641,23 @@ public class HGWD002 extends DaoEPBase {
public
void
setDocType
(
String
docType
)
{
this
.
docType
=
docType
;
}
/**
* get the changeContent - 变更内容.
* @return the changeContent
*/
public
String
getChangeContent
()
{
return
this
.
changeContent
;
}
/**
* set the changeContent - 变更内容.
*
* @param changeContent - 变更内容
*/
public
void
setChangeContent
(
String
changeContent
)
{
this
.
changeContent
=
changeContent
;
}
/**
* get the value from Map.
*
...
...
@@ -669,6 +692,7 @@ public class HGWD002 extends DaoEPBase {
setPreviewNum
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PREVIEW_NUM
)),
previewNum
));
setDownloadNum
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DOWNLOAD_NUM
)),
downloadNum
));
setDocType
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DOC_TYPE
)),
docType
));
setChangeContent
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CHANGE_CONTENT
)),
changeContent
));
}
/**
...
...
@@ -704,6 +728,7 @@ public class HGWD002 extends DaoEPBase {
map
.
put
(
FIELD_PREVIEW_NUM
,
StringUtils
.
toString
(
previewNum
,
eiMetadata
.
getMeta
(
FIELD_PREVIEW_NUM
)));
map
.
put
(
FIELD_DOWNLOAD_NUM
,
StringUtils
.
toString
(
downloadNum
,
eiMetadata
.
getMeta
(
FIELD_DOWNLOAD_NUM
)));
map
.
put
(
FIELD_DOC_TYPE
,
StringUtils
.
toString
(
docType
,
eiMetadata
.
getMeta
(
FIELD_DOC_TYPE
)));
map
.
put
(
FIELD_CHANGE_CONTENT
,
StringUtils
.
toString
(
changeContent
,
eiMetadata
.
getMeta
(
FIELD_CHANGE_CONTENT
)));
return
map
;
}
...
...
src/main/java/com/baosight/hggp/hg/wd/domain/HGWD099.java
View file @
e1bfde27
...
...
@@ -38,6 +38,8 @@ public class HGWD099 extends DaoEPBase {
public
static
final
String
FIELD_DOC_VERSION
=
"docVersion"
;
/* 文件版本号*/
public
static
final
String
FIELD_DOC_TYPE
=
"docType"
;
/* 文件类型*/
public
static
final
String
FIELD_OPER_STATUS
=
"operStatus"
;
/* 是否变更 0-否 1-是*/
public
static
final
String
FIELD_CHANGE_CONTENT
=
"changeContent"
;
/* 变更内容*/
public
static
final
String
FIELD_FILE_PATH
=
"filePath"
;
/* 文件路径*/
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_COMPANY_CODE
=
"COMPANY_CODE"
;
/* 企业编码 预留*/
...
...
@@ -87,6 +89,8 @@ public class HGWD099 extends DaoEPBase {
private
Integer
docVersion
=
new
Integer
(
0
);
/* 文件版本号*/
private
String
docType
=
" "
;
/* 文件类型*/
private
Integer
operStatus
=
new
Integer
(
0
);
private
String
changeContent
=
" "
;
/* 变更内容*/
private
String
filePath
=
" "
;
/**
* initialize the metadata.
...
...
@@ -178,6 +182,14 @@ public class HGWD099 extends DaoEPBase {
eiColumn
=
new
EiColumn
(
FIELD_OPER_STATUS
);
eiColumn
.
setDescName
(
"操作状态"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CHANGE_CONTENT
);
eiColumn
.
setDescName
(
"变更内容"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_FILE_PATH
);
eiColumn
.
setDescName
(
"文件路径"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
/**
...
...
@@ -486,6 +498,31 @@ public class HGWD099 extends DaoEPBase {
}
/**
* get the changeContent - 变更内容.
* @return the changeContent
*/
public
String
getChangeContent
()
{
return
this
.
changeContent
;
}
/**
* set the changeContent - 变更内容.
*
* @param changeContent - 变更内容
*/
public
void
setChangeContent
(
String
changeContent
)
{
this
.
changeContent
=
changeContent
;
}
public
String
getFilePath
()
{
return
filePath
;
}
public
void
setFilePath
(
String
filePath
)
{
this
.
filePath
=
filePath
;
}
/**
* get the value from Map.
*
* @param map - source data map
...
...
@@ -514,6 +551,8 @@ public class HGWD099 extends DaoEPBase {
setReleaseDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_RELEASE_DATE
)),
releaseDate
));
setDocType
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DOC_TYPE
)),
docType
));
setOperStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_OPER_STATUS
)),
operStatus
));
setChangeContent
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CHANGE_CONTENT
)),
changeContent
));
setFilePath
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_FILE_PATH
)),
filePath
));
}
/**
...
...
@@ -544,6 +583,8 @@ public class HGWD099 extends DaoEPBase {
map
.
put
(
FIELD_RELEASE_DATE
,
StringUtils
.
toString
(
releaseDate
,
eiMetadata
.
getMeta
(
FIELD_RELEASE_DATE
)));
map
.
put
(
FIELD_DOC_TYPE
,
StringUtils
.
toString
(
docType
,
eiMetadata
.
getMeta
(
FIELD_DOC_TYPE
)));
map
.
put
(
FIELD_OPER_STATUS
,
StringUtils
.
toString
(
operStatus
,
eiMetadata
.
getMeta
(
FIELD_OPER_STATUS
)));
map
.
put
(
FIELD_CHANGE_CONTENT
,
StringUtils
.
toString
(
changeContent
,
eiMetadata
.
getMeta
(
FIELD_CHANGE_CONTENT
)));
map
.
put
(
FIELD_FILE_PATH
,
StringUtils
.
toString
(
filePath
,
eiMetadata
.
getMeta
(
FIELD_FILE_PATH
)));
return
map
;
}
...
...
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD001.java
View file @
e1bfde27
...
...
@@ -219,9 +219,6 @@ public class ServiceHGWD001 extends ServiceEPBase {
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
HGWD099
hgwd099
=
new
HGWD099
();
hgwd099
.
fromMap
(
map
);
if
(
hgwd099
.
getOperStatus
()
==
0
){
hgwd099
.
setDocVersion
(
hgwd099
.
getDocVersion
()
+
1
);
}
hgwd099
.
setStatus
(
HgWdConstant
.
FileStatus
.
S_1
);
hgwd099
.
setReleaseDate
(
DateUtils
.
shortDateTime
());
hgwd099
.
setOperStatus
(
HgWdConstant
.
OperStatus
.
S_0
);
...
...
@@ -308,13 +305,13 @@ public class ServiceHGWD001 extends ServiceEPBase {
hgwd099
.
setDocId
(
resultRow
.
get
(
HGWD099
.
FIELD_DOC_ID
).
toString
());
hgwd099
.
setDocName
(
resultRow
.
get
(
HGWD099
.
FIELD_DOC_NAME
).
toString
());
hgwd099
.
setDocType
(
resultRow
.
get
(
HGWD099
.
FIELD_DOC_TYPE
).
toString
());
hgwd099
.
setChangeContent
(
resultRow
.
get
(
HGWD099
.
FIELD_CHANGE_CONTENT
).
toString
());
hgwd099
.
setStatus
(
HgWdConstant
.
FileStatus
.
S_0
);
hgwd099
.
setOperStatus
(
HgWdConstant
.
OperStatus
.
S_1
);
DaoUtils
.
insert
(
HGWD099
.
UPDATE
,
hgwd099
);
if
(
Objects
.
nonNull
(
resultRow
.
get
(
"changeContent"
))
||
resultRow
.
get
(
"changeContent"
).
toString
().
trim
().
length
()>
0
){
HGWDTools
.
HgWd006
.
add
(
hgwd099
,
hgwd001
,
resultRow
.
get
(
"changeContent"
).
toString
());
}
}
//获取文件下的权限人员
List
<
HGWD003
>
listByFile
=
HGWDTools
.
HgWd003
.
listByFile
(
hgwd001
.
getFileId
());
...
...
@@ -434,6 +431,7 @@ public class ServiceHGWD001 extends ServiceEPBase {
cleanBaseInfo
(
hgdm099
);
hgdm099
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
NO_0
);
hgdm099
.
setBizId
(
hgwd001
.
getFileId
());
hgdm099
.
setFilePath
(
hgwd001
.
getFilePath
());
hgdm099
.
setStatus
(
HgWdConstant
.
FileStatus
.
S_0
);
DaoUtils
.
insert
(
HGWD099
.
INSERT
,
hgdm099
);
strFileName
.
append
(
hgdm099
.
getDocName
()).
append
(
","
);
...
...
@@ -516,6 +514,7 @@ public class ServiceHGWD001 extends ServiceEPBase {
if
(!
StringUtils
.
isNull
(
result2Rows
))
{
result2Rows
.
forEach
(
hgwd001
->
{
hgwd001
.
setParentId
(
parentId
);
hgwd001
.
setFilePath
(
detail2Rows
.
get
(
0
).
getFilePath
()+
"/"
+
hgwd001
.
getFileName
());
});
// 查询添加子节点
addNode
(
result2Rows
);
...
...
@@ -540,6 +539,7 @@ public class ServiceHGWD001 extends ServiceEPBase {
hgwd001s
.
forEach
(
o
->
{
if
(
o
.
getParentId
().
equals
(
hgwd001
.
getFileId
()))
{
o
.
setParentId
(
fileId
);
o
.
setFilePath
(
hgwd001
.
getFilePath
()+
"/"
+
o
.
getFileName
());
}
});
}
...
...
@@ -563,6 +563,7 @@ public class ServiceHGWD001 extends ServiceEPBase {
cleanBaseInfo
(
hgwd099
);
hgwd099
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
NO_0
);
hgwd099
.
setBizId
(
fileId
);
hgwd099
.
setFilePath
(
hgwd001
.
getFilePath
());
hgwd099
.
setStatus
(
HgWdConstant
.
FileStatus
.
S_0
);
DaoUtils
.
insert
(
HGWD099
.
INSERT
,
hgwd099
);
strFileName
.
append
(
hgwd099
.
getDocName
()).
append
(
","
);
...
...
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD001D.java
View file @
e1bfde27
...
...
@@ -10,6 +10,7 @@ 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.domain.HGWD099
;
import
com.baosight.hggp.hg.wd.tools.HGWDTools
;
import
com.baosight.hggp.hg.wd.utils.HgWdUtils
;
import
com.baosight.hggp.util.EiInfoUtils
;
...
...
@@ -249,6 +250,7 @@ public class ServiceHGWD001D extends TreeService {
Map
leafMap
=
buildLeaf
(
parentId
,
label
,
text
,
HgWdConstant
.
LeafType
.
P
);
leafMap
.
put
(
"type"
,
"-1"
);
leafMap
.
put
(
"leafLevel"
,
"-1"
);
leafMap
.
put
(
"filePath"
,
text
);
results
.
add
(
leafMap
);
}
// 设置叶子节点
...
...
@@ -269,6 +271,7 @@ public class ServiceHGWD001D extends TreeService {
Map
queryMap
=
new
HashMap
<>();
queryMap
.
put
(
"ename"
,
ename
);
queryMap
.
put
(
"projectSource"
,
parentId
);
// 非管理员仅查询自己有权限的项目
String
userId
=
UserSessionUtils
.
getLoginName
();
if
(
isAuth
&&
!
HgWdUtils
.
HgWd009
.
isManager
(
userId
))
{
...
...
@@ -292,6 +295,7 @@ public class ServiceHGWD001D extends TreeService {
leafMap
.
put
(
"leafLevel"
,
"0"
);
leafMap
.
put
(
"count"
,
count
);
leafMap
.
put
(
"isAuth"
,
isAuth
?
"1"
:
"0"
);
leafMap
.
put
(
"filePath"
,
ProjectSourceEnum
.
getByCode
(
parentId
).
getName
()+
"/"
+
text
);
results
.
add
(
leafMap
);
}
// 设置叶子节点
...
...
@@ -326,16 +330,27 @@ public class ServiceHGWD001D extends TreeService {
List
<
String
>
fileIds
=
dbWd001s
.
stream
().
map
(
HGWD001:
:
getFileId
).
distinct
().
collect
(
Collectors
.
toList
());
// 查询目录授权人数
Map
<
String
,
List
<
HGWD003
>>
dbWd003Map
=
HGWDTools
.
HgWd003
.
map
(
fileIds
);
Map
<
String
,
List
<
HGWD099
>>
fWd099s
=
HGWDTools
.
HgWd099
.
map
(
fileIds
);
for
(
HGWD001
dbWd001
:
dbWd001s
)
{
Map
leafMap
=
buildLeaf
(
parentId
,
dbWd001
.
getFileId
(),
dbWd001
.
getFileName
(),
HgWdConstant
.
LeafType
.
C
);
// 已授权人员信息
List
<
HGWD003
>
dbWd003s
=
dbWd003Map
==
null
?
null
:
dbWd003Map
.
get
(
dbWd001
.
getFileId
());
int
dbWd099s
=
fWd099s
.
get
(
dbWd001
.
getFileId
())
==
null
?
0
:
fWd099s
.
get
(
dbWd001
.
getFileId
()).
size
();
int
count
=
0
;
if
(
dbWd003s
!=
null
&&
dbWd003s
.
size
()
>
0
&&
dbWd099s
>
0
){
count
=
3
;
}
else
if
(
dbWd003s
!=
null
&&
dbWd003s
.
size
()
>
0
){
count
=
2
;
}
else
if
(
dbWd099s
>
0
){
count
=
1
;
}
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"
,
dbWd003s
==
null
?
0
:
dbWd003s
.
size
());
leafMap
.
put
(
"count"
,
count
);
leafMap
.
put
(
"filePath"
,
dbWd001
.
getFilePath
());
if
(!
isManager
&&
isSourceAuth
)
{
leafMap
.
put
(
"isAuth"
,
"1"
);
// 从已授权的信息中查找出自己
...
...
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD001E.java
View file @
e1bfde27
...
...
@@ -16,9 +16,7 @@ import com.baosight.hggp.hg.wd.domain.HGWD001A;
import
com.baosight.hggp.hg.wd.domain.HGWD005
;
import
com.baosight.hggp.hg.wd.tools.HGWDTools
;
import
com.baosight.hggp.hg.xs.domain.Org
;
import
com.baosight.hggp.util.AssertUtils
;
import
com.baosight.hggp.util.CommonMethod
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.*
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
...
...
@@ -69,8 +67,15 @@ public class ServiceHGWD001E extends ServiceEPBase {
@OperationLogAnnotation
(
operModul
=
"文档库"
,
operType
=
"保存"
,
operDesc
=
"保存操作"
)
public
EiInfo
save
(
EiInfo
inInfo
)
{
try
{
Map
<
String
,
String
>
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
List
<
Map
<
String
,
Object
>>
edcm01List
=
Iplat4jTools
.
EdCm01
.
list
(
"hggp.hgwd.fileType"
);
List
<
Map
<
String
,
Object
>>
edcm01List
=
Iplat4jTools
.
EdCm01
.
getByCodesetMap
(
"CODESET_CODE IN ('hggp.hgwd.fileType','app.sc.projectSource')"
);
HGWD001
wd001
=
(
HGWD001
)
this
.
dao
.
get
(
HGWD001
.
QUERY
,
HGWD001
.
FIELD_FILE_ID
,
queryMap
.
get
(
HGWD001
.
FIELD_PARENT_ID
));
HGSC001
hgsc001
=
new
HGSC001
();
if
(
wd001
==
null
){
hgsc001
=
HGSCTools
.
Hgsc001
.
queryByCode
(
queryMap
.
get
(
HGWD001
.
FIELD_PARENT_ID
));
}
Map
<
String
,
List
<
Map
<
String
,
Object
>>>
edcm01Map
=
edcm01List
.
stream
().
collect
(
Collectors
.
groupingBy
(
map
->
map
.
get
(
"codesetCode"
).
toString
(),
Collectors
.
toList
()));
List
<
HGWD001
>
hgwd001s
=
new
ArrayList
<>();
// 写入数据
for
(
Map
resultRow
:
resultRows
)
{
...
...
@@ -79,10 +84,17 @@ public class ServiceHGWD001E extends ServiceEPBase {
hgwd001
.
setStatus
(
HgWdConstant
.
FileStatus
.
S_0
);
// 设置项目信息
this
.
setProjectInfo
(
hgwd001
);
if
(
wd001
==
null
){
String
filePath
=
setFilePath
(
hgsc001
,
edcm01Map
.
get
(
"app.sc.projectSource"
));
hgwd001
.
setFilePath
(
filePath
+
"/"
+
hgwd001
.
getFileName
());
}
else
{
hgwd001
.
setFilePath
(
wd001
.
getFilePath
()+
"/"
+
hgwd001
.
getFileName
());
}
if
(
hgwd001
.
getId
()
==
null
||
hgwd001
.
getId
()
==
0
)
{
this
.
add
(
hgwd001
);
}
else
{
this
.
modify
(
hgwd001
,
edcm01List
);
List
<
Map
<
String
,
Object
>>
mapList
=
edcm01Map
.
get
(
"hggp.hgwd.fileType"
);
this
.
modify
(
hgwd001
,
mapList
);
}
hgwd001s
.
add
(
hgwd001
);
}
...
...
@@ -132,7 +144,7 @@ public class ServiceHGWD001E extends ServiceEPBase {
hgwd001a
.
setChangeEnd
(
hgwd001
.
getFileName
());
HGWDTools
.
HgWd001
.
addHGWD001A
(
hgwd001a
);
}
else
if
(
wd001
!=
null
&&
!
wd001
.
getFileType
().
equals
(
hgwd001
.
getFileType
())){
List
<
Map
>
fileType1
=
edcm01List
.
stream
().
filter
(
map
->
map
.
get
(
"itemCode"
).
equals
(
wd001
.
getFileType
())).
collect
(
Collectors
.
toList
());
List
<
Map
>
fileType1
=
edcm01List
.
stream
().
filter
(
map
->
map
.
get
(
"itemCode"
).
equals
(
hgwd001
.
getFileType
())).
filter
(
map
->
map
.
get
(
"itemCode"
).
equals
(
wd001
.
getFileType
())).
collect
(
Collectors
.
toList
());
List
<
Map
>
fileType2
=
edcm01List
.
stream
().
filter
(
map
->
map
.
get
(
"itemCode"
).
equals
(
hgwd001
.
getFileType
())).
collect
(
Collectors
.
toList
());
hgwd001a
.
setChangeContent
(
"文件类型"
);
hgwd001a
.
setChangeStart
(
fileType1
.
get
(
0
).
get
(
"itemCname"
).
toString
());
...
...
@@ -166,4 +178,8 @@ public class ServiceHGWD001E extends ServiceEPBase {
fWd001
.
setProjectSource
(
dbSc001
.
getProjectSource
());
}
private
String
setFilePath
(
HGSC001
hgsc001
,
List
<
Map
<
String
,
Object
>>
edcm01List
)
{
String
filePath
=
edcm01List
.
stream
().
filter
(
map
->
map
.
get
(
"itemCode"
).
equals
(
hgsc001
.
getProjectSource
())).
findAny
().
get
().
get
(
"itemCname"
).
toString
();
return
filePath
+
"/"
+
hgsc001
.
getProjName
();
}
}
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD001F.java
View file @
e1bfde27
...
...
@@ -8,12 +8,17 @@ import com.baosight.hggp.core.dao.DaoUtils;
import
com.baosight.hggp.core.enums.OrgTypeEnum
;
import
com.baosight.hggp.core.tools.Iplat4jTools
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.sc.domain.HGSC001
;
import
com.baosight.hggp.hg.sc.tools.HGSCTools
;
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.HGWD001A
;
import
com.baosight.hggp.hg.wd.domain.HGWD099
;
import
com.baosight.hggp.hg.wd.tools.HGWDTools
;
import
com.baosight.hggp.hg.xs.domain.Org
;
import
com.baosight.hggp.util.CommonMethod
;
import
com.baosight.hggp.util.EiInfoUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
...
...
@@ -21,10 +26,7 @@ import com.baosight.iplat4j.core.ei.EiInfo;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -61,17 +63,32 @@ public class ServiceHGWD001F extends ServiceEPBase {
@OperationLogAnnotation
(
operModul
=
"文档库"
,
operType
=
"保存"
,
operDesc
=
"保存操作"
)
public
EiInfo
save
(
EiInfo
inInfo
)
{
try
{
Map
<
String
,
String
>
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
List
<
Map
<
String
,
Object
>>
edcm01List
=
Iplat4jTools
.
EdCm01
.
list
(
"hggp.hgwd.fileType"
);
List
<
Map
<
String
,
Object
>>
edcm01List
=
Iplat4jTools
.
EdCm01
.
getByCodesetMap
(
"CODESET_CODE IN ('hggp.hgwd.fileType','app.sc.projectSource')"
);
HGWD001
wd001
=
(
HGWD001
)
this
.
dao
.
get
(
HGWD001
.
QUERY
,
HGWD001
.
FIELD_FILE_ID
,
inInfo
.
getString
(
HGWD001
.
FIELD_PARENT_ID
));
HGSC001
hgsc001
=
new
HGSC001
();
if
(
wd001
==
null
){
hgsc001
=
HGSCTools
.
Hgsc001
.
queryByCode
(
queryMap
.
get
(
HGWD001
.
FIELD_PROJ_CODE
));
}
Map
<
String
,
List
<
Map
<
String
,
Object
>>>
edcm01Map
=
edcm01List
.
stream
().
collect
(
Collectors
.
groupingBy
(
map
->
map
.
get
(
"codesetCode"
).
toString
(),
Collectors
.
toList
()));
// 写入数据
for
(
Map
resultRow
:
resultRows
)
{
HGWD001
hgwd001
=
new
HGWD001
();
hgwd001
.
fromMap
(
resultRow
);
hgwd001
.
setStatus
(
HgWdConstant
.
FileStatus
.
S_0
);
if
(
wd001
==
null
){
String
filePath
=
setFilePath
(
hgsc001
,
edcm01Map
.
get
(
"app.sc.projectSource"
));
hgwd001
.
setFilePath
(
filePath
+
"/"
+
hgwd001
.
getFileName
());
}
else
{
hgwd001
.
setFilePath
(
wd001
.
getFilePath
()+
"/"
+
hgwd001
.
getFileName
());
}
if
(
hgwd001
.
getId
()
==
null
||
hgwd001
.
getId
()
==
0
)
{
this
.
add
(
hgwd001
);
}
else
{
this
.
modify
(
hgwd001
,
edcm01List
);
String
wd001FilePath
=
wd001
==
null
?
setFilePath
(
hgsc001
,
edcm01Map
.
get
(
"app.sc.projectSource"
)):
wd001
.
getFilePath
();
this
.
modify
(
hgwd001
,
wd001FilePath
,
edcm01Map
);
}
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
...
...
@@ -103,9 +120,12 @@ public class ServiceHGWD001F extends ServiceEPBase {
/**
* 修改操作
* @param hgwd001 文件信息
* @param wd001FilePath 文件路径
* @param edcm01Map 小代碼
*/
public
void
modify
(
HGWD001
hgwd001
,
List
<
Map
<
String
,
Object
>>
edcm01List
)
{
HGWD001
wd001
=
HGWDTools
.
HgWd001
.
get
(
hgwd001
.
getId
());
public
void
modify
(
HGWD001
hgwd001
,
String
wd001FilePath
,
Map
<
String
,
List
<
Map
<
String
,
Object
>>>
edcm01Map
)
{
HGWD001
wd001
out
=
HGWDTools
.
HgWd001
.
get
(
hgwd001
.
getId
());
HGWD001A
hgwd001a
=
new
HGWD001A
();
hgwd001a
.
setCompanyCode
(
hgwd001
.
getCompanyCode
());
hgwd001a
.
setCompanyName
(
hgwd001
.
getCompanyName
());
...
...
@@ -113,14 +133,14 @@ public class ServiceHGWD001F extends ServiceEPBase {
hgwd001a
.
setProjName
(
hgwd001
.
getProjName
());
hgwd001a
.
setChangeType
(
ChangeTypeEnum
.
UPDATE
.
getCode
());
hgwd001a
.
setMatId
(
hgwd001
.
getId
());
if
(
wd001
!=
null
&&
!
wd001
.
getFileName
().
equals
(
hgwd001
.
getFileName
())){
if
(
wd001
out
!=
null
&&
!
wd001out
.
getFileName
().
equals
(
hgwd001
.
getFileName
())){
hgwd001a
.
setChangeContent
(
"文件名称"
);
hgwd001a
.
setChangeStart
(
wd001
.
getFileName
());
hgwd001a
.
setChangeStart
(
wd001
out
.
getFileName
());
hgwd001a
.
setChangeEnd
(
hgwd001
.
getFileName
());
HGWDTools
.
HgWd001
.
addHGWD001A
(
hgwd001a
);
}
else
if
(
wd001
!=
null
&&
!
wd001
.
getFileType
().
equals
(
hgwd001
.
getFileType
())){
List
<
Map
>
fileType1
=
edcm01
List
.
stream
().
filter
(
map
->
map
.
get
(
"itemCode"
).
equals
(
wd001
.
getFileType
())).
collect
(
Collectors
.
toList
());
List
<
Map
>
fileType2
=
edcm01
List
.
stream
().
filter
(
map
->
map
.
get
(
"itemCode"
).
equals
(
hgwd001
.
getFileType
())).
collect
(
Collectors
.
toList
());
}
else
if
(
wd001
out
!=
null
&&
!
wd001out
.
getFileType
().
equals
(
hgwd001
.
getFileType
())){
List
<
Map
>
fileType1
=
edcm01
Map
.
get
(
"hggp.hgwd.fileType"
).
stream
().
filter
(
map
->
map
.
get
(
"itemCode"
).
equals
(
wd001out
.
getFileType
())).
collect
(
Collectors
.
toList
());
List
<
Map
>
fileType2
=
edcm01
Map
.
get
(
"hggp.hgwd.fileType"
)
.
stream
().
filter
(
map
->
map
.
get
(
"itemCode"
).
equals
(
hgwd001
.
getFileType
())).
collect
(
Collectors
.
toList
());
hgwd001a
.
setChangeContent
(
"文件类型"
);
hgwd001a
.
setChangeStart
(
fileType1
.
get
(
0
).
get
(
"itemCname"
).
toString
());
hgwd001a
.
setChangeEnd
(
fileType2
.
get
(
0
).
get
(
"itemCname"
).
toString
());
...
...
@@ -128,5 +148,40 @@ public class ServiceHGWD001F extends ServiceEPBase {
}
DaoUtils
.
update
(
HGWD001
.
UPDATE
,
hgwd001
);
updateFilePath
(
hgwd001
,
wd001out
,
wd001FilePath
);
}
public
void
updateFilePath
(
HGWD001
hgwd001
,
HGWD001
wd001out
,
String
wd001FilePath
)
{
List
<
Map
>
childList
=
HGWDTools
.
HgWd001
.
queryFileChild
(
hgwd001
.
getFileId
());
List
<
String
>
childFileIdList
=
Optional
.
ofNullable
(
childList
).
orElse
(
new
ArrayList
<>()).
stream
()
.
filter
(
map
->
!
hgwd001
.
getFileId
().
equals
(
map
.
get
(
HGWD001
.
FIELD_FILE_ID
)))
.
map
(
map
->
map
.
get
(
HGWD001
.
FIELD_FILE_ID
).
toString
()).
collect
(
Collectors
.
toList
());
List
<
HGWD099
>
hgwd099List
=
HGWDTools
.
HgWd099
.
queryByBiz
(
"WD"
,
childFileIdList
);
Map
<
String
,
List
<
HGWD099
>>
listMap
=
hgwd099List
.
stream
().
collect
(
Collectors
.
groupingBy
(
HGWD099:
:
getBizId
,
Collectors
.
toList
()));
int
end
=
wd001out
.
getFilePath
().
length
()+
1
;
if
(
childList
!=
null
&&
childList
.
size
()
>
0
)
{
for
(
Map
child
:
childList
)
{
HGWD001
childOut
=
new
HGWD001
();
childOut
.
fromMap
(
child
);
if
(!
hgwd001
.
getFileId
().
equals
(
childOut
.
getFileId
())){
String
filePathEnd
=
child
.
get
(
HGWD001
.
FIELD_FILE_PATH
).
toString
().
substring
(
end
);
StringBuffer
filePath
=
new
StringBuffer
();
filePath
.
append
(
wd001FilePath
).
append
(
"/"
).
append
(
hgwd001
.
getFileName
()).
append
(
"/"
).
append
(
filePathEnd
);
childOut
.
setFilePath
(
filePath
.
toString
());
DaoUtils
.
update
(
HgWdSqlConstant
.
HgWd001
.
UPDATE_FILE_PATH
,
childOut
);
if
(
listMap
.
containsKey
(
childOut
.
getFileId
())){
for
(
HGWD099
hgwd099:
listMap
.
get
(
childOut
.
getFileId
()))
{
hgwd099
.
setFilePath
(
filePath
.
toString
());
DaoUtils
.
update
(
HGWD099
.
UPDATE
,
hgwd099
);
}
}
}
}
}
}
private
String
setFilePath
(
HGSC001
hgsc001
,
List
<
Map
<
String
,
Object
>>
edcm01List
)
{
String
filePath
=
edcm01List
.
stream
().
filter
(
map
->
map
.
get
(
"itemCode"
).
equals
(
hgsc001
.
getProjectSource
())).
findAny
().
get
().
get
(
"itemCname"
).
toString
();
return
filePath
+
"/"
+
hgsc001
.
getProjName
();
}
}
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD002.java
View file @
e1bfde27
...
...
@@ -135,6 +135,12 @@ public class ServiceHGWD002 extends ServiceBase {
case
"updatedTime desc"
:
orderByStr
.
append
(
orderBy
[
i
].
replace
(
"updatedTime desc"
,
"b.updatedTime desc"
));
break
;
case
"changeContent asc"
:
orderByStr
.
append
(
orderBy
[
i
].
replace
(
"downloadNum desc"
,
"b.changeContent asc"
));
break
;
case
"changeContent desc"
:
orderByStr
.
append
(
orderBy
[
i
].
replace
(
"updatedTime desc"
,
"b.changeContent desc"
));
break
;
default
:
if
(!
orderBy
[
i
].
isEmpty
())
{
orderByStr
.
append
(
orderBy
[
i
]);
...
...
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD099.java
View file @
e1bfde27
...
...
@@ -65,6 +65,11 @@ public class ServiceHGWD099 extends ServiceEPBase {
try
{
Map
queryRow
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
if
(
StringUtils
.
isNotEmpty
(
queryRow
.
get
(
HGWD001
.
FIELD_PARENT_ID
).
toString
())){
List
<
Map
>
childList
=
HGWDTools
.
HgWd001
.
queryFileChild
(
queryRow
.
get
(
HGWD001
.
FIELD_PARENT_ID
).
toString
());
List
<
String
>
childFileIdList
=
Optional
.
ofNullable
(
childList
).
orElse
(
new
ArrayList
<>()).
stream
().
map
(
map
->
map
.
get
(
HGWD001
.
FIELD_FILE_ID
).
toString
()).
collect
(
Collectors
.
toList
());
queryRow
.
put
(
"bizIds"
,
childFileIdList
);
queryRow
.
remove
(
HGWD099
.
FIELD_BIZ_ID
);
inInfo
.
getBlock
(
EiConstant
.
queryBlock
).
getRow
(
ACConstants
.
ROW_CODE_0
).
remove
(
HGWD001
.
FIELD_PARENT_ID
);
inInfo
=
super
.
query
(
inInfo
,
HGWD099
.
QUERY
,
new
HGWD099
());
}
}
catch
(
Throwable
e
)
{
...
...
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD001.xml
View file @
e1bfde27
...
...
@@ -26,7 +26,8 @@
DOC_VERSION as "docVersion",
<!-- 文件版本号 -->
STATUS as "status",
<!-- 状态 -->
REMARK as "remark",
<!-- 备注 -->
RELEASE_DATE as "releaseDate"
<!-- 发布时间 -->
RELEASE_DATE as "releaseDate",
<!-- 发布时间 -->
FILE_PATH as "filePath"
<!-- 文件路径 -->
</sql>
<sql
id=
"condition"
>
...
...
@@ -93,6 +94,9 @@
<isNotEmpty
prepend=
" AND "
property=
"releaseDate"
>
RELEASE_DATE = #releaseDate#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"filePath"
>
FILE_PATH = #filePath#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"ename"
>
PROJ_NAME like concat('%', #ename#, '%') or PROJ_CODE like concat('%', #ename#, '%')
</isNotEmpty>
...
...
@@ -209,12 +213,13 @@
DOC_VERSION,
<!-- 文件版本号 -->
STATUS,
<!-- 状态 -->
REMARK,
<!-- 备注 -->
RELEASE_DATE
RELEASE_DATE,
FILE_PATH
) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #companyCode#, #companyName#, #projCode#, #projName#, #projectSource#,
#leafLevel#, #parentId#, #fileId#, #fileType#, #fileName#,
#docVersion#, #status#, #remark#, #releaseDate#
#docVersion#, #status#, #remark#, #releaseDate#
, #filePath#
)
<selectKey
resultClass=
"long"
keyProperty=
"id"
>
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGWD001
...
...
@@ -236,6 +241,7 @@
STATUS = #status#,
<!-- 状态 -->
REMARK = #remark#,
<!-- 备注 -->
RELEASE_DATE = #releaseDate#,
<!--发布时间-->
FILE_PATH = #filePath#,
<include
refid=
"SqlBase.updateRevise"
/>
WHERE ID = #id#
</update>
...
...
@@ -259,6 +265,14 @@
WHERE ID = #id#
</update>
<update
id=
"updateFilePath"
>
UPDATE ${hggpSchema}.HGWD001
SET
FILE_PATH = #filePath#,
<include
refid=
"SqlBase.updateRevise"
/>
WHERE ID = #id#
</update>
<select
id=
"queryTree"
resultClass=
"java.util.HashMap"
>
SELECT
COMPANY_CODE as "companyCode",
<!-- 公司编码 -->
...
...
@@ -270,7 +284,8 @@
PARENT_ID as "pId",
<!--父级ID-->
FILE_ID as "fileId",
<!-- 文件ID -->
FILE_TYPE as "fileType",
<!-- 文件类型 -->
FILE_NAME as "fileName"
<!-- 文件名称 -->
FILE_NAME as "fileName",
<!-- 文件名称 -->
FILE_PATH as "filePath"
FROM ${hggpSchema}.HGWD001
WHERE 1=1
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
...
...
@@ -309,7 +324,8 @@
FILE_TYPE as "type",
PARENT_ID as "parentId",
DELETE_FLAG as "isDeleted",
LEAF_LEVEL as "leafLevel"
LEAF_LEVEL as "leafLevel",
FILE_PATH as "filePath"
FROM ${hggpSchema}.HGWD001
WHERE 1=1
<isEmpty
prepend=
" AND "
property=
"deletedQuery"
>
...
...
@@ -331,7 +347,11 @@
<!--档库所有子节点树查询-->
<select
id=
"queryFileChild"
resultClass=
"java.util.HashMap"
>
SELECT
T3.ID as "id", T3.FILE_ID AS "fileId",T3.FILE_TYPE AS "fileType", T3.PARENT_ID as "parentId"
T3.ID as "id",
T3.FILE_ID AS "fileId",
T3.FILE_TYPE AS "fileType",
T3.PARENT_ID as "parentId",
T3.FILE_PATH as "filePath"
FROM (
SELECT
@CODES AS CODES,
...
...
@@ -354,7 +374,7 @@
${hggpSchema}.HGWD001 T3
WHERE T3.DELETE_FLAG = 0
AND FIND_IN_SET(T3.FILE_ID, T2.CODES)
ORDER BY T3.
FILE_
ID ASC
ORDER BY T3.ID ASC
</select>
<!-- 修改项目信息 -->
...
...
@@ -375,7 +395,8 @@
PARENT_ID as "parentId",
<!--父级ID-->
FILE_ID as "fileId",
<!-- 文件ID -->
FILE_TYPE as "fileType",
<!-- 文件类型 -->
FILE_NAME as "fileName"
<!-- 文件名称 -->
FILE_NAME as "fileName",
<!-- 文件名称 -->
FILE_PATH as "filePath"
from (
SELECT
PROJ_CODE,
<!-- 项目编码 -->
...
...
@@ -384,7 +405,8 @@
PROJ_CODE as "PARENT_ID",
<!--父级ID-->
'' as "FILE_ID",
<!-- 文件ID -->
'' as "FILE_TYPE",
<!-- 文件类型 -->
'' as "FILE_NAME"
<!-- 文件名称 -->
'' as "FILE_NAME",
<!-- 文件名称 -->
project_source as "FILE_PATH"
FROM ${hggpSchema}.HGSC001 T WHERE 1=1
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
ACCOUNT_CODE = #accountCode#
...
...
@@ -411,7 +433,8 @@
PARENT_ID,
<!--父级ID-->
FILE_ID,
<!-- 文件ID -->
FILE_TYPE,
<!-- 文件类型 -->
FILE_NAME
<!-- 文件名称 -->
FILE_NAME,
<!-- 文件名称 -->
FILE_PATH
FROM ${hggpSchema}.HGWD001 T WHERE 1=1
<include
refid=
"condition"
/>
) a
...
...
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD002.xml
View file @
e1bfde27
...
...
@@ -20,6 +20,7 @@
B.DOC_TYPE as "docType",
<!-- 文件类型 -->
B.PREVIEW_NUM as "previewNum",
<!-- 预览次数 -->
B.DOWNLOAD_NUM as "downloadNum",
<!-- 下载次数 -->
B.CHANGE_CONTENT as "changeContent",
<!-- 变更内容 -->
B.CREATED_BY as "createdBy",
<!-- 创建人 -->
B.CREATED_NAME as "createdName",
<!-- 创建人名称 -->
B.CREATED_TIME as "createdTime",
<!-- 创建时间 -->
...
...
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD099.xml
View file @
e1bfde27
...
...
@@ -22,7 +22,9 @@
DOWNLOAD_NUM as "downloadNum",
<!-- 下载次数 -->
DOC_VERSION as "docVersion",
<!-- 文件版本号 -->
RELEASE_DATE as "releaseDate",
<!-- 发布时间 -->
OPER_STATUS as "operStatus"
OPER_STATUS as "operStatus",
CHANGE_CONTENT as "changeContent",
<!-- 变更内容 -->
FILE_PATH as "filePath"
</sql>
<sql
id=
"condition"
>
...
...
@@ -36,9 +38,9 @@
<isNotEmpty
prepend=
" AND "
property=
"bizId"
>
BIZ_ID = #bizId#
</isNotEmpty>
<
!--<isNotEmpty prepend=" AND " property="fileId
">
BIZ_ID IN
(select FILE_ID from ${hggpSchema}.hgwd003 where USER_ID = #userId# and FILE_ID = #fileId# )
</isNotEmpty>
-->
<
isNotEmpty
prepend=
" AND "
property=
"bizIds
"
>
BIZ_ID IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"bizIds"
>
#bizIds[]#
</iterate>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"docId"
>
DOC_ID = #docId#
</isNotEmpty>
...
...
@@ -69,6 +71,9 @@
<isNotEmpty
prepend=
" AND "
property=
"updatedTime"
>
LEFT(UPDATED_TIME,8) = replace(#updatedTime#,'-','')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"filePath"
>
FILE_PATH like concat('%',#filePath#,'%')
</isNotEmpty>
</sql>
<sql
id=
"customCondition"
>
...
...
@@ -139,11 +144,14 @@
STATUS,
DOC_VERSION,
RELEASE_DATE,
OPER_STATUS
OPER_STATUS,
CHANGE_CONTENT,
FILE_PATH
) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#updatedBy#, #updatedName#, #updatedTime#,
#deleteFlag#, #bizType#, #bizId#, #docId#, #docName#, #docType#, #status#, #docVersion#, #releaseDate#, #operStatus#
#deleteFlag#, #bizType#, #bizId#, #docId#, #docName#, #docType#, #status#,
#docVersion#, #releaseDate#, #operStatus#, #changeContent#, #filePath#
<selectKey
resultClass=
"long"
keyProperty=
"id"
>
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGWD099
</selectKey>
...
...
@@ -177,9 +185,10 @@
DOC_NAME = #docName#,
<!-- 文件名称 -->
DOC_TYPE = #docType#,
<!-- 文件类型 -->
STATUS = #status#,
DOC_VERSION = DOC_VERSION + 1,
<!--版本号-->
RELEASE_DATE = #releaseDate#,
<!--发布时间-->
OPER_STATUS = #operStatus#,
CHANGE_CONTENT = #changeContent#,
FILE_PATH = #filePath#,
UPDATED_BY = #updatedBy#,
<!-- 修改人 -->
UPDATED_NAME = #updatedName#,
<!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#
<!-- 修改时间 -->
...
...
@@ -200,7 +209,7 @@
UPDATE ${hggpSchema}.HGWD099
SET
RELEASE_DATE = #releaseDate#,
<!--发布时间-->
DOC_VERSION =
#docVersion#
,
<!--版本号-->
DOC_VERSION =
DOC_VERSION + 1
,
<!--版本号-->
STATUS = #status#,
<!-- 状态 -->
OPER_STATUS = #operStatus#,
<include
refid=
"SqlBase.updateRevise"
/>
...
...
src/main/java/com/baosight/hggp/hg/wd/tools/HGWDTools.java
View file @
e1bfde27
...
...
@@ -215,6 +215,20 @@ public class HGWDTools {
}
return
results
;
}
/**
* 查询文件子节点
*
* @param parentId
* @return
*/
public
static
List
<
Map
>
queryFileChild
(
String
parentId
)
{
AssertUtils
.
isEmpty
(
parentId
,
"文件ID不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"parentId"
,
parentId
);
List
<
Map
>
results
=
DaoBase
.
getInstance
().
query
(
HgWdSqlConstant
.
HgWd001
.
QUERY_FILE_CHILD
,
queryMap
);
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
;
}
}
...
...
@@ -444,6 +458,18 @@ public class HGWDTools {
);
return
results
;
}
/**
* @param fileIds
* @return
*/
public
static
Map
<
String
,
List
<
HGWD099
>>
map
(
List
<
String
>
fileIds
)
{
List
<
HGWD099
>
hgwd099List
=
queryByBiz
(
"WD"
,
fileIds
);
if
(
CollectionUtils
.
isEmpty
(
hgwd099List
))
{
return
null
;
}
return
hgwd099List
.
stream
().
collect
(
Collectors
.
groupingBy
(
HGWD099:
:
getBizId
));
}
}
/**
...
...
src/main/webapp/HG/WD/HGWD001.js
View file @
e1bfde27
...
...
@@ -122,14 +122,22 @@ $(function () {
switch
(
item
.
leafType
)
{
case
'P'
:
icon
=
'fa fa-clipboard'
if
(
count
>
0
){
if
(
count
==
2
){
icon
=
'fa fa-clipboard text-success'
}
else
if
(
count
==
3
){
icon
=
'fa fa-clipboard text-primary'
}
else
if
(
count
==
1
){
icon
=
'fa fa-clipboard text-danger'
}
break
;
case
'C'
:
icon
=
'fa fa-folder'
if
(
count
>
0
){
if
(
count
==
2
){
icon
=
'fa fa-folder text-success'
}
else
if
(
count
==
3
){
icon
=
'fa fa-folder text-primary'
}
else
if
(
count
==
1
){
icon
=
'fa fa-folder text-danger'
}
break
;
}
...
...
@@ -274,6 +282,7 @@ $(function () {
$
(
"#edit"
).
on
(
"click"
,
()
=>
{
const
orgId
=
$
(
"#inqu_status-0-parentId"
).
val
();
let
parentId
=
IPLATUI
.
EFTree
.
categoryTree
.
selectTreeNode
.
parentId
;
let
projCode
=
$
(
"#inqu_status-0-projCode"
).
val
();
let
leafLevel
=
parseInt
(
$
(
"#inqu_status-0-leafLevel"
).
val
())
+
1
;
let
type
=
$
(
"#inqu_status-0-type"
).
val
();
...
...
@@ -285,7 +294,7 @@ $(function () {
message2
(
"提示"
,
"项目无法编辑!"
);
return
}
let
params
=
"&inqu_status-0-fileId="
+
orgId
+
"&inqu_status-0-projCode="
+
projCode
;
let
params
=
"&inqu_status-0-fileId="
+
orgId
+
"&inqu_status-0-projCode="
+
projCode
+
"&parentId="
+
parentId
;
JSColorbox
.
open
({
href
:
"HGWD001F?methodName=initLoad"
+
params
,
title
:
"<div style='text-align: center;'>编辑文件</div>"
,
...
...
@@ -381,6 +390,7 @@ $(function () {
leafLevel
:
''
,
leafType
:
''
,
isAuth
:
'1'
,
filePath
:
''
,
},
// expandLevel:1,
/**
...
...
@@ -522,7 +532,7 @@ $(function () {
query
:
function
(
e
)
{
let
inEiInfo
=
new
EiInfo
();
let
fileId
=
IPLATUI
.
EFTree
.
categoryTree
.
selectTreeNode
.
fileId
;
inEiInfo
.
set
(
"inqu_status2-0-
parent
Id"
,
fileId
);
inEiInfo
.
set
(
"inqu_status2-0-
file
Id"
,
fileId
);
return
inEiInfo
;
}
},
...
...
@@ -699,6 +709,7 @@ let setTreeNodeValue = function (nodeData) {
IPLATUI
.
EFTree
.
categoryTree
.
selectTreeNode
.
leafLevel
=
leafLevel
;
IPLATUI
.
EFTree
.
categoryTree
.
selectTreeNode
.
leafType
=
nodeData
.
leafType
;
IPLATUI
.
EFTree
.
categoryTree
.
selectTreeNode
.
isAuth
=
nodeData
.
isAuth
;
IPLATUI
.
EFTree
.
categoryTree
.
selectTreeNode
.
filePath
=
nodeData
.
filePath
;
$
(
"[name = 'inqu_status-0-parentId']"
).
val
(
nodeData
.
label
);
$
(
"[name = 'inqu_status-0-fileId']"
).
val
(
nodeData
.
label
);
$
(
"[name = 'inqu_status-0-leafLevel']"
).
val
(
leafLevel
);
...
...
@@ -786,6 +797,7 @@ function uploadFileCallback(data) {
inEiInfo
.
set
(
"result-0-ndocId"
,
data
.
ndocId
);
inEiInfo
.
set
(
"inqu_status-0-fileId"
,
data
.
bizId
);
inEiInfo
.
set
(
"result-0-changeContent"
,
data
.
changeContent
);
inEiInfo
.
set
(
"result-0-filePath"
,
IPLATUI
.
EFTree
.
categoryTree
.
selectTreeNode
.
filePath
);
let
serviceName
=
data
.
operType
==
"add"
?
"HGWD099"
:
"HGWD001"
;
let
methodName
=
data
.
operType
==
"add"
?
"insert"
:
"updateFile"
;
...
...
src/main/webapp/HG/WD/HGWD001.jsp
View file @
e1bfde27
...
...
@@ -74,6 +74,7 @@
startName=
"updateDateFrom"
endName=
"updateDateTo"
role=
"date"
format=
"yyyy-MM-dd"
ratio=
"3:3"
satrtRatio=
"4:8"
endRatio=
"4:8"
readonly=
"false"
>
</EF:EFDateSpan>
<EF:EFInput
cname=
"文件路径"
ename=
"filePath"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
/>
</div>
</EF:EFRegion>
<EF:EFRegion
id=
"result"
title=
"明细信息"
fitHeight=
"true"
>
...
...
@@ -84,6 +85,8 @@
<EF:EFColumn
ename=
"operator"
cname=
"操作"
enable=
"false"
width=
"150"
align=
"center"
sort=
"false"
/>
<EF:EFColumn
ename=
"docName"
cname=
"附件名称"
enable=
"false"
width=
"200"
/>
<EF:EFColumn
ename=
"docType"
cname=
"附件类型"
enable=
"false"
width=
"110"
align=
"center"
/>
<EF:EFColumn
ename=
"changeContent"
cname=
"变更内容"
enable=
"false"
width=
"200"
align=
"center"
/>
<EF:EFColumn
ename=
"filePath"
cname=
"文件路径"
enable=
"false"
width=
"200"
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"
>
...
...
@@ -130,6 +133,7 @@
queryMethod=
"query1"
>
<EF:EFColumn
ename=
"id"
primaryKey=
"true"
cname=
"内码"
hidden=
"true"
/>
<EF:EFColumn
ename=
"parentId"
cname=
"上级ID"
hidden=
"true"
/>
<EF:EFColumn
ename=
"filePath"
cname=
"文件路径"
hidden=
"true"
/>
<EF:EFComboColumn
ename=
"projCode"
cname=
"项目名称"
blockName=
"proj_record_block_id"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
textField=
"textField"
valueField=
"valueField"
...
...
@@ -162,6 +166,7 @@
<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:EFColumn
ename=
"filePath"
cname=
"文件路径"
hidden=
"true"
/>
<
%
--
<
EF:EFComboColumn
ename=
"projCode"
cname=
"项目名称"
blockName=
"proj_record_block_id"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
textField=
"textField"
valueField=
"valueField"
...
...
@@ -182,6 +187,7 @@
<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:EFColumn
ename=
"filePath"
cname=
"文件路径"
hidden=
"true"
/>
<
%
--
<
EF:EFComboColumn
ename=
"projCode"
cname=
"项目名称"
blockName=
"proj_record_block_id"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
textField=
"textField"
valueField=
"valueField"
...
...
src/main/webapp/HG/WD/HGWD001E.js
View file @
e1bfde27
...
...
@@ -10,7 +10,8 @@ $(function () {
pageSize
:
500
,
pageSizes
:
[
20
,
50
,
100
,
250
,
500
],
},
columns
:
[{
columns
:
[
{
field
:
"projCode"
,
title
:
"所属项目"
,
template
:
function
(
dataItem
)
{
...
...
@@ -22,7 +23,8 @@ $(function () {
}
return
dataItem
[
"projCode"
];
}
},
{
},
{
field
:
"fileName"
,
editor
:
function
(
container
,
options
)
{
var
grid
=
container
.
closest
(
".k-grid"
).
data
(
"kendoGrid"
);
...
...
src/main/webapp/HG/WD/HGWD001F.js
View file @
e1bfde27
...
...
@@ -136,7 +136,7 @@ let save = function (btnNode) {
var
status
=
e
.
status
;
if
(
status
!==
-
1
)
{
let
fileId
=
$
(
"#inqu_status-0-fileId"
).
val
();
parent
.
JSColorbox
.
setValueCallback
(
fileId
);
parent
.
JSColorbox
.
setValueCallback
();
}
}
);
...
...
src/main/webapp/HG/WD/HGWD001F.jsp
View file @
e1bfde27
...
...
@@ -20,7 +20,7 @@
<EF:EFPage title="文档库">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput cname="上级组织编码"
blockId="inqu_status" ename="parentId" row="0
" type="hidden"/>
<EF:EFInput cname="上级组织编码"
ename="parentId
" 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="leafLevel" row="0" type="hidden"/>
...
...
@@ -34,6 +34,7 @@
<EF:EFRegion id="result" title="明细信息" fitHeight="true">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row" showCount="true" height="73vh">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="filePath" cname="文件路径" hidden="true"/>
<%--<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="160" align="center"/>
<EF:EFComboColumn ename="status" cname="状态" enable="false" width="80" align="center" defaultValue="0">
<EF:EFCodeOption codeName="hggp.hgwd.status"/>
...
...
src/main/webapp/HG/WD/HGWD002.jsp
View file @
e1bfde27
...
...
@@ -54,6 +54,7 @@
<EF:EFColumn
ename=
"docName"
cname=
"附件名称"
enable=
"false"
width=
"220"
sort=
"true"
/>
<EF:EFColumn
ename=
"docType"
cname=
"附件后缀"
enable=
"false"
width=
"110"
align=
"center"
sort=
"true"
/>
<EF:EFColumn
ename=
"docVersion"
cname=
"版本号"
enable=
"false"
width=
"90"
align=
"center"
sort=
"true"
/>
<EF:EFColumn
ename=
"changeContent"
cname=
"变更内容"
enable=
"false"
width=
"200"
align=
"center"
sort=
"true"
/>
<EF:EFColumn
ename=
"updatedTime"
cname=
"上传时间"
parseFormats=
"['yyyyMMddHHmmss']"
editType=
"datetime"
dateFormat=
"yyyy-MM-dd HH:mm:ss"
align=
"center"
width=
"140"
readonly=
"true"
required=
"false"
enable=
"false"
sort=
"true"
/>
...
...
src/main/webapp/HG/WD/HGWD006.jsp
View file @
e1bfde27
...
...
@@ -38,6 +38,9 @@
<EF:EFColumn ename="docId" cname="附件ID" width="160" enable="true" readonly="false" hidden="true" align="center" required="false"/>
<EF:EFColumn ename="docName" cname="附件名称" width="160" enable="true" readonly="true" align="center" required="false"/>
<EF:EFColumn ename="changeContent" cname="变更内容" width="200" enable="true" readonly="true" align="center" required="false"/>
<EF:EFColumn cname="变更人" ename="createdName" enable="false" align="center"/>
<EF:EFColumn cname="变更时间" ename="createdTime" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss','yyyy-MM-dd HH:mm:ss']"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
...
...
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