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
0efb9a92
Commit
0efb9a92
authored
Sep 23, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-09-23 1、文件版本bug修复 2、发布通知内容变更
parent
65130dd9
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
9 deletions
+34
-9
ServiceHGWD001.java
.../java/com/baosight/hggp/hg/wd/service/ServiceHGWD001.java
+13
-7
ServiceHGWD099.java
.../java/com/baosight/hggp/hg/wd/service/ServiceHGWD099.java
+1
-0
HGWD001A.xml
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD001A.xml
+3
-0
HGWD099.xml
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD099.xml
+3
-1
HGWDTools.java
src/main/java/com/baosight/hggp/hg/wd/tools/HGWDTools.java
+14
-1
No files found.
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD001.java
View file @
0efb9a92
...
...
@@ -191,12 +191,20 @@ public class ServiceHGWD001 extends ServiceEPBase {
HGWD001
hgwd001
=
HGWDTools
.
HgWd001
.
get
(
fileId
);
hgwd001
.
setRemark
(
changeContent
);
List
<
HGWD099
>
listByBizId
=
HGWDTools
.
HgWd099
.
queryByBiz
(
"WD"
,
fileId
).
stream
().
filter
(
hgwd099
->
hgwd099
.
getStatus
()==
1
).
collect
(
Collectors
.
toList
());
List
<
HGWD099
>
listByBizId
=
HGWDTools
.
HgWd099
.
queryByBiz
(
"WD"
,
fileId
).
stream
().
filter
(
hgwd099
->
hgwd099
.
getStatus
()==
0
).
collect
(
Collectors
.
toList
());
if
(
listByBizId
.
size
()>
0
){
List
<
String
>
docNames
=
listByBizId
.
stream
().
map
(
HGWD099:
:
getDocName
).
collect
(
Collectors
.
toList
());
strFileName
.
append
(
"发布前文件名称:"
).
append
(
String
.
join
(
","
,
docNames
)).
append
(
", "
);
List
<
String
>
docIds
=
listByBizId
.
stream
().
map
(
HGWD099:
:
getDocId
).
collect
(
Collectors
.
toList
());
List
<
HGWD001A
>
hgwd001AList
=
HGWDTools
.
HgWd001
.
listByDocIds
(
docIds
);
if
(!
StringUtils
.
isEmpty
(
hgwd001AList
)){
List
<
String
>
changeStart
=
hgwd001AList
.
stream
().
map
(
HGWD001A:
:
getChangeStart
).
collect
(
Collectors
.
toList
());
if
(!
StringUtils
.
isEmpty
(
changeStart
)){
strFileName
.
append
(
"发布前文件名称:"
).
append
(
String
.
join
(
","
,
changeStart
)).
append
(
", "
);
}
strFileName
.
append
(
"新发布的文件名称:"
);
List
<
String
>
changeEnd
=
hgwd001AList
.
stream
().
map
(
HGWD001A:
:
getChangeEnd
).
collect
(
Collectors
.
toList
());
strFileName
.
append
(
"新发布文件名称:"
).
append
(
String
.
join
(
","
,
changeEnd
));
}
}
for
(
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
HGWD099
hgwd099
=
new
HGWD099
();
...
...
@@ -211,8 +219,6 @@ public class ServiceHGWD001 extends ServiceEPBase {
AssertUtils
.
isEmpty
(
hgwd003s
,
"您不是该项目的项目经理管理员,无法发布!"
);
DaoUtils
.
update
(
HgWdSqlConstant
.
HgWd099
.
RELEASE_DATE
,
hgwd099
);
//发布附件
strFileName
.
append
(
hgwd099
.
getDocName
()).
append
(
","
);
//添加变更记录
HGWD001A
hgwd001a
=
initHgwd001a
(
hgwd001
,
hgwd099
,
ChangeTypeEnum
.
RELEASE
.
getCode
());
HGWDTools
.
HgWd001
.
addHGWD001A
(
hgwd001a
);
...
...
@@ -223,7 +229,7 @@ public class ServiceHGWD001 extends ServiceEPBase {
DaoUtils
.
update
(
HGWD001
.
RELEASE_DATE
,
hgwd001
);
}
if
(
StringUtils
.
isNotEmpty
(
changeContent
))
{
strFileName
.
append
(
"变更内容:"
).
append
(
changeContent
);
strFileName
.
append
(
"
,"
).
append
(
"
变更内容:"
).
append
(
changeContent
);
}
HGWDTools
.
interaction
(
hgwd001
,
strFileName
.
toString
());
...
...
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD099.java
View file @
0efb9a92
...
...
@@ -104,6 +104,7 @@ public class ServiceHGWD099 extends ServiceEPBase {
hgwd001a
.
setChangeEnd
(
hgdm099
.
getDocName
());
hgwd001a
.
setChangeEndCode
(
hgdm099
.
getDocId
());
hgwd001a
.
setMatId
(
hgwd001
.
getId
());
hgwd001a
.
setAcceId
(
hgdm099
.
getId
().
toString
());
HGWDTools
.
HgWd001
.
addHGWD001A
(
hgwd001a
);
hgwd001
.
setStatus
(
HgWdConstant
.
FileStatus
.
S_0
);
...
...
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD001A.xml
View file @
0efb9a92
...
...
@@ -92,6 +92,9 @@
<isNotEmpty
prepend=
" AND "
property=
"acceId"
>
ACCE_ID = #acceId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"changeEndCodes"
>
CHANGE_END_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"changeEndCodes"
>
#changeEndCodes[]#
</iterate>
</isNotEmpty>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
...
...
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD099.xml
View file @
0efb9a92
...
...
@@ -128,6 +128,9 @@
) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #bizType#, #bizId#, #docId#, #docName#, #docType#, #status#, #docVersion#, #releaseDate#, #operStatus#
<selectKey
resultClass=
"long"
keyProperty=
"id"
>
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGWD099
</selectKey>
)
</insert>
...
...
@@ -158,7 +161,6 @@
DOC_NAME = #docName#,
<!-- 文件名称 -->
DOC_TYPE = #docType#,
<!-- 文件类型 -->
STATUS = #status#,
DOC_VERSION = DOC_VERSION + 1,
<!--版本号-->
RELEASE_DATE = #releaseDate#,
<!--发布时间-->
OPER_STATUS = #operStatus#,
UPDATED_BY = #updatedBy#,
<!-- 修改人 -->
...
...
src/main/java/com/baosight/hggp/hg/wd/tools/HGWDTools.java
View file @
0efb9a92
...
...
@@ -76,6 +76,19 @@ public class HGWDTools {
return
DaoBase
.
getInstance
().
query
(
HGWD001
.
QUERY
,
queryMap
);
}
/** 查询变更后的变更记录
* @param docIds 附件ID
* @return
*/
public
static
List
<
HGWD001A
>
listByDocIds
(
List
<
String
>
docIds
)
{
if
(
CollectionUtils
.
isEmpty
(
docIds
)){
return
null
;
}
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"changeEndCodes"
,
docIds
);
return
DaoBase
.
getInstance
().
query
(
HGWD001A
.
QUERY
,
queryMap
);
}
/**
* @param fileIds
* @return
...
...
@@ -278,7 +291,7 @@ public class HGWDTools {
.
filter
(
ObjectUtils:
:
isNotBlank
).
distinct
().
collect
(
Collectors
.
toList
());
if
(
userIds
.
size
()>
0
){
DcOpenApi
.
interactionAdd
(
String
.
format
(
"[%s]项目
变更
"
,
hgwd001
.
getProjName
()),
String
.
format
(
"[%s]项目
通知
"
,
hgwd001
.
getProjName
()),
changeContent
,
String
.
join
(
","
,
userIds
));
}
...
...
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