Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
71860179
Commit
71860179
authored
Jul 11, 2022
by
季圣华
Browse files
零售或销售单价低于最低售价,进行提示
parent
85a4f046
Changes
2
Hide whitespace changes
Inline
Side-by-side
jshERP-boot/src/main/java/com/jsh/erp/constants/ExceptionConstants.java
View file @
71860179
...
...
@@ -382,6 +382,9 @@ public class ExceptionConstants {
//单据录入-累计订金超出原订单中的订金
public
static
final
int
DEPOT_HEAD_DEPOSIT_OVER_PRE_CODE
=
8000017
;
public
static
final
String
DEPOT_HEAD_DEPOSIT_OVER_PRE_MSG
=
"抱歉,累计订金超出原订单中的订金"
;
//单据录入-商品条码XXX的单价低于最低售价
public
static
final
int
DEPOT_HEAD_UNIT_PRICE_LOW_CODE
=
8000018
;
public
static
final
String
DEPOT_HEAD_UNIT_PRICE_LOW_MSG
=
"商品条码%s的单价低于最低售价"
;
/**
* 单据明细信息
* type = 90
...
...
jshERP-boot/src/main/java/com/jsh/erp/service/depotItem/DepotItemService.java
View file @
71860179
...
...
@@ -486,7 +486,17 @@ public class DepotItemService {
}
}
if
(
StringUtil
.
isExist
(
rowObj
.
get
(
"unitPrice"
)))
{
depotItem
.
setUnitPrice
(
rowObj
.
getBigDecimal
(
"unitPrice"
));
BigDecimal
unitPrice
=
rowObj
.
getBigDecimal
(
"unitPrice"
);
depotItem
.
setUnitPrice
(
unitPrice
);
if
(
materialExtend
.
getLowDecimal
()!=
null
)
{
//零售或销售单价低于最低售价,进行提示
if
(
"零售"
.
equals
(
depotHead
.
getSubType
())
||
"销售"
.
equals
(
depotHead
.
getSubType
()))
{
if
(
unitPrice
.
compareTo
(
materialExtend
.
getLowDecimal
())
<
0
)
{
throw
new
BusinessRunTimeException
(
ExceptionConstants
.
DEPOT_HEAD_UNIT_PRICE_LOW_CODE
,
String
.
format
(
ExceptionConstants
.
DEPOT_HEAD_UNIT_PRICE_LOW_MSG
,
barCode
));
}
}
}
}
if
(
StringUtil
.
isExist
(
rowObj
.
get
(
"taxUnitPrice"
)))
{
depotItem
.
setTaxUnitPrice
(
rowObj
.
getBigDecimal
(
"taxUnitPrice"
));
...
...
Write
Preview
Supports
Markdown
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