Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hp-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
hp-smart
Commits
1b40a0c1
Commit
1b40a0c1
authored
Jan 24, 2024
by
wuwenlong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
库存管理opt
parent
c32343b3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
9 deletions
+18
-9
ServiceHPKC010.java
.../java/com/baosight/hpjx/hp/kc/service/ServiceHPKC010.java
+9
-7
HPSC011.jsp
src/main/webapp/HP/SC/HPSC011.jsp
+9
-2
No files found.
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC010.java
View file @
1b40a0c1
...
...
@@ -101,8 +101,8 @@ public class ServiceHPKC010 extends ServiceBase {
}});
if
(
CollectionUtils
.
isEmpty
(
list
)){
//新增
if
(
Objects
.
isNull
(
amount
)||
amount
.
compareTo
(
BigDecimal
.
ZERO
)<=
0
||
Objects
.
isNull
(
amount
)||
weight
.
compareTo
(
BigDecimal
.
ZERO
)<=
0
){
if
(
amount
.
compareTo
(
BigDecimal
.
ZERO
)<
0
||
weight
.
compareTo
(
BigDecimal
.
ZERO
)<
0
){
throw
new
PlatException
(
"当前库存为空,库存变更数量与重量不能小于等于0!"
);
}
generatorBaseInfo
(
newObj
);
...
...
@@ -113,7 +113,7 @@ public class ServiceHPKC010 extends ServiceBase {
oldObj
.
fromMap
(
list
.
get
(
0
));
BigDecimal
afterAmout
=
oldObj
.
getAmount
().
add
(
amount
);
BigDecimal
afterWeight
=
oldObj
.
getWeight
().
add
(
weight
);
if
(
afterAmout
.
compareTo
(
BigDecimal
.
ZERO
)<
=
0
||
afterWeight
.
compareTo
(
BigDecimal
.
ZERO
)<=
0
){
if
(
afterAmout
.
compareTo
(
BigDecimal
.
ZERO
)<
0
||
afterWeight
.
compareTo
(
BigDecimal
.
ZERO
)<
0
){
throw
new
PlatException
(
"库存更新失败,出库数量与重量不能大于当前库存!"
);
}
oldObj
.
setAmount
(
afterAmout
);
...
...
@@ -220,11 +220,13 @@ public class ServiceHPKC010 extends ServiceBase {
if
(
Objects
.
isNull
(
inventRecordId
)||
inventRecordId
==
0
){
throw
new
PlatException
(
"存货档案ID不能为空!"
);
}
if
(
Objects
.
isNull
(
amout
)||
amout
.
compareTo
(
BigDecimal
.
ZERO
)==
0
){
throw
new
PlatException
(
"库存变更数量不能为空!"
);
if
(
Objects
.
isNull
(
amout
)||
Objects
.
isNull
(
amout
)){
throw
new
PlatException
(
"库存变更数量或重量不能为空!"
);
}
if
(
Objects
.
isNull
(
amout
)||
weight
.
compareTo
(
BigDecimal
.
ZERO
)==
0
){
throw
new
PlatException
(
"库存变更重量不能为空!"
);
if
(
amout
.
compareTo
(
BigDecimal
.
ZERO
)==
0
&&
weight
.
compareTo
(
BigDecimal
.
ZERO
)==
0
){
throw
new
PlatException
(
"库存变更数量或重量不能为0)!"
);
}
}
...
...
src/main/webapp/HP/SC/HPSC011.jsp
View file @
1b40a0c1
...
...
@@ -16,7 +16,11 @@
<EF:EFRegion
id=
"inqu"
title=
"查询条件"
><
%
--
type=
"query"
efRegionShowClear=
"true"
efRegionSave=
"true"
--
%
>
<div
class=
"row"
>
<
%
--
blockId=
"inqu_status"
row=
"0"
--
%
>
<EF:EFInput
blockId=
"inqu_status"
ename=
"projType"
cname=
"项目类型:"
row=
"0"
/>
<EF:EFSelect
ename=
"inqu_status-0-projType"
cname=
"项目类型"
colWidth=
"3"
filter=
"contains"
template=
"#=valueField#-#=textField#"
valueTemplate=
"#=valueField#-#=textField#"
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFCodeOption
codeName=
"hpjx.hpsc.projType"
/>
</EF:EFSelect>
<EF:EFInput
blockId=
"inqu_status"
ename=
"projName"
cname=
"项目名称:"
row=
"0"
/>
</div>
<EF:EFButton
ename=
"QUERY"
cname=
"查询"
row=
"1"
class=
"btn-align-right"
></EF:EFButton>
...
...
@@ -25,7 +29,10 @@
<EF:EFRegion
id=
"result"
title=
"记录集"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"no"
>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"projType"
required=
'true'
cname=
"项目类型"
/>
<EF:EFComboColumn
ename=
"projType"
cname=
"项目类型"
width=
"100"
align=
"center"
required=
"true"
columnTemplate=
"#=valueField#-#=textField#"
itemTemplate=
"#=valueField#-#=textField#"
>
<EF:EFCodeOption
codeName=
"hpjx.hpsc.projType"
/>
</EF:EFComboColumn>
<EF:EFColumn
required=
"true"
ename=
"projCode"
cname=
"项目编码"
/>
<EF:EFColumn
required=
"true"
ename=
"projName"
cname=
"项目名称"
/>
<EF:EFColumn
required=
"true"
ename=
"princ1"
cname=
"本公司项目负责人"
/>
...
...
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