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
66acf490
Commit
66acf490
authored
Jan 04, 2017
by
Java-刘 彧阳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改数据库连接用户
parent
f9d54384
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
57 additions
and
42 deletions
+57
-42
CountTotal.java
src/main/java/cn/gq/financial/app/CountTotal.java
+46
-0
DifCheckOutAPP.java
src/main/java/cn/gq/financial/app/DifCheckOutAPP.java
+8
-39
RepayFinancialAPP.java
src/main/java/cn/gq/financial/app/RepayFinancialAPP.java
+1
-1
DifCheckOutHandler.java
.../java/cn/gq/financial/app/handler/DifCheckOutHandler.java
+1
-1
applicationContext.properties
src/main/resources/applicationContext.properties
+1
-1
No files found.
src/main/java/cn/gq/financial/app/CountTotal.java
0 → 100644
View file @
66acf490
package
cn
.
gq
.
financial
.
app
;
import
cn.gq.financial.model.bill.Bill
;
import
cn.gq.financial.model.bill.YeepayBill
;
import
cn.gq.financial.utils.BillParsers
;
import
java.io.File
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* Created by ocean on 2016/12/6.
*/
public
class
CountTotal
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
List
<
Bill
>
bills
=
getBillsFromFile
(
"E:\\financial-system-data\\yeepay\\baitiao"
,
YeepayBill
.
class
,
"ױ-˻"
,
11
);
BigDecimal
incomeTotal
=
bills
.
stream
().
map
(
Bill:
:
getIncome
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
BigDecimal
poundageTotal
=
bills
.
stream
().
map
(
Bill:
:
getPoundage
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
System
.
out
.
println
(
"incomeTotal:"
+
incomeTotal
);
System
.
out
.
println
(
"poundageTotal:"
+
poundageTotal
);
}
public
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
++)
{
List
<?
extends
Bill
>
billAday
=
BillParsers
.
parseBillFromInputStream
(
billFiles
[
i
],
clazz
);
bills
.
addAll
(
billAday
);
}
for
(
Bill
bill
:
bills
)
{
bill
.
setPayAccount
(
payAccount
);
bill
.
setMonth
(
month
);
}
return
bills
;
}
private
static
File
[]
getFiles
(
String
src
)
{
File
f
=
new
File
(
src
);
return
f
.
listFiles
();
}
}
src/main/java/cn/gq/financial/app/DifCheckOutAPP.java
View file @
66acf490
...
...
@@ -3,6 +3,7 @@ package cn.gq.financial.app;
import
cn.gq.financial.app.handler.DifCheckOutHandler
;
import
cn.gq.financial.app.handler.RepayHandler
;
import
cn.gq.financial.bills.PayType
;
import
cn.gq.financial.db.local.dao.RepayDetailFinancialEntityMapper
;
import
cn.gq.financial.model.bill.Bill
;
import
cn.gq.financial.model.bill.UMPayBill
;
import
cn.gq.financial.model.bill.WXBill
;
...
...
@@ -29,49 +30,17 @@ public class DifCheckOutAPP {
private
static
ClassPathXmlApplicationContext
context
=
null
;
private
static
List
<
String
>
lostOrder
=
new
ArrayList
<>();
static
{
String
[]
lost
=
{
"1476879442402"
,
"1476879519371"
,
"1476879520479"
,
"1476879597863"
};
Collections
.
addAll
(
lostOrder
,
lost
);
}
public
static
void
main
(
String
[]
args
)
throws
Exception
{
try
{
File
file
=
new
File
(
"E:\\financial-system-data\\yeepay\\baitiao"
);
File
[]
files
=
file
.
listFiles
();
List
<
YeepayBill
>
bills
=
new
ArrayList
<>();
for
(
File
f
:
files
)
{
List
<
YeepayBill
>
wxBills
=
BillParsers
.
parseBillFromInputStream
(
f
,
YeepayBill
.
class
);
bills
.
addAll
(
wxBills
);
}
// BigDecimal imcomes = new BigDecimal("0");
// BigDecimal poundages = new BigDecimal("0");
// for(YeepayBill bill:bills){
// BigDecimal imcome = bill.getIncome();
// BigDecimal poundage = bill.getPoundage();
// imcomes = imcomes.add(imcome);
// poundages = poundages.add(poundage);
// }
// System.out.println(imcomes);
// System.out.println(poundages);
//
List
<
Bill
>
bills
=
CountTotal
.
getBillsFromFile
(
"E:\\financial-system-data\\yeepay\\baitiao"
,
YeepayBill
.
class
,
"ױ-˻"
,
11
);
getSpringContext
().
getBean
(
DifCheckOutHandler
.
class
).
checkDif
(
bills
);
closeContext
();
}
getSpringContext
().
getBean
(
DifCheckOutHandler
.
class
).
checkDif
(
bills
);
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
finally
{
if
(
null
!=
context
)
private
static
void
closeContext
()
{
if
(
null
!=
context
){
context
.
close
();
}
}
public
static
ClassPathXmlApplicationContext
getSpringContext
()
{
...
...
src/main/java/cn/gq/financial/app/RepayFinancialAPP.java
View file @
66acf490
...
...
@@ -31,7 +31,7 @@ public class RepayFinancialAPP {
*/
static
Integer
currentMonth
=
12
;
static
PayType
payType
=
PayType
.
YeePay_
Xjd
;
static
PayType
payType
=
PayType
.
YeePay_
BaiTiao
;
static
AbstractBills
bill
;
...
...
src/main/java/cn/gq/financial/app/handler/DifCheckOutHandler.java
View file @
66acf490
...
...
@@ -45,7 +45,7 @@ public class DifCheckOutHandler {
wrong
.
addAll
(
checkOut
(
bills
.
subList
((
i
*
item_size
),
bills
.
size
())));
}
}
FileUtils
.
writeOutStrsToFile
(
wrong
,
"E:\\financial-system-data\\yeepay\\baitiao\\
易宝
丢失的.txt"
);
FileUtils
.
writeOutStrsToFile
(
wrong
,
"E:\\financial-system-data\\yeepay\\baitiao\\丢失的.txt"
);
}
private
Collection
<?
extends
String
>
checkOut
(
List
<?
extends
Bill
>
bills
)
{
...
...
src/main/resources/applicationContext.properties
View file @
66acf490
...
...
@@ -29,7 +29,7 @@ lkbadmin.jdbc.password=wj0msj8J8/v2Ee6Xl75ZDizrJBdEDOAQGlxTGKbRFng=
#localDB
local.repayment.jdbc.url
=
jdbc:mysql://127.0.0.1:3306/test?useUnicode=true&characterEncoding=utf8
local.repayment.jdbc.username
=
root
local.repayment.jdbc.password
=
123456
local.repayment.jdbc.password
=
root
#offlineBaitiao
offlineBaitiao.jdbc.url
=
jdbc:mysql://172.16.1.244:33312/offline?useUnicode=true&characterEncoding=UTF8
...
...
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