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
43c8ed03
Commit
43c8ed03
authored
Apr 11, 2019
by
Memorydoc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#
parent
2107edc9
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
63 additions
and
62 deletions
+63
-62
pom.xml
atms-api/pom.xml
+12
-1
TemplateHeaderCheck.java
...n/java/pwc/taxtech/atms/constant/TemplateHeaderCheck.java
+1
-1
AnalysisJobServiceImpl.java
...pwc/taxtech/atms/service/impl/AnalysisJobServiceImpl.java
+20
-39
ReportServiceImpl.java
.../pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
+5
-3
applicationContext-job.xml
atms-api/src/main/resources/applicationContext-job.xml
+0
-3
AnalysisTest.java
...test/java/pwc/taxtech/atms/service/impl/AnalysisTest.java
+7
-4
CitAssetEamMappingMapper.java
...n/java/pwc/taxtech/atms/dao/CitAssetEamMappingMapper.java
+3
-0
index.html
atms-web/src/main/webapp/WEB-INF/templates/index.html
+1
-1
domestic-data-import.ctrl.js
...-import/domestic-data-import/domestic-data-import.ctrl.js
+2
-2
international-data-import.html
.../international-data-import/international-data-import.html
+1
-1
tb-ebit-form.ctrl.js
...b/src/main/webapp/app/analysis/table/tb-ebit-form.ctrl.js
+8
-4
tb-ebit-form.html
...-web/src/main/webapp/app/analysis/table/tb-ebit-form.html
+3
-3
No files found.
atms-api/pom.xml
View file @
43c8ed03
...
...
@@ -432,12 +432,23 @@
<profiles>
<profile>
<id>
dev
</id>
<build>
<filters>
<filter>
src/main/resources/conf/conf_profile_dev.properties
</filter>
</filters>
</build>
<properties>
<env>
dev
</env>
</properties>
</profile>
<profile>
<id>
local
</id>
<activation>
<activeByDefault>
true
</activeByDefault>
</activation>
<build>
<filters>
<filter>
src/main/resources/conf/conf_profile_dev.properties
</filter>
<filter>
src/main/resources/conf/conf_profile_dev
_local
.properties
</filter>
</filters>
</build>
<properties>
...
...
atms-api/src/main/java/pwc/taxtech/atms/constant/TemplateHeaderCheck.java
View file @
43c8ed03
...
...
@@ -21,7 +21,7 @@ public class TemplateHeaderCheck {
};
//职工人数
public
static
String
[]
zgrs
=
{
"公司
简
称"
,
"正式员工"
,
"实习生"
,
"外包"
,
"合计"
"公司
名
称"
,
"正式员工"
,
"实习生"
,
"外包"
,
"合计"
};
//司机人数
public
static
String
[]
sjrs
=
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/AnalysisJobServiceImpl.java
View file @
43c8ed03
...
...
@@ -3,7 +3,6 @@ package pwc.taxtech.atms.service.impl;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.math.BigDecimal
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.*
;
...
...
@@ -36,6 +35,7 @@ import pwc.taxtech.atms.vat.dao.TrialBalanceFinalMapper;
import
pwc.taxtech.atms.vat.entity.*
;
import
javax.annotation.Resource
;
import
java.util.concurrent.atomic.AtomicReference
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
...
...
@@ -642,8 +642,6 @@ public class AnalysisJobServiceImpl extends BaseService {
});
}
@Autowired
private
OrganizationApprovedLevyInfoMapper
organizationApprovedLevyInfoMapper
;
/**
* 19/03/2019 15:59
...
...
@@ -653,9 +651,9 @@ public class AnalysisJobServiceImpl extends BaseService {
* @return
* @author Gary J Li
*/
public
void
analysisFileManagement
(
List
<
Organization
>
orgs
,
Integer
period
,
Integer
type
)
{
public
void
analysisFileManagement
(
List
<
Organization
>
orgs
,
Integer
period
,
Integer
type
)
{
List
<
String
>
orgIds
=
orgs
.
stream
().
map
(
Organization:
:
getId
).
collect
(
Collectors
.
toList
());
if
(
type
.
equals
(
EnumTbImportType
.
CoverImport
.
getCode
()))
{
if
(
type
.
equals
(
EnumTbImportType
.
CoverImport
.
getCode
()))
{
AnalysisFileManagementExample
example
=
new
AnalysisFileManagementExample
();
example
.
createCriteria
().
andOrganizationIdIn
(
orgIds
).
andPeriodEqualTo
(
period
);
analysisFileManagementMapper
.
deleteByExample
(
example
);
...
...
@@ -664,38 +662,35 @@ public class AnalysisJobServiceImpl extends BaseService {
TaxDocumentExample
e1
=
new
TaxDocumentExample
();
e1
.
createCriteria
().
andCompanyIdIn
(
orgIds
).
andOwnTimeEqualTo
(
period
);
List
<
TaxDocument
>
taxDocuments
=
taxDocumentMapper
.
selectByExample
(
e1
);
List
<
OrganizationTaxRule
>
taxRules
=
organizationTaxRuleMapper
.
selectByExample
(
new
OrganizationTaxRuleExample
());
// Map<String, OrganizationTaxRule> ruleMap = taxRules.stream().collect(Collectors.toMap(OrganizationTaxRule::getGroupName, Function.identity()));
Map
<
String
,
List
<
OrganizationTaxRule
>>
ruleMap
=
taxRules
.
stream
().
collect
(
Collectors
.
groupingBy
(
OrganizationTaxRule:
:
getGroupName
));
for
(
TaxDocument
td
:
taxDocuments
)
{
for
(
TaxDocument
td
:
taxDocuments
){
Organization
o
=
orgMap
.
get
(
td
.
getCompanyId
());
AnalysisFileManagement
afm
=
new
AnalysisFileManagement
();
afm
.
setId
(
idService
.
nextId
());
afm
.
setSeqNo
(
getSeqNoByPeriod
(
o
.
getId
(),
period
)
);
afm
.
setSeqNo
(
o
.
getCode
()
+
""
+
period
);
afm
.
setFileType
(
td
.
getFileType
());
// 周期性上传 校验当年的当前及之前的周期是否有上传文件
if
(
StringUtils
.
isNotEmpty
(
td
.
getTaxType
())
&&
null
!=
td
.
getOwnTime
())
{
List
<
OrganizationTaxRule
>
otrs
=
ruleMap
.
get
(
td
.
getTaxType
());
Optional
<
OrganizationTaxRule
>
otrOP
=
otrs
.
stream
().
filter
(
otr
->
otr
.
getGroupName
().
equals
(
td
.
getTaxType
())).
map
(
OrganizationTaxRule:
:
getUpdateTime
).
max
(
new
ComparatorDate
());
Optional
<
OrganizationTaxRule
>
otrOP
=
otrs
.
stream
().
filter
(
otr
->
otr
.
getGroupName
().
equals
(
td
.
getTaxType
())).
map
(
OrganizationTaxRule:
:
getUpdateTime
).
max
(
new
ComparatorDate
());
OrganizationTaxRule
rule
=
otrOP
.
get
();
if
(
null
==
rule
)
{
if
(
null
==
rule
)
{
break
;
}
// afm.setReportingFrequency(rule.getTaxDecCycle());
String
reporingFrequency
=
"/"
;
if
(
td
.
getFileType
().
indexOf
(
"所属期间"
)
!=
-
1
||
td
.
getFileType
().
indexOf
(
"税种"
)
!=
-
1
)
{
OrganizationApprovedLevyInfoExample
example
=
new
OrganizationApprovedLevyInfoExample
();
example
.
createCriteria
().
andOrganizationIdEqualTo
(
o
.
getId
());
List
<
OrganizationApprovedLevyInfo
>
organizationApprovedLevyInfos
=
organizationApprovedLevyInfoMapper
.
selectByExample
(
example
);
reporingFrequency
=
organizationApprovedLevyInfos
.
get
(
0
).
getApprovedTaxPeriod
();
}
afm
.
setReportingFrequency
(
reporingFrequency
);
afm
.
setReportingFrequency
(
rule
.
getTaxDecCycle
());
String
archivingStatus
=
"未归档"
;
/*if ("年度".equals(rule.getTaxDecCycle())) {
TaxDocumentExample
example
=
new
TaxDocumentExample
();
List
<
Integer
>
fileterTime
=
Lists
.
newArrayList
();
if
(
"年度"
.
equals
(
rule
.
getTaxDecCycle
()))
{
Integer
str
=
DateUtils
.
getNowYear
()
*
100
;
Integer
end
=
DateUtils
.
getNowYear
()
*
100
+
12
;
example
.
createCriteria
().
andOwnTimeGreaterThanOrEqualTo
(
str
).
andOwnTimeLessThanOrEqualTo
(
end
).
andFileTypeEqualTo
(
td
.
getFileType
());
...
...
@@ -711,28 +706,13 @@ public class AnalysisJobServiceImpl extends BaseService {
});
example
.
createCriteria
().
andOwnTimeIn
(
fileterTime
).
andFileTypeEqualTo
(
td
.
getFileType
());
archivingStatus
=
taxDocumentMapper
.
countByExample
(
example
)
>
0
?
"已归档"
:
archivingStatus
;
}*/
if
(
td
.
getFileType
().
indexOf
(
"增值税"
)
!=
-
1
)
{
if
(
ZZS_DATE_LIST
.
contains
(
td
.
getOwnTime
()%
100
)){
archivingStatus
=
"已归档"
;
}
}
else
if
(
td
.
getFileType
().
indexOf
(
"印花税"
)
!=
-
1
)
{
List
<
AnalysisFileManagement
>
maps
=
analysisFileManagementMapper
.
getYHSsql
(
getYHSsql
(
String
.
valueOf
(
td
.
getOwnTime
()
/
100
),
td
.
getFileType
()));
if
(
maps
.
size
()
!=
0
)
archivingStatus
=
"已归档"
;
}
/*else{
TaxDocumentExample example = new TaxDocumentExample();
example.createCriteria().andOwnTimeEqualTo(td.getOwnTime());
if(taxDocumentMapper.selectByExample(example).size() != 0)
archivingStatus = "已归档";
}*/
}
afm
.
setArchivingStatus
(
archivingStatus
);
}
else
{
}
else
{
afm
.
setReportingFrequency
(
"/"
);
// 由于是根据文档列表查询 必然已归档
afm
.
setArchivingStatus
(
"已归档"
);
}
afm
.
setOrganizationId
(
o
.
getId
());
afm
.
setCompanyName
(
o
.
getName
());
afm
.
setPeriod
(
period
);
...
...
@@ -740,10 +720,11 @@ public class AnalysisJobServiceImpl extends BaseService {
}
}
@Autowired
private
JdbcTemplate
jdbcTemplate
;
public
String
getYHSsql
(
String
year
,
String
fileType
){
public
String
getYHSsql
(
String
year
,
String
fileType
)
{
String
str
=
""
;
str
.
format
(
"select * from tax_document t where t.own_time like %s and t.file_type = %s"
,
year
,
fileType
);
return
str
;
...
...
@@ -815,7 +796,7 @@ public class AnalysisJobServiceImpl extends BaseService {
}
public
class
ComparatorDate
implements
Comparator
{
public
class
ComparatorDate
implements
Comparator
{
public
static
final
String
TAG
=
"ComparatorDate"
;
...
...
@@ -829,5 +810,5 @@ public class AnalysisJobServiceImpl extends BaseService {
return
-
1
;
}
}
}
}
}
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
View file @
43c8ed03
...
...
@@ -10,6 +10,7 @@ import org.apache.commons.collections.CollectionUtils;
import
org.apache.commons.collections.map.HashedMap
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.poi.hssf.usermodel.HSSFCell
;
import
org.apache.poi.hssf.usermodel.HSSFCellStyle
;
import
org.apache.poi.openxml4j.exceptions.InvalidFormatException
;
import
org.apache.poi.ss.usermodel.*
;
import
org.apache.poi.xssf.usermodel.XSSFCell
;
...
...
@@ -2356,11 +2357,9 @@ public class ReportServiceImpl extends BaseService {
if
(
ebitCellDataMapper
.
selectByExample
(
example1
).
size
()
!=
0
)
{
ebitCellDataMapper
.
deleteByExample
(
example1
);
}
;
for
(
int
j
=
1
;
j
<=
sheet
.
getLastRowNum
();
j
++)
{
if
(
j
<=
36
)
continue
;
;
for
(
int
k
=
1
;
k
<
sheet
.
getRow
(
0
).
getLastCellNum
();
k
++)
{
EbitCellData
ebitCellData1
=
new
EbitCellData
();
ebitCellData1
.
setId
(
idService
.
nextId
());
...
...
@@ -2444,7 +2443,10 @@ public class ReportServiceImpl extends BaseService {
default
:
if
(
i
==
0
)
break
;
sheetAt
.
getRow
(
m
).
getCell
(
i
+
1
).
setCellValue
(
getCellStringValue
(
sheetAt1
.
getRow
(
m
).
getCell
(
2
)));
Cell
cell
=
sheetAt
.
getRow
(
m
).
getCell
(
i
+
1
);
cell
.
setCellValue
(
getCellStringValue
(
sheetAt1
.
getRow
(
m
).
getCell
(
2
)));
cell
.
setCellFormula
(
"B2 + C3"
);
//cell.setCellType(cellStyle.getAlignment());
}
}
}
...
...
atms-api/src/main/resources/applicationContext-job.xml
View file @
43c8ed03
...
...
@@ -84,9 +84,6 @@
<property
name=
"cronExpression"
value=
"0 0 0 1 * ?"
/>
</bean>
<!--analysisJob-->
<bean
name=
"analysisJob"
class=
"org.springframework.scheduling.quartz.JobDetailFactoryBean"
>
<property
name=
"jobClass"
value=
"pwc.taxtech.atms.common.schedule.AnalysisJob"
/>
...
...
atms-api/src/test/java/pwc/taxtech/atms/service/impl/AnalysisTest.java
View file @
43c8ed03
...
...
@@ -10,7 +10,9 @@ import pwc.taxtech.atms.constant.enums.EnumTbImportType;
import
pwc.taxtech.atms.entity.Organization
;
import
pwc.taxtech.atms.entity.OrganizationExample
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Auther: Gary J Li
...
...
@@ -76,23 +78,24 @@ public class AnalysisTest extends CommonIT {
analysisJobService
.
analysisSales
(
orgs
,
period
,
EnumTbImportType
.
CoverImport
.
getCode
());
}
@Test
public
void
analysisTax
ReturnEnd
(){
public
void
analysisTax
(){
Integer
period
=
DateUtils
.
getPeriodNow
();
OrganizationExample
e
=
new
OrganizationExample
();
//e.createCriteria().andIsActiveEqualTo(true);
List
<
Organization
>
orgs
=
organizationMapper
.
selectByExample
(
e
);
logger
.
info
(
String
.
format
(
"开始分析%s返还后税数据"
,
period
));
analysisJobService
.
analysisTax
ReturnEnd
(
orgs
,
period
,
EnumTbImportType
.
CoverImport
.
getCode
());
analysisJobService
.
analysisTax
(
orgs
,
period
,
EnumTbImportType
.
CoverImport
.
getCode
());
}
@Test
public
void
analysisTax
(){
public
void
analysisTax
ReturnEnd
(){
Integer
period
=
DateUtils
.
getPeriodNow
();
OrganizationExample
e
=
new
OrganizationExample
();
//e.createCriteria().andIsActiveEqualTo(true);
List
<
Organization
>
orgs
=
organizationMapper
.
selectByExample
(
e
);
logger
.
info
(
String
.
format
(
"开始分析%s返还后税数据"
,
period
));
analysisJobService
.
analysisTax
(
orgs
,
period
,
EnumTbImportType
.
CoverImport
.
getCode
());
analysisJobService
.
analysisTax
ReturnEnd
(
orgs
,
period
,
EnumTbImportType
.
CoverImport
.
getCode
());
}
}
atms-dao/src/main/java/pwc/taxtech/atms/dao/CitAssetEamMappingMapper.java
View file @
43c8ed03
...
...
@@ -105,4 +105,6 @@ public interface CitAssetEamMappingMapper extends MyMapper {
* @mbg.generated
*/
int
updateByPrimaryKey
(
CitAssetEamMapping
record
);
int
insertBatch
(
List
<
CitAssetEamMapping
>
citAssetEamMappings
);
}
\ No newline at end of file
atms-web/src/main/webapp/WEB-INF/templates/index.html
View file @
43c8ed03
...
...
@@ -63,7 +63,7 @@
<!--@Html.AntiForgeryToken()-->
<div
class=
"wrapper"
>
<app-nav></app-nav>
<div
class=
"page-wrapper"
style=
"position:relative;overflow
:scroll
;margin-top:55px"
>
<div
class=
"page-wrapper"
style=
"position:relative;overflow
-x:hidden;overflow-y:auto
;margin-top:55px"
>
<div
class=
"main-contents"
ui-view
></div>
<div
class=
"data-import-contents"
ui-view=
"importContent"
></div>
<!--style="display: none"-->
</div>
...
...
atms-web/src/main/webapp/app/analysis/data-import/domestic-data-import/domestic-data-import.ctrl.js
View file @
43c8ed03
...
...
@@ -310,7 +310,7 @@
dataField
:
"companyName"
,
width
:
'28%'
,
allowHeaderFiltering
:
false
,
caption
:
$translate
.
instant
(
'Company
Simple
Name'
)
caption
:
$translate
.
instant
(
'CompanyName'
)
},
{
dataField
:
"segment1"
,
allowHeaderFiltering
:
false
,
...
...
@@ -411,7 +411,7 @@
dataField
:
"companyName"
,
width
:
'25%'
,
allowHeaderFiltering
:
false
,
caption
:
$translate
.
instant
(
'Company
Simple
Name'
)
caption
:
$translate
.
instant
(
'CompanyName'
)
},
{
dataField
:
"segment1"
,
allowHeaderFiltering
:
false
,
...
...
atms-web/src/main/webapp/app/analysis/data-import/international-data-import/international-data-import.html
View file @
43c8ed03
...
...
@@ -29,7 +29,7 @@
</li>
</ul>
</div>
<span
class=
"text-bold"
translate=
"Period"
></span>
:
<span
class=
"text-bold"
style=
"margin-left: 39px;"
translate=
"Period"
></span>
:
<div
class=
"period-picker"
style=
"margin-left:10px; width:141px;"
>
<input
type=
"text"
id=
"periodDatepicker"
class=
"datepicker imp-subheader"
style=
" width: 111px;"
readonly=
"readonly"
ng-model=
"UploadPeriodTime"
/>
...
...
atms-web/src/main/webapp/app/analysis/table/tb-ebit-form.ctrl.js
View file @
43c8ed03
...
...
@@ -2940,7 +2940,6 @@
}).error(function (error) {
});*/
calculateEbitAndInsert
(
$scope
.
relation
.
sheet
,
true
);
spreadTODb
();
}
var
spreadTODb
=
function
(
front
)
{
...
...
@@ -2948,6 +2947,7 @@
SweetAlert
.
error
(
"请选择机构"
);
return
;
}
//{includeBindingSource: true}
var
json
=
$scope
.
spread
.
toJSON
({
includeBindingSource
:
true
});
var
excelIo
=
new
GC
.
Spread
.
Excel
.
IO
();
var
url
=
apiInterceptor
.
webApiHostUrl
+
'/Report/spreadToDb?orgId='
+
$scope
.
relation
.
orgId
+
"&period="
+
$scope
.
relation
.
period
;
...
...
@@ -2997,6 +2997,8 @@
return
;
}
file
=
file
[
0
];
// 转圈圈
$
(
'#busy-indicator-container'
).
show
();
frontImport
(
file
);
//前端导入
/*if(file.length == 0)
return
...
...
@@ -3074,8 +3076,7 @@
if
(
$scope
.
spread
!=
undefined
&&
$scope
.
spread
)
{
var
excelIo
=
new
GC
.
Spread
.
Excel
.
IO
();
excelIo
.
open
(
file
,
function
(
json
)
{
var
workbookObj
=
json
;
$scope
.
spread
.
fromJSON
(
workbookObj
);
$scope
.
spread
.
fromJSON
(
json
);
var
sheet
=
$scope
.
spread
.
sheets
[
0
];
$scope
.
relation
.
sheet
=
$scope
.
spread
.
sheets
[
0
];
/*vatReportService.saveAndRefresh($scope.relation.orgId, $scope.relation.period, 0, "1").success(function (res) {
...
...
@@ -3089,7 +3090,10 @@
$scope
.
relation
.
addEbitRow
(
sheet
);
calculateEbitAndInsert
(
sheet
,
true
);
$scope
.
relation
.
lockCell
(
$scope
.
spread
);
$
(
'#busy-indicator-container'
).
hide
();
//关闭弹出层
spreadTODb
(
true
);
},
function
(
e
)
{
alert
(
e
.
errorMessage
);
if
(
e
.
errorCode
===
2
/*noPassword*/
||
e
.
errorCode
===
3
/*invalidPassword*/
)
{
...
...
@@ -3134,7 +3138,7 @@
$scope
.
_ebitResult
.
rate
=
rate
;
$scope
.
_ebitResult
.
gljyye
=
Number
(((
rate
/
100
)
*
$scope
.
_ebitResult
.
kltsys
).
toFixed
(
4
));
$scope
.
_ebitResult
.
sixAddtax
=
Number
((
0.06
*
$scope
.
_ebitResult
.
gljyye
).
toFixed
(
4
));
$scope
.
_ebitResult
.
tsklys
=
Number
((
$scope
.
_ebitResult
.
gljyye
*
0.1
06
).
toFixed
(
4
));
$scope
.
_ebitResult
.
tsklys
=
Number
((
$scope
.
_ebitResult
.
gljyye
*
1.
06
).
toFixed
(
4
));
if
(
insert
)
{
sheet
.
setValue
(
37
,
2
,
$scope
.
_ebitResult
.
klzcjsz
);
sheet
.
setValue
(
38
,
2
,
$scope
.
_ebitResult
.
tsyskl
);
...
...
atms-web/src/main/webapp/app/analysis/table/tb-ebit-form.html
View file @
43c8ed03
...
...
@@ -33,7 +33,7 @@
</div>
</div>
</div>
<div
class=
"col-sm-5 bar-export navRight"
style=
" margin-top: 20px;width:
30
%; float: right;"
>
<div
class=
"col-sm-5 bar-export navRight"
style=
" margin-top: 20px;width:
38
%; float: right;"
>
<span
ngf-select=
""
ngf-change=
"upload($files)"
accept=
".xls,.xlsx"
ngf-multiple=
"false"
ngf-allow-dir=
"false"
class=
""
><i
class=
"fa fa-file"
>
{{'uploadProfileTable' | translate}}
</i></span>
<span
ng-click=
"saveAndRefresh()"
><i
class=
"fa fa-refresh"
></i>
{{'saveAndRefresh' | translate}}
</span>
...
...
@@ -51,8 +51,7 @@
</table-report-sheet>
<form
name=
"myform"
style=
"disply:none;"
id=
"myform"
enctype=
"multipart/form-data"
method=
"post"
>
</form>
</form>
<a
href=
"#"
id =
"a"
></a>
</div>
</div>
\ No newline at end of file
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