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
85a4f046
Commit
85a4f046
authored
Jul 11, 2022
by
季圣华
Browse files
给批号和序列号增加限制判断(入库或者出库)
parent
9ebd4ac3
Changes
1
Hide whitespace changes
Inline
Side-by-side
jshERP-boot/src/main/java/com/jsh/erp/service/depotItem/DepotItemService.java
View file @
85a4f046
...
@@ -407,19 +407,27 @@ public class DepotItemService {
...
@@ -407,19 +407,27 @@ public class DepotItemService {
depotHead
.
getNumber
(),
materialExtend
.
getMaterialId
(),
depotId
,
depotItem
.
getSnList
());
depotHead
.
getNumber
(),
materialExtend
.
getMaterialId
(),
depotId
,
depotItem
.
getSnList
());
}
}
}
else
{
}
else
{
//序列号不能为空
//入库或出库
if
(
BusinessConstants
.
ENABLE_SERIAL_NUMBER_ENABLED
.
equals
(
material
.
getEnableSerialNumber
()))
{
if
(
BusinessConstants
.
DEPOTHEAD_TYPE_IN
.
equals
(
depotHead
.
getType
())
||
throw
new
BusinessRunTimeException
(
ExceptionConstants
.
MATERIAL_SERIAL_NUMBERE_EMPTY_CODE
,
BusinessConstants
.
DEPOTHEAD_TYPE_OUT
.
equals
(
depotHead
.
getType
()))
{
String
.
format
(
ExceptionConstants
.
MATERIAL_SERIAL_NUMBERE_EMPTY_MSG
,
barCode
));
//序列号不能为空
if
(
BusinessConstants
.
ENABLE_SERIAL_NUMBER_ENABLED
.
equals
(
material
.
getEnableSerialNumber
()))
{
throw
new
BusinessRunTimeException
(
ExceptionConstants
.
MATERIAL_SERIAL_NUMBERE_EMPTY_CODE
,
String
.
format
(
ExceptionConstants
.
MATERIAL_SERIAL_NUMBERE_EMPTY_MSG
,
barCode
));
}
}
}
}
}
if
(
StringUtil
.
isExist
(
rowObj
.
get
(
"batchNumber"
)))
{
if
(
StringUtil
.
isExist
(
rowObj
.
get
(
"batchNumber"
)))
{
depotItem
.
setBatchNumber
(
rowObj
.
getString
(
"batchNumber"
));
depotItem
.
setBatchNumber
(
rowObj
.
getString
(
"batchNumber"
));
}
else
{
}
else
{
//批号不能为空
//入库或出库
if
(
BusinessConstants
.
ENABLE_BATCH_NUMBER_ENABLED
.
equals
(
material
.
getEnableBatchNumber
()))
{
if
(
BusinessConstants
.
DEPOTHEAD_TYPE_IN
.
equals
(
depotHead
.
getType
())
||
throw
new
BusinessRunTimeException
(
ExceptionConstants
.
DEPOT_HEAD_BATCH_NUMBERE_EMPTY_CODE
,
BusinessConstants
.
DEPOTHEAD_TYPE_OUT
.
equals
(
depotHead
.
getType
()))
{
String
.
format
(
ExceptionConstants
.
DEPOT_HEAD_BATCH_NUMBERE_EMPTY_MSG
,
barCode
));
//批号不能为空
if
(
BusinessConstants
.
ENABLE_BATCH_NUMBER_ENABLED
.
equals
(
material
.
getEnableBatchNumber
()))
{
throw
new
BusinessRunTimeException
(
ExceptionConstants
.
DEPOT_HEAD_BATCH_NUMBERE_EMPTY_CODE
,
String
.
format
(
ExceptionConstants
.
DEPOT_HEAD_BATCH_NUMBERE_EMPTY_MSG
,
barCode
));
}
}
}
}
}
if
(
StringUtil
.
isExist
(
rowObj
.
get
(
"expirationDate"
)))
{
if
(
StringUtil
.
isExist
(
rowObj
.
get
(
"expirationDate"
)))
{
...
...
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