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
abc1287b
Commit
abc1287b
authored
Apr 30, 2021
by
季圣华
Browse files
优化采购入库的账户
parent
da9c3176
Changes
2
Hide whitespace changes
Inline
Side-by-side
jshERP-boot/src/main/java/com/jsh/erp/service/account/AccountService.java
View file @
abc1287b
...
...
@@ -525,13 +525,12 @@ public class AccountService {
public
String
getAccountStrByIdAndMoney
(
Map
<
Long
,
String
>
accountMap
,
String
accountIdList
,
String
accountMoneyList
){
StringBuffer
sb
=
new
StringBuffer
();
accountIdList
=
accountIdList
.
replace
(
"["
,
""
).
replace
(
"]"
,
""
).
replace
(
"\""
,
""
);
accountMoneyList
=
accountMoneyList
.
replace
(
"["
,
""
).
replace
(
"]"
,
""
).
replace
(
"\""
,
""
);
List
<
Long
>
idList
=
StringUtil
.
strToLongList
(
accountIdList
);
List
<
Long
>
moneyList
=
StringUtil
.
strToLongList
(
accountMoneyList
);
for
(
int
i
=
0
;
i
<
idList
.
size
();
i
++)
{
Long
id
=
idList
.
get
(
i
);
sb
.
append
(
accountMap
.
get
(
id
)
+
"("
+
moneyList
.
get
(
i
)
+
"元) "
);
BigDecimal
money
=
BigDecimal
.
valueOf
(
moneyList
.
get
(
i
)).
abs
();
sb
.
append
(
accountMap
.
get
(
id
)
+
"("
+
money
+
"元) "
);
}
return
sb
.
toString
();
}
...
...
jshERP-boot/src/main/java/com/jsh/erp/service/depotHead/DepotHeadService.java
View file @
abc1287b
...
...
@@ -523,6 +523,8 @@ public class DepotHeadService {
depotHead
.
setCreateTime
(
new
Timestamp
(
System
.
currentTimeMillis
()));
depotHead
.
setStatus
(
BusinessConstants
.
BILLS_STATUS_UN_AUDIT
);
depotHead
.
setPayType
(
depotHead
.
getPayType
()==
null
?
"现付"
:
depotHead
.
getPayType
());
depotHead
.
setAccountIdList
(
depotHead
.
getAccountIdList
().
replace
(
"["
,
""
).
replace
(
"]"
,
""
).
replaceAll
(
"\""
,
""
));
depotHead
.
setAccountMoneyList
(
depotHead
.
getAccountMoneyList
().
replace
(
"["
,
""
).
replace
(
"]"
,
""
).
replaceAll
(
"\""
,
""
));
try
{
depotHeadMapper
.
insertSelective
(
depotHead
);
}
catch
(
Exception
e
){
...
...
@@ -574,6 +576,8 @@ public class DepotHeadService {
BigDecimal
preTotalPrice
,
Long
tenantId
,
HttpServletRequest
request
)
throws
Exception
{
/**更新单据主表信息*/
DepotHead
depotHead
=
JSONObject
.
parseObject
(
beanJson
,
DepotHead
.
class
);
depotHead
.
setAccountIdList
(
depotHead
.
getAccountIdList
().
replace
(
"["
,
""
).
replace
(
"]"
,
""
).
replaceAll
(
"\""
,
""
));
depotHead
.
setAccountMoneyList
(
depotHead
.
getAccountMoneyList
().
replace
(
"["
,
""
).
replace
(
"]"
,
""
).
replaceAll
(
"\""
,
""
));
try
{
depotHeadMapper
.
updateByPrimaryKeySelective
(
depotHead
);
}
catch
(
Exception
e
){
...
...
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