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
3006acfe
Commit
3006acfe
authored
Feb 21, 2019
by
chase
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改税金公式支持不传参数
parent
2caf2528
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
45 deletions
+63
-45
WPTYPEParasBo.java
.../main/java/pwc/taxtech/atms/dto/vatdto/WPTYPEParasBo.java
+13
-0
FormulaAdminMapper.java
...rc/main/java/pwc/taxtech/atms/dao/FormulaAdminMapper.java
+0
-45
FormulaAdminMapper.xml
...urces/pwc/taxtech/atms/dao/extends/FormulaAdminMapper.xml
+50
-0
No files found.
atms-api/src/main/java/pwc/taxtech/atms/dto/vatdto/WPTYPEParasBo.java
View file @
3006acfe
...
...
@@ -2,6 +2,7 @@ package pwc.taxtech.atms.dto.vatdto;
import
org.apache.poi.ss.formula.OperationEvaluationContext
;
import
org.apache.poi.ss.formula.eval.EvaluationException
;
import
org.apache.poi.ss.formula.eval.MissingArgEval
;
import
org.apache.poi.ss.formula.eval.ValueEval
;
import
java.math.BigDecimal
;
...
...
@@ -68,15 +69,27 @@ public class WPTYPEParasBo {
}
rowColumnIndex
=
rtn
;
}
if
(
args
[
2
]
instanceof
MissingArgEval
){
split
(
expression
);
}
else
{
taxRate
=
new
BigDecimal
(
resolverString
(
args
,
ec
,
2
));
split
(
expression
);
concatPara
(
expression
,
String
.
valueOf
(
taxRate
));
}
if
(
args
[
3
]
instanceof
MissingArgEval
){
split
(
expression
);
}
else
{
revenueType
=
resolverInteger
(
args
,
ec
,
3
);
split
(
expression
);
concatPara
(
expression
,
revenueType
);
}
if
(
args
[
4
]
instanceof
MissingArgEval
){
split
(
expression
);
}
else
{
taxType
=
resolverInteger
(
args
,
ec
,
4
);
split
(
expression
);
concatPara
(
expression
,
taxType
);
}
try
{
columnIndex
=
resolverInteger
(
args
,
ec
,
5
);
split
(
expression
);
...
...
atms-dao/src/main/java/pwc/taxtech/atms/dao/FormulaAdminMapper.java
View file @
3006acfe
...
...
@@ -131,51 +131,6 @@ public interface FormulaAdminMapper extends MyMapper {
@Param
(
"period"
)
Integer
period
);
@Select
(
"select "
+
" detail.*, "
+
" source_cell.cell_template_id AS cellTemplateID,"
+
" source_cell.column_index AS columnIndex,"
+
" source_cell.column_name AS columnName,"
+
" source_cell.row_name AS rowName,"
+
" source_cell.data_type AS resultType "
+
"from ("
+
" select "
+
" template.template_id AS reportTemplateID,"
+
" template.template_group_id AS reportTemplateGroupID,"
+
" template.code AS reportCode,"
+
" cell_template.row_index AS rowIndex "
+
" from "
+
" revenue_config revenue "
+
" inner join "
+
" period_cell_template as cell_template "
+
" on "
+
" revenue.name = cell_template.row_name "
+
" and "
+
" cell_template.column_index = #{rowColumnIndex}"
+
" inner join "
+
" period_template as template "
+
" on template.template_id = cell_template.report_template_id"
+
" where "
+
" revenue.org_id = #{orgId}"
+
" and revenue.tax_rate = #{taxRate}"
+
" and revenue.revenue_type = #{revenueType}"
+
" and revenue.tax_type = #{taxType}"
+
" and revenue.start_date <= #{startDate}"
+
" and revenue.end_date>= #{endDate}"
+
" and template.template_group_id = #{templateGroupId}"
+
" and template.is_active_association = 1"
+
" and template.code = #{code}"
+
" and template.project_id = #{projectId}"
+
" and template.period = #{period}"
+
" and cell_template.project_id = #{projectId}"
+
" and cell_template.period = #{period}) as detail,"
+
" period_cell_template as source_cell"
+
" where source_cell.project_id = #{projectId}"
+
" and source_cell.period = #{period}"
+
" and detail.reportTemplateID = source_cell.report_template_id"
+
" and detail.rowIndex = source_cell.row_index"
+
" and source_cell.column_index = #{columnIndex}"
)
List
<
CellTemplatePerGroupDto
>
getCellTemplateByTypeAndIndex
(
@Param
(
"templateGroupId"
)
Long
templateGroupId
,
@Param
(
"projectId"
)
String
projectId
,
...
...
atms-dao/src/main/resources/pwc/taxtech/atms/dao/extends/FormulaAdminMapper.xml
0 → 100644
View file @
3006acfe
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"pwc.taxtech.atms.dao.FormulaAdminMapper"
>
<select
id=
"getCellTemplateByTypeAndIndex"
resultType=
"pwc.taxtech.atms.dpo.CellTemplatePerGroupDto"
>
select detail.*,
source_cell.cell_template_id AS cellTemplateID,
source_cell.column_index AS columnIndex,
source_cell.column_name AS columnName,
source_cell.row_name AS rowName,
source_cell.data_type AS resultType
from (
select template.template_id AS reportTemplateID,
template.template_group_id AS reportTemplateGroupID,
template.code AS reportCode,
cell_template.row_index AS rowIndex
from revenue_config revenue
inner join period_cell_template as cell_template
on revenue.name = cell_template.row_name and cell_template.column_index = #{rowColumnIndex}
inner join period_template as template on template.template_id = cell_template.report_template_id
where revenue.org_id = #{orgId}
<if
test=
"taxRate != null"
>
and revenue.tax_rate = #{taxRate}
</if>
<if
test=
"revenueType != null"
>
and revenue.revenue_type = #{revenueType}
</if>
<if
test=
"taxType != null"
>
and revenue.tax_type = #{taxType}
</if>
<![CDATA[ and revenue.start_date <= #{startDate}]]>
<![CDATA[ and revenue.end_date >= #{endDate}]]>
and template.template_group_id = #{templateGroupId}
and template.is_active_association = 1
and template.code = #{code}
and template.project_id = #{projectId}
and template.period = #{period}
and cell_template.project_id = #{projectId}
and cell_template.period = #{period}) as detail,
period_cell_template as source_cell
where source_cell.project_id = #{projectId}
and source_cell.period = #{period}
and detail.reportTemplateID = source_cell.report_template_id
and detail.rowIndex = source_cell.row_index
and source_cell.column_index = #{columnIndex}
</select>
</mapper>
\ 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