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
0427d8c7
Commit
0427d8c7
authored
Jul 27, 2017
by
data-赵 玉龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增现金白条账户
parent
ad169629
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
17 deletions
+34
-17
OfflineRapay.java
src/main/java/cn/gq/financial/app/OfflineRapay.java
+2
-2
RepayFinancialAPP.java
src/main/java/cn/gq/financial/app/RepayFinancialAPP.java
+13
-13
RepayHandler.java
src/main/java/cn/gq/financial/app/handler/RepayHandler.java
+2
-2
PayType.java
src/main/java/cn/gq/financial/bills/PayType.java
+6
-0
WeichatBills.java
src/main/java/cn/gq/financial/bills/WeichatBills.java
+11
-0
No files found.
src/main/java/cn/gq/financial/app/OfflineRapay.java
View file @
0427d8c7
...
...
@@ -30,9 +30,9 @@ public class OfflineRapay {
* Tip: 对帐单时 只需修改currentMonth和payType
* currentMonth 当前是几月就输入几 无须减1 后续代码里面已经处理
*/
static
Integer
currentMonth
=
11
;
static
Integer
currentMonth
=
7
;
static
PayType
payType
=
PayType
.
YeePay_Xjd
;
static
PayType
payType
=
PayType
.
WeiChat_BaiTiao_Cash
;
static
AbstractBills
bill
;
...
...
src/main/java/cn/gq/financial/app/RepayFinancialAPP.java
View file @
0427d8c7
...
...
@@ -29,9 +29,9 @@ public class RepayFinancialAPP {
* Tip: 对帐单时 只需修改currentMonth和payType
* currentMonth 当前是几月就输入几 无须减1 后续代码里面已经处理
*/
static
Integer
currentMonth
=
2
;
static
Integer
currentMonth
=
7
;
static
PayType
payType
=
PayType
.
YeePay_Xjd
;
static
PayType
payType
=
PayType
.
WeiChat_BaiTiao_Cash
;
static
AbstractBills
bill
;
...
...
@@ -54,17 +54,17 @@ public class RepayFinancialAPP {
clazz
=
UMPayBill
.
class
;
break
;
}
//
// 拉取帐单前先清理目录
//
if (!"易宝".equals(payType.getChannelName())) {
//
if (Paths.get(path).toFile().exists()) {
//
try {
//
FileUtils.cleanDirectory(Paths.get(path).toFile());
//
} catch (IOException e) {
//
e.printStackTrace();
//
}
//
}
//
bill.pullBills(payType);
//
}
// 拉取帐单前先清理目录
if
(!
"易宝"
.
equals
(
payType
.
getChannelName
()))
{
if
(
Paths
.
get
(
path
).
toFile
().
exists
())
{
try
{
FileUtils
.
cleanDirectory
(
Paths
.
get
(
path
).
toFile
());
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
bill
.
pullBills
(
payType
);
}
}
public
static
void
main
(
String
[]
args
)
throws
Exception
{
...
...
src/main/java/cn/gq/financial/app/handler/RepayHandler.java
View file @
0427d8c7
...
...
@@ -47,8 +47,8 @@ public class RepayHandler {
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
);
if
(!
CollectionUtils
.
isEmpty
(
bills
)){
asyncHandlerRepayData
(
clazz
,
bills
);
count
.
await
();
//等待所有线程结束
//
asyncHandlerRepayData(clazz, bills);
//
count.await(); //等待所有线程结束
}
else
{
throw
new
RuntimeException
(
"没有读入任何账单"
);
...
...
src/main/java/cn/gq/financial/bills/PayType.java
View file @
0427d8c7
...
...
@@ -25,6 +25,12 @@ public enum PayType {
return
Joiner
.
on
(
File
.
separator
).
join
(
"weichat"
,
"baitiao"
);
}
},
WeiChat_BaiTiao_Cash
(
"微信"
,
"微信-白条现金支付账户"
)
{
@Override
public
String
path
()
{
return
Joiner
.
on
(
File
.
separator
).
join
(
"weichat"
,
"baitiao_cash"
);
}
},
UMPay_Xjd
(
"联动"
,
"联动-现金贷账户"
)
{
@Override
public
String
path
()
{
...
...
src/main/java/cn/gq/financial/bills/WeichatBills.java
View file @
0427d8c7
...
...
@@ -42,9 +42,20 @@ public class WeichatBills extends AbstractBills {
weiChatBaitiaoInfo
.
put
(
"nonce_str"
,
"53E9BC685BF2CE47D4C064D3737F890B"
);
weiChatBaitiaoInfo
.
put
(
"key"
,
"53E9BC685BF2CE47D4C064D3737F890B"
);
Map
<
String
,
String
>
weiChatBaitiaoCashInfo
=
Maps
.
newLinkedHashMap
();
weiChatBaitiaoCashInfo
.
put
(
"appid"
,
"wx7bf214ccdcbd2e16"
);
weiChatBaitiaoCashInfo
.
put
(
"bill_date"
,
billDate
);
weiChatBaitiaoCashInfo
.
put
(
"bill_type"
,
"ALL"
);
weiChatBaitiaoCashInfo
.
put
(
"mch_id"
,
"1480390602"
);
weiChatBaitiaoCashInfo
.
put
(
"nonce_str"
,
"53E9BC685BF2CE47D4C064D3737F890B"
);
weiChatBaitiaoCashInfo
.
put
(
"key"
,
"UYu4Rpk08TdaFQLuKYsgF9eiCQ7U2TI1"
);
EnumMap
<
PayType
,
Map
<
String
,
String
>>
weiChatInfo
=
Maps
.
newEnumMap
(
PayType
.
class
);
weiChatInfo
.
put
(
PayType
.
WeiChat_Xjd
,
weiChatXjdInfo
);
weiChatInfo
.
put
(
PayType
.
WeiChat_BaiTiao
,
weiChatBaitiaoInfo
);
weiChatInfo
.
put
(
PayType
.
WeiChat_BaiTiao_Cash
,
weiChatBaitiaoCashInfo
);
return
weiChatInfo
;
}
}
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