Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-enterprise
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
base_platform_enterprise
gic-platform-enterprise
Commits
ff922688
Commit
ff922688
authored
Apr 29, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
未开票列表接口调整:添加坏账金额,如果是银行对公转账
parent
ab1973d3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
1 deletions
+59
-1
BillingPayInfoController.java
...c/enterprise/web/controller/BillingPayInfoController.java
+45
-1
BillListVO.java
...b/src/main/java/com/gic/enterprise/web/vo/BillListVO.java
+14
-0
No files found.
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/controller/BillingPayInfoController.java
View file @
ff922688
package
com
.
gic
.
enterprise
.
web
.
controller
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collector
;
import
java.util.stream.Collectors
;
import
com.gic.api.base.commons.Page
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.enterprise.dto.BillingPayInfoDTO
;
import
com.gic.enterprise.utils.UserDetail
;
import
com.gic.finance.dto.TransferAccountsApprovalDTO
;
import
com.gic.finance.service.TransferAccountsApprovalApiService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -49,6 +59,8 @@ public class BillingPayInfoController {
private
InvoiceManageApiService
invoiceManageApiService
;
@Autowired
private
BizdictService
bizdictService
;
@Autowired
private
TransferAccountsApprovalApiService
transferAccountsApprovalApiService
;
@RequestMapping
(
"/bank-info"
)
public
RestResponse
bankInfo
()
{
...
...
@@ -75,7 +87,39 @@ public class BillingPayInfoController {
@RequestMapping
(
"/list-bill"
)
public
RestResponse
listBill
(
BillListQueryQO
params
)
{
params
.
setEnterpriseId
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
());
return
ResultControllerUtils
.
commonPageResult
(
billingPayInfoApiService
.
listBill
(
params
),
BillListVO
.
class
);
ServiceResponse
<
Page
<
BillingPayInfoDTO
>>
payInfoResponse
=
billingPayInfoApiService
.
listBill
(
params
);
if
(
payInfoResponse
.
isSuccess
())
{
Page
<
BillingPayInfoDTO
>
page
=
payInfoResponse
.
getResult
();
if
(
page
!=
null
)
{
List
<
BillingPayInfoDTO
>
list
=
page
.
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
//银行对公转账,需要查询坏账金额
List
<
String
>
orderSerialNumberList
=
list
.
stream
()
.
filter
(
e
->
e
.
getPayType
()
==
3
)
.
map
(
e
->
e
.
getOrderSerialNumber
()).
collect
(
Collectors
.
toList
());
final
Map
<
String
,
Object
>
badMoneyMap
;
ServiceResponse
<
List
<
TransferAccountsApprovalDTO
>>
approvalResponse
=
transferAccountsApprovalApiService
.
listByOrderSerialNumber
(
orderSerialNumberList
);
if
(
approvalResponse
.
isSuccess
())
{
badMoneyMap
=
approvalResponse
.
getResult
().
stream
()
.
collect
(
Collectors
.
toMap
(
TransferAccountsApprovalDTO:
:
getOrderNumber
,
TransferAccountsApprovalDTO:
:
getBadAmount
));
}
else
{
badMoneyMap
=
new
HashMap
<>(
2
);
}
Page
<
BillListVO
>
resultPage
=
EntityUtil
.
changeEntityNew
(
Page
.
class
,
page
);
List
<
BillListVO
>
voList
=
list
.
stream
()
.
map
(
e
->
{
BillListVO
vo
=
EntityUtil
.
changeEntityNew
(
BillListVO
.
class
,
e
);
vo
.
setBadAmount
((
Double
)
badMoneyMap
.
get
(
e
.
getOrderSerialNumber
()));
return
vo
;
})
.
collect
(
Collectors
.
toList
());
resultPage
.
setResult
(
voList
);
return
RestResponse
.
success
(
resultPage
);
}
}
}
return
RestResponse
.
failure
(
payInfoResponse
.
getCode
(),
payInfoResponse
.
getMessage
());
}
@RequestMapping
(
"/list-pay-type"
)
...
...
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/vo/BillListVO.java
View file @
ff922688
...
...
@@ -52,6 +52,11 @@ public class BillListVO implements Serializable{
*/
private
String
buyTypeStr
;
/**
* 坏账金额
*/
private
Double
badAmount
;
public
String
getSerialNumber
()
{
return
serialNumber
;
}
...
...
@@ -101,4 +106,13 @@ public class BillListVO implements Serializable{
}
return
null
;
}
public
Double
getBadAmount
()
{
return
badAmount
;
}
public
BillListVO
setBadAmount
(
Double
badAmount
)
{
this
.
badAmount
=
badAmount
;
return
this
;
}
}
Write
Preview
Markdown
is supported
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