Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
financial-tools
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QG
financial-tools
Commits
e16407d2
Commit
e16407d2
authored
Oct 08, 2016
by
Java-刘 彧阳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
23ecf8ce
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
117 additions
and
316 deletions
+117
-316
pom.xml
pom.xml
+5
-0
RepayFinancialAPP.java
src/main/java/cn/gq/financial/app/RepayFinancialAPP.java
+4
-5
RepayHandler.java
src/main/java/cn/gq/financial/app/handler/RepayHandler.java
+11
-3
RepayHandlerAsync.java
...n/java/cn/gq/financial/app/handler/RepayHandlerAsync.java
+5
-6
TotalAmountCheck.java
src/main/java/cn/gq/financial/checkout/TotalAmountCheck.java
+61
-0
RepayDetailFinancial.java
...n/java/cn/gq/financial/model/db/RepayDetailFinancial.java
+3
-296
BaitiaoOfflineDetailService.java
.../cn/gq/financial/service/BaitiaoOfflineDetailService.java
+3
-0
BaitiaoOnlineDetailService.java
...a/cn/gq/financial/service/BaitiaoOnlineDetailService.java
+10
-2
BillParsers.java
src/main/java/cn/gq/financial/utils/BillParsers.java
+11
-3
Constants.java
src/main/java/cn/gq/financial/utils/Constants.java
+3
-0
HttpUtils.java
src/main/java/cn/gq/financial/utils/HttpUtils.java
+1
-1
No files found.
pom.xml
View file @
e16407d2
...
...
@@ -6,6 +6,11 @@
<version>
0.0.1-SNAPSHOT
</version>
<dependencies>
<dependency>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
<version>
1.16.4
</version>
</dependency>
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
...
...
src/main/java/cn/gq/financial/app/RepayFinancialAPP.java
View file @
e16407d2
package
cn
.
gq
.
financial
.
app
;
import
cn.gq.financial.model.db.RepayDetailFinancial
;
import
cn.gq.financial.service.FinancialRepayDetailService
;
import
cn.gq.financial.utils.Constants
;
import
org.slf4j.Logger
;
...
...
@@ -17,13 +16,13 @@ public class RepayFinancialAPP {
private
static
final
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
RepayFinancialAPP
.
class
);
static
final
String
CONFIG_LOCAL
=
"applicationContext.xml"
;
static
Integer
month
=
9
;
static
String
SRC_BILL_PATH
=
"E:\\
WX_BILL_BAITIAO
"
;
static
Integer
month
=
8
;
static
String
SRC_BILL_PATH
=
"E:\\
易宝白条-9月
"
;
// static String SRC_BILL_PATH ="E:\\WX_BILL\\GBK";
static
String
payAprroach
=
"
微信
"
;
static
String
payAprroach
=
"
易宝
"
;
static
String
payAccount
=
"
微信
-白条账户"
;
static
String
payAccount
=
"
易宝
-白条账户"
;
private
static
ClassPathXmlApplicationContext
context
=
null
;
...
...
src/main/java/cn/gq/financial/app/handler/RepayHandler.java
View file @
e16407d2
package
cn
.
gq
.
financial
.
app
.
handler
;
import
java.io.File
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.concurrent.CountDownLatch
;
import
cn.gq.financial.db.local.dao.FinancialRepayDetailMapper
;
import
cn.gq.financial.model.bill.YeepayBill
;
import
cn.gq.financial.model.db.RepayDetailFinancial
;
import
cn.gq.financial.service.FinancialRepayDetailService
;
import
cn.gq.financial.utils.Constants
;
...
...
@@ -22,7 +24,7 @@ import cn.gq.financial.utils.BillParsers;
@Component
public
class
RepayHandler
{
static
int
ITEM_SIZE
=
5
000
;
static
int
ITEM_SIZE
=
10
000
;
@Autowired
private
ThreadPoolTaskExecutor
threadPoolTaskExecutor
;
...
...
@@ -40,7 +42,13 @@ public class RepayHandler {
private
CountDownLatch
count
=
null
;
public
void
repayBillDetailHandler
(
final
String
srcPaht
,
final
Class
<?
extends
Bill
>
clazz
,
String
payAccount
,
Integer
month
)
throws
Exception
{
List
<
Bill
>
bills
=
getBillsFromFile
(
srcPaht
,
clazz
,
payAccount
,
month
);
// List<Bill> bills = getBillsFromFile(srcPaht,clazz,payAccount,month);
List
<
Bill
>
bills
=
new
ArrayList
<>();
YeepayBill
bill
=
new
YeepayBill
();
bill
.
setOrderId
(
"1469787374013"
);
bill
.
setIncome
(
new
BigDecimal
(
"830.04"
));
bill
.
setBizType
(
YeepayBill
.
REPAY
);
bills
.
add
(
bill
);
if
(!
CollectionUtils
.
isEmpty
(
bills
)){
asyncHandlerRepayData
(
clazz
,
bills
);
count
.
await
();
//等待所有线程结束
...
...
@@ -75,7 +83,7 @@ public class RepayHandler {
}
}
p
rivate
static
List
<
Bill
>
getBillsFromFile
(
String
srcPath
,
Class
<?
extends
Bill
>
clazz
,
String
payAccount
,
Integer
month
)
throws
Exception
{
p
ublic
static
List
<
Bill
>
getBillsFromFile
(
String
srcPath
,
Class
<?
extends
Bill
>
clazz
,
String
payAccount
,
Integer
month
)
throws
Exception
{
File
[]
billFiles
=
getFiles
(
srcPath
);
List
<
Bill
>
bills
=
new
ArrayList
<
Bill
>();
for
(
int
i
=
0
;
i
<
billFiles
.
length
;
i
++)
{
...
...
src/main/java/cn/gq/financial/app/handler/RepayHandlerAsync.java
View file @
e16407d2
...
...
@@ -40,8 +40,6 @@ public class RepayHandlerAsync implements Runnable {
private
FinancialRepayDetailService
financialRepayDetailService
;
static
BigDecimal
MINUS_ONE
=
new
BigDecimal
(
"-1"
);
public
RepayHandlerAsync
(
List
<
Bill
>
bills
,
Class
<?
extends
Bill
>
clazz
,
PaycenterService
paycenterService
,
BizRepayDetailService
bizRepayDetailService
,
CountDownLatch
count
,
FinancialRepayDetailMapper
repayDetailMapper
,
FinancialRepayDetailService
financialRepayDetailService
)
{
super
();
...
...
@@ -105,15 +103,15 @@ public class RepayHandlerAsync implements Runnable {
detail
.
setPayAccount
(
bill
.
getPayAccount
());
detail
.
setMonth
(
bill
.
getMonth
());
if
(
1
==
detail
.
getActivityRelief
().
compareTo
(
BigDecimal
.
ZERO
)){
detail
.
setActivityRelief
(
detail
.
getActivityRelief
().
multiply
(
MINUS_ONE
));
detail
.
setActivityRelief
(
detail
.
getActivityRelief
().
multiply
(
Constants
.
MINUS_ONE
));
}
if
(
1
==
detail
.
getCollectionRelief
().
compareTo
(
BigDecimal
.
ZERO
)){
detail
.
setCollectionRelief
(
detail
.
getCollectionRelief
().
multiply
(
MINUS_ONE
));
detail
.
setCollectionRelief
(
detail
.
getCollectionRelief
().
multiply
(
Constants
.
MINUS_ONE
));
}
total
=
total
.
add
(
detail
.
getCurrentRepayment
());
}
list
.
get
(
0
).
setPayApproachPoundage
(
bill
.
getPoundage
());
BigDecimal
subtract
=
total
.
subtract
(
bill
.
getIncome
()
);
BigDecimal
subtract
=
bill
.
getIncome
().
subtract
(
total
);
if
(
1
==
subtract
.
compareTo
(
BigDecimal
.
ZERO
)){
//多收了放逾期
list
.
get
(
0
).
setOverdueFee
(
list
.
get
(
0
).
getOverdueFee
().
add
(
subtract
));
...
...
@@ -121,9 +119,10 @@ public class RepayHandlerAsync implements Runnable {
}
if
(-
1
==
subtract
.
compareTo
(
BigDecimal
.
ZERO
)){
//少收放红包减免
list
.
get
(
0
).
set
ActivityRelief
(
list
.
get
(
0
).
getActivity
Relief
().
add
(
subtract
));
list
.
get
(
0
).
set
CollectionRelief
(
list
.
get
(
0
).
getCollection
Relief
().
add
(
subtract
));
list
.
get
(
0
).
setRemark
(
"少收:"
+
subtract
);
}
list
.
get
(
0
).
setCurrentRepayment
(
list
.
get
(
0
).
getCurrentRepayment
().
add
(
subtract
));
}
else
{
LOGGER
.
info
(
"还款明细丢失,orderId-->{}"
,
orderId
);
}
...
...
src/main/java/cn/gq/financial/checkout/TotalAmountCheck.java
0 → 100644
View file @
e16407d2
package
cn
.
gq
.
financial
.
checkout
;
import
cn.gq.financial.app.handler.RepayHandler
;
import
cn.gq.financial.model.bill.Bill
;
import
cn.gq.financial.model.bill.UMPayBill
;
import
cn.gq.financial.model.bill.WXBill
;
import
cn.gq.financial.model.bill.YeepayBill
;
import
java.math.BigDecimal
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Set
;
/**
* Created by ocean on 2016/9/26.
*/
public
class
TotalAmountCheck
{
static
String
[]
lost
=
{
"1470995273554"
,
"1470995273550"
,
"1470995273567"
};
static
Set
<
String
>
lostSet
=
new
HashSet
<>();
static
String
payAprroach
=
"微信"
;
static
String
payAccount
=
"微信-白条账户"
;
static
Integer
month
=
9
;
static
String
SRC_BILL_PATH
=
"E:\\WX_BILL_BAITIAO"
;
static
Class
<?
extends
Bill
>
clazz
=
null
;
static
{
for
(
String
lostId
:
lost
){
lostSet
.
add
(
lostId
);
}
switch
(
payAprroach
)
{
case
"微信"
:
clazz
=
WXBill
.
class
;
break
;
case
"易宝"
:
clazz
=
YeepayBill
.
class
;
break
;
case
"联动"
:
clazz
=
UMPayBill
.
class
;
break
;
}
}
public
static
void
main
(
String
args
[])
throws
Exception
{
List
<
Bill
>
bills
=
RepayHandler
.
getBillsFromFile
(
SRC_BILL_PATH
,
clazz
,
payAccount
,
month
);
BigDecimal
total
=
new
BigDecimal
(
0
);
for
(
int
i
=
0
;
i
<
bills
.
size
();
i
++)
{
if
(!
lostSet
.
contains
(
bills
.
get
(
i
).
getOrderId
()))
{
total
=
total
.
add
(
bills
.
get
(
i
).
getIncome
());
}
else
{
System
.
out
.
println
(
bills
.
get
(
i
).
getOrderId
().
concat
(
"--"
).
concat
(
bills
.
get
(
i
).
getIncome
().
toString
()));
}
}
System
.
out
.
println
(
total
);
}
}
src/main/java/cn/gq/financial/model/db/RepayDetailFinancial.java
View file @
e16407d2
package
cn
.
gq
.
financial
.
model
.
db
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.util.Date
;
@Data
public
class
RepayDetailFinancial
{
private
Long
id
;
...
...
@@ -77,300 +80,4 @@ public class RepayDetailFinancial {
private
String
phoneMerchant
;
//3C产品商家
private
String
productName3C
;
public
String
getPhoneMerchant
()
{
return
phoneMerchant
;
}
public
void
setPhoneMerchant
(
String
phoneMerchant
)
{
this
.
phoneMerchant
=
phoneMerchant
;
}
public
String
getProductName3C
()
{
return
productName3C
;
}
public
void
setProductName3C
(
String
productName3C
)
{
this
.
productName3C
=
productName3C
;
}
public
Integer
getMonth
()
{
return
month
;
}
public
void
setMonth
(
Integer
month
)
{
this
.
month
=
month
;
}
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
String
getBizType
()
{
return
bizType
;
}
public
void
setBizType
(
String
bizType
)
{
this
.
bizType
=
bizType
;
}
public
String
getPayAccount
()
{
return
payAccount
;
}
public
void
setPayAccount
(
String
payAccount
)
{
this
.
payAccount
=
payAccount
;
}
public
Long
getRepaymentPlanId
()
{
return
repaymentPlanId
;
}
public
void
setRepaymentPlanId
(
Long
repaymentPlanId
)
{
this
.
repaymentPlanId
=
repaymentPlanId
;
}
public
String
getOrderId
()
{
return
orderId
;
}
public
void
setOrderId
(
String
orderId
)
{
this
.
orderId
=
orderId
;
}
public
String
getLhpSeriaNo
()
{
return
lhpSeriaNo
;
}
public
void
setLhpSeriaNo
(
String
lhpSeriaNo
)
{
this
.
lhpSeriaNo
=
lhpSeriaNo
;
}
public
String
getCustomerFrom
()
{
return
customerFrom
;
}
public
void
setCustomerFrom
(
String
customerFrom
)
{
this
.
customerFrom
=
customerFrom
;
}
public
String
getFundingCorpName
()
{
return
fundingCorpName
;
}
public
void
setFundingCorpName
(
String
fundingCorpName
)
{
this
.
fundingCorpName
=
fundingCorpName
;
}
public
String
getContractNo
()
{
return
contractNo
;
}
public
void
setContractNo
(
String
contractNo
)
{
this
.
contractNo
=
contractNo
;
}
public
String
getUserName
()
{
return
userName
;
}
public
void
setUserName
(
String
userName
)
{
this
.
userName
=
userName
;
}
public
String
getUserIdNo
()
{
return
userIdNo
;
}
public
void
setUserIdNo
(
String
userIdNo
)
{
this
.
userIdNo
=
userIdNo
;
}
public
String
getUserPhone
()
{
return
userPhone
;
}
public
void
setUserPhone
(
String
userPhone
)
{
this
.
userPhone
=
userPhone
;
}
public
Date
getLoanPaidAt
()
{
return
loanPaidAt
;
}
public
void
setLoanPaidAt
(
Date
loanPaidAt
)
{
this
.
loanPaidAt
=
loanPaidAt
;
}
public
BigDecimal
getShouldLoanAmount
()
{
return
shouldLoanAmount
;
}
public
void
setShouldLoanAmount
(
BigDecimal
shouldLoanAmount
)
{
this
.
shouldLoanAmount
=
shouldLoanAmount
;
}
public
BigDecimal
getRealLoanAmount
()
{
return
realLoanAmount
;
}
public
void
setRealLoanAmount
(
BigDecimal
realLoanAmount
)
{
this
.
realLoanAmount
=
realLoanAmount
;
}
public
Integer
getContractTerm
()
{
return
contractTerm
;
}
public
void
setContractTerm
(
Integer
contractTerm
)
{
this
.
contractTerm
=
contractTerm
;
}
public
Integer
getTermNo
()
{
return
termNo
;
}
public
void
setTermNo
(
Integer
termNo
)
{
this
.
termNo
=
termNo
;
}
public
Date
getDeadline
()
{
return
deadline
;
}
public
void
setDeadline
(
Date
deadline
)
{
this
.
deadline
=
deadline
;
}
public
BigDecimal
getRequiredRepayment
()
{
return
requiredRepayment
;
}
public
void
setRequiredRepayment
(
BigDecimal
requiredRepayment
)
{
this
.
requiredRepayment
=
requiredRepayment
;
}
public
Date
getRepaidAt
()
{
return
repaidAt
;
}
public
void
setRepaidAt
(
Date
repaidAt
)
{
this
.
repaidAt
=
repaidAt
;
}
public
BigDecimal
getPrincipalAmount
()
{
return
principalAmount
;
}
public
void
setPrincipalAmount
(
BigDecimal
principalAmount
)
{
this
.
principalAmount
=
principalAmount
;
}
public
BigDecimal
getInterest
()
{
return
interest
;
}
public
void
setInterest
(
BigDecimal
interest
)
{
this
.
interest
=
interest
;
}
public
BigDecimal
getOverdueFee
()
{
return
overdueFee
;
}
public
void
setOverdueFee
(
BigDecimal
overdueFee
)
{
this
.
overdueFee
=
overdueFee
;
}
public
BigDecimal
getSelfManexpense
()
{
return
selfManexpense
;
}
public
void
setSelfManexpense
(
BigDecimal
selfManexpense
)
{
this
.
selfManexpense
=
selfManexpense
;
}
public
BigDecimal
getActivityRelief
()
{
return
activityRelief
;
}
public
void
setActivityRelief
(
BigDecimal
activityRelief
)
{
this
.
activityRelief
=
activityRelief
;
}
public
BigDecimal
getCollectionRelief
()
{
return
collectionRelief
;
}
public
void
setCollectionRelief
(
BigDecimal
collectionRelief
)
{
this
.
collectionRelief
=
collectionRelief
;
}
public
BigDecimal
getCurrentRepayment
()
{
return
currentRepayment
;
}
public
void
setCurrentRepayment
(
BigDecimal
currentRepayment
)
{
this
.
currentRepayment
=
currentRepayment
;
}
public
BigDecimal
getPayApproachPoundage
()
{
return
payApproachPoundage
;
}
public
void
setPayApproachPoundage
(
BigDecimal
payApproachPoundage
)
{
this
.
payApproachPoundage
=
payApproachPoundage
;
}
public
String
getFinancialMerchant
()
{
return
financialMerchant
;
}
public
void
setFinancialMerchant
(
String
financialMerchant
)
{
this
.
financialMerchant
=
financialMerchant
;
}
public
String
getActuallyFundingCorp
()
{
return
actuallyFundingCorp
;
}
public
void
setActuallyFundingCorp
(
String
actuallyFundingCorp
)
{
this
.
actuallyFundingCorp
=
actuallyFundingCorp
;
}
public
String
getPayCenterOrderNo
()
{
return
payCenterOrderNo
;
}
public
void
setPayCenterOrderNo
(
String
payCenterOrderNo
)
{
this
.
payCenterOrderNo
=
payCenterOrderNo
;
}
public
Long
getLoanApplicationHistoryId
()
{
return
loanApplicationHistoryId
;
}
public
void
setLoanApplicationHistoryId
(
Long
loanApplicationHistoryId
)
{
this
.
loanApplicationHistoryId
=
loanApplicationHistoryId
;
}
public
Date
getContractCreateAt
()
{
return
contractCreateAt
;
}
public
void
setContractCreateAt
(
Date
contractCreateAt
)
{
this
.
contractCreateAt
=
contractCreateAt
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
}
src/main/java/cn/gq/financial/service/BaitiaoOfflineDetailService.java
View file @
e16407d2
...
...
@@ -81,6 +81,9 @@ public class BaitiaoOfflineDetailService implements DetailService {
detail
.
setSelfManexpense
(
new
BigDecimal
(
entity
.
getServiceFeePerTerm
()));
detail
.
setFundingCorpName
(
entity
.
getFundingCorp
());
detail
.
setActuallyFundingCorp
(
entity
.
getDebtFundingCorp
());
BigDecimal
curr
=
detail
.
getPrincipalAmount
().
add
(
detail
.
getInterest
()).
add
(
detail
.
getOverdueFee
()).
add
(
detail
.
getSelfManexpense
()).
subtract
(
detail
.
getCollectionRelief
()).
subtract
(
detail
.
getActivityRelief
());
detail
.
setCurrentRepayment
(
curr
);
return
detail
;
}
...
...
src/main/java/cn/gq/financial/service/BaitiaoOnlineDetailService.java
View file @
e16407d2
package
cn
.
gq
.
financial
.
service
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashSet
;
...
...
@@ -7,6 +8,7 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Set
;
import
cn.gq.financial.utils.Constants
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -99,13 +101,19 @@ public class BaitiaoOnlineDetailService implements DetailService {
detail
.
setInterest
(
entity
.
getInterestAmount
());
detail
.
setOverdueFee
(
entity
.
getOverdueFee
());
if
(
null
!=
entity
.
getReduceAmount
()){
detail
.
setCollectionRelief
(
entity
.
getReduceAmount
());
if
(
1
==
BigDecimal
.
ZERO
.
compareTo
(
entity
.
getReduceAmount
()))
{
detail
.
setCollectionRelief
(
entity
.
getReduceAmount
().
multiply
(
Constants
.
MINUS_ONE
));
}
else
{
detail
.
setCurrentRepayment
(
entity
.
getReduceAmount
());
}
detail
.
setCurrentRepayment
(
entity
.
getCurrentRepayment
());
}
// detail.setCurrentRepayment(entity.getCurrentRepayment());
detail
.
setPayCenterOrderNo
(
entity
.
getPayCenterOrderNo
());
detail
.
setContractCreateAt
(
entity
.
getOrderTime
());
detail
.
setProductName3C
(
entity
.
getProductName3C
());
//3c产品名称
detail
.
setPhoneMerchant
(
entity
.
getPhoneMerchant
());
//3c的商家
BigDecimal
curr
=
detail
.
getPrincipalAmount
().
add
(
detail
.
getInterest
()).
add
(
detail
.
getOverdueFee
()).
add
(
detail
.
getSelfManexpense
()).
subtract
(
detail
.
getCollectionRelief
()).
subtract
(
detail
.
getActivityRelief
());
detail
.
setCurrentRepayment
(
curr
);
return
detail
;
}
...
...
src/main/java/cn/gq/financial/utils/BillParsers.java
View file @
e16407d2
...
...
@@ -15,6 +15,7 @@ import java.util.List;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.time.DateUtils
;
import
org.apache.poi.ss.usermodel.Cell
;
import
org.apache.poi.ss.usermodel.Row
;
import
org.apache.poi.xssf.usermodel.XSSFSheet
;
import
org.apache.poi.xssf.usermodel.XSSFWorkbook
;
...
...
@@ -176,16 +177,23 @@ public class BillParsers {
if
(
StringUtils
.
isNotBlank
(
row
.
getCell
(
4
).
getStringCellValue
())){
bill
.
setOrderId
(
row
.
getCell
(
4
).
getStringCellValue
().
trim
());
}
row
.
getCell
(
5
).
setCellType
(
Cell
.
CELL_TYPE_STRING
);
if
(
StringUtils
.
isNotBlank
(
row
.
getCell
(
5
).
getStringCellValue
())){
bill
.
setIncome
(
new
BigDecimal
(
row
.
getCell
(
5
).
getStringCellValue
()));
}
row
.
getCell
(
6
).
setCellType
(
Cell
.
CELL_TYPE_STRING
);
if
(
StringUtils
.
isNotBlank
(
row
.
getCell
(
6
).
getStringCellValue
())){
bill
.
setCost
(
new
BigDecimal
(
row
.
getCell
(
6
).
getStringCellValue
()));
}
if
(
StringUtils
.
isNotBlank
(
row
.
getCell
(
7
).
getStringCellValue
())){
if
(
null
!=
row
.
getCell
(
7
))
{
row
.
getCell
(
7
).
setCellType
(
Cell
.
CELL_TYPE_STRING
);
if
(
StringUtils
.
isNotBlank
(
row
.
getCell
(
7
).
getStringCellValue
()))
{
bill
.
setPoundage
(
new
BigDecimal
(
row
.
getCell
(
7
).
getStringCellValue
()));
}
}
if
(
null
!=
row
.
getCell
(
10
))
{
bill
.
setRemak
(
row
.
getCell
(
10
).
getStringCellValue
());
}
return
bill
;
}
...
...
src/main/java/cn/gq/financial/utils/Constants.java
View file @
e16407d2
package
cn
.
gq
.
financial
.
utils
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.List
;
...
...
@@ -10,4 +11,6 @@ public class Constants {
public
static
List
<
RepayDetailFinancial
>
result
=
Collections
.
synchronizedList
(
new
ArrayList
<
RepayDetailFinancial
>());
public
static
final
BigDecimal
MINUS_ONE
=
new
BigDecimal
(
"-1"
);
}
src/main/java/cn/gq/financial/utils/HttpUtils.java
View file @
e16407d2
...
...
@@ -51,7 +51,7 @@ public class HttpUtils {
// 设置连接池
connMgr
=
new
PoolingHttpClientConnectionManager
();
// 设置连接池大小
connMgr
.
setMaxTotal
(
100
);
connMgr
.
setMaxTotal
(
5000
);
connMgr
.
setDefaultMaxPerRoute
(
connMgr
.
getMaxTotal
());
RequestConfig
.
Builder
configBuilder
=
RequestConfig
.
custom
();
...
...
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