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
2a99e04d
Commit
2a99e04d
authored
Apr 03, 2019
by
chase
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
a3b88a86
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
15 deletions
+36
-15
ReportServiceImpl.java
.../pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
+7
-9
InvoiceRecordMapper.java
...in/java/pwc/taxtech/atms/vat/dao/InvoiceRecordMapper.java
+3
-0
InvoiceRecordExtendsMapper.xml
...xtech/atms/vat/dao/extends/InvoiceRecordExtendsMapper.xml
+26
-6
No files found.
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
View file @
2a99e04d
...
...
@@ -342,17 +342,15 @@ public class ReportServiceImpl extends BaseService {
andStartDateLessThanOrEqualTo
(
queryDate
).
andEndDateGreaterThanOrEqualTo
(
queryDate
).
andStatusEqualTo
(
0
);
List
<
RevenueTypeMapping
>
mappingList
=
revenueTypeMappingMapper
.
selectByExample
(
mappingExample
);
//先清除数据
InvoiceRecord
delRecord
=
new
InvoiceRecord
();
delRecord
.
setRevenueCofId
(
null
);
if
(!
isMergeManualData
){
delRecord
.
setModifyRevenueCofId
(
null
);
}
InvoiceRecordExample
delExample
=
new
InvoiceRecordExample
();
delExample
.
createCriteria
().
andProjectIdEqualTo
(
projectId
)
.
andProjectIdEqualTo
(
projectId
).
delExample
.
createCriteria
().
andProjectIdEqualTo
(
projectId
).
andPeriodEqualTo
(
Integer
.
valueOf
(
queryDate
.
replace
(
"-"
,
""
)));
invoiceRecordMapper
.
deleteByExample
(
delExample
);
if
(
isMergeManualData
){
invoiceRecordMapper
.
clearRevenueCof
(
true
,
false
,
delExample
);
}
else
{
invoiceRecordMapper
.
clearRevenueCof
(
true
,
true
,
delExample
);
}
Map
<
String
,
Long
>
map
=
new
HashMap
<>();
for
(
RevenueTypeMapping
mapping
:
mappingList
)
{
if
(!
map
.
containsKey
(
mapping
.
getContent
()))
{
...
...
atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/InvoiceRecordMapper.java
View file @
2a99e04d
...
...
@@ -129,4 +129,6 @@ public interface InvoiceRecordMapper extends MyVatMapper {
List
<
String
>
queryBillTypeGroupBy
(
@Param
(
"projectId"
)
String
projectId
,
@Param
(
"period"
)
Integer
period
);
int
clearRevenueCof
(
@Param
(
"clearRevenue"
)
boolean
clearRevenue
,
@Param
(
"clearModifyRevenue"
)
boolean
clearModifyRevenue
,
@Param
(
"example"
)
InvoiceRecordExample
example
);
}
\ No newline at end of file
atms-dao/src/main/resources/pwc/taxtech/atms/vat/dao/extends/InvoiceRecordExtendsMapper.xml
View file @
2a99e04d
...
...
@@ -15,15 +15,17 @@
</if>
</sql>
<select
id=
"selectByCondition"
parameterType=
"pwc.taxtech.atms.vat.dpo.InvoiceRecordCondition"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByCondition"
parameterType=
"pwc.taxtech.atms.vat.dpo.InvoiceRecordCondition"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from invoice_record
where
<include
refid=
"QueryCondition"
/>
</select>
<select
id=
"selectCountByCondition"
parameterType=
"pwc.taxtech.atms.vat.dpo.InvoiceRecordCondition"
resultType=
"Integer"
>
<select
id=
"selectCountByCondition"
parameterType=
"pwc.taxtech.atms.vat.dpo.InvoiceRecordCondition"
resultType=
"Integer"
>
select
count(*)
from invoice_record
...
...
@@ -135,7 +137,8 @@
<otherwise>
0,
</otherwise>
</choose>
<choose>
<when
test=
"item.customerCompanyTaxNum != null"
>
#{item.customerCompanyTaxNum,jdbcType=VARCHAR},
</when>
<when
test=
"item.customerCompanyTaxNum != null"
>
#{item.customerCompanyTaxNum,jdbcType=VARCHAR},
</when>
<otherwise>
'',
</otherwise>
</choose>
<choose>
...
...
@@ -167,7 +170,8 @@
<otherwise>
CURRENT_TIMESTAMP,
</otherwise>
</choose>
</trim>
</foreach>
;
</foreach>
;
SELECT 1 FROM DUAL;
</insert>
...
...
@@ -210,7 +214,8 @@
and bd.invoice_num like concat('%',#{billNumber},'%')
</if>
<if
test=
"revenueCofId != null"
>
and if(bd.modify_revenue_cof_id is null,bd.revenue_cof_id = #{revenueCofId},bd.modify_revenue_cof_id = #{revenueCofId})
and if(bd.modify_revenue_cof_id is null,bd.revenue_cof_id = #{revenueCofId},bd.modify_revenue_cof_id =
#{revenueCofId})
</if>
<if
test=
"billContent != null and billContent != ''"
>
and bd.billing_content like concat('%',#{billContent},'%')
...
...
@@ -238,4 +243,18 @@
group by invoice_type;
</select>
<update
id=
"clearRevenueCof"
>
update invoice_record
<set>
<if
test=
"clearRevenue"
>
revenue_cof_id = null,
</if>
<if
test=
"clearModifyRevenue"
>
modify_revenue_cof_id = null,
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
</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