Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
traffic-front
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxiaoming
traffic-front
Commits
caad06da
Commit
caad06da
authored
Apr 20, 2019
by
kevin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_mysql' of
https://gitee.com/Memorydoc/atms
into dev_mysql
parents
41515c6b
c12993fb
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
98 additions
and
52 deletions
+98
-52
DataImportService.java
...java/pwc/taxtech/atms/service/impl/DataImportService.java
+30
-16
ReportServiceImpl.java
.../pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
+10
-6
analysis_init_data.xlsx
...ain/resources/analysis_excel_init/analysis_init_data.xlsx
+0
-0
import-log.ctrl.js
...n/webapp/app/dataImport/log/import-log/import-log.ctrl.js
+30
-15
import-log.html
...main/webapp/app/dataImport/log/import-log/import-log.html
+1
-1
process-log.ctrl.js
...webapp/app/dataImport/log/process-log/process-log.ctrl.js
+27
-14
No files found.
atms-api/src/main/java/pwc/taxtech/atms/service/impl/DataImportService.java
View file @
caad06da
...
...
@@ -48,6 +48,7 @@ import pwc.taxtech.atms.vat.entity.*;
import
javax.annotation.Resource
;
import
java.io.InputStream
;
import
java.math.BigDecimal
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.concurrent.*
;
...
...
@@ -962,7 +963,7 @@ public class DataImportService extends BaseService {
rlits
.
stream
().
collect
(
Collectors
.
groupingBy
(
RedLetterInfoTable:
:
getSubjectNum
));
atsGroupRes
.
forEach
((
k
,
v
)
->
processRlits
(
k
,
v
,
orgIds
,
tmsPeriod
,
importType
,
dataImportLogs
));
}
if
(
dataImportLogs
.
size
()
==
0
)
if
(
dataImportLogs
.
size
()
==
0
)
return
OperationResultDto
.
error
(
ErrorMessage
.
NoData
);
addDataImportLog
(
dataImportLogs
);
...
...
@@ -1071,7 +1072,7 @@ public class DataImportService extends BaseService {
atsGroupRes
.
forEach
((
k
,
v
)
->
processAts
(
k
,
v
,
orgIds
,
tmsPeriod
,
importType
,
dataImportLogs
));
}
addDataImportLog
(
dataImportLogs
);
if
(
dataImportLogs
.
size
()
==
0
)
if
(
dataImportLogs
.
size
()
==
0
)
return
OperationResultDto
.
error
(
ErrorMessage
.
NoData
);
int
isSuccess
=
(
int
)
dataImportLogs
.
stream
().
filter
(
di
->
Boolean
.
TRUE
.
equals
(
di
.
getImportResult
())).
count
();
if
(
isSuccess
<
1
)
{
...
...
@@ -1177,7 +1178,7 @@ public class DataImportService extends BaseService {
atsGroupRes
.
forEach
((
k
,
v
)
->
processCprs
(
k
,
v
,
orgIds
,
tmsPeriod
,
importType
,
dataImportLogs
));
}
int
isSuccess
=
(
int
)
dataImportLogs
.
stream
().
filter
(
di
->
Boolean
.
TRUE
.
equals
(
di
.
getImportResult
())).
count
();
if
(
dataImportLogs
.
size
()
==
0
)
if
(
dataImportLogs
.
size
()
==
0
)
return
OperationResultDto
.
error
(
ErrorMessage
.
NoData
);
addDataImportLog
(
dataImportLogs
);
...
...
@@ -1466,7 +1467,7 @@ public class DataImportService extends BaseService {
irs
.
stream
().
collect
(
Collectors
.
groupingBy
(
InvoiceRecord:
:
getBillingBody
));
atsGroupRes
.
forEach
((
k
,
v
)
->
processIrs
(
k
,
v
,
orgIds
,
tmsPeriod
,
importType
,
dataImportLogs
));
}
if
(
dataImportLogs
.
size
()
==
0
)
if
(
dataImportLogs
.
size
()
==
0
)
return
OperationResultDto
.
error
(
ErrorMessage
.
NoData
);
int
isSuccess
=
(
int
)
dataImportLogs
.
stream
().
filter
(
di
->
Boolean
.
TRUE
.
equals
(
di
.
getImportResult
())).
count
();
addDataImportLog
(
dataImportLogs
);
...
...
@@ -1851,7 +1852,7 @@ public class DataImportService extends BaseService {
private
int
addDataImportLog
(
List
<
DataImportLog
>
dataImportLogs
)
{
if
(
dataImportLogs
.
size
()
==
0
)
return
0
;
if
(
dataImportLogs
.
size
()
==
0
)
return
0
;
dataImportLogMapper
.
displayOld
(
dataImportLogs
.
get
(
0
).
getType
());
int
res
=
0
;
for
(
DataImportLog
dataImportLog
:
dataImportLogs
)
{
...
...
@@ -1899,20 +1900,28 @@ public class DataImportService extends BaseService {
* @author Gary J Li
*/
public
PageInfo
<
DataImportLogDto
>
displayImportLogAll
(
DataImportAllParam
param
)
{
Date
strDate
=
DateUtils
.
strToDate2
(
param
.
getStartDate
());
String
startStr
=
param
.
getStartDate
();
Date
strDate
=
DateUtils
.
strToDate2
(
startStr
);
String
endStr
=
param
.
getEndDate
();
Date
endDateO
=
DateUtils
.
strToDate2
(
endStr
);
long
endDateLong
=
endDateO
.
getTime
()+
86399000
;
Date
endDate
=
new
Date
(
endDateLong
);
/*Date strDate = DateUtils.strToDate2(param.getStartDate());
Date endDate = DateUtils.strToDate2(param.getEndDate());
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
try {
strDate = format.parse(format.format(strDate) + "00:00:00");
endDate = format.parse(format.format(endDate) + "23:59:59");
} catch (ParseException e) {
e.printStackTrace();
}*/
DataImportLogExample
example
=
new
DataImportLogExample
();
DataImportLogExample
.
Criteria
criteria
=
example
.
createCriteria
();
Page
page
=
PageHelper
.
startPage
(
param
.
getPageInfo
().
getPageIndex
(),
param
.
getPageInfo
().
getPageSize
());
List
<
String
>
orgIds
=
organizationService
.
getMyOrgList
().
stream
().
map
(
OrgSelectDto:
:
getId
).
collect
(
Collectors
.
toList
());
criteria
.
andOrganizationIdIn
(
orgIds
).
andCreateTimeBetween
(
strDate
,
endDate
);
example
.
setOrderByClause
(
"update_time desc"
);
PageInfo
<
DataImportLogDto
>
pageInfo
=
new
PageInfo
<>(
dataImportLogMapper
.
selectByExample
(
example
).
stream
()
.
map
(
o
->
beanUtil
.
copyProperties
(
o
,
new
DataImportLogDto
())).
collect
(
Collectors
.
toList
()));
pageInfo
.
setTotal
(
page
.
getTotal
());
...
...
@@ -1929,9 +1938,16 @@ public class DataImportService extends BaseService {
* @author Gary J Li
*/
public
PageInfo
<
DataValidateLogDto
>
displayProcessLog
(
DataProcessParam
param
)
{
/*
Date strDate = DateUtils.strToDate2(param.getStartDate());
Date
endDate
=
DateUtils
.
strToDate2
(
param
.
getEndDate
());
Date endDate = DateUtils.strToDate2(param.getEndDate());*/
String
startStr
=
param
.
getStartDate
();
Date
strDate
=
DateUtils
.
strToDate2
(
startStr
);
String
endStr
=
param
.
getEndDate
();
Date
endDateO
=
DateUtils
.
strToDate2
(
endStr
);
long
endDateLong
=
endDateO
.
getTime
()+
86399000
;
Date
endDate
=
new
Date
(
endDateLong
);
DataValidateLogExample
example
=
new
DataValidateLogExample
();
...
...
@@ -1945,11 +1961,9 @@ public class DataImportService extends BaseService {
orgIds
.
add
(
Constant
.
ALL
);
criteria
.
andOrganizationIdIn
(
orgIds
).
andCreateTimeBetween
(
strDate
,
endDate
);
example
.
setOrderByClause
(
"update_time desc"
);
PageInfo
<
DataValidateLogDto
>
pageInfo
=
new
PageInfo
<>(
dataValidateLogMapper
.
selectByExample
(
example
).
stream
()
.
map
(
o
->
beanUtil
.
copyProperties
(
o
,
new
DataValidateLogDto
())).
collect
(
Collectors
.
toList
()));
pageInfo
.
setTotal
(
page
.
getTotal
());
return
pageInfo
;
}
...
...
@@ -1979,7 +1993,7 @@ public class DataImportService extends BaseService {
List
<
Organization
>
tmpOrgList
=
Collections
.
emptyList
();
if
(
type
==
EbsExtractTypeConstant
.
RATE
)
{
tmpOrgList
=
orgs
.
stream
().
limit
(
1
).
collect
(
Collectors
.
toList
());
}
else
{
}
else
{
tmpOrgList
=
orgs
;
}
tmpOrgList
.
forEach
(
o
->
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
View file @
caad06da
...
...
@@ -2704,12 +2704,16 @@ public class ReportServiceImpl extends BaseService {
Map
<
String
,
List
<
ProfitLossStatementPrc
>>
newMap
=
new
HashMap
<>();
///如果ebitCellData 中已经存在当前机构的数,将取 ebit中,否则取利润表中
for
(
Map
.
Entry
<
String
,
List
<
EbitCellData
>>
entry1
:
collect1
.
entrySet
())
{
for
(
Map
.
Entry
<
String
,
List
<
ProfitLossStatementPrc
>>
entry2
:
collect2
.
entrySet
())
{
/*System.out.println("Key = " + entry.getKey() + ", Value = " + entry.getValue());*/
if
(
entry2
.
getKey
()
==
entry1
.
getKey
())
continue
;
newMap
.
put
(
entry2
.
getKey
(),
entry2
.
getValue
());
if
(
collect1
.
isEmpty
()){
newMap
=
collect2
;
}
else
{
for
(
Map
.
Entry
<
String
,
List
<
EbitCellData
>>
entry1
:
collect1
.
entrySet
())
{
for
(
Map
.
Entry
<
String
,
List
<
ProfitLossStatementPrc
>>
entry2
:
collect2
.
entrySet
())
{
/*System.out.println("Key = " + entry.getKey() + ", Value = " + entry.getValue());*/
if
(
entry2
.
getKey
()
==
entry1
.
getKey
())
continue
;
newMap
.
put
(
entry2
.
getKey
(),
entry2
.
getValue
());
}
}
}
Map
<
String
,
List
<
EbitCellData
>>
_newMap
=
new
HashMap
<>();
...
...
atms-api/src/main/resources/analysis_excel_init/analysis_init_data.xlsx
View file @
caad06da
No preview for this file type
atms-web/src/main/webapp/app/dataImport/log/import-log/import-log.ctrl.js
View file @
caad06da
...
...
@@ -18,7 +18,7 @@
$scope
.
startRowNum
=
2
;
var
date
=
new
Date
();
var
year
=
date
.
getFullYear
();
var
month
=
date
.
getMonth
()
+
1
;
var
month
=
date
.
getMonth
()
+
1
;
var
day
=
date
.
getDate
();
$scope
.
dateFormat
=
$translate
.
instant
(
'dateFormat4YearMonth'
);
...
...
@@ -51,9 +51,9 @@
nextPage
:
$translate
.
instant
(
'PagingNextPage'
),
lastPage
:
$translate
.
instant
(
'PagingLastPage'
)
},
type
:
constant
.
importFileType
.
undefined
,
startDate
:
year
+
'/'
+
month
+
'/'
+
day
,
endDate
:
year
+
'/'
+
month
+
'/'
+
day
type
:
constant
.
importFileType
.
undefined
,
startDate
:
year
+
'/'
+
month
+
'/'
+
day
,
endDate
:
year
+
'/'
+
month
+
'/'
+
day
};
var
loadImportLogInfoDatagrid
=
function
()
{
...
...
@@ -155,7 +155,7 @@
if
(
data
&&
data
.
list
)
{
$scope
.
ImportLogGridSource
=
data
.
list
;
$scope
.
pagingOptions
.
totalItems
=
data
.
pageInfo
.
totalCount
;
}
else
{
}
else
{
SweetAlert
.
error
(
$translate
.
instant
(
'SystemError'
));
}
});
...
...
@@ -191,34 +191,41 @@
var
setButtonWrapStyle
=
function
()
{
if
(
$scope
.
fileName
)
{
return
{
width
:
"100%"
};
return
{
width
:
"100%"
};
}
};
var
setGridStyle
=
function
()
{
if
(
$scope
.
showTotalSecondRow
)
{
return
{
'margin-top'
:
'60px'
}
return
{
'margin-top'
:
'60px'
}
}
else
{
return
{
'margin-top'
:
'55px'
}
return
{
'margin-top'
:
'55px'
}
}
};
var
initDatePicker
=
function
()
{
var
ele
=
$
(
".startDatepicker"
);
ele
.
datepicker
({
var
_ele1
=
$
(
"#startDate"
);
var
_ele2
=
$
(
"#endDate"
);
_ele1
.
datepicker
({
startDate
:
$scope
.
startDate
,
endDate
:
$scope
.
endDate
,
endDate
:
$scope
.
queryParams
.
endDate
,
viewMode
:
$scope
.
viewMode
,
minViewMode
:
$scope
.
viewMode
,
autoclose
:
true
,
//选中之后自动隐藏日期选择框
clearBtn
:
true
,
//清除按钮
todayBtn
:
false
,
//今日按钮
format
:
'yyyy/mm/dd'
//日期格式,详见 http://bootstrap-datepicker.readthedocs.org/en/release/options.html#format
}).
on
(
'changeDate'
,
function
(
ev
)
{
if
(
ev
.
date
!=
undefined
)
{
_ele2
.
datepicker
(
'setStartDate'
,
ev
.
date
);
_ele1
.
datepicker
(
'setFormat'
,
'yyyy/mm/dd'
);
}
});
ele
.
datepicker
(
"setDate"
,
new
Date
().
formatDateTime
(
'yyyy/mm/dd'
));
var
ele2
=
$
(
".endDatepicker"
);
ele2
.
datepicker
({
_ele1
.
datepicker
(
"setDate"
,
new
Date
().
formatDateTime
(
'yyyy/mm/dd'
));
_ele2
.
datepicker
({
startDate
:
$scope
.
startDate
,
endDate
:
$scope
.
endDate
,
viewMode
:
$scope
.
viewMode
,
...
...
@@ -227,8 +234,15 @@
clearBtn
:
true
,
//清除按钮
todayBtn
:
false
,
//今日按钮
format
:
'yyyy/mm/dd'
//日期格式,详见 http://bootstrap-datepicker.readthedocs.org/en/release/options.html#format
}).
on
(
'changeDate'
,
function
(
ev
)
{
if
(
ev
.
date
!=
undefined
)
{
_ele1
.
datepicker
(
'setEndDate'
,
ev
.
date
);
_ele1
.
datepicker
(
'setFormat'
,
'yyyy/mm/dd'
);
$
(
'.datepicker'
).
css
(
'display'
,
'none'
);
}
});
ele2
.
datepicker
(
"setDate"
,
new
Date
().
formatDateTime
(
'yyyy/mm/dd'
));
_
ele2
.
datepicker
(
"setDate"
,
new
Date
().
formatDateTime
(
'yyyy/mm/dd'
));
};
var
initParam
=
function
()
{
...
...
@@ -237,6 +251,7 @@
$scope
.
setGridStyle
=
setGridStyle
;
$scope
.
$watch
(
'queryParams.startDate'
,
function
(
newValue
,
oldValue
)
{
getImportLog
();
});
$scope
.
$watch
(
'queryParams.endDate'
,
function
(
newValue
,
oldValue
)
{
getImportLog
();
...
...
atms-web/src/main/webapp/app/dataImport/log/import-log/import-log.html
View file @
caad06da
...
...
@@ -6,7 +6,7 @@
<div
id=
"tab_total"
>
<div
class=
"select-period"
style=
"height: 10px;"
>
<span
class=
"text-bold"
style=
"float: left; margin-top: 5px;"
>
{{'StartDateMao'|translate}}
</span>
<div
class=
"input-daterange input-group
startDatepicker
"
style=
"float: left;width: 10%;"
>
<div
class=
"input-daterange input-group "
style=
"float: left;width: 10%;"
>
<input
type=
"text"
id=
"startDate"
class=
"input-sm form-control"
name=
"startDate"
ng-model=
"queryParams.startDate"
style=
"width: 120px;margin-left: 50px;"
/>
</div>
...
...
atms-web/src/main/webapp/app/dataImport/log/process-log/process-log.ctrl.js
View file @
caad06da
...
...
@@ -18,7 +18,7 @@
$scope
.
startRowNum
=
2
;
var
date
=
new
Date
();
var
year
=
date
.
getFullYear
();
var
month
=
date
.
getMonth
()
+
1
;
var
month
=
date
.
getMonth
()
+
1
;
var
day
=
date
.
getDate
();
$scope
.
selectedDate
=
new
Date
(
vatSessionService
.
year
,
vatSessionService
.
month
-
1
,
1
);
...
...
@@ -53,8 +53,8 @@
nextPage
:
$translate
.
instant
(
'PagingNextPage'
),
lastPage
:
$translate
.
instant
(
'PagingLastPage'
)
},
startDate
:
year
+
'/'
+
month
+
'/'
+
day
,
endDate
:
year
+
'/'
+
month
+
'/'
+
day
startDate
:
year
+
'/'
+
month
+
'/'
+
day
,
endDate
:
year
+
'/'
+
month
+
'/'
+
day
};
var
loadProcessLogInfoDatagrid
=
function
()
{
...
...
@@ -111,7 +111,7 @@
},
{
dataField
:
"createTime"
,
allowHeaderFiltering
:
false
,
dataType
:
"date"
,
dataType
:
"date"
,
width
:
'10%'
,
caption
:
$translate
.
instant
(
'OperateTime'
)
}
...
...
@@ -162,7 +162,7 @@
if
(
data
&&
data
.
list
)
{
$scope
.
ProcessLogGridSource
=
data
.
list
;
$scope
.
pagingOptions
.
totalItems
=
data
.
pageInfo
.
totalCount
;
}
else
{
}
else
{
SweetAlert
.
error
(
$translate
.
instant
(
'SystemError'
));
}
});
...
...
@@ -198,42 +198,55 @@
var
setButtonWrapStyle
=
function
()
{
if
(
$scope
.
fileName
)
{
return
{
width
:
"100%"
};
return
{
width
:
"100%"
};
}
};
var
setGridStyle
=
function
()
{
if
(
$scope
.
showTotalSecondRow
)
{
return
{
'margin-top'
:
'60px'
}
return
{
'margin-top'
:
'60px'
}
}
else
{
return
{
'margin-top'
:
'55px'
}
return
{
'margin-top'
:
'55px'
}
}
};
var
initDatePicker
=
function
()
{
var
ele
=
$
(
"
.startDatepicker
"
);
var
ele
=
$
(
"
#startDate
"
);
ele
.
datepicker
({
startDate
:
$scope
.
startDate
,
endDate
:
$scope
.
endDate
,
//
startDate: $scope.startDate,
endDate
:
$scope
.
queryParams
.
endDate
,
viewMode
:
$scope
.
viewMode
,
minViewMode
:
$scope
.
viewMode
,
autoclose
:
true
,
//选中之后自动隐藏日期选择框
clearBtn
:
true
,
//清除按钮
todayBtn
:
false
,
//今日按钮
format
:
'yyyy/mm/dd'
//日期格式,详见 http://bootstrap-datepicker.readthedocs.org/en/release/options.html#format
}).
on
(
'changeDate'
,
function
(
ev
)
{
if
(
ev
.
date
!=
undefined
)
{
ele
.
datepicker
(
'setStartDate'
,
ev
.
date
);
ele
.
datepicker
(
'setFormat'
,
'yyyy/mm/dd'
);
}
});
;
ele
.
datepicker
(
"setDate"
,
new
Date
().
formatDateTime
(
'yyyy/mm/dd'
));
var
ele2
=
$
(
"
.endDatepicker
"
);
var
ele2
=
$
(
"
#endDate
"
);
ele2
.
datepicker
({
startDate
:
$scope
.
startDate
,
endDate
:
$scope
.
endDate
,
//
startDate: $scope.startDate,
//
endDate: $scope.endDate,
viewMode
:
$scope
.
viewMode
,
minViewMode
:
$scope
.
viewMode
,
autoclose
:
true
,
//选中之后自动隐藏日期选择框
clearBtn
:
true
,
//清除按钮
todayBtn
:
false
,
//今日按钮
format
:
'yyyy/mm/dd'
//日期格式,详见 http://bootstrap-datepicker.readthedocs.org/en/release/options.html#format
}).
on
(
'changeDate'
,
function
(
ev
)
{
if
(
ev
.
date
!=
undefined
)
{
ele2
.
datepicker
(
'setEndDate'
,
ev
.
date
);
ele2
.
datepicker
(
'setFormat'
,
'yyyy/mm/dd'
);
$
(
'.datepicker'
).
css
(
'display'
,
'none'
);
}
});
;
ele2
.
datepicker
(
"setDate"
,
new
Date
().
formatDateTime
(
'yyyy/mm/dd'
));
};
...
...
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