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
00839ba3
Commit
00839ba3
authored
Nov 27, 2018
by
eddie.woo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify
parent
79b3576e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
147 additions
and
31 deletions
+147
-31
ReportAnalysisController.java
...pwc/taxtech/atms/controller/ReportAnalysisController.java
+41
-2
ReportAnalysisService.java
.../pwc/taxtech/atms/service/impl/ReportAnalysisService.java
+68
-8
weblogic.xml
atms-api/src/main/webapp/WEB-INF/weblogic.xml
+15
-0
web.xml
atms-web/src/main/webapp/WEB-INF/web.xml
+0
-21
weblogic.xml
atms-web/src/main/webapp/WEB-INF/weblogic.xml
+15
-0
vat-model-analysis.ctrl.js
...alyzeReport/vat-model-analysis/vat-model-analysis.ctrl.js
+0
-0
vat-model-analysis.html
.../analyzeReport/vat-model-analysis/vat-model-analysis.html
+8
-0
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/ReportAnalysisController.java
View file @
00839ba3
...
@@ -48,7 +48,7 @@ public class ReportAnalysisController extends BaseController {
...
@@ -48,7 +48,7 @@ public class ReportAnalysisController extends BaseController {
try
{
try
{
return
ApiResultDto
.
success
(
reportAnalysisService
.
getIncomeRate
(
projectId
));
return
ApiResultDto
.
success
(
reportAnalysisService
.
getIncomeRate
(
projectId
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"
getDispersion
error."
,
e
);
logger
.
error
(
"
incomeRate
error."
,
e
);
}
}
return
ApiResultDto
.
fail
();
return
ApiResultDto
.
fail
();
}
}
...
@@ -61,7 +61,46 @@ public class ReportAnalysisController extends BaseController {
...
@@ -61,7 +61,46 @@ public class ReportAnalysisController extends BaseController {
try
{
try
{
return
ApiResultDto
.
success
(
reportAnalysisService
.
getIncomeVolatility
(
projectId
));
return
ApiResultDto
.
success
(
reportAnalysisService
.
getIncomeVolatility
(
projectId
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"getDispersion error."
,
e
);
logger
.
error
(
"incomeVolatility error."
,
e
);
}
return
ApiResultDto
.
fail
();
}
@GetMapping
(
"/vatIncomeRate/{projectId}/{period}"
)
public
ApiResultDto
getVatIncomeRate
(
@PathVariable
String
projectId
,
@PathVariable
Integer
period
)
{
if
(
StringUtils
.
isBlank
(
projectId
))
{
return
ApiResultDto
.
success
(
Collections
.
emptyList
());
}
try
{
return
ApiResultDto
.
success
(
reportAnalysisService
.
getVatIncomeRate
(
projectId
,
period
));
}
catch
(
Exception
e
)
{
logger
.
error
(
"getVatIncomeRate error."
,
e
);
}
return
ApiResultDto
.
fail
();
}
@GetMapping
(
"/vatIncomeLine/{projectId}"
)
public
ApiResultDto
getVatIncomeLine
(
@PathVariable
String
projectId
)
{
if
(
StringUtils
.
isBlank
(
projectId
))
{
return
ApiResultDto
.
success
(
Collections
.
emptyList
());
}
try
{
return
ApiResultDto
.
success
(
reportAnalysisService
.
getVatIncomeLine
(
projectId
));
}
catch
(
Exception
e
)
{
logger
.
error
(
"getVatIncomeLine error."
,
e
);
}
return
ApiResultDto
.
fail
();
}
@GetMapping
(
"/deduction/{projectId}"
)
public
ApiResultDto
getDeduction
(
@PathVariable
String
projectId
)
{
if
(
StringUtils
.
isBlank
(
projectId
))
{
return
ApiResultDto
.
success
(
Collections
.
emptyList
());
}
try
{
return
ApiResultDto
.
success
(
reportAnalysisService
.
getDeduction
(
projectId
));
}
catch
(
Exception
e
)
{
logger
.
error
(
"getDeduction error."
,
e
);
}
}
return
ApiResultDto
.
fail
();
return
ApiResultDto
.
fail
();
}
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/ReportAnalysisService.java
View file @
00839ba3
...
@@ -5,17 +5,13 @@ import org.apache.commons.collections.CollectionUtils;
...
@@ -5,17 +5,13 @@ import org.apache.commons.collections.CollectionUtils;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.math.NumberUtils
;
import
org.apache.commons.lang3.math.NumberUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
pwc.taxtech.atms.common.util.DateUtils
;
import
pwc.taxtech.atms.constant.enums.FormulaDataSourceType
;
import
pwc.taxtech.atms.constant.enums.FormulaDataSourceType
;
import
pwc.taxtech.atms.constant.enums.StdAccountEnum
;
import
pwc.taxtech.atms.constant.enums.StdAccountEnum
;
import
pwc.taxtech.atms.dao.AccountMappingMapper
;
import
pwc.taxtech.atms.dao.*
;
import
pwc.taxtech.atms.dao.GlBalanceDao
;
import
pwc.taxtech.atms.dao.ProjectMapper
;
import
pwc.taxtech.atms.dao.StandardAccountDao
;
import
pwc.taxtech.atms.dto.vatdto.BurdenRateDto
;
import
pwc.taxtech.atms.dto.vatdto.BurdenRateDto
;
import
pwc.taxtech.atms.entity.AccountMapping
;
import
pwc.taxtech.atms.entity.*
;
import
pwc.taxtech.atms.entity.AccountMappingExample
;
import
pwc.taxtech.atms.invoice.InputInvoiceMapper
;
import
pwc.taxtech.atms.entity.Project
;
import
pwc.taxtech.atms.entity.StandardAccount
;
import
pwc.taxtech.atms.vat.dao.PeriodCellDataMapper
;
import
pwc.taxtech.atms.vat.dao.PeriodCellDataMapper
;
import
pwc.taxtech.atms.vat.dao.PeriodCellTemplateMapper
;
import
pwc.taxtech.atms.vat.dao.PeriodCellTemplateMapper
;
import
pwc.taxtech.atms.vat.dao.PeriodDataSourceMapper
;
import
pwc.taxtech.atms.vat.dao.PeriodDataSourceMapper
;
...
@@ -41,6 +37,8 @@ public class ReportAnalysisService extends BaseService {
...
@@ -41,6 +37,8 @@ public class ReportAnalysisService extends BaseService {
@Resource
@Resource
private
ProjectMapper
projectMapper
;
private
ProjectMapper
projectMapper
;
@Resource
@Resource
private
OrganizationMapper
organizationMapper
;
@Resource
private
StandardAccountDao
standardAccountDao
;
private
StandardAccountDao
standardAccountDao
;
@Resource
@Resource
private
PeriodTemplateMapper
periodTemplateMapper
;
private
PeriodTemplateMapper
periodTemplateMapper
;
...
@@ -50,6 +48,8 @@ public class ReportAnalysisService extends BaseService {
...
@@ -50,6 +48,8 @@ public class ReportAnalysisService extends BaseService {
private
PeriodCellDataMapper
periodCellDataMapper
;
private
PeriodCellDataMapper
periodCellDataMapper
;
@Resource
@Resource
private
PeriodDataSourceMapper
periodDataSourceMapper
;
private
PeriodDataSourceMapper
periodDataSourceMapper
;
@Resource
private
InputInvoiceMapper
inputInvoiceMapper
;
/**
/**
* 增值税负担率
* 增值税负担率
...
@@ -162,6 +162,66 @@ public class ReportAnalysisService extends BaseService {
...
@@ -162,6 +162,66 @@ public class ReportAnalysisService extends BaseService {
return
dto
;
return
dto
;
}
}
/**
* 增值税应税收入、增值税免、抵、退办法出口收入 占会计收入比例
*/
public
BurdenRateDto
getVatIncomeRate
(
String
projectId
,
Integer
period
)
{
BurdenRateDto
dto
=
new
BurdenRateDto
();
BigDecimal
val
=
getCellValue
(
projectId
,
period
,
"VAT001"
,
19
,
18
);
BigDecimal
val2
=
getCellValue
(
projectId
,
period
,
"VAT005"
,
26
,
12
);
dto
.
setVatAmount
(
Lists
.
newArrayList
(
val
));
dto
.
setIncome
(
Lists
.
newArrayList
(
val2
));
return
dto
;
}
/**
* 增值税应税收入、增值税免、抵、退办法出口收入 占会计收入比例 趋势
*/
public
BurdenRateDto
getVatIncomeLine
(
String
projectId
)
{
BurdenRateDto
dto
=
new
BurdenRateDto
();
List
<
BigDecimal
>
vatAmountList
=
Lists
.
newArrayList
();
List
<
BigDecimal
>
incomeList
=
Lists
.
newArrayList
();
for
(
int
p
=
1
;
p
<=
12
;
p
++)
{
BigDecimal
val
=
getCellValue
(
projectId
,
p
,
"VAT001"
,
19
,
18
);
BigDecimal
val2
=
getCellValue
(
projectId
,
p
,
"VAT005"
,
26
,
12
);
BigDecimal
sum
=
val
.
add
(
val2
);
BigDecimal
rate
=
sum
.
compareTo
(
BigDecimal
.
ZERO
)
==
0
?
BigDecimal
.
ZERO
:
val
.
divide
(
sum
,
2
,
BigDecimal
.
ROUND_HALF_UP
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
BigDecimal
rate2
=
sum
.
compareTo
(
BigDecimal
.
ZERO
)
==
0
?
BigDecimal
.
ZERO
:
val2
.
divide
(
sum
,
2
,
BigDecimal
.
ROUND_HALF_UP
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
vatAmountList
.
add
(
rate
);
incomeList
.
add
(
rate2
);
}
dto
.
setVatAmount
(
vatAmountList
);
dto
.
setIncome
(
incomeList
);
return
dto
;
}
/**
* 已抵扣进项税波动率
*/
public
BurdenRateDto
getDeduction
(
String
projectId
)
{
BurdenRateDto
dto
=
new
BurdenRateDto
();
List
<
BigDecimal
>
rateList
=
Lists
.
newArrayList
();
Project
project
=
projectMapper
.
selectByPrimaryKey
(
projectId
);
Organization
org
=
organizationMapper
.
selectByPrimaryKey
(
project
.
getOrganizationId
());
for
(
int
p
=
1
;
p
<=
12
;
p
++)
{
BigDecimal
val
=
getCellValue
(
projectId
,
p
,
"VAT001"
,
19
,
18
);
InputInvoiceExample
example
=
new
InputInvoiceExample
();
example
.
createCriteria
().
andGFSHEqualTo
(
org
.
getTaxPayerNumber
()).
andFPZTIn
(
Lists
.
newArrayList
(
"0"
,
"2"
))
.
andLRRQBetween
(
DateUtils
.
getPeriodBeginFormat
(
project
.
getYear
(),
p
),
DateUtils
.
getPeriodEndFormat
(
project
.
getYear
(),
p
));
BigDecimal
sum
=
inputInvoiceMapper
.
selectByExample
(
example
).
stream
().
map
(
o
->
NumberUtils
.
isParsable
(
o
.
getHJSE
())
?
NumberUtils
.
createBigDecimal
(
o
.
getHJSE
())
:
BigDecimal
.
ZERO
)
.
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
BigDecimal
rate
=
sum
.
compareTo
(
BigDecimal
.
ZERO
)
==
0
?
BigDecimal
.
ZERO
:
val
.
divide
(
sum
,
2
,
BigDecimal
.
ROUND_HALF_UP
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
rateList
.
add
(
rate
);
}
dto
.
setRate
(
rateList
);
return
dto
;
}
/**
/**
* 根据借贷方向获取TB表科目的发生额
* 根据借贷方向获取TB表科目的发生额
*/
*/
...
...
atms-api/src/main/webapp/WEB-INF/weblogic.xml
0 → 100644
View file @
00839ba3
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app
xmlns=
"http://xmlns.oracle.com/weblogic/weblogic-web-app"
>
<context-root>
/
</context-root>
<container-descriptor>
<prefer-application-packages>
<package-name>
org.apache.commons.lang.*
</package-name>
<package-name>
antlr.*
</package-name>
<package-name>
javax.persistence.*
</package-name>
<package-name>
org.hibernate.*
</package-name>
<package-name>
org.apache.xerces.*
</package-name>
<package-name>
com.fasterxml.jackson.*
</package-name>
</prefer-application-packages>
</container-descriptor>
</weblogic-web-app>
\ No newline at end of file
atms-web/src/main/webapp/WEB-INF/web.xml
View file @
00839ba3
...
@@ -48,27 +48,6 @@
...
@@ -48,27 +48,6 @@
<url-pattern>
/
</url-pattern>
<url-pattern>
/
</url-pattern>
</servlet-mapping>
</servlet-mapping>
<servlet>
<servlet-name>
DruidStatView
</servlet-name>
<servlet-class>
com.alibaba.druid.support.http.StatViewServlet
</servlet-class>
<init-param>
<param-name>
resetEnable
</param-name>
<param-value>
true
</param-value>
</init-param>
<init-param>
<param-name>
loginUsername
</param-name>
<param-value>
druid
</param-value>
</init-param>
<init-param>
<param-name>
loginPassword
</param-name>
<param-value>
druid
</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>
DruidStatView
</servlet-name>
<url-pattern>
/druid/*
</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file-list>
<welcome-file>
index.jsp
</welcome-file>
<welcome-file>
index.jsp
</welcome-file>
<welcome-file>
index.html
</welcome-file>
<welcome-file>
index.html
</welcome-file>
...
...
atms-web/src/main/webapp/WEB-INF/weblogic.xml
0 → 100644
View file @
00839ba3
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app
xmlns=
"http://xmlns.oracle.com/weblogic/weblogic-web-app"
>
<context-root>
/
</context-root>
<container-descriptor>
<prefer-application-packages>
<package-name>
org.apache.commons.lang.*
</package-name>
<package-name>
antlr.*
</package-name>
<package-name>
javax.persistence.*
</package-name>
<package-name>
org.hibernate.*
</package-name>
<package-name>
org.apache.xerces.*
</package-name>
<package-name>
com.fasterxml.jackson.*
</package-name>
</prefer-application-packages>
</container-descriptor>
</weblogic-web-app>
\ No newline at end of file
atms-web/src/main/webapp/app/vat/analyzeReport/vat-model-analysis/vat-model-analysis.ctrl.js
View file @
00839ba3
This diff is collapsed.
Click to expand it.
atms-web/src/main/webapp/app/vat/analyzeReport/vat-model-analysis/vat-model-analysis.html
View file @
00839ba3
...
@@ -25,6 +25,14 @@
...
@@ -25,6 +25,14 @@
<div
id=
"vatIncomeLineDiv"
name=
"p_chart"
></div>
<div
id=
"vatIncomeLineDiv"
name=
"p_chart"
></div>
</div>
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-lg-5 col-md-5"
>
<div
id=
"deductionDiv"
name=
"p_chart"
></div>
</div>
<div
class=
"col-lg-5 col-md-5 col-md-offset-1 col-lg-offset-1"
>
<div
id=
""
name=
"p_chart"
></div>
</div>
</div>
</div>
</div>
<style>
<style>
...
...
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