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
30f89125
Commit
30f89125
authored
Sep 04, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-09-04 文件库优化
parent
00a480c0
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
570 additions
and
50 deletions
+570
-50
HGWD001A.java
src/main/java/com/baosight/hggp/hg/wd/domain/HGWD001A.java
+16
-0
HGWD002.java
src/main/java/com/baosight/hggp/hg/wd/domain/HGWD002.java
+15
-1
HGWD099.java
src/main/java/com/baosight/hggp/hg/wd/domain/HGWD099.java
+16
-0
ServiceHGWD001.java
.../java/com/baosight/hggp/hg/wd/service/ServiceHGWD001.java
+111
-6
ServiceHGWD002.java
.../java/com/baosight/hggp/hg/wd/service/ServiceHGWD002.java
+65
-0
ServiceHGWD004.java
.../java/com/baosight/hggp/hg/wd/service/ServiceHGWD004.java
+19
-10
ServiceHGWD099.java
.../java/com/baosight/hggp/hg/wd/service/ServiceHGWD099.java
+40
-4
HGWD001.xml
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD001.xml
+1
-0
HGWD001A.xml
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD001A.xml
+14
-9
HGWD002.xml
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD002.xml
+11
-1
HGWD099.xml
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD099.xml
+17
-2
HGWD001.js
src/main/webapp/HG/WD/HGWD001.js
+145
-3
HGWD001.jsp
src/main/webapp/HG/WD/HGWD001.jsp
+60
-3
HGWD002.js
src/main/webapp/HG/WD/HGWD002.js
+9
-0
HGWD002.jsp
src/main/webapp/HG/WD/HGWD002.jsp
+17
-7
HGWD004.js
src/main/webapp/HG/WD/HGWD004.js
+13
-4
HGWD099A.js
src/main/webapp/HG/WD/HGWD099A.js
+1
-0
No files found.
src/main/java/com/baosight/hggp/hg/wd/domain/HGWD001A.java
View file @
30f89125
...
@@ -42,6 +42,7 @@ public class HGWD001A extends DaoEPBase {
...
@@ -42,6 +42,7 @@ public class HGWD001A extends DaoEPBase {
public
static
final
String
FIELD_CHANGE_END_CODE
=
"changeEndCode"
;
/* 变更后编码*/
public
static
final
String
FIELD_CHANGE_END_CODE
=
"changeEndCode"
;
/* 变更后编码*/
public
static
final
String
FIELD_CHANGE_END
=
"changeEnd"
;
/* 变更后*/
public
static
final
String
FIELD_CHANGE_END
=
"changeEnd"
;
/* 变更后*/
public
static
final
String
FIELD_MAT_ID
=
"matId"
;
/* 上级ID*/
public
static
final
String
FIELD_MAT_ID
=
"matId"
;
/* 上级ID*/
public
static
final
String
FIELD_ACCE_ID
=
"acceId"
;
/* 上级ID*/
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_ACCOUNT_CODE
=
"ACCOUNT_CODE"
;
/* 企业编码*/
public
static
final
String
COL_ACCOUNT_CODE
=
"ACCOUNT_CODE"
;
/* 企业编码*/
...
@@ -92,6 +93,7 @@ public class HGWD001A extends DaoEPBase {
...
@@ -92,6 +93,7 @@ public class HGWD001A extends DaoEPBase {
private
String
changeEndCode
=
" "
;
/* 变更后编码*/
private
String
changeEndCode
=
" "
;
/* 变更后编码*/
private
String
changeEnd
=
" "
;
/* 变更后*/
private
String
changeEnd
=
" "
;
/* 变更后*/
private
Long
matId
=
new
Long
(
0
);
private
Long
matId
=
new
Long
(
0
);
private
String
acceId
=
" "
;
/**
/**
* initialize the metadata.
* initialize the metadata.
...
@@ -184,6 +186,10 @@ public class HGWD001A extends DaoEPBase {
...
@@ -184,6 +186,10 @@ public class HGWD001A extends DaoEPBase {
eiColumn
.
setDescName
(
"上级ID"
);
eiColumn
.
setDescName
(
"上级ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_ACCE_ID
);
eiColumn
.
setDescName
(
"附件ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
}
...
@@ -507,6 +513,14 @@ public class HGWD001A extends DaoEPBase {
...
@@ -507,6 +513,14 @@ public class HGWD001A extends DaoEPBase {
this
.
changeEndCode
=
changeEndCode
;
this
.
changeEndCode
=
changeEndCode
;
}
}
public
String
getAcceId
()
{
return
acceId
;
}
public
void
setAcceId
(
String
acceId
)
{
this
.
acceId
=
acceId
;
}
/**
/**
* get the value from Map.
* get the value from Map.
*
*
...
@@ -536,6 +550,7 @@ public class HGWD001A extends DaoEPBase {
...
@@ -536,6 +550,7 @@ public class HGWD001A extends DaoEPBase {
setChangeEndCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CHANGE_END_CODE
)),
changeEndCode
));
setChangeEndCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CHANGE_END_CODE
)),
changeEndCode
));
setChangeEnd
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CHANGE_END
)),
changeEnd
));
setChangeEnd
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CHANGE_END
)),
changeEnd
));
setMatId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_MAT_ID
)),
matId
));
setMatId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_MAT_ID
)),
matId
));
setAcceId
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ACCE_ID
)),
acceId
));
}
}
/**
/**
...
@@ -566,6 +581,7 @@ public class HGWD001A extends DaoEPBase {
...
@@ -566,6 +581,7 @@ public class HGWD001A extends DaoEPBase {
map
.
put
(
FIELD_CHANGE_END_CODE
,
StringUtils
.
toString
(
changeEndCode
,
eiMetadata
.
getMeta
(
FIELD_CHANGE_END_CODE
)));
map
.
put
(
FIELD_CHANGE_END_CODE
,
StringUtils
.
toString
(
changeEndCode
,
eiMetadata
.
getMeta
(
FIELD_CHANGE_END_CODE
)));
map
.
put
(
FIELD_CHANGE_END
,
StringUtils
.
toString
(
changeEnd
,
eiMetadata
.
getMeta
(
FIELD_CHANGE_END
)));
map
.
put
(
FIELD_CHANGE_END
,
StringUtils
.
toString
(
changeEnd
,
eiMetadata
.
getMeta
(
FIELD_CHANGE_END
)));
map
.
put
(
FIELD_MAT_ID
,
StringUtils
.
toString
(
matId
,
eiMetadata
.
getMeta
(
FIELD_MAT_ID
)));
map
.
put
(
FIELD_MAT_ID
,
StringUtils
.
toString
(
matId
,
eiMetadata
.
getMeta
(
FIELD_MAT_ID
)));
map
.
put
(
FIELD_ACCE_ID
,
StringUtils
.
toString
(
acceId
,
eiMetadata
.
getMeta
(
FIELD_ACCE_ID
)));
return
map
;
return
map
;
}
}
...
...
src/main/java/com/baosight/hggp/hg/wd/domain/HGWD002.java
View file @
30f89125
...
@@ -47,6 +47,7 @@ public class HGWD002 extends DaoEPBase {
...
@@ -47,6 +47,7 @@ public class HGWD002 extends DaoEPBase {
public
static
final
String
FIELD_RELEASE_DATE
=
"releaseDate"
;
/* 发布时间*/
public
static
final
String
FIELD_RELEASE_DATE
=
"releaseDate"
;
/* 发布时间*/
public
static
final
String
FIELD_PREVIEW_NUM
=
"previewNum"
;
/* 预览次数*/
public
static
final
String
FIELD_PREVIEW_NUM
=
"previewNum"
;
/* 预览次数*/
public
static
final
String
FIELD_DOWNLOAD_NUM
=
"downloadNum"
;
/* 下载次数*/
public
static
final
String
FIELD_DOWNLOAD_NUM
=
"downloadNum"
;
/* 下载次数*/
public
static
final
String
FIELD_DOC_TYPE
=
"docType"
;
/* 文件类型*/
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_ACCOUNT_CODE
=
"ACCOUNT_CODE"
;
/* 企业编码*/
public
static
final
String
COL_ACCOUNT_CODE
=
"ACCOUNT_CODE"
;
/* 企业编码*/
...
@@ -105,6 +106,7 @@ public class HGWD002 extends DaoEPBase {
...
@@ -105,6 +106,7 @@ public class HGWD002 extends DaoEPBase {
private
String
releaseDate
=
" "
;
/* 发布时间*/
private
String
releaseDate
=
" "
;
/* 发布时间*/
private
Integer
previewNum
=
new
Integer
(
0
);
/* 预览次数*/
private
Integer
previewNum
=
new
Integer
(
0
);
/* 预览次数*/
private
Integer
downloadNum
=
new
Integer
(
0
);
/* 下载次数*/
private
Integer
downloadNum
=
new
Integer
(
0
);
/* 下载次数*/
private
String
docType
=
" "
;
/* 文件类型*/
/**
/**
* initialize the metadata.
* initialize the metadata.
...
@@ -213,7 +215,9 @@ public class HGWD002 extends DaoEPBase {
...
@@ -213,7 +215,9 @@ public class HGWD002 extends DaoEPBase {
eiColumn
.
setDescName
(
"下载次数"
);
eiColumn
.
setDescName
(
"下载次数"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_DOC_TYPE
);
eiColumn
.
setDescName
(
"文件类型"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
}
/**
/**
...
@@ -623,6 +627,14 @@ public class HGWD002 extends DaoEPBase {
...
@@ -623,6 +627,14 @@ public class HGWD002 extends DaoEPBase {
public
void
setDownloadNum
(
Integer
downloadNum
)
{
public
void
setDownloadNum
(
Integer
downloadNum
)
{
this
.
downloadNum
=
downloadNum
;
this
.
downloadNum
=
downloadNum
;
}
}
public
String
getDocType
()
{
return
docType
;
}
public
void
setDocType
(
String
docType
)
{
this
.
docType
=
docType
;
}
/**
/**
* get the value from Map.
* get the value from Map.
*
*
...
@@ -656,6 +668,7 @@ public class HGWD002 extends DaoEPBase {
...
@@ -656,6 +668,7 @@ public class HGWD002 extends DaoEPBase {
setReleaseDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_RELEASE_DATE
)),
releaseDate
));
setReleaseDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_RELEASE_DATE
)),
releaseDate
));
setPreviewNum
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PREVIEW_NUM
)),
previewNum
));
setPreviewNum
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PREVIEW_NUM
)),
previewNum
));
setDownloadNum
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DOWNLOAD_NUM
)),
downloadNum
));
setDownloadNum
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DOWNLOAD_NUM
)),
downloadNum
));
setDocType
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DOC_TYPE
)),
docType
));
}
}
/**
/**
...
@@ -690,6 +703,7 @@ public class HGWD002 extends DaoEPBase {
...
@@ -690,6 +703,7 @@ public class HGWD002 extends DaoEPBase {
map
.
put
(
FIELD_RELEASE_DATE
,
StringUtils
.
toString
(
releaseDate
,
eiMetadata
.
getMeta
(
FIELD_RELEASE_DATE
)));
map
.
put
(
FIELD_RELEASE_DATE
,
StringUtils
.
toString
(
releaseDate
,
eiMetadata
.
getMeta
(
FIELD_RELEASE_DATE
)));
map
.
put
(
FIELD_PREVIEW_NUM
,
StringUtils
.
toString
(
previewNum
,
eiMetadata
.
getMeta
(
FIELD_PREVIEW_NUM
)));
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_DOWNLOAD_NUM
,
StringUtils
.
toString
(
downloadNum
,
eiMetadata
.
getMeta
(
FIELD_DOWNLOAD_NUM
)));
map
.
put
(
FIELD_DOC_TYPE
,
StringUtils
.
toString
(
docType
,
eiMetadata
.
getMeta
(
FIELD_DOC_TYPE
)));
return
map
;
return
map
;
}
}
...
...
src/main/java/com/baosight/hggp/hg/wd/domain/HGWD099.java
View file @
30f89125
...
@@ -36,6 +36,7 @@ public class HGWD099 extends DaoEPBase {
...
@@ -36,6 +36,7 @@ public class HGWD099 extends DaoEPBase {
public
static
final
String
FIELD_DOWNLOAD_NUM
=
"downloadNum"
;
/* 下载次数*/
public
static
final
String
FIELD_DOWNLOAD_NUM
=
"downloadNum"
;
/* 下载次数*/
public
static
final
String
FIELD_RELEASE_DATE
=
"releaseDate"
;
/* 发布时间*/
public
static
final
String
FIELD_RELEASE_DATE
=
"releaseDate"
;
/* 发布时间*/
public
static
final
String
FIELD_DOC_VERSION
=
"docVersion"
;
/* 文件版本号*/
public
static
final
String
FIELD_DOC_VERSION
=
"docVersion"
;
/* 文件版本号*/
public
static
final
String
FIELD_DOC_TYPE
=
"docType"
;
/* 文件类型*/
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_COMPANY_CODE
=
"COMPANY_CODE"
;
/* 企业编码 预留*/
public
static
final
String
COL_COMPANY_CODE
=
"COMPANY_CODE"
;
/* 企业编码 预留*/
...
@@ -61,6 +62,7 @@ public class HGWD099 extends DaoEPBase {
...
@@ -61,6 +62,7 @@ public class HGWD099 extends DaoEPBase {
public
static
final
String
UPDATE
=
"HGWD099.update"
;
public
static
final
String
UPDATE
=
"HGWD099.update"
;
public
static
final
String
DELETE
=
"HGWD099.delete"
;
public
static
final
String
DELETE
=
"HGWD099.delete"
;
public
static
final
String
DELETE_DOC_ID
=
"HGWD099.deleteDocId"
;
public
static
final
String
DELETE_DOC_ID
=
"HGWD099.deleteDocId"
;
public
static
final
String
DELETE_ID
=
"HGWD099.deleteId"
;
private
Long
id
=
new
Long
(
0
);
private
Long
id
=
new
Long
(
0
);
...
@@ -82,6 +84,7 @@ public class HGWD099 extends DaoEPBase {
...
@@ -82,6 +84,7 @@ public class HGWD099 extends DaoEPBase {
private
Integer
downloadNum
=
new
Integer
(
0
);
/* 下载次数*/
private
Integer
downloadNum
=
new
Integer
(
0
);
/* 下载次数*/
private
String
releaseDate
=
" "
;
/* 发布时间*/
private
String
releaseDate
=
" "
;
/* 发布时间*/
private
Integer
docVersion
=
new
Integer
(
0
);
/* 文件版本号*/
private
Integer
docVersion
=
new
Integer
(
0
);
/* 文件版本号*/
private
String
docType
=
" "
;
/* 文件类型*/
/**
/**
* initialize the metadata.
* initialize the metadata.
...
@@ -166,6 +169,9 @@ public class HGWD099 extends DaoEPBase {
...
@@ -166,6 +169,9 @@ public class HGWD099 extends DaoEPBase {
eiColumn
.
setDescName
(
"发布时间"
);
eiColumn
.
setDescName
(
"发布时间"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_DOC_TYPE
);
eiColumn
.
setDescName
(
"文件类型"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
}
/**
/**
...
@@ -457,6 +463,14 @@ public class HGWD099 extends DaoEPBase {
...
@@ -457,6 +463,14 @@ public class HGWD099 extends DaoEPBase {
this
.
docVersion
=
docVersion
;
this
.
docVersion
=
docVersion
;
}
}
public
String
getDocType
()
{
return
docType
;
}
public
void
setDocType
(
String
docType
)
{
this
.
docType
=
docType
;
}
/**
/**
* get the value from Map.
* get the value from Map.
*
*
...
@@ -484,6 +498,7 @@ public class HGWD099 extends DaoEPBase {
...
@@ -484,6 +498,7 @@ public class HGWD099 extends DaoEPBase {
setDownloadNum
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DOWNLOAD_NUM
)),
downloadNum
));
setDownloadNum
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DOWNLOAD_NUM
)),
downloadNum
));
setDocVersion
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DOC_VERSION
)),
docVersion
));
setDocVersion
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DOC_VERSION
)),
docVersion
));
setReleaseDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_RELEASE_DATE
)),
releaseDate
));
setReleaseDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_RELEASE_DATE
)),
releaseDate
));
setDocType
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DOC_TYPE
)),
docType
));
}
}
/**
/**
...
@@ -512,6 +527,7 @@ public class HGWD099 extends DaoEPBase {
...
@@ -512,6 +527,7 @@ public class HGWD099 extends DaoEPBase {
map
.
put
(
FIELD_DOWNLOAD_NUM
,
StringUtils
.
toString
(
downloadNum
,
eiMetadata
.
getMeta
(
FIELD_DOWNLOAD_NUM
)));
map
.
put
(
FIELD_DOWNLOAD_NUM
,
StringUtils
.
toString
(
downloadNum
,
eiMetadata
.
getMeta
(
FIELD_DOWNLOAD_NUM
)));
map
.
put
(
FIELD_DOC_VERSION
,
StringUtils
.
toString
(
docVersion
,
eiMetadata
.
getMeta
(
FIELD_DOC_VERSION
)));
map
.
put
(
FIELD_DOC_VERSION
,
StringUtils
.
toString
(
docVersion
,
eiMetadata
.
getMeta
(
FIELD_DOC_VERSION
)));
map
.
put
(
FIELD_RELEASE_DATE
,
StringUtils
.
toString
(
releaseDate
,
eiMetadata
.
getMeta
(
FIELD_RELEASE_DATE
)));
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
)));
return
map
;
return
map
;
}
}
...
...
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD001.java
View file @
30f89125
...
@@ -8,12 +8,14 @@ import com.baosight.hggp.core.dao.DaoBase;
...
@@ -8,12 +8,14 @@ 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.enums.OrgTypeEnum
;
import
com.baosight.hggp.core.enums.OrgTypeEnum
;
import
com.baosight.hggp.core.extapp.decheng.api.DcOpenApi
;
import
com.baosight.hggp.core.extapp.decheng.api.DcOpenApi
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.core.tools.Iplat4jTools
;
import
com.baosight.hggp.core.tools.Iplat4jTools
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.cw.tools.HGCWTools
;
import
com.baosight.hggp.hg.cw.tools.HGCWTools
;
import
com.baosight.hggp.hg.dm.tools.HpDmTools
;
import
com.baosight.hggp.hg.dm.tools.HpDmTools
;
import
com.baosight.hggp.hg.pz.domain.HGPZ009
;
import
com.baosight.hggp.hg.pz.domain.HGPZ009
;
import
com.baosight.hggp.hg.pz.tools.HGPZTools
;
import
com.baosight.hggp.hg.pz.tools.HGPZTools
;
import
com.baosight.hggp.hg.sc.domain.HGSC008
;
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.constant.HgWdSqlConstant
;
import
com.baosight.hggp.hg.wd.domain.HGWD001
;
import
com.baosight.hggp.hg.wd.domain.HGWD001
;
...
@@ -34,10 +36,7 @@ import com.baosight.iplat4j.ed.util.SequenceGenerator;
...
@@ -34,10 +36,7 @@ import com.baosight.iplat4j.ed.util.SequenceGenerator;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.Arrays
;
import
java.util.*
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
/**
/**
...
@@ -186,6 +185,8 @@ public class ServiceHGWD001 extends ServiceEPBase {
...
@@ -186,6 +185,8 @@ public class ServiceHGWD001 extends ServiceEPBase {
int
i
=
0
;
int
i
=
0
;
try
{
try
{
EiBlock
eiBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
EiBlock
eiBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
String
changeContent
=
inInfo
.
getCellStr
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGWD001A
.
FIELD_CHANGE_CONTENT
);
HGWD001
hgwd001
=
new
HGWD001
();
List
<
HGWD099
>
list
=
HGWDTools
.
HgWd099
.
queryByBiz
(
"WD"
);
List
<
HGWD099
>
list
=
HGWDTools
.
HgWd099
.
queryByBiz
(
"WD"
);
for
(
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
for
(
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
...
@@ -193,9 +194,14 @@ public class ServiceHGWD001 extends ServiceEPBase {
...
@@ -193,9 +194,14 @@ public class ServiceHGWD001 extends ServiceEPBase {
hgwd099
.
fromMap
(
map
);
hgwd099
.
fromMap
(
map
);
hgwd099
.
setStatus
(
HgWdConstant
.
FileStatus
.
S_1
);
hgwd099
.
setStatus
(
HgWdConstant
.
FileStatus
.
S_1
);
hgwd099
.
setReleaseDate
(
DateUtils
.
shortDateTime
());
hgwd099
.
setReleaseDate
(
DateUtils
.
shortDateTime
());
List
<
HGWD003
>
listByFile
=
HGWDTools
.
HgWd003
.
listByFile
(
hgwd099
.
getBizId
());
List
hgwd003s
=
listByFile
.
stream
().
map
(
HGWD003:
:
getUserId
).
distinct
().
collect
(
Collectors
.
toList
());
AssertUtils
.
isTrue
(
hgwd003s
.
size
()
<=
1
,
"文件未分配人员,请先分配人员!"
);
hgwd003s
=
listByFile
.
stream
().
filter
(
hgwd003
->
hgwd003
.
getUserId
().
equals
(
UserSessionUtils
.
getUserId
())
&&
hgwd003
.
getIsProjectManager
()
==
1
).
collect
(
Collectors
.
toList
());
AssertUtils
.
isEmpty
(
hgwd003s
,
"您不是该项目的项目经理管理员,无法发布!"
);
DaoUtils
.
update
(
HgWdSqlConstant
.
HgWd099
.
RELEASE_DATE
,
hgwd099
);
//发布附件
DaoUtils
.
update
(
HgWdSqlConstant
.
HgWd099
.
RELEASE_DATE
,
hgwd099
);
//发布附件
HGWD001
hgwd001
=
HGWDTools
.
HgWd001
.
get
(
hgwd099
.
getBizId
());
hgwd001
=
HGWDTools
.
HgWd001
.
get
(
hgwd099
.
getBizId
());
List
<
HGWD099
>
cw999List
=
list
.
stream
().
filter
(
hgwcw999
->
hgwcw999
.
getBizId
().
equals
(
hgwd099
.
getBizId
())).
collect
(
Collectors
.
toList
());
List
<
HGWD099
>
cw999List
=
list
.
stream
().
filter
(
hgwcw999
->
hgwcw999
.
getBizId
().
equals
(
hgwd099
.
getBizId
())).
collect
(
Collectors
.
toList
());
AssertUtils
.
isEmpty
(
cw999List
,
String
.
format
(
"未找到[%s]所属项目有关的附件, 发布失败!"
,
hgwd001
.
getProjName
()));
AssertUtils
.
isEmpty
(
cw999List
,
String
.
format
(
"未找到[%s]所属项目有关的附件, 发布失败!"
,
hgwd001
.
getProjName
()));
...
@@ -206,7 +212,7 @@ public class ServiceHGWD001 extends ServiceEPBase {
...
@@ -206,7 +212,7 @@ public class ServiceHGWD001 extends ServiceEPBase {
hgwd001a
.
setProjName
(
hgwd001
.
getProjName
());
hgwd001a
.
setProjName
(
hgwd001
.
getProjName
());
hgwd001a
.
setChangeType
(
ChangeTypeEnum
.
RELEASE
.
getCode
());
hgwd001a
.
setChangeType
(
ChangeTypeEnum
.
RELEASE
.
getCode
());
hgwd001a
.
setMatId
(
hgwd001
.
getId
());
hgwd001a
.
setMatId
(
hgwd001
.
getId
());
hgwd001a
.
setChangeContent
(
"发布"
);
hgwd001a
.
setChangeContent
(
changeContent
.
trim
().
length
()==
0
?
"附件发布"
:
changeContent
);
hgwd001a
.
setChangeStart
(
"V"
.
concat
(
hgwd001
.
getDocVersion
()+
""
));
hgwd001a
.
setChangeStart
(
"V"
.
concat
(
hgwd001
.
getDocVersion
()+
""
));
hgwd001a
.
setChangeEnd
(
"V"
.
concat
(
hgwd001
.
getDocVersion
()+
1
+
""
));
hgwd001a
.
setChangeEnd
(
"V"
.
concat
(
hgwd001
.
getDocVersion
()+
1
+
""
));
//添加变更记录
//添加变更记录
...
@@ -214,8 +220,10 @@ public class ServiceHGWD001 extends ServiceEPBase {
...
@@ -214,8 +220,10 @@ public class ServiceHGWD001 extends ServiceEPBase {
hgwd001
.
setStatus
(
HgWdConstant
.
FileStatus
.
S_1
);
hgwd001
.
setStatus
(
HgWdConstant
.
FileStatus
.
S_1
);
hgwd001
.
setReleaseDate
(
DateUtils
.
shortDateTime
());
hgwd001
.
setReleaseDate
(
DateUtils
.
shortDateTime
());
hgwd001
.
setRemark
(
changeContent
.
trim
().
length
()==
0
?
"附件发布"
:
changeContent
);
DaoUtils
.
update
(
HGWD001
.
RELEASE_DATE
,
hgwd001
);
DaoUtils
.
update
(
HGWD001
.
RELEASE_DATE
,
hgwd001
);
}
}
this
.
interaction
(
hgwd001
,
changeContent
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.update"
,
"发布成功"
)});
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.update"
,
"发布成功"
)});
}
catch
(
PlatException
e
)
{
}
catch
(
PlatException
e
)
{
...
@@ -239,6 +247,7 @@ public class ServiceHGWD001 extends ServiceEPBase {
...
@@ -239,6 +247,7 @@ public class ServiceHGWD001 extends ServiceEPBase {
HGWD001A
hgwd001a
=
initHgwd001a
(
hgwd001
,
hgwd099
,
ChangeTypeEnum
.
UPLOAD_UPDATE
.
getCode
());
HGWD001A
hgwd001a
=
initHgwd001a
(
hgwd001
,
hgwd099
,
ChangeTypeEnum
.
UPLOAD_UPDATE
.
getCode
());
hgwd001a
.
setChangeEndCode
(
resultRow
.
get
(
HGWD099
.
FIELD_DOC_ID
).
toString
());
hgwd001a
.
setChangeEndCode
(
resultRow
.
get
(
HGWD099
.
FIELD_DOC_ID
).
toString
());
hgwd001a
.
setChangeEnd
(
resultRow
.
get
(
HGWD099
.
FIELD_DOC_NAME
).
toString
());
hgwd001a
.
setChangeEnd
(
resultRow
.
get
(
HGWD099
.
FIELD_DOC_NAME
).
toString
());
hgwd001a
.
setAcceId
(
hgwd099
.
getId
().
toString
());
HGWDTools
.
HgWd001
.
addHGWD001A
(
hgwd001a
);
//添加变更记录
HGWDTools
.
HgWd001
.
addHGWD001A
(
hgwd001a
);
//添加变更记录
...
@@ -247,6 +256,7 @@ public class ServiceHGWD001 extends ServiceEPBase {
...
@@ -247,6 +256,7 @@ public class ServiceHGWD001 extends ServiceEPBase {
}
}
hgwd099
.
setDocId
(
resultRow
.
get
(
HGWD099
.
FIELD_DOC_ID
).
toString
());
hgwd099
.
setDocId
(
resultRow
.
get
(
HGWD099
.
FIELD_DOC_ID
).
toString
());
hgwd099
.
setDocName
(
resultRow
.
get
(
HGWD099
.
FIELD_DOC_NAME
).
toString
());
hgwd099
.
setDocName
(
resultRow
.
get
(
HGWD099
.
FIELD_DOC_NAME
).
toString
());
hgwd099
.
setDocType
(
resultRow
.
get
(
HGWD099
.
FIELD_DOC_TYPE
).
toString
());
hgwd099
.
setStatus
(
HgWdConstant
.
FileStatus
.
S_0
);
hgwd099
.
setStatus
(
HgWdConstant
.
FileStatus
.
S_0
);
DaoUtils
.
insert
(
HGWD099
.
UPDATE
,
hgwd099
);
DaoUtils
.
insert
(
HGWD099
.
UPDATE
,
hgwd099
);
}
}
...
@@ -323,12 +333,38 @@ public class ServiceHGWD001 extends ServiceEPBase {
...
@@ -323,12 +333,38 @@ public class ServiceHGWD001 extends ServiceEPBase {
/**
/**
* 附件变更通知
* 附件变更通知
* @param hgwd001 待变更的项目名称
* @param hgwd001 待变更的项目名称
* @param changeContent 变更内容
*/
public
void
interaction
(
HGWD001
hgwd001
,
String
changeContent
){
try
{
HGPZ009
hgpz009
=
HGPZTools
.
HgPz009
.
getByCode
(
hgwd001
.
getAccountCode
());
List
<
HGWD003
>
hgwd003s
=
DaoBase
.
getInstance
().
query
(
HGWD003
.
QUERY
,
new
HashMap
<
String
,
String
>(){{
put
(
"fileId"
,
hgwd001
.
getFileId
());
}}
);
List
<
String
>
userIds
=
hgwd003s
.
stream
().
filter
(
item
->
!
item
.
getUserId
().
equals
(
UserSessionUtils
.
getUserId
())).
map
(
item
->
item
.
getUserId
().
replace
(
hgpz009
.
getLoginPrefix
(),
""
)).
filter
(
ObjectUtils:
:
isNotBlank
).
distinct
().
collect
(
Collectors
.
toList
());
if
(
userIds
.
size
()>
0
){
DcOpenApi
.
interactionAdd
(
String
.
format
(
"[%s]项目附件变更"
,
hgwd001
.
getProjName
()),
changeContent
,
String
.
join
(
","
,
userIds
));
}
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
/**
* 附件变更通知
* @param hgwd001 待变更的项目名称
* @param oldName 变更前附件名称
* @param oldName 变更前附件名称
* @param newName 变更后附件名称
* @param newName 变更后附件名称
*/
*/
public
void
interaction
(
HGWD001
hgwd001
,
String
oldName
,
String
newName
){
public
void
interaction
(
HGWD001
hgwd001
,
String
oldName
,
String
newName
){
try
{
try
{
if
(
Objects
.
nonNull
(
hgwd001
)){
HGPZ009
hgpz009
=
HGPZTools
.
HgPz009
.
getByCode
(
hgwd001
.
getAccountCode
());
HGPZ009
hgpz009
=
HGPZTools
.
HgPz009
.
getByCode
(
hgwd001
.
getAccountCode
());
List
<
HGWD003
>
hgwd003s
=
DaoBase
.
getInstance
().
query
(
HGWD003
.
QUERY
,
List
<
HGWD003
>
hgwd003s
=
DaoBase
.
getInstance
().
query
(
HGWD003
.
QUERY
,
new
HashMap
<
String
,
String
>(){{
new
HashMap
<
String
,
String
>(){{
put
(
"fileId"
,
hgwd001
.
getFileId
());
put
(
"fileId"
,
hgwd001
.
getFileId
());
...
@@ -338,8 +374,77 @@ public class ServiceHGWD001 extends ServiceEPBase {
...
@@ -338,8 +374,77 @@ public class ServiceHGWD001 extends ServiceEPBase {
DcOpenApi
.
interactionAdd
(
DcOpenApi
.
interactionAdd
(
String
.
format
(
"[%s]项目附件变更"
,
hgwd001
.
getProjName
()),
String
.
format
(
"[%s]项目附件变更"
,
hgwd001
.
getProjName
()),
String
.
format
(
"变更前附件名称[%s],变更后附件名称[%s]"
,
oldName
,
newName
),
String
.
join
(
","
,
userIds
));
String
.
format
(
"变更前附件名称[%s],变更后附件名称[%s]"
,
oldName
,
newName
),
String
.
join
(
","
,
userIds
));
}
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
}
}
public
EiInfo
query1
(
EiInfo
inInfo
)
{
try
{
Map
queryRow
=
EiInfoUtils
.
getFirstRow
(
inInfo
,
"inqu_status1"
);
queryRow
.
put
(
HGWD001
.
FIELD_DELETE_FLAG
,
CommonConstant
.
YesNo
.
NO_0
);
EiBlock
block
=
inInfo
.
getBlock
(
EiConstant
.
queryBlock
);
block
.
addRow
(
queryRow
);
inInfo
.
setBlock
(
block
);
return
super
.
query
(
inInfo
,
HGWD001
.
QUERY
,
new
HGWD001
(),
false
,
new
HGWD001
().
eiMetadata
,
"inqu_status1"
,
"result1"
,
"result1"
,
null
);
}
catch
(
Exception
e
)
{
LogUtils
.
setMsg
(
inInfo
,
e
,
"查询失败"
);
}
return
inInfo
;
}
@OperationLogAnnotation
(
operModul
=
"文档库"
,
operType
=
"复制附件"
,
operDesc
=
"文档库-附件复制-附件复制操作"
)
public
EiInfo
save1
(
EiInfo
inInfo
)
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
List
<
Map
>
result1Rows
=
inInfo
.
getBlock
(
"result1"
).
getRows
();
//List<Map<String, Object>> edcm01List = Iplat4jTools.EdCm01.list("hggp.hgwd.fileType");
// 写入数据
for
(
Map
result1Row:
result1Rows
)
{
HGWD001
hgwd001
=
new
HGWD001
();
hgwd001
.
fromMap
(
result1Row
);
for
(
Map
resultRow
:
resultRows
)
{
HGWD099
hgdm099
=
new
HGWD099
();
hgdm099
.
fromMap
(
resultRow
);
cleanBaseInfo
(
hgdm099
);
hgdm099
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
NO_0
);
hgdm099
.
setBizId
(
hgwd001
.
getFileId
());
DaoUtils
.
insert
(
HGWD099
.
INSERT
,
hgdm099
);
HGWD001A
hgwd001a
=
new
HGWD001A
();
hgwd001a
.
setCompanyCode
(
hgwd001
.
getCompanyCode
());
hgwd001a
.
setCompanyName
(
hgwd001
.
getCompanyName
());
hgwd001a
.
setProjCode
(
hgwd001
.
getProjCode
());
hgwd001a
.
setProjName
(
hgwd001
.
getProjName
());
hgwd001a
.
setChangeType
(
ChangeTypeEnum
.
UPLOAD_ADD
.
getCode
());
hgwd001a
.
setChangeContent
(
hgwd001
.
getFileName
());
hgwd001a
.
setChangeEnd
(
hgdm099
.
getDocName
());
hgwd001a
.
setChangeEndCode
(
hgdm099
.
getDocId
());
hgwd001a
.
setMatId
(
hgwd001
.
getId
());
HGWDTools
.
HgWd001
.
addHGWD001A
(
hgwd001a
);
}
hgwd001
.
setStatus
(
HgWdConstant
.
FileStatus
.
S_0
);
HGWDTools
.
HgWd001
.
updateStatus
(
hgwd001
);
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据保存成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"保存失败"
);
}
return
inInfo
;
}
private
static
void
cleanBaseInfo
(
HGWD099
hgwd099
){
hgwd099
.
setCreatedBy
(
null
);
hgwd099
.
setCreatedName
(
null
);
hgwd099
.
setCreatedTime
(
null
);
hgwd099
.
setUpdatedBy
(
null
);
hgwd099
.
setUpdatedName
(
null
);
hgwd099
.
setUpdatedTime
(
null
);
hgwd099
.
setDepCode
(
null
);
hgwd099
.
setId
(
null
);
}
}
}
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD002.java
View file @
30f89125
...
@@ -56,6 +56,7 @@ public class ServiceHGWD002 extends ServiceBase {
...
@@ -56,6 +56,7 @@ public class ServiceHGWD002 extends ServiceBase {
// 仅查询已发布的文件
// 仅查询已发布的文件
queryRow
.
put
(
HGWD001
.
FIELD_STATUS
,
HgWdConstant
.
FileStatus
.
S_1
);
queryRow
.
put
(
HGWD001
.
FIELD_STATUS
,
HgWdConstant
.
FileStatus
.
S_1
);
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
User
.
FIELD_USER_ID
,
UserSessionUtils
.
getUserId
());
inInfo
.
setCell
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
User
.
FIELD_USER_ID
,
UserSessionUtils
.
getUserId
());
builder
(
inInfo
);
inInfo
=
super
.
query
(
inInfo
,
HGWD002
.
QUERY
,
new
HGWD002
());
inInfo
=
super
.
query
(
inInfo
,
HGWD002
.
QUERY
,
new
HGWD002
());
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
...
@@ -63,4 +64,68 @@ public class ServiceHGWD002 extends ServiceBase {
...
@@ -63,4 +64,68 @@ public class ServiceHGWD002 extends ServiceBase {
return
inInfo
;
return
inInfo
;
}
}
public
void
builder
(
EiInfo
eiInfo
){
String
[]
orderBy
=
eiInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getString
(
"orderBy"
).
split
(
","
);
if
(
orderBy
.
length
>
0
){
StringBuilder
orderByStr
=
new
StringBuilder
();
for
(
int
i
=
0
;
i
<
orderBy
.
length
;
i
++)
{
if
(
i
!=
0
&&
i
!=
orderByStr
.
length
()
-
1
)
{
orderByStr
.
append
(
","
);
}
switch
(
orderBy
[
i
])
{
case
"fileType asc"
:
orderByStr
.
append
(
orderBy
[
i
].
replace
(
"fileType asc"
,
"a.fileType asc"
));
break
;
case
"docId asc"
:
orderByStr
.
append
(
orderBy
[
i
].
replace
(
"docId asc"
,
"b.docId asc"
));
break
;
case
"docName asc"
:
orderByStr
.
append
(
orderBy
[
i
].
replace
(
"docName asc"
,
"b.docName asc"
));
break
;
case
"docVersion asc"
:
orderByStr
.
append
(
orderBy
[
i
].
replace
(
"docVersion asc"
,
"b.docVersion asc"
));
break
;
case
"createdTime asc"
:
orderByStr
.
append
(
orderBy
[
i
].
replace
(
"createdTime asc"
,
"b.createdTime asc"
));
break
;
case
"previewNum asc"
:
orderByStr
.
append
(
orderBy
[
i
].
replace
(
"previewNum asc"
,
"b.previewNum asc"
));
break
;
case
"downloadNum asc"
:
orderByStr
.
append
(
orderBy
[
i
].
replace
(
"downloadNum asc"
,
"b.downloadNum asc"
));
break
;
case
"fileType desc"
:
orderByStr
.
append
(
orderBy
[
i
].
replace
(
"fileType desc"
,
"a.fileType desc"
));
break
;
case
"docId desc"
:
orderByStr
.
append
(
orderBy
[
i
].
replace
(
"docId desc"
,
"b.docId desc"
));
break
;
case
"docName desc"
:
orderByStr
.
append
(
orderBy
[
i
].
replace
(
"docName desc"
,
"b.docName desc"
));
break
;
case
"docVersion desc"
:
orderByStr
.
append
(
orderBy
[
i
].
replace
(
"docVersion desc"
,
"b.docVersion desc"
));
break
;
case
"createdTime desc"
:
orderByStr
.
append
(
orderBy
[
i
].
replace
(
"createdTime desc"
,
"b.createdTime desc"
));
break
;
case
"previewNum desc"
:
orderByStr
.
append
(
orderBy
[
i
].
replace
(
"previewNum desc"
,
"b.previewNum desc"
));
break
;
case
"downloadNum desc"
:
orderByStr
.
append
(
orderBy
[
i
].
replace
(
"downloadNum desc"
,
"b.downloadNum desc"
));
break
;
default
:
if
(!
orderBy
[
i
].
isEmpty
()){
orderByStr
.
append
(
orderBy
[
i
]);
}
else
{
orderByStr
.
append
(
orderBy
[
i
]);
}
break
;
}
}
eiInfo
.
getBlock
(
EiConstant
.
resultBlock
).
set
(
"orderBy"
,
orderByStr
);
}
}
}
}
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD004.java
View file @
30f89125
package
com
.
baosight
.
hggp
.
hg
.
wd
.
service
;
package
com
.
baosight
.
hggp
.
hg
.
wd
.
service
;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.common.ChangeTypeEnum
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.dao.DaoBase
;
import
com.baosight.hggp.core.dao.DaoBase
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.enums.OrgTypeEnum
;
import
com.baosight.hggp.core.enums.OrgTypeEnum
;
import
com.baosight.hggp.core.utils.Iplat4jUtils
;
import
com.baosight.hggp.core.utils.Iplat4jUtils
;
import
com.baosight.hggp.hg.sb.domain.HGSB002
;
import
com.baosight.hggp.hg.wd.constant.HgWdConstant
;
import
com.baosight.hggp.hg.wd.domain.HGWD001
;
import
com.baosight.hggp.hg.wd.domain.HGWD001
;
import
com.baosight.hggp.hg.wd.domain.HGWD001A
;
import
com.baosight.hggp.hg.wd.domain.HGWD001A
;
import
com.baosight.hggp.hg.wd.domain.HGWD099
;
import
com.baosight.hggp.hg.wd.domain.HGWD099
;
...
@@ -16,7 +15,6 @@ import com.baosight.hggp.hg.xs.domain.Org;
...
@@ -16,7 +15,6 @@ import com.baosight.hggp.hg.xs.domain.Org;
import
com.baosight.hggp.util.CommonMethod
;
import
com.baosight.hggp.util.CommonMethod
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.StringUtil
;
import
com.baosight.hggp.util.StringUtil
;
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.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
...
@@ -29,6 +27,7 @@ import java.util.Arrays;
...
@@ -29,6 +27,7 @@ import java.util.Arrays;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
/**
* @author LiuYang
* @author LiuYang
...
@@ -73,19 +72,29 @@ public class ServiceHGWD004 extends ServiceEPBase {
...
@@ -73,19 +72,29 @@ public class ServiceHGWD004 extends ServiceEPBase {
public
EiInfo
delete
(
EiInfo
inInfo
)
{
public
EiInfo
delete
(
EiInfo
inInfo
)
{
int
i
=
0
;
int
i
=
0
;
try
{
try
{
List
<
HGWD099
>
hgwd099s
=
DaoBase
.
getInstance
().
query
(
HGWD099
.
QUERY
,
new
HashMap
<
String
,
Object
>(){{
put
(
HGWD099
.
FIELD_DELETE_FLAG
,
Arrays
.
asList
(
CommonConstant
.
YesNo
.
NO_0
,
CommonConstant
.
YesNo
.
YES_1
));
}}
);
EiBlock
eiBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
EiBlock
eiBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
for
(
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
for
(
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
HGWD001A
hgwd001a
=
new
HGWD001A
();
HGWD001A
hgwd001a
=
new
HGWD001A
();
hgwd001a
.
fromMap
(
map
);
hgwd001a
.
fromMap
(
map
);
Iplat4jUtils
.
deleteFileByDocId
(
hgwd001a
.
getChangeStartCode
());
//删除物理附件
String
docId
=
hgwd001a
.
getChangeType
().
equals
(
ChangeTypeEnum
.
UPLOAD_UPDATE
.
getCode
())
?
hgwd001a
.
getChangeStartCode
()
:
hgwd001a
.
getChangeEndCode
();
List
<
HGWD099
>
cw099List
=
hgwd099s
.
stream
().
filter
(
hgwd099
->
hgwd099
.
getDocId
().
equals
(
docId
)).
collect
(
Collectors
.
toList
());
if
(
cw099List
.
size
()
<=
1
){
//删除物理附件
Iplat4jUtils
.
deleteFileByDocId
(
docId
);
}
//删除附件详情
//删除附件详情
DaoUtils
.
update
(
HGWD099
.
DELETE_DOC_ID
,
if
(
hgwd001a
.
getChangeType
().
equals
(
ChangeTypeEnum
.
UPLOAD_DELETE
.
getCode
()))
{
new
HashMap
<
String
,
String
>(){{
DaoUtils
.
update
(
HGWD099
.
DELETE_ID
,
new
HashMap
<
String
,
String
>(){{
put
(
HGWD099
.
FIELD_ID
,
hgwd001a
.
getAcceId
());}});
put
(
HGWD099
.
FIELD_DOC_ID
,
hgwd001a
.
getChangeStartCode
());
}
}}
);
//删除变更记录
DaoUtils
.
update
(
HGWD001A
.
DELETE
,
hgwd001a
);
//删除变更记录
DaoUtils
.
update
(
HGWD001A
.
DELETE
,
hgwd001a
);
}
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.delete"
,
"删除"
)});
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.delete"
,
"删除"
)});
...
...
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD099.java
View file @
30f89125
...
@@ -3,12 +3,17 @@ package com.baosight.hggp.hg.wd.service;
...
@@ -3,12 +3,17 @@ package com.baosight.hggp.hg.wd.service;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.common.ChangeTypeEnum
;
import
com.baosight.hggp.common.ChangeTypeEnum
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.dao.DaoBase
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.extapp.decheng.api.DcOpenApi
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.cw.vo.UserVO
;
import
com.baosight.hggp.hg.cw.vo.UserVO
;
import
com.baosight.hggp.hg.pz.domain.HGPZ009
;
import
com.baosight.hggp.hg.pz.tools.HGPZTools
;
import
com.baosight.hggp.hg.wd.constant.HgWdConstant
;
import
com.baosight.hggp.hg.wd.constant.HgWdConstant
;
import
com.baosight.hggp.hg.wd.domain.HGWD001
;
import
com.baosight.hggp.hg.wd.domain.HGWD001
;
import
com.baosight.hggp.hg.wd.domain.HGWD001A
;
import
com.baosight.hggp.hg.wd.domain.HGWD001A
;
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.xs.domain.User
;
import
com.baosight.hggp.hg.xs.domain.User
;
...
@@ -18,11 +23,11 @@ import com.baosight.iplat4j.core.ei.EiConstant;
...
@@ -18,11 +23,11 @@ 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
;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
org.apache.commons.collections.CollectionUtils
;
import
java.util.ArrayList
;
import
java.io.IOException
;
import
java.util.HashMap
;
import
java.util.*
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.Map
;
/**
/**
* @author LiuYang
* @author LiuYang
...
@@ -84,6 +89,7 @@ public class ServiceHGWD099 extends ServiceEPBase {
...
@@ -84,6 +89,7 @@ public class ServiceHGWD099 extends ServiceEPBase {
hgdm099
.
fromMap
(
resultRow
);
hgdm099
.
fromMap
(
resultRow
);
hgdm099
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
NO_0
);
hgdm099
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
NO_0
);
DaoUtils
.
insert
(
HGWD099
.
INSERT
,
hgdm099
);
DaoUtils
.
insert
(
HGWD099
.
INSERT
,
hgdm099
);
//项目文件
HGWD001
hgwd001
=
HGWDTools
.
HgWd001
.
get
(
hgdm099
.
getBizId
());
HGWD001
hgwd001
=
HGWDTools
.
HgWd001
.
get
(
hgdm099
.
getBizId
());
if
(
hgwd001
!=
null
)
{
if
(
hgwd001
!=
null
)
{
HGWD001A
hgwd001a
=
new
HGWD001A
();
HGWD001A
hgwd001a
=
new
HGWD001A
();
...
@@ -101,6 +107,8 @@ public class ServiceHGWD099 extends ServiceEPBase {
...
@@ -101,6 +107,8 @@ public class ServiceHGWD099 extends ServiceEPBase {
hgwd001
.
setStatus
(
HgWdConstant
.
FileStatus
.
S_0
);
hgwd001
.
setStatus
(
HgWdConstant
.
FileStatus
.
S_0
);
HGWDTools
.
HgWd001
.
updateStatus
(
hgwd001
);
HGWDTools
.
HgWd001
.
updateStatus
(
hgwd001
);
}
}
interaction
(
hgwd001
,
hgdm099
.
getDocName
());
}
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据新增成功!"
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据新增成功!"
);
...
@@ -137,6 +145,7 @@ public class ServiceHGWD099 extends ServiceEPBase {
...
@@ -137,6 +145,7 @@ public class ServiceHGWD099 extends ServiceEPBase {
hgwd001a
.
setChangeEnd
(
hgdm099
.
getDocName
());
hgwd001a
.
setChangeEnd
(
hgdm099
.
getDocName
());
hgwd001a
.
setChangeEndCode
(
hgdm099
.
getDocId
());
hgwd001a
.
setChangeEndCode
(
hgdm099
.
getDocId
());
hgwd001a
.
setMatId
(
hgwd001
.
getId
());
hgwd001a
.
setMatId
(
hgwd001
.
getId
());
hgwd001a
.
setAcceId
(
hgdm099
.
getId
().
toString
());
HGWDTools
.
HgWd001
.
addHGWD001A
(
hgwd001a
);
HGWDTools
.
HgWd001
.
addHGWD001A
(
hgwd001a
);
hgwd001
.
setStatus
(
HgWdConstant
.
FileStatus
.
S_0
);
hgwd001
.
setStatus
(
HgWdConstant
.
FileStatus
.
S_0
);
...
@@ -150,4 +159,31 @@ public class ServiceHGWD099 extends ServiceEPBase {
...
@@ -150,4 +159,31 @@ public class ServiceHGWD099 extends ServiceEPBase {
}
}
return
inInfo
;
return
inInfo
;
}
}
/**
* 附件上传通知
* @param hgwd001 待变更的项目名称
* @param newName 变更后附件名称
*/
public
void
interaction
(
HGWD001
hgwd001
,
String
newName
){
try
{
if
(
Objects
.
nonNull
(
hgwd001
)){
List
<
HGWD003
>
listByFile
=
HGWDTools
.
HgWd003
.
listByFile
(
hgwd001
.
getFileId
());
//获取文件下的权限人员
//当前登录用户是否是设计人员,是设计人员则通知项目经理
List
<
HGWD003
>
hgwd003s
=
listByFile
.
stream
().
filter
(
hgwd003
->
hgwd003
.
getUserId
().
equals
(
UserSessionUtils
.
getUserId
())
&&
hgwd003
.
getIsProjectManager
()
==
0
).
collect
(
Collectors
.
toList
());
if
(
hgwd003s
.
size
()>
0
){
HGPZ009
hgpz009
=
HGPZTools
.
HgPz009
.
getByCode
(
hgwd001
.
getAccountCode
());
List
<
String
>
userIds
=
listByFile
.
stream
().
filter
(
hgwd003
->
hgwd003
.
getIsProjectManager
()
==
1
).
map
(
hgwd003
->
hgwd003
.
getUserId
().
replace
(
hgpz009
.
getLoginPrefix
(),
""
)).
distinct
().
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
userIds
)){
DcOpenApi
.
interactionAdd
(
String
.
format
(
"[%s]项目上传附件请审核发布"
,
hgwd001
.
getProjName
()),
String
.
format
(
"上传附件名称[%s]"
,
newName
),
String
.
join
(
","
,
userIds
));
}
}
}
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
}
}
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD001.xml
View file @
30f89125
...
@@ -232,6 +232,7 @@
...
@@ -232,6 +232,7 @@
RELEASE_DATE = #releaseDate#,
<!--发布时间-->
RELEASE_DATE = #releaseDate#,
<!--发布时间-->
DOC_VERSION = DOC_VERSION + 1,
<!--版本号-->
DOC_VERSION = DOC_VERSION + 1,
<!--版本号-->
STATUS = #status#,
<!-- 状态 -->
STATUS = #status#,
<!-- 状态 -->
REMARK = #remark#,
<!-- 备注 -->
<include
refid=
"SqlBase.updateRevise"
/>
<include
refid=
"SqlBase.updateRevise"
/>
WHERE ID = #id#
WHERE ID = #id#
</update>
</update>
...
...
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD001A.xml
View file @
30f89125
...
@@ -89,6 +89,9 @@
...
@@ -89,6 +89,9 @@
<isNotEmpty
prepend=
" AND "
property=
"matId"
>
<isNotEmpty
prepend=
" AND "
property=
"matId"
>
MAT_ID = #matId#
MAT_ID = #matId#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"acceId"
>
ACCE_ID = #acceId#
</isNotEmpty>
</sql>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
<select
id=
"query"
parameterClass=
"java.util.HashMap"
...
@@ -114,7 +117,8 @@
...
@@ -114,7 +117,8 @@
CHANGE_START as "changeStart",
<!-- 变更前 -->
CHANGE_START as "changeStart",
<!-- 变更前 -->
CHANGE_END_CODE as "changeEndCode",
CHANGE_END_CODE as "changeEndCode",
CHANGE_END as "changeEnd",
<!-- 变更后 -->
CHANGE_END as "changeEnd",
<!-- 变更后 -->
MAT_ID as "matId"
MAT_ID as "matId",
ACCE_ID as "acceId"
FROM ${hggpSchema}.HGWD001A WHERE 1=1
FROM ${hggpSchema}.HGWD001A WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"condition"
/>
<dynamic
prepend=
"ORDER BY"
>
<dynamic
prepend=
"ORDER BY"
>
...
@@ -211,21 +215,20 @@
...
@@ -211,21 +215,20 @@
CHANGE_START,
<!-- 变更前 -->
CHANGE_START,
<!-- 变更前 -->
CHANGE_END_CODE,
CHANGE_END_CODE,
CHANGE_END,
<!-- 变更后 -->
CHANGE_END,
<!-- 变更后 -->
MAT_ID
MAT_ID,
ACCE_ID
)
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #projCode#, #projName#, #changeType#,
#updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #projCode#, #projName#, #changeType#,
#changeContent#, #changeStartCode#, #changeStart#, #changeEndCode#, #changeEnd#,
#mat
Id#)
#changeContent#, #changeStartCode#, #changeStart#, #changeEndCode#, #changeEnd#,
#matId#, #acce
Id#)
</insert>
</insert>
<delete
id=
"delete"
>
<delete
id=
"delete"
>
DELETE FROM ${hggpSchema}.HGWD001A WHERE
DELETE FROM ${hggpSchema}.HGWD001A WHERE ID = #id#
ID = #id#
</delete>
</delete>
<delete
id=
"deleteMatId"
>
<delete
id=
"deleteMatId"
>
DELETE FROM ${hggpSchema}.HGWD001A WHERE
DELETE FROM ${hggpSchema}.HGWD001A WHERE MAT_ID = #matId#
MAT_ID = #matId#
</delete>
</delete>
<update
id=
"update"
>
<update
id=
"update"
>
...
@@ -250,7 +253,8 @@
...
@@ -250,7 +253,8 @@
CHANGE_START = #changeStart#,
<!-- 变更前 -->
CHANGE_START = #changeStart#,
<!-- 变更前 -->
CHANGE_END_CODE as #changeEndCode#,
CHANGE_END_CODE as #changeEndCode#,
CHANGE_END = #changeEnd#,
<!-- 变更后 -->
CHANGE_END = #changeEnd#,
<!-- 变更后 -->
MAT_ID = #matId#
MAT_ID = #matId#,
ACCE_ID = #acceId#
WHERE
WHERE
ID = #id#
ID = #id#
</update>
</update>
...
@@ -278,7 +282,8 @@
...
@@ -278,7 +282,8 @@
CHANGE_START as "changeStart",
<!-- 变更前 -->
CHANGE_START as "changeStart",
<!-- 变更前 -->
CHANGE_END_CODE as "changeEndCode",
CHANGE_END_CODE as "changeEndCode",
CHANGE_END as "changeEnd",
<!-- 变更后 -->
CHANGE_END as "changeEnd",
<!-- 变更后 -->
MAT_ID as "matId"
MAT_ID as "matId",
ACCE_ID as "acceId"
FROM ${hggpSchema}.HGWD001A WHERE 1=1 and CHANGE_TYPE IN ('uploadUpdate','uploadDelete')
FROM ${hggpSchema}.HGWD001A WHERE 1=1 and CHANGE_TYPE IN ('uploadUpdate','uploadDelete')
<include
refid=
"BaseCondition.createdTimeCondition"
/>
<include
refid=
"BaseCondition.createdTimeCondition"
/>
<include
refid=
"condition"
/>
<include
refid=
"condition"
/>
...
...
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD002.xml
View file @
30f89125
...
@@ -17,8 +17,12 @@
...
@@ -17,8 +17,12 @@
B.RELEASE_DATE as "releaseDate",
<!-- 发布时间 -->
B.RELEASE_DATE as "releaseDate",
<!-- 发布时间 -->
B.DOC_ID as "docId",
<!-- 文件号 -->
B.DOC_ID as "docId",
<!-- 文件号 -->
B.DOC_NAME as "docName",
<!-- 文件附件名称 -->
B.DOC_NAME as "docName",
<!-- 文件附件名称 -->
B.DOC_TYPE as "docType",
<!-- 文件类型 -->
B.PREVIEW_NUM as "previewNum",
<!-- 预览次数 -->
B.PREVIEW_NUM as "previewNum",
<!-- 预览次数 -->
B.DOWNLOAD_NUM as "downloadNum"
<!-- 下载次数 -->
B.DOWNLOAD_NUM as "downloadNum",
<!-- 下载次数 -->
B.CREATED_BY as "createdBy",
<!-- 创建人 -->
B.CREATED_NAME as "createdName",
<!-- 创建人名称 -->
B.CREATED_TIME as "createdTime"
<!-- 创建时间 -->
</sql>
</sql>
<sql
id=
"condition"
>
<sql
id=
"condition"
>
...
@@ -56,6 +60,12 @@
...
@@ -56,6 +60,12 @@
<isNotEmpty
prepend=
" AND "
property=
"parentId"
>
<isNotEmpty
prepend=
" AND "
property=
"parentId"
>
B.BIZ_ID IN (select FILE_ID from ${hggpSchema}.hgwd003 where USER_ID = #userId# and FILE_ID = #parentId# )
B.BIZ_ID IN (select FILE_ID from ${hggpSchema}.hgwd003 where USER_ID = #userId# and FILE_ID = #parentId# )
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdTime"
>
LEFT(B.CREATED_TIME,8) = replace(#createdTime#,'-','')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"docType"
>
B.DOC_TYPE = #docType#
</isNotEmpty>
</sql>
</sql>
<sql
id=
"orderBy"
>
<sql
id=
"orderBy"
>
...
...
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD099.xml
View file @
30f89125
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
BIZ_ID as "bizId",
<!-- 业务ID -->
BIZ_ID as "bizId",
<!-- 业务ID -->
DOC_ID as "docId",
<!-- 文件ID -->
DOC_ID as "docId",
<!-- 文件ID -->
DOC_NAME as "docName",
<!-- 文件名称 -->
DOC_NAME as "docName",
<!-- 文件名称 -->
DOC_TYPE as "docType",
<!-- 文件类型 -->
STATUS as "status",
STATUS as "status",
PREVIEW_NUM as "previewNum",
<!-- 预览次数 -->
PREVIEW_NUM as "previewNum",
<!-- 预览次数 -->
DOWNLOAD_NUM as "downloadNum",
<!-- 下载次数 -->
DOWNLOAD_NUM as "downloadNum",
<!-- 下载次数 -->
...
@@ -24,7 +25,6 @@
...
@@ -24,7 +25,6 @@
</sql>
</sql>
<sql
id=
"condition"
>
<sql
id=
"condition"
>
AND DELETE_FLAG = '0'
<include
refid=
"HGXSDataAuth.authCondition"
/>
<include
refid=
"HGXSDataAuth.authCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
ID = #id#
...
@@ -41,6 +41,9 @@
...
@@ -41,6 +41,9 @@
<isNotEmpty
prepend=
" AND "
property=
"docId"
>
<isNotEmpty
prepend=
" AND "
property=
"docId"
>
DOC_ID = #docId#
DOC_ID = #docId#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"docType"
>
DOC_TYPE = #docType#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"status"
>
<isNotEmpty
prepend=
" AND "
property=
"status"
>
STATUS = #status#
STATUS = #status#
</isNotEmpty>
</isNotEmpty>
...
@@ -53,6 +56,12 @@
...
@@ -53,6 +56,12 @@
<isNotEmpty
prepend=
" AND "
property=
"parentId"
>
<isNotEmpty
prepend=
" AND "
property=
"parentId"
>
BIZ_ID = #parentId#
BIZ_ID = #parentId#
</isNotEmpty>
</isNotEmpty>
<isEmpty
prepend=
" AND "
property=
"deleteFlag"
>
DELETE_FLAG = 0
</isEmpty>
<isNotEmpty
prepend=
" AND "
property=
"deleteFlag"
>
DELETE_FLAG in
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"deleteFlag"
>
#deleteFlag[]#
</iterate>
</isNotEmpty>
</sql>
</sql>
<sql
id=
"customCondition"
>
<sql
id=
"customCondition"
>
...
@@ -107,12 +116,13 @@
...
@@ -107,12 +116,13 @@
BIZ_ID,
<!-- 业务ID -->
BIZ_ID,
<!-- 业务ID -->
DOC_ID,
<!-- 文件ID -->
DOC_ID,
<!-- 文件ID -->
DOC_NAME,
<!-- 文件名称 -->
DOC_NAME,
<!-- 文件名称 -->
DOC_TYPE,
<!-- 文件名称 -->
STATUS,
STATUS,
DOC_VERSION,
DOC_VERSION,
RELEASE_DATE
RELEASE_DATE
) VALUES (
) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #bizType#, #bizId#, #docId#, #docName#, #status#, #docVersion#, #releaseDate#
#deleteFlag#, #bizType#, #bizId#, #docId#, #docName#, #
docType#, #
status#, #docVersion#, #releaseDate#
)
)
</insert>
</insert>
...
@@ -132,11 +142,16 @@
...
@@ -132,11 +142,16 @@
DELETE FROM ${hggpSchema}.HGWD099 WHERE DOC_ID = #docId#
DELETE FROM ${hggpSchema}.HGWD099 WHERE DOC_ID = #docId#
</delete>
</delete>
<delete
id=
"deleteId"
>
DELETE FROM ${hggpSchema}.HGWD099 WHERE ID = #id#
</delete>
<update
id=
"update"
>
<update
id=
"update"
>
UPDATE ${hggpSchema}.HGWD099
UPDATE ${hggpSchema}.HGWD099
SET
SET
DOC_ID = #docId#,
<!-- 文件ID -->
DOC_ID = #docId#,
<!-- 文件ID -->
DOC_NAME = #docName#,
<!-- 文件名称 -->
DOC_NAME = #docName#,
<!-- 文件名称 -->
DOC_TYPE = #docType#,
<!-- 文件类型 -->
STATUS = #status#,
STATUS = #status#,
DOC_VERSION = DOC_VERSION + 1,
<!--版本号-->
DOC_VERSION = DOC_VERSION + 1,
<!--版本号-->
RELEASE_DATE = #releaseDate#,
<!--发布时间-->
RELEASE_DATE = #releaseDate#,
<!--发布时间-->
...
...
src/main/webapp/HG/WD/HGWD001.js
View file @
30f89125
...
@@ -15,6 +15,9 @@ $(function () {
...
@@ -15,6 +15,9 @@ $(function () {
$
(
"#QUERY"
).
on
(
"click"
,
function
(
e
)
{
$
(
"#QUERY"
).
on
(
"click"
,
function
(
e
)
{
resultGrid
.
dataSource
.
page
(
1
);
resultGrid
.
dataSource
.
page
(
1
);
});
});
$
(
"#QUERY1"
).
on
(
"click"
,
function
(
e
)
{
result1Grid
.
dataSource
.
page
(
1
);
});
// 分割线组件
// 分割线组件
(
function
()
{
(
function
()
{
splitter
=
$
(
"#splitter"
).
kendoSplitter
({
splitter
=
$
(
"#splitter"
).
kendoSplitter
({
...
@@ -89,7 +92,6 @@ $(function () {
...
@@ -89,7 +92,6 @@ $(function () {
}
}
init
();
init
();
$
(
"#QUERY"
).
on
(
"click"
,
query
);
IPLATUI
.
EFTree
=
{
IPLATUI
.
EFTree
=
{
"categoryTree"
:
{
"categoryTree"
:
{
select
:
function
(
e
)
{
select
:
function
(
e
)
{
...
@@ -471,9 +473,53 @@ $(function () {
...
@@ -471,9 +473,53 @@ $(function () {
// 附件上传
// 附件上传
$
(
"#UPLOAD_FILE"
).
on
(
"click"
,
uploadFile
);
$
(
"#UPLOAD_FILE"
).
on
(
"click"
,
uploadFile
);
//发布
//发布
$
(
"#RELEASE"
).
click
(
"click"
,
updateRelease
);
$
(
"#RELEASE"
).
click
(
"click"
,
function
()
{
var
rows
=
resultGrid
.
getCheckedRows
();
let
flat
=
1
;
if
(
rows
.
length
==
0
)
{
message
(
"请先勾选要发布的数据!"
);
return
;
}
$
.
each
(
rows
,
function
(
i
,
row
){
if
(
row
.
status
==
1
){
message
(
"选中的第"
+
(
i
+
1
)
+
"行
\"
已发布
\"
,不能重复发布!"
);
flat
=
0
;
return
;
}
})
if
(
flat
){
let
parentId
=
IPLATUI
.
EFTree
.
categoryTree
.
selectTreeNode
.
fileId
;
let
inEiInfo
=
new
EiInfo
();
inEiInfo
.
set
(
"inqu_status-0-fileId"
,
parentId
);
//inEiInfo.set("inqu_status-0-isProjectManager", "1");
//inEiInfo.set("inqu_status-0-userId", $("#inqu_status-0-userId").val());
EiCommunicator
.
send
(
"HGWD003"
,
"query"
,
inEiInfo
,
{
onSuccess
(
ei
)
{
if
(
!
isBlank
(
ei
.
getBlock
(
"result"
))){
let
rows
=
ei
.
getBlock
(
"result"
).
getMappedRows
();
if
(
rows
.
length
<=
1
){
message
(
"文件未分配人员,请先分配人员!"
);
return
;
}
else
{
$
(
"#releaseWindow"
).
data
(
"kendoWindow"
).
center
()
$
(
"#releaseWindow"
).
data
(
"kendoWindow"
).
open
();
}
}
},
onFail
(
errorMessage
,
status
,
e
)
{
NotificationUtil
(
"执行失败!"
,
"error"
);
}
},
{
async
:
false
});
}
});
//变更记录
//变更记录
$
(
"#CHANGE_RECORD"
).
on
(
"click"
,
changeResord
);
$
(
"#CHANGE_RECORD"
).
on
(
"click"
,
changeResord
);
// 复制附件
$
(
"#COPY_FILE"
).
on
(
"click"
,
copyFile
);
},
},
onDelete
:
function
(
e
)
{
onDelete
:
function
(
e
)
{
// 阻止默认请求,使用自定义删除
// 阻止默认请求,使用自定义删除
...
@@ -494,6 +540,13 @@ $(function () {
...
@@ -494,6 +540,13 @@ $(function () {
}
}
}
}
],
],
},
result1
:{
exportGrid
:
false
,
// 隐藏右侧自定义导出按钮
pageable
:
{
pageSize
:
10
,
pageSizes
:
[
10
,
20
,
50
,
100
],
}
}
}
};
};
...
@@ -501,6 +554,9 @@ $(function () {
...
@@ -501,6 +554,9 @@ $(function () {
// 查询
// 查询
$
(
"#BTN_DELETE"
).
on
(
"click"
,
deleteFunc
);
$
(
"#BTN_DELETE"
).
on
(
"click"
,
deleteFunc
);
$
(
"#SAVE1"
).
on
(
"click"
,
saveFunc
);
//确认发布
$
(
"#confirmRelease"
).
on
(
"click"
,
updateRelease
);
});
});
let
query
=
function
()
{
let
query
=
function
()
{
...
@@ -862,6 +918,7 @@ function uploadFileCallback(data) {
...
@@ -862,6 +918,7 @@ function uploadFileCallback(data) {
inEiInfo
.
set
(
"result-0-bizId"
,
data
.
bizId
);
inEiInfo
.
set
(
"result-0-bizId"
,
data
.
bizId
);
inEiInfo
.
set
(
"result-0-docId"
,
data
.
docId
);
inEiInfo
.
set
(
"result-0-docId"
,
data
.
docId
);
inEiInfo
.
set
(
"result-0-docName"
,
data
.
docName
);
inEiInfo
.
set
(
"result-0-docName"
,
data
.
docName
);
inEiInfo
.
set
(
"result-0-docType"
,
data
.
docType
);
inEiInfo
.
set
(
"result-0-bizType"
,
data
.
bizType
);
inEiInfo
.
set
(
"result-0-bizType"
,
data
.
bizType
);
inEiInfo
.
set
(
"result-0-ndocId"
,
data
.
ndocId
);
inEiInfo
.
set
(
"result-0-ndocId"
,
data
.
ndocId
);
let
serviceName
=
data
.
operType
==
"add"
?
"HGWD099"
:
"HGWD001"
;
let
serviceName
=
data
.
operType
==
"add"
?
"HGWD099"
:
"HGWD001"
;
...
@@ -910,11 +967,18 @@ function updateRelease() {
...
@@ -910,11 +967,18 @@ function updateRelease() {
message
(
"请选择数据"
);
message
(
"请选择数据"
);
return
;
return
;
}
}
let
changeContent
=
$
(
"#inqu_status-0-changeContent"
).
val
();
if
(
isBlank
(
changeContent
)){
message
(
"请输入变更内容"
);
return
;
}
let
inEiInfo
=
new
EiInfo
();
let
inEiInfo
=
new
EiInfo
();
inEiInfo
.
addBlock
(
JSUtils
.
checkedRows2Block
(
"result"
))
inEiInfo
.
addBlock
(
JSUtils
.
checkedRows2Block
(
"result"
));
inEiInfo
.
set
(
"inqu_status-0-changeContent"
,
changeContent
);
EiCommunicator
.
send
(
'HGWD001'
,
'updateRelease'
,
inEiInfo
,
{
EiCommunicator
.
send
(
'HGWD001'
,
'updateRelease'
,
inEiInfo
,
{
onSuccess
(
response
)
{
onSuccess
(
response
)
{
if
(
response
.
status
!=
-
1
)
{
if
(
response
.
status
!=
-
1
)
{
$
(
"#releaseWindow"
).
data
(
"kendoWindow"
).
close
()
NotificationUtil
(
response
.
msg
);
NotificationUtil
(
response
.
msg
);
query
();
query
();
}
else
{
}
else
{
...
@@ -935,16 +999,41 @@ function updateRelease() {
...
@@ -935,16 +999,41 @@ function updateRelease() {
*/
*/
let
showAuthButton
=
function
()
{
let
showAuthButton
=
function
()
{
let
leafType
=
IPLATUI
.
EFTree
.
categoryTree
.
selectTreeNode
.
leafLevel
;
let
leafType
=
IPLATUI
.
EFTree
.
categoryTree
.
selectTreeNode
.
leafLevel
;
let
parentId
=
IPLATUI
.
EFTree
.
categoryTree
.
selectTreeNode
.
fileId
;
// C:目录
// C:目录
if
(
leafType
&&
leafType
>
0
)
{
if
(
leafType
&&
leafType
>
0
)
{
$
(
"#RELEASE"
).
attr
(
"disabled"
,
false
);
$
(
"#RELEASE"
).
attr
(
"disabled"
,
false
);
$
(
"#UPLOAD_FILE"
).
attr
(
"disabled"
,
false
);
$
(
"#UPLOAD_FILE"
).
attr
(
"disabled"
,
false
);
$
(
"#CHANGE_RECORD"
).
attr
(
"disabled"
,
true
);
$
(
"#CHANGE_RECORD"
).
attr
(
"disabled"
,
true
);
$
(
"#COPY_FILE"
).
attr
(
"disabled"
,
false
);
}
else
{
}
else
{
$
(
"#RELEASE"
).
attr
(
"disabled"
,
true
);
$
(
"#RELEASE"
).
attr
(
"disabled"
,
true
);
$
(
"#UPLOAD_FILE"
).
attr
(
"disabled"
,
true
);
$
(
"#UPLOAD_FILE"
).
attr
(
"disabled"
,
true
);
$
(
"#CHANGE_RECORD"
).
attr
(
"disabled"
,
false
);
$
(
"#CHANGE_RECORD"
).
attr
(
"disabled"
,
false
);
$
(
"#COPY_FILE"
).
attr
(
"disabled"
,
true
);
}
let
inEiInfo
=
new
EiInfo
();
inEiInfo
.
set
(
"inqu_status-0-fileId"
,
parentId
);
inEiInfo
.
set
(
"inqu_status-0-isProjectManager"
,
"1"
);
inEiInfo
.
set
(
"inqu_status-0-userId"
,
$
(
"#inqu_status-0-userId"
).
val
());
EiCommunicator
.
send
(
"HGWD003"
,
"query"
,
inEiInfo
,
{
onSuccess
(
ei
)
{
if
(
!
isBlank
(
ei
.
getBlock
(
"result"
))){
let
rows
=
ei
.
getBlock
(
"result"
).
getMappedRows
();
if
(
rows
.
length
>
0
&&
rows
[
0
].
isProjectManager
==
"1"
){
$
(
"#RELEASE"
).
attr
(
"disabled"
,
false
);
}
else
{
$
(
"#RELEASE"
).
attr
(
"disabled"
,
true
);
}
}
}
},
onFail
(
errorMessage
,
status
,
e
)
{
NotificationUtil
(
"执行失败!"
,
"error"
);
}
},
{
async
:
false
});
}
}
/**
/**
...
@@ -967,3 +1056,55 @@ function changeResord() {
...
@@ -967,3 +1056,55 @@ function changeResord() {
callbackName
:
uploadFileCallback
callbackName
:
uploadFileCallback
});
});
}
}
/**
* 复制文件
*/
let
copyFile
=
function
()
{
let
rowsDate
=
resultGrid
.
getCheckedRows
();
if
(
rowsDate
.
length
<
1
){
message
(
"请选择数据"
);
return
;
}
let
selectOrgWindow
=
$
(
"#selectOrgWindow"
);
selectOrgWindow
.
data
(
"kendoWindow"
).
center
();
selectOrgWindow
.
data
(
"kendoWindow"
).
open
();
result1Grid
.
dataSource
.
page
(
1
);
}
/**
* 复制附件
*/
function
saveFunc
()
{
var
rows
=
result1Grid
.
getCheckedRows
();
if
(
rows
.
length
==
0
)
{
message
(
"请勾选数据文件!"
);
return
;
}
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据
\"
确认
\"
操作?"
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result,result1"
,
"HGWD001"
,
"save1"
,
true
,
function
(
ei
)
{
if
(
ei
.
getStatus
()
>=
0
)
{
try
{
$
(
"#selectOrgWindow"
).
data
(
"kendoWindow"
).
close
()
$
(
"#inqu_status1-0-companyCode"
).
val
(
''
);
$
(
"#inqu_status1-0-projName"
).
val
(
''
);
$
(
"#inqu_status1-0-fileType"
).
val
(
''
);
$
(
"#inqu_status1-0-fileName"
).
val
(
''
);
query
();
}
catch
(
e
)
{
// TODO: handle exception
}
if
(
ei
.
getStatus
()
==
0
)
{
NotificationUtil
(
ei
,
'warning'
);
}
else
{
NotificationUtil
(
ei
);
}
}
else
{
NotificationUtil
(
ei
,
"error"
);
}
});
}
})
}
\ No newline at end of file
src/main/webapp/HG/WD/HGWD001.jsp
View file @
30f89125
...
@@ -4,10 +4,10 @@
...
@@ -4,10 +4,10 @@
<
%@
taglib
prefix=
"EF"
tagdir=
"/WEB-INF/tags/EF"
%
>
<
%@
taglib
prefix=
"EF"
tagdir=
"/WEB-INF/tags/EF"
%
>
<
%@
page
import=
"com.baosight.iplat4j.core.web.threadlocal.UserSession"
%
>
<
%@
page
import=
"com.baosight.iplat4j.core.web.threadlocal.UserSession"
%
>
<
%
<
%
String
loginName =
UserSession.getLoginName
();
String
userId =
UserSession.getUserId
();
%
>
%
>
<c:set
var=
"ctx"
value=
"${pageContext.request.contextPath}"
/>
<c:set
var=
"ctx"
value=
"${pageContext.request.contextPath}"
/>
<c:set
var=
"loginName"
value=
"<%=
loginName
%>"
/>
<c:set
var=
"loginName"
value=
"<%=
userId
%>"
/>
<script
type=
"text/javascript"
src=
"${ctx}/common/js/dayjs.min.js"
></script>
<script
type=
"text/javascript"
src=
"${ctx}/common/js/dayjs.min.js"
></script>
<EF:EFPage
title=
"文档库"
>
<EF:EFPage
title=
"文档库"
>
...
@@ -59,6 +59,7 @@
...
@@ -59,6 +59,7 @@
<EF:EFInput
cname=
"层级"
ename=
"leafLevel"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<EF:EFInput
cname=
"层级"
ename=
"leafLevel"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<EF:EFInput
cname=
"文档库名称"
ename=
"fileName"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<EF:EFInput
cname=
"文档库名称"
ename=
"fileName"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<EF:EFInput
cname=
"父级Id"
ename=
"orgParentId"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<EF:EFInput
cname=
"父级Id"
ename=
"orgParentId"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<EF:EFInput
cname=
"登录用户"
ename=
"userId"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
value=
"${loginName}"
type=
"hidden"
/>
<EF:EFInput
cname=
"业务类型"
ename=
"bizType"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
value=
"WD"
/>
<EF:EFInput
cname=
"业务类型"
ename=
"bizType"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
value=
"WD"
/>
<EF:EFInput
cname=
"文件名称"
ename=
"docName"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
/>
<EF:EFInput
cname=
"文件名称"
ename=
"docName"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
/>
</div>
</div>
...
@@ -81,7 +82,7 @@
...
@@ -81,7 +82,7 @@
</EF:EFPage>
</EF:EFPage>
<EF:EFWindow
id=
"deleteOrgWindow"
width=
"350px"
height=
"
200
px"
>
<EF:EFWindow
id=
"deleteOrgWindow"
width=
"350px"
height=
"
165
px"
>
<div
class=
"kendo-del-message"
>
<div
class=
"kendo-del-message"
>
<span>
确认删除?
</span>
<span>
确认删除?
</span>
</div>
</div>
...
@@ -92,3 +93,59 @@
...
@@ -92,3 +93,59 @@
</div>
</div>
</EF:EFWindow>
</EF:EFWindow>
<EF:EFWindow
id=
"selectOrgWindow"
width=
"70%"
height=
"70%"
title=
"选择文档"
>
<EF:EFRegion
id=
"inqu1"
title=
"查询条件"
>
<div
class=
"row"
>
<EF:EFSelect
blockId=
"inqu_status1"
row=
"0"
ename=
"companyCode"
cname=
"公司名称"
colWidth=
"3"
filter=
"contains"
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFOptions
blockId=
"companyBox_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFSelect>
<EF:EFInput
blockId=
"inqu_status1"
row=
"0"
ename=
"projName"
cname=
"项目名称"
colWidth=
"3"
placeholder=
"模糊查询项目名称"
/>
<EF:EFSelect
blockId=
"inqu_status1"
row=
"0"
ename=
"fileType"
cname=
"文件类型"
colWidth=
"3"
filter=
"contains"
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFCodeOption
codeName=
"hggp.hgwd.fileType"
/>
</EF:EFSelect>
<EF:EFInput
blockId=
"inqu_status1"
row=
"0"
ename=
"fileName"
cname=
"文件名称"
colWidth=
"3"
placeholder=
"模糊查询文件名称"
/>
</div>
</EF:EFRegion>
<EF:EFRegion
id=
"result1"
title=
"明细信息"
>
<EF:EFGrid
blockId=
"result1"
autoDraw=
"override"
isFloat=
"true"
checkMode=
"row"
queryMethod=
"query1"
>
<EF:EFColumn
ename=
"id"
primaryKey=
"true"
cname=
"内码"
hidden=
"true"
/>
<EF:EFColumn
ename=
"parentId"
cname=
"上级ID"
hidden=
"true"
/>
<EF:EFComboColumn
ename=
"companyCode"
cname=
"公司名称"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
textField=
"textField"
valueField=
"valueField"
maxLength=
"16"
readonly=
"true"
width=
"160"
required=
"true"
align=
"center"
filter=
"contains"
sort=
"true"
>
<EF:EFOptions
blockId=
"companyBox_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"companyName"
cname=
"项目名称"
width=
"160"
enable=
"true"
readonly=
"true"
align=
"center"
required=
"true"
hidden=
"true"
/>
<EF:EFComboColumn
ename=
"projCode"
cname=
"项目名称"
blockName=
"proj_record_block_id"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
textField=
"textField"
valueField=
"valueField"
maxLength=
"16"
readonly=
"true"
width=
"200"
required=
"true"
align=
"center"
filter=
"contains"
sort=
"true"
/>
<EF:EFColumn
ename=
"projName"
cname=
"项目名称"
width=
"160"
enable=
"true"
readonly=
"true"
align=
"center"
required=
"true"
hidden=
"true"
/>
<EF:EFComboColumn
ename=
"fileType"
cname=
"文件类型"
width=
"100"
align=
"center"
readonly=
"false"
required=
"true"
defaultValue=
"20"
>
<EF:EFCodeOption
codeName=
"hggp.hgwd.fileType"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"fileName"
cname=
"文件名称"
width=
"160"
enable=
"true"
readonly=
"false"
align=
"center"
required=
"true"
/>
<EF:EFColumn
ename=
"fileId"
cname=
"文件号"
width=
"100"
enable=
"false"
readonly=
"true"
align=
"center"
required=
"false"
/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFWindow>
<EF:EFWindow
id=
"releaseWindow"
title=
"发布变更"
width=
"50%"
height=
"30%"
>
<EF:EFRegion
id=
"inqu2"
title=
""
>
<EF:EFInput
blockId=
"inqu_status"
row=
"0"
ename=
"changeContent"
cname=
"变更内容"
type=
"textarea"
colWidth=
"12"
ratio=
"2:10"
required=
"true"
/>
</EF:EFRegion>
<div
style=
"display: flex;justify-content: flex-end;"
>
<EF:EFButton
ename=
"confirmRelease"
cname=
"确认发布"
/>
</div>
</EF:EFWindow>
src/main/webapp/HG/WD/HGWD002.js
View file @
30f89125
...
@@ -182,6 +182,15 @@ $(function () {
...
@@ -182,6 +182,15 @@ $(function () {
template
:
function
(
model
)
{
template
:
function
(
model
)
{
return
"V"
+
model
.
docVersion
;
return
"V"
+
model
.
docVersion
;
}
}
},
{
field
:
"docType"
,
title
:
"文件类型"
,
template
:
function
(
row
)
{
if
(
!
isBlank
(
row
.
docType
)){
return
row
.
docType
.
substring
(
1
).
toUpperCase
();
}
return
row
.
docType
==
null
?
""
:
row
.
docType
;
}
}],
}],
loadComplete
:
function
(
grid
)
{
loadComplete
:
function
(
grid
)
{
}
}
...
...
src/main/webapp/HG/WD/HGWD002.jsp
View file @
30f89125
...
@@ -28,20 +28,30 @@
...
@@ -28,20 +28,30 @@
<EF:EFInput
cname=
"层级"
ename=
"leafLevel"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<EF:EFInput
cname=
"层级"
ename=
"leafLevel"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<EF:EFInput
cname=
"文档库名称"
ename=
"fileName"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<EF:EFInput
cname=
"文档库名称"
ename=
"fileName"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
/>
<EF:EFInput
cname=
"业务类型"
ename=
"bizType"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
value=
"WD"
/>
<EF:EFInput
cname=
"业务类型"
ename=
"bizType"
blockId=
"inqu_status"
row=
"0"
type=
"hidden"
value=
"WD"
/>
<EF:EFSelect
blockId=
"inqu_status"
row=
"0"
ename=
"fileType"
cname=
"文件类型"
colWidth=
"3"
filter=
"contains"
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFCodeOption
codeName=
"hggp.hgwd.fileType"
/>
</EF:EFSelect>
<EF:EFInput
cname=
"文件名称"
ename=
"docName"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
/>
<EF:EFInput
cname=
"文件名称"
ename=
"docName"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
/>
<EF:EFDatePicker
blockId=
"inqu_status"
row=
"0"
ename=
"createdTime"
cname=
"上传时间"
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=
"明细信息"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"
no"
personal=
"true"
queryMethod=
"query
"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"
override"
queryMethod=
"query"
sort=
"single
"
>
<EF:EFColumn
ename=
"id"
cname=
"ID"
hidden=
"true"
/>
<EF:EFColumn
ename=
"id"
cname=
"ID"
hidden=
"true"
/>
<EF:EFColumn
ename=
"fileId"
cname=
"ID"
hidden=
"true"
/>
<EF:EFColumn
ename=
"fileId"
cname=
"ID"
hidden=
"true"
/>
<EF:EFColumn
ename=
"docId"
cname=
"文件ID"
enable=
"false"
width=
"150"
/>
<EF:EFColumn
ename=
"docId"
cname=
"文件ID"
enable=
"false"
width=
"180"
sort=
"false"
/>
<EF:EFColumn
ename=
"docName"
cname=
"文件名称"
enable=
"false"
width=
"150"
/>
<EF:EFColumn
ename=
"docName"
cname=
"文件名称"
enable=
"false"
width=
"150"
sort=
"false"
/>
<EF:EFColumn
ename=
"docVersion"
cname=
"版本号"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"docType"
cname=
"文件类型"
enable=
"false"
width=
"150"
align=
"center"
sort=
"false"
/>
<EF:EFColumn
ename=
"previewNum"
cname=
"预览次数"
enable=
"false"
width=
"100"
align=
"right"
/>
<EF:EFColumn
ename=
"docVersion"
cname=
"版本号"
enable=
"false"
width=
"100"
align=
"center"
sort=
"true"
/>
<EF:EFColumn
ename=
"downloadNum"
cname=
"下载次数"
enable=
"false"
width=
"100"
align=
"right"
/>
<EF:EFColumn
ename=
"createdTime"
cname=
"上传时间"
parseFormats=
"['yyyyMMddHHmmss']"
editType=
"datetime"
<EF:EFColumn
ename=
"operator"
cname=
"操作"
enable=
"false"
width=
"200"
align=
"center"
/>
dateFormat=
"yyyy-MM-dd HH:mm:ss"
align=
"center"
width=
"140"
readonly=
"true"
required=
"false"
enable=
"false"
sort=
"true"
/>
<EF:EFColumn
ename=
"previewNum"
cname=
"预览次数"
enable=
"false"
width=
"100"
align=
"right"
sort=
"true"
/>
<EF:EFColumn
ename=
"downloadNum"
cname=
"下载次数"
enable=
"false"
width=
"100"
align=
"right"
sort=
"true"
/>
<EF:EFColumn
ename=
"operator"
cname=
"操作"
enable=
"false"
width=
"200"
align=
"center"
sort=
"false"
/>
</EF:EFGrid>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFRegion>
</div>
</div>
...
...
src/main/webapp/HG/WD/HGWD004.js
View file @
30f89125
...
@@ -14,10 +14,19 @@ $(function () {
...
@@ -14,10 +14,19 @@ $(function () {
field
:
"changeStartCode"
,
field
:
"changeStartCode"
,
template
:
function
(
item
)
{
template
:
function
(
item
)
{
let
template
=
item
[
"changeStartCode"
]
let
template
=
item
[
"changeStartCode"
]
/*if (item.changeType == "uploadAdd" || item.changeType == "uploadDelete" || item.changeType == "uploadUpdate") {
if
(
item
[
'changeType'
]
===
"uploadAdd"
||
item
[
'changeType'
]
===
"uploadDelete"
)
{
template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
template
=
item
[
'changeEndCode'
];
+ 'href="' + downloadHref(item.changeStartCode) + '" target="_blank">'+item.changeStart+'</a>';
}
}*/
return
template
;
}
},
{
field
:
"changeStart"
,
template
:
function
(
item
)
{
let
template
=
item
[
"changeStart"
]
if
(
item
[
'changeType'
]
===
"uploadAdd"
||
item
[
'changeType'
]
===
"uploadDelete"
)
{
template
=
item
[
'changeEnd'
];
}
return
template
;
return
template
;
}
}
}
}
...
...
src/main/webapp/HG/WD/HGWD099A.js
View file @
30f89125
...
@@ -17,6 +17,7 @@ $(function () {
...
@@ -17,6 +17,7 @@ $(function () {
var
data
=
{
var
data
=
{
docId
:
docId
,
docId
:
docId
,
docName
:
e
.
response
.
docName
,
docName
:
e
.
response
.
docName
,
docType
:
e
.
response
.
docType
,
bizId
:
matId
,
bizId
:
matId
,
bizType
:
bizType
,
bizType
:
bizType
,
operType
:
operType
,
operType
:
operType
,
...
...
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