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
3c9a496a
Commit
3c9a496a
authored
Aug 09, 2024
by
江和松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
物料清单增加审核功能
parent
bbbe110f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
9 deletions
+25
-9
HGConstant.java
src/main/java/com/baosight/hggp/hg/constant/HGConstant.java
+2
-6
ServiceHGSC004A.java
...java/com/baosight/hggp/hg/sc/service/ServiceHGSC004A.java
+20
-2
HGSC004A.jsp
src/main/webapp/HG/SC/HGSC004A.jsp
+3
-1
No files found.
src/main/java/com/baosight/hggp/hg/constant/HGConstant.java
View file @
3c9a496a
...
...
@@ -401,11 +401,7 @@ public class HGConstant {
// 待审核
public
static
final
Integer
S_0
=
0
;
// 审核中
public
static
final
Integer
S_1
=
1
;
// 审核通过
public
static
final
Integer
S_2
=
2
;
// 审核拒绝
public
static
final
Integer
S_3
=
3
;
// 已审核
public
static
final
Integer
S_1
=
2
;
}
}
src/main/java/com/baosight/hggp/hg/sc/service/ServiceHGSC004A.java
View file @
3c9a496a
...
...
@@ -447,6 +447,8 @@ public class ServiceHGSC004A extends ServiceBase {
Long
id
=
hgsc004a
.
getId
();
hgsc004a
=
allHgsc004AList
.
stream
().
filter
(
o
->
o
.
getId
().
intValue
()
==
id
).
findAny
().
orElse
(
null
);
submitEntityList
.
add
(
hgsc004a
);
//提交校验
checkSubmit
(
hgsc004a
);
}
if
(!
CollectionUtils
.
isEmpty
(
submitEntityList
)){
if
(
Objects
.
nonNull
(
hgsc004
)){
...
...
@@ -542,7 +544,7 @@ public class ServiceHGSC004A extends ServiceBase {
Long
id
=
hgsc004a
.
getId
();
hgsc004a
=
allHgsc004AList
.
stream
().
filter
(
o
->
o
.
getId
().
intValue
()
==
id
.
intValue
()).
findAny
().
orElse
(
null
);
checkApproval
(
hgsc004a
);
hgsc004a
.
setApprovalStatus
(
HGConstant
.
WlApprovalStatu
.
S_
2
);
hgsc004a
.
setApprovalStatus
(
HGConstant
.
WlApprovalStatu
.
S_
1
);
DaoUtils
.
update
(
HGSC004A
.
UPDATE
,
hgsc004a
);
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
...
...
@@ -562,6 +564,22 @@ public class ServiceHGSC004A extends ServiceBase {
*
* @param hgsc004a
*/
private
void
checkSubmit
(
HGSC004A
hgsc004a
)
{
//为构件的需要验证是否已经存在了,不能重复添加
AssertUtils
.
isEmpty
(
UserSessionUtils
.
getAccountCode
(),
"当前用户未绑定公司,无法操作数据,请联系管理员!"
);
AssertUtils
.
isEmpty
(
UserSessionUtils
.
getOrgId
(),
"当前用户未绑定部门,无法操作数据,请联系管理员!"
);
AssertUtils
.
isEmpty
(
hgsc004a
.
getCompanyCode
(),
"请选择公司!"
);
AssertUtils
.
isEmpty
(
hgsc004a
.
getProjCode
(),
"请填写项目编号!"
);
AssertUtils
.
isEmpty
(
hgsc004a
.
getProjName
(),
"请填写项目名称!"
);
AssertUtils
.
isTrue
(
hgsc004a
.
getSingleWeight
().
compareTo
(
BigDecimal
.
ZERO
)
<=
0
,
"单重不能小于等于0!"
);
AssertUtils
.
isTrue
(
hgsc004a
.
getProductStatus
().
intValue
()
==
HGConstant
.
ProductStatus
.
YTJ
,
hgsc004a
.
getProductCode
()+
"已提交,不能重复!"
);
AssertUtils
.
isTrue
(
hgsc004a
.
getApprovalStatus
().
intValue
()
==
HGConstant
.
WlApprovalStatu
.
S_0
,
hgsc004a
.
getProductCode
()+
"未审批通过,不能提交!"
);
}
/**
* 校验保存的数据
*
* @param hgsc004a
*/
private
void
checkApproval
(
HGSC004A
hgsc004a
)
{
//为构件的需要验证是否已经存在了,不能重复添加
AssertUtils
.
isEmpty
(
UserSessionUtils
.
getAccountCode
(),
"当前用户未绑定公司,无法操作数据,请联系管理员!"
);
...
...
@@ -571,7 +589,7 @@ public class ServiceHGSC004A extends ServiceBase {
AssertUtils
.
isEmpty
(
hgsc004a
.
getProjName
(),
"请填写项目名称!"
);
AssertUtils
.
isTrue
(
hgsc004a
.
getSingleWeight
().
compareTo
(
BigDecimal
.
ZERO
)
<=
0
,
"单重不能小于等于0!"
);
AssertUtils
.
isTrue
(
hgsc004a
.
getProductStatus
().
intValue
()
==
HGConstant
.
ProductStatus
.
YTJ
,
hgsc004a
.
getProductCode
()+
"已提交,不能审核!"
);
AssertUtils
.
isTrue
(
hgsc004a
.
getApprovalStatus
().
intValue
()
!=
HGConstant
.
WlApprovalStatu
.
S_0
,
hgsc004a
.
getProductCode
()+
"已审核,不能重复审核!"
);
AssertUtils
.
isTrue
(
hgsc004a
.
getApprovalStatus
().
intValue
()
==
HGConstant
.
WlApprovalStatu
.
S_1
,
hgsc004a
.
getProductCode
()+
"已审核,不能重复审核!"
);
}
...
...
src/main/webapp/HG/SC/HGSC004A.jsp
View file @
3c9a496a
...
...
@@ -69,7 +69,9 @@
data-regex=
"/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt=
"请输入数字,该值最大可设置17位整数和3位小数!"
/>
<EF:EFComboColumn
cname=
"审核状态"
ename=
"approvalStatus"
width=
"90"
align=
"center"
required=
"false"
enable=
"false"
>
<EF:EFCodeOption
codeName=
"hggp.hgyx.status"
/>
</EF:EFComboColumn>
<EF:EFComboColumn
cname=
"提交状态"
ename=
"productStatus"
width=
"90"
align=
"center"
required=
"false"
enable=
"false"
>
<EF:EFCodeOption
codeName=
"hggp.sc.productStatus"
/>
</EF:EFComboColumn>
...
...
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