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
66cb79a3
Commit
66cb79a3
authored
Sep 05, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-09-05 发布变更逻辑调整
parent
ae61af53
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
51 additions
and
10 deletions
+51
-10
HgWdConstant.java
...n/java/com/baosight/hggp/hg/wd/constant/HgWdConstant.java
+11
-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
+7
-1
HGWD099.xml
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD099.xml
+10
-3
HGWDTools.java
src/main/java/com/baosight/hggp/hg/wd/tools/HGWDTools.java
+1
-1
HGWD001.js
src/main/webapp/HG/WD/HGWD001.js
+0
-0
HGWD001.jsp
src/main/webapp/HG/WD/HGWD001.jsp
+2
-2
HGWD001A.jsp
src/main/webapp/HG/WD/HGWD001A.jsp
+4
-2
No files found.
src/main/java/com/baosight/hggp/hg/wd/constant/HgWdConstant.java
View file @
66cb79a3
...
...
@@ -35,5 +35,15 @@ public class HgWdConstant {
// 目录
public
static
final
String
C
=
"C"
;
}
/**
* 操作状态
*/
public
static
class
OperStatus
{
//新增
public
static
final
Integer
S_0
=
0
;
//变更
public
static
final
Integer
S_1
=
1
;
}
}
src/main/java/com/baosight/hggp/hg/wd/domain/HGWD099.java
View file @
66cb79a3
...
...
@@ -37,6 +37,7 @@ public class HGWD099 extends DaoEPBase {
public
static
final
String
FIELD_RELEASE_DATE
=
"releaseDate"
;
/* 发布时间*/
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
COL_ID
=
"ID"
;
public
static
final
String
COL_COMPANY_CODE
=
"COMPANY_CODE"
;
/* 企业编码 预留*/
...
...
@@ -85,6 +86,7 @@ public class HGWD099 extends DaoEPBase {
private
String
releaseDate
=
" "
;
/* 发布时间*/
private
Integer
docVersion
=
new
Integer
(
0
);
/* 文件版本号*/
private
String
docType
=
" "
;
/* 文件类型*/
private
Integer
operStatus
=
new
Integer
(
0
);
/**
* initialize the metadata.
...
...
@@ -172,6 +174,10 @@ public class HGWD099 extends DaoEPBase {
eiColumn
=
new
EiColumn
(
FIELD_DOC_TYPE
);
eiColumn
.
setDescName
(
"文件类型"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_OPER_STATUS
);
eiColumn
.
setDescName
(
"操作状态"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
/**
...
...
@@ -471,6 +477,14 @@ public class HGWD099 extends DaoEPBase {
this
.
docType
=
docType
;
}
public
Integer
getOperStatus
()
{
return
operStatus
;
}
public
void
setOperStatus
(
Integer
operStatus
)
{
this
.
operStatus
=
operStatus
;
}
/**
* get the value from Map.
*
...
...
@@ -499,6 +513,7 @@ public class HGWD099 extends DaoEPBase {
setDocVersion
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DOC_VERSION
)),
docVersion
));
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
));
}
/**
...
...
@@ -528,6 +543,7 @@ public class HGWD099 extends DaoEPBase {
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_DOC_TYPE
,
StringUtils
.
toString
(
docType
,
eiMetadata
.
getMeta
(
FIELD_DOC_TYPE
)));
map
.
put
(
FIELD_OPER_STATUS
,
StringUtils
.
toString
(
operStatus
,
eiMetadata
.
getMeta
(
FIELD_OPER_STATUS
)));
return
map
;
}
...
...
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD001.java
View file @
66cb79a3
...
...
@@ -203,6 +203,7 @@ public class ServiceHGWD001 extends ServiceEPBase {
hgwd099
.
fromMap
(
map
);
hgwd099
.
setStatus
(
HgWdConstant
.
FileStatus
.
S_1
);
hgwd099
.
setReleaseDate
(
DateUtils
.
shortDateTime
());
hgwd099
.
setOperStatus
(
HgWdConstant
.
OperStatus
.
S_0
);
List
<
HGWD003
>
listByFile
=
HGWDTools
.
HgWd003
.
listByFile
(
hgwd099
.
getBizId
());
List
hgwd003s
=
listByFile
.
stream
().
map
(
HGWD003:
:
getUserId
).
distinct
().
collect
(
Collectors
.
toList
());
AssertUtils
.
isTrue
(
hgwd003s
.
size
()
<=
1
,
"文件未分配人员,请先分配人员!"
);
...
...
@@ -221,7 +222,10 @@ public class ServiceHGWD001 extends ServiceEPBase {
hgwd001
.
setRemark
(
changeContent
.
trim
().
length
()==
0
?
"附件发布"
:
changeContent
);
DaoUtils
.
update
(
HGWD001
.
RELEASE_DATE
,
hgwd001
);
}
HGWDTools
.
interaction
(
hgwd001
,
strFileName
.
append
(
"变更内容:"
).
append
(
changeContent
).
toString
());
if
(
StringUtils
.
isNotEmpty
(
changeContent
))
{
strFileName
.
append
(
"变更内容:"
).
append
(
changeContent
);
}
HGWDTools
.
interaction
(
hgwd001
,
strFileName
.
toString
());
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.update"
,
"发布成功"
)});
...
...
@@ -263,6 +267,7 @@ public class ServiceHGWD001 extends ServiceEPBase {
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
.
setOperStatus
(
HgWdConstant
.
OperStatus
.
S_1
);
DaoUtils
.
insert
(
HGWD099
.
UPDATE
,
hgwd099
);
}
HGWDTools
.
interaction
(
hgwd001
,
strFileName
.
substring
(
0
,
strFileName
.
length
()-
1
));
...
...
@@ -296,6 +301,7 @@ public class ServiceHGWD001 extends ServiceEPBase {
hgwd001a
.
setChangeStartCode
(
hgwd099
.
getDocId
());
hgwd001a
.
setChangeStart
(
hgwd099
.
getDocName
());
}
else
if
(
ChangeTypeEnum
.
RELEASE
.
getCode
().
equals
(
type
)){
hgwd001a
.
setChangeType
(
ChangeTypeEnum
.
RELEASE
.
getCode
());
hgwd001a
.
setChangeContent
(
hgwd001
.
getRemark
().
trim
().
length
()==
0
?
"附件发布"
:
hgwd001
.
getRemark
().
trim
());
hgwd001a
.
setChangeStart
(
"V"
.
concat
(
hgwd001
.
getDocVersion
()+
""
));
hgwd001a
.
setChangeEnd
(
"V"
.
concat
(
hgwd001
.
getDocVersion
()+
1
+
""
));
...
...
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD099.xml
View file @
66cb79a3
...
...
@@ -21,7 +21,8 @@
PREVIEW_NUM as "previewNum",
<!-- 预览次数 -->
DOWNLOAD_NUM as "downloadNum",
<!-- 下载次数 -->
DOC_VERSION as "docVersion",
<!-- 文件版本号 -->
RELEASE_DATE as "releaseDate"
<!-- 发布时间 -->
RELEASE_DATE as "releaseDate",
<!-- 发布时间 -->
OPER_STATUS as "operStatus"
</sql>
<sql
id=
"condition"
>
...
...
@@ -62,6 +63,9 @@
<isNotEmpty
prepend=
" AND "
property=
"deleteFlag"
>
DELETE_FLAG in
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"deleteFlag"
>
#deleteFlag[]#
</iterate>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"operStatus"
>
OPER_STATUS = #operStatus#
</isNotEmpty>
</sql>
<sql
id=
"customCondition"
>
...
...
@@ -119,10 +123,11 @@
DOC_TYPE,
<!-- 文件名称 -->
STATUS,
DOC_VERSION,
RELEASE_DATE
RELEASE_DATE,
OPER_STATUS
) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #bizType#, #bizId#, #docId#, #docName#, #docType#, #status#, #docVersion#, #releaseDate#
#deleteFlag#, #bizType#, #bizId#, #docId#, #docName#, #docType#, #status#, #docVersion#, #releaseDate#
, #operStatus#
)
</insert>
...
...
@@ -155,6 +160,7 @@
STATUS = #status#,
DOC_VERSION = DOC_VERSION + 1,
<!--版本号-->
RELEASE_DATE = #releaseDate#,
<!--发布时间-->
OPER_STATUS = #operStatus#,
UPDATED_BY = #updatedBy#,
<!-- 修改人 -->
UPDATED_NAME = #updatedName#,
<!-- 修改人名称 -->
UPDATED_TIME = #updatedTime#
<!-- 修改时间 -->
...
...
@@ -177,6 +183,7 @@
RELEASE_DATE = #releaseDate#,
<!--发布时间-->
DOC_VERSION = DOC_VERSION + 1,
<!--版本号-->
STATUS = #status#,
<!-- 状态 -->
OPER_STATUS = #operStatus#,
<include
refid=
"SqlBase.updateRevise"
/>
WHERE ID = #id#
</update>
...
...
src/main/java/com/baosight/hggp/hg/wd/tools/HGWDTools.java
View file @
66cb79a3
...
...
@@ -271,7 +271,7 @@ public class HGWDTools {
if
(
Objects
.
nonNull
(
hgwd001
)){
List
<
HGWD003
>
listByFile
=
HGWDTools
.
HgWd003
.
listByFile
(
hgwd001
.
getFileId
());
//获取文件下的权限人员
HGPZ009
hgpz009
=
HGPZTools
.
HgPz009
.
getByCode
(
hgwd001
.
getAccountCode
());
//
HGPZ009 hgpz009 = HGPZTools.HgPz009.getByCode(hgwd001.getAccountCode());
List
<
String
>
userIds
=
listByFile
.
stream
().
filter
(
item
->
!
item
.
getUserId
().
equals
(
UserSessionUtils
.
getUserId
())
&&
item
.
getIsProjectManager
()
==
1
)
.
map
(
HGWD003:
:
getExtId
)
...
...
src/main/webapp/HG/WD/HGWD001.js
View file @
66cb79a3
This diff is collapsed.
Click to expand it.
src/main/webapp/HG/WD/HGWD001.jsp
View file @
66cb79a3
...
...
@@ -71,7 +71,7 @@
<EF:EFColumn
ename=
"docId"
cname=
"文件ID"
enable=
"false"
width=
"180"
hidden=
"true"
/>
<EF:EFColumn
ename=
"operator"
cname=
"操作"
enable=
"false"
width=
"140"
align=
"center"
/>
<EF:EFColumn
ename=
"docName"
cname=
"文件名称"
enable=
"false"
width=
"180"
/>
<EF:EFColumn
ename=
"docType"
cname=
"文件类型"
enable=
"false"
width=
"110"
/>
<EF:EFColumn
ename=
"docType"
cname=
"文件类型"
enable=
"false"
width=
"110"
align=
"center"
/>
<EF:EFComboColumn
ename=
"status"
cname=
"状态"
enable=
"false"
width=
"100"
align=
"center"
defaultValue=
"0"
hidden=
"false"
>
<EF:EFCodeOption
codeName=
"hggp.hgwd.status"
/>
...
...
@@ -124,7 +124,7 @@
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"
<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#"
...
...
src/main/webapp/HG/WD/HGWD001A.jsp
View file @
66cb79a3
...
...
@@ -24,8 +24,10 @@
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="projCode" cname="项目编码" type="hidden" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="projName" cname="项目名称" placeholder="模糊查询" colWidth="3" readonly="true"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="projCode" cname="项目名称" colWidth="3" filter="contains" readonly="true">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="proj_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect blockId="inqu_status" row="0" ename="changeType" cname="变更类型" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.hgwd.changeType"/>
...
...
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