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
6f733eb0
Commit
6f733eb0
authored
Dec 22, 2020
by
季圣华
Browse files
优化单据中仓库的校验逻辑
parent
8cc8dea0
Changes
3
Hide whitespace changes
Inline
Side-by-side
erp_web/js/pages/bill/in_out.js
View file @
6f733eb0
...
@@ -1262,7 +1262,7 @@
...
@@ -1262,7 +1262,7 @@
}
}
var
totalRowNum
=
""
;
var
totalRowNum
=
""
;
for
(
var
i
=
0
;
i
<
row
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
row
.
length
;
i
++
)
{
if
(
row
[
i
].
DepotId
==
""
||
row
[
i
].
barCode
==
""
||
row
[
i
].
OperNumber
==
""
||
row
[
i
].
UnitPrice
===
""
||
row
[
i
].
AllPrice
===
""
)
{
if
(
row
[
i
].
barCode
==
""
||
row
[
i
].
OperNumber
==
""
||
row
[
i
].
UnitPrice
===
""
||
row
[
i
].
AllPrice
===
""
)
{
totalRowNum
+=
(
i
+
1
)
+
"
、
"
;
totalRowNum
+=
(
i
+
1
)
+
"
、
"
;
}
}
}
}
...
...
src/main/java/com/jsh/erp/constants/ExceptionConstants.java
View file @
6f733eb0
...
@@ -294,6 +294,12 @@ public class ExceptionConstants {
...
@@ -294,6 +294,12 @@ public class ExceptionConstants {
//单据录入数量超出限制
//单据录入数量超出限制
public
static
final
int
DEPOT_HEAD_OVER_LIMIT_FAILED_CODE
=
8500003
;
public
static
final
int
DEPOT_HEAD_OVER_LIMIT_FAILED_CODE
=
8500003
;
public
static
final
String
DEPOT_HEAD_OVER_LIMIT_FAILED_MSG
=
"单据录入数量超出限制,请联系管理员"
;
public
static
final
String
DEPOT_HEAD_OVER_LIMIT_FAILED_MSG
=
"单据录入数量超出限制,请联系管理员"
;
//单据录入-仓库不能为空
public
static
final
int
DEPOT_HEAD_DEPOT_FAILED_CODE
=
8500004
;
public
static
final
String
DEPOT_HEAD_DEPOT_FAILED_MSG
=
"仓库不能为空"
;
//单据录入-调入仓库不能为空
public
static
final
int
DEPOT_HEAD_ANOTHER_DEPOT_FAILED_CODE
=
8500005
;
public
static
final
String
DEPOT_HEAD_ANOTHER_DEPOT_FAILED_MSG
=
"调入仓库不能为空"
;
/**
/**
* 单据明细信息
* 单据明细信息
* type = 90
* type = 90
...
...
src/main/java/com/jsh/erp/service/depotItem/DepotItemService.java
View file @
6f733eb0
...
@@ -355,12 +355,19 @@ public class DepotItemService {
...
@@ -355,12 +355,19 @@ public class DepotItemService {
if
(
StringUtil
.
isExist
(
rowObj
.
get
(
"AllPrice"
)))
{
if
(
StringUtil
.
isExist
(
rowObj
.
get
(
"AllPrice"
)))
{
depotItem
.
setAllPrice
(
rowObj
.
getBigDecimal
(
"AllPrice"
));
depotItem
.
setAllPrice
(
rowObj
.
getBigDecimal
(
"AllPrice"
));
}
}
depotItem
.
setRemark
(
rowObj
.
getString
(
"Remark"
));
if
(
StringUtil
.
isExist
(
rowObj
.
get
(
"DepotId"
)))
{
if
(
rowObj
.
get
(
"DepotId"
)
!=
null
&&
!
StringUtil
.
isEmpty
(
rowObj
.
get
(
"DepotId"
).
toString
()))
{
depotItem
.
setDepotId
(
rowObj
.
getLong
(
"DepotId"
));
depotItem
.
setDepotId
(
rowObj
.
getLong
(
"DepotId"
));
}
else
{
throw
new
BusinessRunTimeException
(
ExceptionConstants
.
DEPOT_HEAD_DEPOT_FAILED_CODE
,
String
.
format
(
ExceptionConstants
.
DEPOT_HEAD_DEPOT_FAILED_MSG
));
}
}
if
(
rowObj
.
get
(
"AnotherDepotId"
)
!=
null
&&
!
StringUtil
.
isEmpty
(
rowObj
.
get
(
"AnotherDepotId"
).
toString
()))
{
if
(
BusinessConstants
.
SUB_TYPE_TRANSFER
.
equals
(
depotHead
.
getSubType
()))
{
depotItem
.
setAnotherDepotId
(
rowObj
.
getLong
(
"AnotherDepotId"
));
if
(
StringUtil
.
isExist
(
rowObj
.
get
(
"AnotherDepotId"
)))
{
depotItem
.
setAnotherDepotId
(
rowObj
.
getLong
(
"AnotherDepotId"
));
}
else
{
throw
new
BusinessRunTimeException
(
ExceptionConstants
.
DEPOT_HEAD_ANOTHER_DEPOT_FAILED_CODE
,
String
.
format
(
ExceptionConstants
.
DEPOT_HEAD_ANOTHER_DEPOT_FAILED_MSG
));
}
}
}
if
(
StringUtil
.
isExist
(
rowObj
.
get
(
"TaxRate"
)))
{
if
(
StringUtil
.
isExist
(
rowObj
.
get
(
"TaxRate"
)))
{
depotItem
.
setTaxRate
(
rowObj
.
getBigDecimal
(
"TaxRate"
));
depotItem
.
setTaxRate
(
rowObj
.
getBigDecimal
(
"TaxRate"
));
...
@@ -371,10 +378,10 @@ public class DepotItemService {
...
@@ -371,10 +378,10 @@ public class DepotItemService {
if
(
StringUtil
.
isExist
(
rowObj
.
get
(
"TaxLastMoney"
)))
{
if
(
StringUtil
.
isExist
(
rowObj
.
get
(
"TaxLastMoney"
)))
{
depotItem
.
setTaxLastMoney
(
rowObj
.
getBigDecimal
(
"TaxLastMoney"
));
depotItem
.
setTaxLastMoney
(
rowObj
.
getBigDecimal
(
"TaxLastMoney"
));
}
}
if
(
rowObj
.
get
(
"MType"
)
!=
null
)
{
if
(
StringUtil
.
isExist
(
rowObj
.
get
(
"MType"
)
)
)
{
depotItem
.
setMaterialType
(
rowObj
.
getString
(
"MType"
));
depotItem
.
setMaterialType
(
rowObj
.
getString
(
"MType"
));
}
}
if
(
rowObj
.
get
(
"Remark"
)
!=
null
)
{
if
(
StringUtil
.
isExist
(
rowObj
.
get
(
"Remark"
)
)
)
{
depotItem
.
setRemark
(
rowObj
.
getString
(
"Remark"
));
depotItem
.
setRemark
(
rowObj
.
getString
(
"Remark"
));
}
}
//出库时判断库存是否充足
//出库时判断库存是否充足
...
...
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