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
9fb970fd
Commit
9fb970fd
authored
May 05, 2021
by
季圣华
Browse files
优化单据明细接口
parent
854bbeae
Changes
1
Hide whitespace changes
Inline
Side-by-side
jshERP-boot/src/main/java/com/jsh/erp/service/depotHead/DepotHeadService.java
View file @
9fb970fd
...
...
@@ -468,38 +468,47 @@ public class DepotHeadService {
List
<
DepotHeadVo4List
>
resList
=
new
ArrayList
<
DepotHeadVo4List
>();
List
<
DepotHeadVo4List
>
list
=
null
;
try
{
Map
<
Long
,
String
>
personMap
=
personService
.
getPersonMap
();
Map
<
Long
,
String
>
accountMap
=
accountService
.
getAccountMap
();
list
=
depotHeadMapperEx
.
getDetailByNumber
(
number
);
}
catch
(
Exception
e
){
JshException
.
readFail
(
logger
,
e
);
}
if
(
null
!=
list
)
{
for
(
DepotHeadVo4List
dh
:
list
)
{
if
(
dh
.
getAccountIdList
()
!=
null
)
{
String
accountidlistStr
=
dh
.
getAccountIdList
().
replace
(
"["
,
""
).
replace
(
"]"
,
""
).
replaceAll
(
"\""
,
""
);
dh
.
setAccountIdList
(
accountidlistStr
);
}
if
(
dh
.
getAccountMoneyList
()
!=
null
)
{
String
accountmoneylistStr
=
dh
.
getAccountMoneyList
().
replace
(
"["
,
""
).
replace
(
"]"
,
""
).
replaceAll
(
"\""
,
""
);
dh
.
setAccountMoneyList
(
accountmoneylistStr
);
}
if
(
dh
.
getOtherMoneyList
()
!=
null
)
{
String
otherMoneyListStr
=
dh
.
getOtherMoneyList
().
replace
(
"["
,
""
).
replace
(
"]"
,
""
).
replaceAll
(
"\""
,
""
);
dh
.
setOtherMoneyList
(
otherMoneyListStr
);
}
if
(
dh
.
getOtherMoneyItem
()
!=
null
)
{
String
otherMoneyItemStr
=
dh
.
getOtherMoneyItem
().
replace
(
"["
,
""
).
replace
(
"]"
,
""
).
replaceAll
(
"\""
,
""
);
dh
.
setOtherMoneyItem
(
otherMoneyItemStr
);
}
if
(
dh
.
getChangeAmount
()
!=
null
)
{
dh
.
setChangeAmount
(
dh
.
getChangeAmount
().
abs
());
}
if
(
dh
.
getTotalPrice
()
!=
null
)
{
dh
.
setTotalPrice
(
dh
.
getTotalPrice
().
abs
());
if
(
null
!=
list
)
{
for
(
DepotHeadVo4List
dh
:
list
)
{
if
(
accountMap
!=
null
&&
StringUtil
.
isNotEmpty
(
dh
.
getAccountIdList
())
&&
StringUtil
.
isNotEmpty
(
dh
.
getAccountMoneyList
()))
{
String
accountStr
=
accountService
.
getAccountStrByIdAndMoney
(
accountMap
,
dh
.
getAccountIdList
(),
dh
.
getAccountMoneyList
());
dh
.
setAccountName
(
accountStr
);
}
if
(
dh
.
getAccountIdList
()
!=
null
)
{
String
accountidlistStr
=
dh
.
getAccountIdList
().
replace
(
"["
,
""
).
replace
(
"]"
,
""
).
replaceAll
(
"\""
,
""
);
dh
.
setAccountIdList
(
accountidlistStr
);
}
if
(
dh
.
getAccountMoneyList
()
!=
null
)
{
String
accountmoneylistStr
=
dh
.
getAccountMoneyList
().
replace
(
"["
,
""
).
replace
(
"]"
,
""
).
replaceAll
(
"\""
,
""
);
dh
.
setAccountMoneyList
(
accountmoneylistStr
);
}
if
(
dh
.
getOtherMoneyList
()
!=
null
)
{
String
otherMoneyListStr
=
dh
.
getOtherMoneyList
().
replace
(
"["
,
""
).
replace
(
"]"
,
""
).
replaceAll
(
"\""
,
""
);
dh
.
setOtherMoneyList
(
otherMoneyListStr
);
}
if
(
dh
.
getOtherMoneyItem
()
!=
null
)
{
String
otherMoneyItemStr
=
dh
.
getOtherMoneyItem
().
replace
(
"["
,
""
).
replace
(
"]"
,
""
).
replaceAll
(
"\""
,
""
);
dh
.
setOtherMoneyItem
(
otherMoneyItemStr
);
}
if
(
dh
.
getChangeAmount
()
!=
null
)
{
dh
.
setChangeAmount
(
dh
.
getChangeAmount
().
abs
());
}
if
(
dh
.
getTotalPrice
()
!=
null
)
{
dh
.
setTotalPrice
(
dh
.
getTotalPrice
().
abs
());
}
if
(
StringUtil
.
isNotEmpty
(
dh
.
getSalesMan
()))
{
dh
.
setSalesManStr
(
personService
.
getPersonByMapAndIds
(
personMap
,
dh
.
getSalesMan
()));
}
dh
.
setOperTimeStr
(
getCenternTime
(
dh
.
getOperTime
()));
dh
.
setMaterialsList
(
findMaterialsListByHeaderId
(
dh
.
getId
()));
resList
.
add
(
dh
);
}
dh
.
setOperTimeStr
(
getCenternTime
(
dh
.
getOperTime
()));
dh
.
setMaterialsList
(
findMaterialsListByHeaderId
(
dh
.
getId
()));
resList
.
add
(
dh
);
}
}
catch
(
Exception
e
){
JshException
.
readFail
(
logger
,
e
);
}
return
resList
;
}
...
...
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