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
f9227c49
Commit
f9227c49
authored
Jul 17, 2018
by
frank.xa.zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add code for jxfpmx, need debug later
parent
5ace3d48
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
173 additions
and
53 deletions
+173
-53
SpringContextUtil.java
.../java/pwc/taxtech/atms/common/util/SpringContextUtil.java
+3
-2
FormulaDataSourceDetailType.java
...tech/atms/constant/enums/FormulaDataSourceDetailType.java
+10
-5
InputInvoiceDetailDataSourceDto.java
...tech/atms/dto/vatdto/InputInvoiceDetailDataSourceDto.java
+24
-0
InputVATInvoiceResultDto.java
...pwc/taxtech/atms/dto/vatdto/InputVATInvoiceResultDto.java
+16
-0
PermissionServiceImpl.java
.../pwc/taxtech/atms/service/impl/PermissionServiceImpl.java
+4
-4
InputVATInvoiceMapper.java
.../java/pwc/taxtech/atms/vat/dao/InputVATInvoiceMapper.java
+5
-0
VoucherServiceImpl.java
...pwc/taxtech/atms/vat/service/impl/VoucherServiceImpl.java
+1
-1
FunctionBase.java
.../atms/vat/service/impl/report/functions/FunctionBase.java
+2
-1
JXFP.java
.../taxtech/atms/vat/service/impl/report/functions/JXFP.java
+1
-1
JXFPMX.java
...axtech/atms/vat/service/impl/report/functions/JXFPMX.java
+67
-0
XXFP.java
.../taxtech/atms/vat/service/impl/report/functions/XXFP.java
+1
-1
InputVATInvoiceMapper.xml
...ources/pwc/taxtech/atms/vat/dao/InputVATInvoiceMapper.xml
+0
-0
OutputVATInvoiceMapper.xml
...urces/pwc/taxtech/atms/vat/dao/OutputVATInvoiceMapper.xml
+39
-38
No files found.
atms-api/src/main/java/pwc/taxtech/atms/common/util/SpringContextUtil.java
View file @
f9227c49
...
...
@@ -39,7 +39,7 @@ public class SpringContextUtil implements ApplicationContextAware {
public
static
OutputVATInvoiceMapper
outputVATInvoiceMapper
;
public
static
PeriodTaxRuleSettingMapper
periodTaxRuleSettingMapper
;
public
static
InputVatInvoiceDao
inputVatInvoiceDao
;
public
static
InputVATInvoiceMapper
inputVATInvoiceMapper
;
/**
* 获取bean
...
...
@@ -68,7 +68,7 @@ public class SpringContextUtil implements ApplicationContextAware {
projectDao
=
webApplicationContext
.
getBean
(
ProjectDao
.
class
);
balanceMapper
=
webApplicationContext
.
getBean
(
BalanceMapper
.
class
);
dataSourceMapper
=
webApplicationContext
.
getBean
(
DataSourceMapper
.
class
);
dataSourceDetailMapper
=
webApplicationContext
.
getBean
(
DataSourceDetailMapper
.
class
);
dataSourceDetailMapper
=
webApplicationContext
.
getBean
(
DataSourceDetailMapper
.
class
);
periodFormulaBlockMapper
=
webApplicationContext
.
getBean
(
PeriodFormulaBlockMapper
.
class
);
vatEnterpriseAccountDao
=
webApplicationContext
.
getBean
(
VatEnterpriseAccountDao
.
class
);
vatEnterpriseAccountMapper
=
webApplicationContext
.
getBean
(
VatEnterpriseAccountMapper
.
class
);
...
...
@@ -76,5 +76,6 @@ public class SpringContextUtil implements ApplicationContextAware {
outputVATInvoiceMapper
=
webApplicationContext
.
getBean
(
OutputVATInvoiceMapper
.
class
);
periodTaxRuleSettingMapper
=
webApplicationContext
.
getBean
(
PeriodTaxRuleSettingMapper
.
class
);
inputVatInvoiceDao
=
webApplicationContext
.
getBean
(
InputVatInvoiceDao
.
class
);
inputVATInvoiceMapper
=
webApplicationContext
.
getBean
(
InputVATInvoiceMapper
.
class
);
}
}
atms-api/src/main/java/pwc/taxtech/atms/constant/enums/FormulaDataSourceDetailType.java
View file @
f9227c49
...
...
@@ -4,19 +4,24 @@ public enum FormulaDataSourceDetailType {
BSPLFormulaDataSourceDto
(
1
,
pwc
.
taxtech
.
atms
.
dto
.
vatdto
.
BSPLFormulaDataSourceDto
.
class
),
FormulaDataSourceDto
(
2
,
pwc
.
taxtech
.
atms
.
dto
.
vatdto
.
FormulaDataSourceDto
.
class
),
InputInvoiceDataSourceDto
(
3
,
pwc
.
taxtech
.
atms
.
dto
.
vatdto
.
FormulaDataSourceDto
.
class
),
OutputInvoiceDataSourceDto
(
4
,
pwc
.
taxtech
.
atms
.
dto
.
vatdto
.
OutputInvoiceDataSourceDto
.
class
);
InputInvoiceDataSourceDto
(
3
,
pwc
.
taxtech
.
atms
.
dto
.
vatdto
.
InputInvoiceDataSourceDto
.
class
),
InputInvoiceDetailDataSourceDto
(
4
,
pwc
.
taxtech
.
atms
.
dto
.
vatdto
.
InputInvoiceDetailDataSourceDto
.
class
),
OutputInvoiceDataSourceDto
(
5
,
pwc
.
taxtech
.
atms
.
dto
.
vatdto
.
OutputInvoiceDataSourceDto
.
class
);
private
Integer
code
;
private
Class
clas
;
FormulaDataSourceDetailType
(
Integer
code
,
Class
clas
)
{
this
.
code
=
code
;
this
.
clas
=
clas
;
FormulaDataSourceDetailType
(
Integer
code
,
Class
clas
)
{
this
.
code
=
code
;
this
.
clas
=
clas
;
}
public
Integer
getCode
()
{
return
code
;
}
public
Class
getClas
(){
return
clas
;}
public
Class
getClas
()
{
return
clas
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/dto/vatdto/InputInvoiceDetailDataSourceDto.java
0 → 100644
View file @
f9227c49
package
pwc
.
taxtech
.
atms
.
dto
.
vatdto
;
import
lombok.Getter
;
import
lombok.Setter
;
import
pwc.taxtech.atms.constant.enums.FormulaDataSourceType
;
import
java.math.BigDecimal
;
import
java.util.Date
;
@Setter
@Getter
public
class
InputInvoiceDetailDataSourceDto
extends
FormulaDataSourceDto
{
public
InputInvoiceDetailDataSourceDto
()
{
super
();
this
.
setType
(
FormulaDataSourceType
.
InputInvoiceDetail
.
getCode
());
}
public
int
Period
;
public
Date
InvoiceDate
;
public
String
InvoiceCode
;
public
String
InvoiceNumber
;
public
BigDecimal
TaxAmount
;
public
BigDecimal
TaxRate
;
public
String
ProductionName
;
}
atms-api/src/main/java/pwc/taxtech/atms/dto/vatdto/InputVATInvoiceResultDto.java
0 → 100644
View file @
f9227c49
package
pwc
.
taxtech
.
atms
.
dto
.
vatdto
;
import
lombok.Getter
;
import
lombok.Setter
;
import
pwc.taxtech.atms.vat.entity.GoodsMapping
;
import
pwc.taxtech.atms.vat.entity.InputVATInvoice
;
import
pwc.taxtech.atms.vat.entity.InputVATInvoiceItem
;
@Setter
@Getter
public
class
InputVATInvoiceResultDto
{
private
String
invoiceID
;
private
InputVATInvoice
inputVATInvoice
;
private
InputVATInvoiceItem
inputVATInvoiceItem
;
private
GoodsMapping
goodsMapping
;
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/PermissionServiceImpl.java
View file @
f9227c49
...
...
@@ -197,7 +197,7 @@ public class PermissionServiceImpl extends AbstractService implements Permission
.
filter
(
rPermissionDto
->
currentNode
.
getId
().
equals
(
rPermissionDto
.
getParentID
())).
collect
(
Collectors
.
toList
());
if
(
subRolePermissionDtoList
!=
null
&&
!
subRolePermissionDtoList
.
isEmpty
())
{
currentNode
.
setExpanded
(
true
);
currentNode
.
setItems
(
new
ArrayList
());
currentNode
.
setItems
(
new
ArrayList
<>
());
for
(
RolePermissionDto
rolePermissionDto
:
subRolePermissionDtoList
)
{
DevTreeDto
subNode
=
new
DevTreeDto
();
subNode
.
setId
(
rolePermissionDto
.
getPermissionID
());
...
...
@@ -210,7 +210,7 @@ public class PermissionServiceImpl extends AbstractService implements Permission
}
else
{
currentNode
.
setExpanded
(
false
);
currentNode
.
setItems
(
new
ArrayList
());
currentNode
.
setItems
(
new
ArrayList
<>
());
}
}
...
...
@@ -221,7 +221,7 @@ public class PermissionServiceImpl extends AbstractService implements Permission
.
filter
(
permission
->
currentNode
.
getId
().
equals
(
permission
.
getParentID
())).
collect
(
Collectors
.
toList
());
if
(
subPermissionList
!=
null
&&
!
subPermissionList
.
isEmpty
())
{
currentNode
.
setExpanded
(
true
);
currentNode
.
setItems
(
new
ArrayList
());
currentNode
.
setItems
(
new
ArrayList
<>
());
for
(
Permission
permission
:
subPermissionList
)
{
DevTreeDto
subNode
=
new
DevTreeDto
();
subNode
.
setId
(
permission
.
getID
());
...
...
@@ -235,7 +235,7 @@ public class PermissionServiceImpl extends AbstractService implements Permission
}
else
{
currentNode
.
setExpanded
(
false
);
currentNode
.
setItems
(
new
ArrayList
());
currentNode
.
setItems
(
new
ArrayList
<>
());
}
}
}
atms-api/src/main/java/pwc/taxtech/atms/vat/dao/InputVATInvoiceMapper.java
View file @
f9227c49
...
...
@@ -6,6 +6,8 @@ import org.apache.ibatis.annotations.Param;
import
org.apache.ibatis.session.RowBounds
;
import
pwc.taxtech.atms.MyVatMapper
;
import
pwc.taxtech.atms.dto.vatdto.InputInvoicePreviewQueryParam
;
import
pwc.taxtech.atms.dto.vatdto.InputVATInvoiceDto
;
import
pwc.taxtech.atms.dto.vatdto.InputVATInvoiceResultDto
;
import
pwc.taxtech.atms.vat.entity.InputVATInvoice
;
import
pwc.taxtech.atms.vat.entity.InputVATInvoiceExample
;
...
...
@@ -110,4 +112,6 @@ public interface InputVATInvoiceMapper extends MyVatMapper {
long
getInputVATInvoiceCountByCondition
(
@Param
(
"paras"
)
InputInvoicePreviewQueryParam
param
);
List
<
InputVATInvoice
>
getInputVATInvoiceCountByConditionWithPaging
(
@Param
(
"paras"
)
InputInvoicePreviewQueryParam
param
,
@Param
(
"limitFrom"
)
int
limitFrom
);
List
<
InputVATInvoiceResultDto
>
getInputVATInvoiceResultDto
(
String
dbName
);
}
\ No newline at end of file
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/VoucherServiceImpl.java
View file @
f9227c49
...
...
@@ -263,7 +263,7 @@ public class VoucherServiceImpl extends VatAbstractService implements VoucherSer
"`VID`"
;
}
List
<
Map
<
String
,
Object
>>
queryForList
=
jdbcTemplate
.
queryForList
(
sql
);
List
<
VoucherDto
>
voucherDtos
=
new
ArrayList
();
List
<
VoucherDto
>
voucherDtos
=
new
ArrayList
<>
();
queryForList
.
forEach
(
a
->
{
VoucherDto
dto
=
new
VoucherDto
();
dto
.
setVoucherID
(
a
.
get
(
"VoucherID"
).
toString
());
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/FunctionBase.java
View file @
f9227c49
...
...
@@ -20,7 +20,8 @@ import java.util.List;
public
class
FunctionBase
{
protected
final
Logger
logger
=
LoggerFactory
.
getLogger
(
this
.
getClass
());
public
static
final
BigDecimal
[]
defaultTaxRates
=
{
new
BigDecimal
(
"0.17"
),
new
BigDecimal
(
"0.13"
)
,
new
BigDecimal
(
"0.11"
),
new
BigDecimal
(
"0.06"
),
new
BigDecimal
(
" 0.05"
),
new
BigDecimal
(
"0.03"
)};
protected
FormulaContext
formulaContext
;
final
FormulaAgent
agent
;
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/JXFP.java
View file @
f9227c49
...
...
@@ -121,7 +121,7 @@ public class JXFP extends FunctionBase implements FreeRefFunction {
}
}
List
<
InputInvoiceDataSourceDto
>
dataSource
=
new
ArrayList
();
List
<
InputInvoiceDataSourceDto
>
dataSource
=
new
ArrayList
<>
();
for
(
InputVATInvoice
x
:
inputVATInvoices
)
{
InputInvoiceDataSourceDto
inputInvoiceDataSourceDto
=
new
InputInvoiceDataSourceDto
();
inputInvoiceDataSourceDto
.
setAmount
(
FormulaHelper
.
roundValue
(
x
.
getAmount
(),
KeyValueConfigResultType
.
Accounting
,
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/JXFPMX.java
View file @
f9227c49
...
...
@@ -5,9 +5,17 @@ import org.apache.poi.ss.formula.OperationEvaluationContext;
import
org.apache.poi.ss.formula.eval.NumberEval
;
import
org.apache.poi.ss.formula.eval.ValueEval
;
import
org.apache.poi.ss.formula.functions.FreeRefFunction
;
import
pwc.taxtech.atms.common.util.SpringContextUtil
;
import
pwc.taxtech.atms.constant.Constant
;
import
pwc.taxtech.atms.constant.enums.EnumOperationType
;
import
pwc.taxtech.atms.constant.enums.FormulaDataSourceDetailType
;
import
pwc.taxtech.atms.constant.enums.KeyValueConfigResultType
;
import
pwc.taxtech.atms.dto.vatdto.InputInvoiceDetailDataSourceDto
;
import
pwc.taxtech.atms.dto.vatdto.InputVATInvoiceResultDto
;
import
java.math.BigDecimal
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/// <summary>
...
...
@@ -64,8 +72,67 @@ public class JXFPMX extends FunctionBase implements FreeRefFunction {
taxRateVal
=
taxRateVal
.
divide
(
new
BigDecimal
(
"100"
),
2
,
BigDecimal
.
ROUND_HALF_UP
);
}
String
dbName
=
SpringContextUtil
.
projectDao
.
getDbNameWithYearAndOrgID
(
formulaContext
.
getOrganizationID
(),
curYear
);
List
<
InputVATInvoiceResultDto
>
inputInvoice
=
SpringContextUtil
.
inputVATInvoiceMapper
.
getInputVATInvoiceResultDto
(
dbName
);
if
(!
goodsName
.
equals
(
"99"
))
{
inputInvoice
=
inputInvoice
.
stream
()
.
filter
(
a
->
a
.
getGoodsMapping
()
!=
null
&&
a
.
getGoodsMapping
().
getStdGoodsName
().
equals
(
goodsName
))
.
collect
(
Collectors
.
toList
());
}
if
(
taxRateVal
.
compareTo
(
new
BigDecimal
(
"-1"
))
==
0
)
{
inputInvoice
=
inputInvoice
.
stream
()
.
filter
(
a
->
Arrays
.
asList
(
FunctionBase
.
defaultTaxRates
).
contains
(
a
.
getInputVATInvoiceItem
().
getTaxRate
()))
.
collect
(
Collectors
.
toList
());
}
else
if
(
taxRateVal
.
compareTo
(
new
BigDecimal
(
"99"
))
!=
0
)
{
BigDecimal
finalTaxRateVal
=
taxRateVal
;
inputInvoice
=
inputInvoice
.
stream
()
.
filter
(
a
->
a
.
getInputVATInvoiceItem
().
getTaxRate
().
equals
(
finalTaxRateVal
))
.
collect
(
Collectors
.
toList
());
}
if
(
period
!=
99
)
{
int
finalPeriod
=
period
;
inputInvoice
=
inputInvoice
.
stream
()
.
filter
(
a
->
a
.
getInputVATInvoice
().
getPeriodID
()
==
finalPeriod
)
.
collect
(
Collectors
.
toList
());
}
List
<
InputInvoiceDetailDataSourceDto
>
dataSouce
=
new
ArrayList
<>();
for
(
InputVATInvoiceResultDto
x
:
inputInvoice
)
{
InputInvoiceDetailDataSourceDto
inputInvoiceDetailDataSourceDto
=
new
InputInvoiceDetailDataSourceDto
();
inputInvoiceDetailDataSourceDto
.
setAmount
(
FormulaHelper
.
roundValue
(
x
.
getInputVATInvoiceItem
().
getAmount
(),
KeyValueConfigResultType
.
Accounting
,
null
,
formulaContext
));
inputInvoiceDetailDataSourceDto
.
setResultType
(
KeyValueConfigResultType
.
Accounting
.
getCode
());
inputInvoiceDetailDataSourceDto
.
setTaxAmount
(
FormulaHelper
.
roundValue
(
x
.
getInputVATInvoiceItem
().
getTaxAmount
(),
KeyValueConfigResultType
.
Accounting
,
null
,
formulaContext
));
inputInvoiceDetailDataSourceDto
.
setTaxRate
(
x
.
getInputVATInvoiceItem
().
getTaxRate
());
inputInvoiceDetailDataSourceDto
.
setInvoiceNumber
(
x
.
getInputVATInvoice
().
getInvoiceNumber
());
inputInvoiceDetailDataSourceDto
.
setInvoiceDate
(
x
.
getInputVATInvoice
().
getInvoiceDate
());
inputInvoiceDetailDataSourceDto
.
setInvoiceCode
(
x
.
getInputVATInvoice
().
getInvoiceCode
());
inputInvoiceDetailDataSourceDto
.
setPeriod
(
x
.
getInputVATInvoice
().
getPeriodID
());
inputInvoiceDetailDataSourceDto
.
setProductionName
(
x
.
getInputVATInvoiceItem
().
getProductionName
());
inputInvoiceDetailDataSourceDto
.
setName
(
Constant
.
DataSourceName
.
InputDetailInvoiceDataSource
);
inputInvoiceDetailDataSourceDto
.
setOperationType
(
EnumOperationType
.
Single
.
getCode
());
dataSouce
.
add
(
inputInvoiceDetailDataSourceDto
);
}
dataSouce
=
dataSouce
.
stream
()
.
sorted
(
Comparator
.
comparing
(
InputInvoiceDetailDataSourceDto:
:
getInvoiceDate
)
.
thenComparing
(
InputInvoiceDetailDataSourceDto:
:
getInvoiceCode
)
.
thenComparing
(
InputInvoiceDetailDataSourceDto:
:
getInvoiceNumber
))
.
collect
(
Collectors
.
toList
());
if
(
amountType
==
0
)
{
double
val
=
dataSouce
.
stream
().
mapToDouble
(
a
->
a
.
getAmount
().
doubleValue
()).
sum
();
Long
dataSourceId
=
saveDataSource
(
ec
,
Collections
.
singletonList
(
dataSouce
),
FormulaDataSourceDetailType
.
InputInvoiceDetailDataSourceDto
,
new
BigDecimal
(
val
));
saveFormulaBlock
(
period
,
ec
,
formulaExpression
,
new
BigDecimal
(
val
),
dataSourceId
);
return
new
NumberEval
(
val
);
}
else
if
(
amountType
==
1
)
{
double
val
=
dataSouce
.
stream
().
mapToDouble
(
a
->
a
.
getTaxAmount
().
doubleValue
()).
sum
();
Long
dataSourceId
=
saveDataSource
(
ec
,
Collections
.
singletonList
(
dataSouce
),
FormulaDataSourceDetailType
.
InputInvoiceDetailDataSourceDto
,
new
BigDecimal
(
val
));
saveFormulaBlock
(
period
,
ec
,
formulaExpression
,
new
BigDecimal
(
val
),
dataSourceId
);
return
new
NumberEval
(
val
);
}
return
NumberEval
.
ZERO
;
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/XXFP.java
View file @
f9227c49
...
...
@@ -91,7 +91,7 @@ public class XXFP extends FunctionBase implements FreeRefFunction {
outputInvoice
=
outputInvoice
.
stream
().
filter
(
a
->
a
.
getInvoice
().
getPeriodID
().
equals
(
finalPeriod
)).
collect
(
Collectors
.
toList
());
}
List
<
OutputInvoiceDataSourceDto
>
dataSource
=
new
ArrayList
();
List
<
OutputInvoiceDataSourceDto
>
dataSource
=
new
ArrayList
<>
();
for
(
OutputVATInvoiceDto
x
:
outputInvoice
)
{
OutputInvoiceDataSourceDto
outputInvoiceDataSourceDto
=
new
OutputInvoiceDataSourceDto
();
outputInvoiceDataSourceDto
.
setAmount
(
FormulaHelper
.
roundValue
(
x
.
getInvoiceItem
().
getAmount
(),
...
...
atms-api/src/main/resources/pwc/taxtech/atms/vat/dao/InputVATInvoiceMapper.xml
View file @
f9227c49
This diff is collapsed.
Click to expand it.
atms-api/src/main/resources/pwc/taxtech/atms/vat/dao/OutputVATInvoiceMapper.xml
View file @
f9227c49
...
...
@@ -571,43 +571,43 @@
</association>
</resultMap>
<select
id=
"getVatInvoiceWithItems"
resultMap=
"outputVATInvoiceDto"
parameterType=
"java.lang.String"
>
SELECT
invoice.InvoiceID,
invoice.InvoiceType,
invoice.ClassCode,
invoice.InvoiceNumber,
invoice.BuyerName,
invoice.BuyerTaxNumber,
invoice.BankAccount,
invoice.PhoneNum,
invoice.InvoiceDate,
invoice.SeqNo,
invoice.PeriodID,
invoice.`STATUS`,
invoice.CreatorID,
invoice.CreateTime,
invoice.PartAccntedPeriod,
invoice.AccntedPeriod,
invoiceItem.ItemID,
invoiceItem.InvoiceID,
invoiceItem.CodeVersion,
invoiceItem.ProductName,
invoiceItem.DocumentNum,
invoiceItem.ProductStandard,
invoiceItem.Unit,
invoiceItem.Quantity,
invoiceItem.UnitPrice,
invoiceItem.Amount,
invoiceItem.TaxRate,
invoiceItem.TaxAmount,
invoiceItem.SeqNo,
invoiceItem.TaxClassCode,
invoiceItem.CreatorID,
invoiceItem.CreateTime,
invoiceItem.PeriodID
FROM ${dbName}.OutputVATInvoice invoice
JOIN ${dbName}.OutputVATInvoiceItem invoiceItem
ON invoice.InvoiceID = invoiceItem.Invoice
ID
ORDER BY invoice.PeriodID,invoice.ClassCode,invoice.InvoiceNumber,invoiceItem.SeqNo
SELECT
invoice.InvoiceID,
invoice.InvoiceType,
invoice.ClassCode,
invoice.InvoiceNumber,
invoice.BuyerName,
invoice.BuyerTaxNumber,
invoice.BankAccount,
invoice.PhoneNum,
invoice.InvoiceDate,
invoice.SeqNo,
invoice.PeriodID,
invoice.`STATUS`,
invoice.CreatorID,
invoice.CreateTime,
invoice.PartAccntedPeriod,
invoice.AccntedPeriod,
invoiceItem.ItemID,
invoiceItem.InvoiceID,
invoiceItem.CodeVersion,
invoiceItem.ProductName,
invoiceItem.DocumentNum,
invoiceItem.ProductStandard,
invoiceItem.Unit,
invoiceItem.Quantity,
invoiceItem.UnitPrice,
invoiceItem.Amount,
invoiceItem.TaxRate,
invoiceItem.TaxAmount,
invoiceItem.SeqNo,
invoiceItem.TaxClassCode,
invoiceItem.CreatorID,
invoiceItem.CreateTime,
invoiceItem.PeriodID
FROM ${dbName}.OutputVATInvoice invoice
JOIN ${dbName}.OutputVATInvoiceItem invoiceItem
ON invoice.InvoiceID = invoiceItem.InvoiceID AND invoice.PeriodID=invoiceItem.Period
ID
ORDER BY invoice.PeriodID,invoice.ClassCode,invoice.InvoiceNumber,invoiceItem.SeqNo
</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