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
56492875
Commit
56492875
authored
Jun 25, 2018
by
neo.wang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_neo' into 'dev'
Dev neo See merge request root/atms!39
parents
ba172580
068a0753
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
96 additions
and
259 deletions
+96
-259
CustomsInvoiceController.java
...pwc/taxtech/atms/controller/CustomsInvoiceController.java
+12
-5
InputInvoiceImportController.java
...taxtech/atms/controller/InputInvoiceImportController.java
+24
-10
JournalEntryImportController.java
...taxtech/atms/controller/JournalEntryImportController.java
+4
-4
InputVATInvoiceItemDto.java
...a/pwc/taxtech/atms/dto/vatdto/InputVATInvoiceItemDto.java
+0
-4
ValidationInfoDto.java
...n/java/pwc/taxtech/atms/dto/vatdto/ValidationInfoDto.java
+0
-115
CustomsInvoiceService.java
...a/pwc/taxtech/atms/vat/service/CustomsInvoiceService.java
+0
-18
InputInvoiceDataImportService.java
...xtech/atms/vat/service/InputInvoiceDataImportService.java
+0
-16
JournalEntryImportService.java
...c/taxtech/atms/vat/service/JournalEntryImportService.java
+0
-14
CustomsInvoiceServiceImpl.java
...tech/atms/vat/service/impl/CustomsInvoiceServiceImpl.java
+36
-9
FinanceDataImportServiceImpl.java
...h/atms/vat/service/impl/FinanceDataImportServiceImpl.java
+4
-22
InputInvoiceDataImportServiceImpl.java
...s/vat/service/impl/InputInvoiceDataImportServiceImpl.java
+13
-21
JournalEntryImportServiceImpl.java
.../atms/vat/service/impl/JournalEntryImportServiceImpl.java
+3
-21
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/CustomsInvoiceController.java
View file @
56492875
...
...
@@ -16,24 +16,26 @@ import pwc.taxtech.atms.dto.PagingDto;
import
pwc.taxtech.atms.dto.PagingResultDto
;
import
pwc.taxtech.atms.dto.vatdto.CustomsInvoiceDto
;
import
pwc.taxtech.atms.dto.vatdto.CustomsInvoiceFilter
;
import
pwc.taxtech.atms.dto.vatdto.JsonCustomsInvoice
;
import
pwc.taxtech.atms.dto.vatdto.JsonCustomsInvoiceDto
;
import
pwc.taxtech.atms.exception.ApplicationException
;
import
pwc.taxtech.atms.thirdparty.ExcelUtil
;
import
pwc.taxtech.atms.vat.service.
CustomsInvoiceService
;
import
pwc.taxtech.atms.vat.service.
impl.CustomsInvoiceServiceImpl
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.OutputStream
;
import
java.text.DateFormat
;
import
java.util.*
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.UUID
;
import
java.util.stream.Collectors
;
@RestController
@RequestMapping
(
value
=
"api/v1/CustomsInvoice"
)
public
class
CustomsInvoiceController
{
@Autowired
CustomsInvoiceService
customsInvoiceService
;
CustomsInvoiceService
Impl
customsInvoiceService
;
@RequestMapping
(
value
=
"GetCustomsInvoiceDataForDisplay"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
String
getCustomsInvoiceDataForDisplay
(
@RequestParam
int
fromPeriod
,
@RequestParam
int
toPeriod
,
@RequestParam
String
criteria
,
@RequestParam
String
pagination
)
{
...
...
@@ -58,6 +60,11 @@ public class CustomsInvoiceController {
return
ResponseEntity
.
ok
().
body
(
customsInvoiceService
.
getCustomsInvoicesByPeriodId
(
periodId
));
}
@RequestMapping
(
value
=
"getCustomsInvoicesValidates/{periodId}"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
ResponseEntity
getCustomsInvoicesValidates
(
@PathVariable
Integer
periodId
)
{
return
ResponseEntity
.
ok
().
body
(
customsInvoiceService
.
getCustomsInvoicesValidates
(
periodId
));
}
@RequestMapping
(
value
=
"ExportQueryData/get"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
void
exportQueryData
(
@RequestParam
String
criteria
,
HttpServletResponse
response
)
{
CustomsInvoiceFilter
filter
=
new
CustomsInvoiceFilter
();
...
...
atms-api/src/main/java/pwc/taxtech/atms/controller/InputInvoiceImportController.java
View file @
56492875
...
...
@@ -4,23 +4,35 @@ import org.apache.http.HttpStatus;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
pwc.taxtech.atms.dto.PagingResultDto
;
import
pwc.taxtech.atms.dto.vatdto.*
;
import
pwc.taxtech.atms.dto.vatdto.InputInvoicePreviewQueryParam
;
import
pwc.taxtech.atms.dto.vatdto.InputVATInvoiceBaseDto
;
import
pwc.taxtech.atms.dto.vatdto.InputVATInvoiceDto
;
import
pwc.taxtech.atms.thirdparty.ExcelSheet
;
import
pwc.taxtech.atms.thirdparty.ExcelUtil
;
import
pwc.taxtech.atms.vat.service.InputInvoiceDataImportService
;
import
pwc.taxtech.atms.vat.entity.InputVATInvoiceItem
;
import
pwc.taxtech.atms.vat.service.impl.InputInvoiceDataImportServiceImpl
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.OutputStream
;
import
java.util.*
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.UUID
;
@RestController
@RequestMapping
(
value
=
"api/v1/inputInvoiceImport"
)
public
class
InputInvoiceImportController
{
@Autowired
InputInvoiceDataImportService
inputInvoiceDataImportService
;
InputInvoiceDataImportService
Impl
inputInvoiceDataImportService
;
@RequestMapping
(
value
=
"inputInvoicePreviewList"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
@ResponseBody
...
...
@@ -55,6 +67,11 @@ public class InputInvoiceImportController {
return
ResponseEntity
.
ok
().
body
(
inputInvoiceDataImportService
.
getInputInvoiceList
(
period
));
}
@RequestMapping
(
value
=
"getInputInvoiceItemList/{period}"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
ResponseEntity
getInputInvoiceItemList
(
@PathVariable
Integer
period
)
{
return
ResponseEntity
.
ok
().
body
(
inputInvoiceDataImportService
.
getInputInvoiceItemList
(
period
));
}
private
int
getDownloadFilePath
(
InputInvoicePreviewQueryParam
paras
,
OutputStream
outputStream
)
{
List
<
InputVATInvoiceDto
>
list
=
inputInvoiceDataImportService
.
getInputInvoiceTreeViewData
(
paras
).
getList
();
if
(
list
.
size
()
==
0
)
{
...
...
@@ -90,12 +107,9 @@ public class InputInvoiceImportController {
excelSheetB
.
setHeaders
(
header2
);
excelSheetB
.
setSheetName
(
"sheetB"
);
List
<
InputVATInvoiceItem
Dto
>
inputInvoiceItemList
=
new
ArrayList
<>();
List
<
InputVATInvoiceItem
>
inputInvoiceItemList
=
new
ArrayList
<>();
for
(
InputVATInvoiceDto
item
:
list
)
{
List
<
InputVATInvoiceItemDto
>
tempResult
=
inputInvoiceDataImportService
.
getInputInvoiceItemTreeViewData
(
item
.
getID
());
for
(
InputVATInvoiceItemDto
r
:
tempResult
)
{
inputInvoiceItemList
.
add
(
r
);
}
inputInvoiceItemList
.
addAll
(
inputInvoiceDataImportService
.
getInputInvoiceItemTreeViewData
(
item
.
getID
()));
}
excelSheetB
.
setDataset
(
inputInvoiceItemList
);
List
<
ExcelSheet
<
InputVATInvoiceBaseDto
>>
sheets
=
new
ArrayList
<>();
...
...
atms-api/src/main/java/pwc/taxtech/atms/controller/JournalEntryImportController.java
View file @
56492875
...
...
@@ -9,25 +9,25 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
pwc.taxtech.atms.dto.vatdto.QueryJeDto
;
import
pwc.taxtech.atms.vat.service.
JournalEntryImportService
;
import
pwc.taxtech.atms.vat.service.
impl.JournalEntryImportServiceImpl
;
@RestController
@RequestMapping
(
value
=
"/api/v1/journalEntryImport"
)
public
class
JournalEntryImportController
{
@Autowired
private
JournalEntryImportService
journalEntryDataImportService
;
private
JournalEntryImportService
Impl
journalEntryDataImportService
;
@ApiOperation
(
value
=
"queryJournalEntryData"
,
notes
=
""
)
@RequestMapping
(
value
=
"/queryJournalEntryData"
,
method
=
RequestMethod
.
POST
)
public
ResponseEntity
queryJournalEntryData
(
@RequestBody
QueryJeDto
queryJeDto
)
{
return
ResponseEntity
.
ok
(
journalEntryDataImportService
.
qeryJournalEntryData
(
queryJeDto
));
return
ResponseEntity
.
ok
(
journalEntryDataImportService
.
qeryJournalEntryData
(
queryJeDto
));
}
@ApiOperation
(
value
=
"getValidationInfo"
,
notes
=
""
)
@RequestMapping
(
value
=
"getValidationInfo/{type}/{period}"
,
method
=
RequestMethod
.
GET
)
public
ResponseEntity
getValidationInfo
(
@PathVariable
Integer
type
,
@PathVariable
Integer
period
)
{
return
ResponseEntity
.
ok
(
journalEntryDataImportService
.
getValidationInfoList
(
type
,
period
));
return
ResponseEntity
.
ok
(
journalEntryDataImportService
.
getValidationInfoList
(
type
,
period
));
}
}
atms-api/src/main/java/pwc/taxtech/atms/dto/vatdto/InputVATInvoiceItemDto.java
deleted
100644 → 0
View file @
ba172580
package
pwc
.
taxtech
.
atms
.
dto
.
vatdto
;
public
class
InputVATInvoiceItemDto
extends
InputVATInvoiceBaseDto
{
}
atms-api/src/main/java/pwc/taxtech/atms/dto/vatdto/ValidationInfoDto.java
deleted
100644 → 0
View file @
ba172580
package
pwc
.
taxtech
.
atms
.
dto
.
vatdto
;
import
java.util.Date
;
public
class
ValidationInfoDto
{
private
String
ID
;
private
Integer
importTypeId
;
private
String
validationResult
;
private
String
validationDetails
;
private
String
validationTips
;
private
Integer
number
;
private
String
creatorId
;
private
Date
createTime
;
private
Integer
periodId
;
private
Integer
erpCheckTypeId
;
private
Integer
errorLevel
;
public
String
getID
()
{
return
ID
;
}
public
void
setID
(
String
ID
)
{
this
.
ID
=
ID
;
}
public
Integer
getImportTypeId
()
{
return
importTypeId
;
}
public
void
setImportTypeId
(
Integer
importTypeId
)
{
this
.
importTypeId
=
importTypeId
;
}
public
String
getValidationResult
()
{
return
validationResult
;
}
public
void
setValidationResult
(
String
validationResult
)
{
this
.
validationResult
=
validationResult
;
}
public
String
getValidationDetails
()
{
return
validationDetails
;
}
public
void
setValidationDetails
(
String
validationDetails
)
{
this
.
validationDetails
=
validationDetails
;
}
public
String
getValidationTips
()
{
return
validationTips
;
}
public
void
setValidationTips
(
String
validationTips
)
{
this
.
validationTips
=
validationTips
;
}
public
Integer
getNumber
()
{
return
number
;
}
public
void
setNumber
(
Integer
number
)
{
this
.
number
=
number
;
}
public
String
getCreatorId
()
{
return
creatorId
;
}
public
void
setCreatorId
(
String
creatorId
)
{
this
.
creatorId
=
creatorId
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Integer
getPeriodId
()
{
return
periodId
;
}
public
void
setPeriodId
(
Integer
periodId
)
{
this
.
periodId
=
periodId
;
}
public
Integer
getErpCheckTypeId
()
{
return
erpCheckTypeId
;
}
public
void
setErpCheckTypeId
(
Integer
erpCheckTypeId
)
{
this
.
erpCheckTypeId
=
erpCheckTypeId
;
}
public
Integer
getErrorLevel
()
{
return
errorLevel
;
}
public
void
setErrorLevel
(
Integer
errorLevel
)
{
this
.
errorLevel
=
errorLevel
;
}
public
Integer
getIsShowDetail
()
{
return
isShowDetail
;
}
public
void
setIsShowDetail
(
Integer
isShowDetail
)
{
this
.
isShowDetail
=
isShowDetail
;
}
private
Integer
isShowDetail
;
}
atms-api/src/main/java/pwc/taxtech/atms/vat/service/CustomsInvoiceService.java
deleted
100644 → 0
View file @
ba172580
package
pwc
.
taxtech
.
atms
.
vat
.
service
;
import
org.springframework.http.ResponseEntity
;
import
pwc.taxtech.atms.dto.vatdto.CustomsInvoiceDto
;
import
java.util.List
;
public
interface
CustomsInvoiceService
{
/**
*
* @param fromPeriod
* @param toPeriod
* @return
*/
List
<
CustomsInvoiceDto
>
getCustomsInvoicesByPeriodIds
(
int
fromPeriod
,
int
toPeriod
);
List
<
CustomsInvoiceDto
>
getCustomsInvoicesByPeriodId
(
Integer
periodId
);
}
atms-api/src/main/java/pwc/taxtech/atms/vat/service/InputInvoiceDataImportService.java
deleted
100644 → 0
View file @
ba172580
package
pwc
.
taxtech
.
atms
.
vat
.
service
;
import
pwc.taxtech.atms.dto.PagingResultDto
;
import
pwc.taxtech.atms.dto.vatdto.InputInvoicePreviewQueryParam
;
import
pwc.taxtech.atms.dto.vatdto.InputVATInvoiceDto
;
import
pwc.taxtech.atms.dto.vatdto.InputVATInvoiceItemDto
;
import
java.util.List
;
public
interface
InputInvoiceDataImportService
{
PagingResultDto
<
InputVATInvoiceDto
>
getInputInvoiceTreeViewData
(
InputInvoicePreviewQueryParam
paras
);
List
<
InputVATInvoiceItemDto
>
getInputInvoiceItemTreeViewData
(
String
id
);
List
<
InputVATInvoiceDto
>
getInputInvoiceList
(
Integer
period
);
}
atms-api/src/main/java/pwc/taxtech/atms/vat/service/JournalEntryImportService.java
deleted
100644 → 0
View file @
ba172580
package
pwc
.
taxtech
.
atms
.
vat
.
service
;
import
pwc.taxtech.atms.dto.PagingResultDto
;
import
pwc.taxtech.atms.dto.vatdto.QueryJeDto
;
import
pwc.taxtech.atms.dto.vatdto.ValidationInfoDto
;
import
pwc.taxtech.atms.dto.vatdto.VoucherDto
;
import
java.util.List
;
public
interface
JournalEntryImportService
{
PagingResultDto
<
VoucherDto
>
qeryJournalEntryData
(
QueryJeDto
queryJeDto
);
List
<
ValidationInfoDto
>
getValidationInfoList
(
Integer
type
,
Integer
period
);
}
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/CustomsInvoiceServiceImpl.java
View file @
56492875
package
pwc
.
taxtech
.
atms
.
vat
.
service
.
impl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
pwc.taxtech.atms.common.CommonUtils
;
import
pwc.taxtech.atms.constant.enums.EnumValidationType
;
import
pwc.taxtech.atms.dto.FieldsMapper
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.dto.vatdto.CustomsInvoiceDto
;
import
pwc.taxtech.atms.vat.dao.ValidationInfoMapper
;
import
pwc.taxtech.atms.vat.entity.CustomsInvoice
;
import
pwc.taxtech.atms.vat.entity.CustomsInvoiceExample
;
import
pwc.taxtech.atms.vat.service.CustomsInvoiceService
;
import
pwc.taxtech.atms.vat.entity.ValidationInfo
;
import
pwc.taxtech.atms.vat.entity.ValidationInfoExample
;
import
java.math.BigDecimal
;
import
java.text.DecimalFormat
;
...
...
@@ -15,8 +20,10 @@ import java.util.Comparator;
import
java.util.List
;
@Service
public
class
CustomsInvoiceServiceImpl
extends
VatAbstractService
implements
CustomsInvoiceService
{
@Override
public
class
CustomsInvoiceServiceImpl
extends
VatAbstractService
{
@Autowired
private
ValidationInfoMapper
validationInfoMapper
;
public
List
<
CustomsInvoiceDto
>
getCustomsInvoicesByPeriodIds
(
int
fromPeriod
,
int
toPeriod
)
{
CustomsInvoiceExample
example
=
new
CustomsInvoiceExample
();
example
.
setOrderByClause
(
" PayNum"
);
...
...
@@ -43,24 +50,23 @@ public class CustomsInvoiceServiceImpl extends VatAbstractService implements Cus
return
result
;
}
@Override
public
List
<
CustomsInvoiceDto
>
getCustomsInvoicesByPeriodId
(
Integer
periodId
)
{
CustomsInvoiceExample
example
=
new
CustomsInvoiceExample
();
example
.
createCriteria
().
andPeriodIdEqualTo
(
periodId
);
List
<
CustomsInvoice
>
result
=
customsInvoiceMapper
.
selectByExample
(
example
);
List
<
CustomsInvoice
>
result
=
customsInvoiceMapper
.
selectByExample
(
example
);
result
.
sort
(
Comparator
.
comparing
(
CustomsInvoice:
:
getPayNum
));
int
seqNo
=
1
;
List
<
CustomsInvoiceDto
>
dtos
=
new
ArrayList
<>(
result
.
size
());
for
(
CustomsInvoice
ci:
result
)
{
for
(
CustomsInvoice
ci
:
result
)
{
CustomsInvoiceDto
dto
=
new
CustomsInvoiceDto
();
try
{
FieldsMapper
.
map
(
ci
,
dto
);
FieldsMapper
.
map
(
ci
,
dto
);
dto
.
setSeqNo
(
seqNo
++);
dto
.
setInvoiceAmount
(
ci
.
getInvoiceAmount
().
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
));
dto
.
setInvoiceTaxAmount
(
ci
.
getInvoiceTaxAmount
().
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
));
dto
.
setInvoiceAmount
(
ci
.
getInvoiceAmount
().
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
));
dto
.
setInvoiceTaxAmount
(
ci
.
getInvoiceTaxAmount
().
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
));
}
catch
(
ClassNotFoundException
e
)
{
e
.
printStackTrace
();
}
catch
(
IllegalAccessException
e
)
{
...
...
@@ -71,4 +77,25 @@ public class CustomsInvoiceServiceImpl extends VatAbstractService implements Cus
return
dtos
;
}
public
OperationResultDto
<
List
<
ValidationInfo
>>
getCustomsInvoicesValidates
(
Integer
periodId
)
{
ValidationInfoExample
example
=
new
ValidationInfoExample
();
List
<
ValidationInfo
>
result
=
null
;
if
(
periodId
==
null
)
{
example
.
createCriteria
().
andImportTypeIdEqualTo
(
EnumValidationType
.
CustomInvoice
.
getCode
());
result
=
validationInfoMapper
.
selectByExample
(
example
);
}
else
{
example
.
createCriteria
().
andImportTypeIdEqualTo
(
EnumValidationType
.
CustomInvoice
.
getCode
()).
andPeriodIdEqualTo
(
periodId
);
result
.
addAll
(
validationInfoMapper
.
selectByExample
(
example
));
example
.
createCriteria
().
andImportTypeIdEqualTo
(
EnumValidationType
.
CustomInvoice
.
getCode
()).
andPeriodIdIsNull
();
result
.
addAll
(
validationInfoMapper
.
selectByExample
(
example
));
}
OperationResultDto
<
List
<
ValidationInfo
>>
resultOpt
=
new
OperationResultDto
<>();
resultOpt
.
setResult
(
true
);
resultOpt
.
setResultMsg
(
""
);
resultOpt
.
setData
(
result
);
return
resultOpt
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/FinanceDataImportServiceImpl.java
View file @
56492875
...
...
@@ -9,7 +9,6 @@ import pwc.taxtech.atms.constant.enums.ImageType;
import
pwc.taxtech.atms.dto.FieldsMapper
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.dto.vatdto.DataCheckDto
;
import
pwc.taxtech.atms.dto.vatdto.ValidationInfoDto
;
import
pwc.taxtech.atms.dto.vatdto.VoucherAccountMto
;
import
pwc.taxtech.atms.dto.vatdto.VoucherBalanceDto
;
import
pwc.taxtech.atms.dto.vatdto.VoucherDto
;
...
...
@@ -54,7 +53,7 @@ public class FinanceDataImportServiceImpl implements FinanceDataImportService {
List
<
DataCheckDto
>
results
=
new
ArrayList
<>();
OperationResultDto
<
List
<
DataCheckDto
>>
operationResult
=
new
OperationResultDto
<>();
List
<
ValidationInfo
Dto
>
dtos
=
getValidationData
(
ErpBasicCheck
.
getCode
());
List
<
ValidationInfo
>
dtos
=
getValidationData
(
ErpBasicCheck
.
getCode
());
if
(
dtos
!=
null
&&
dtos
.
size
()
>
0
)
{
dtos
.
forEach
(
b
->
{
DataCheckDto
dataCheckDto
=
new
DataCheckDto
();
...
...
@@ -312,34 +311,17 @@ public class FinanceDataImportServiceImpl implements FinanceDataImportService {
}
//判断ValidationInfo中是否存在typeId的数据
private
List
<
ValidationInfo
Dto
>
getValidationData
(
Integer
typeId
,
Integer
periodId
)
{
private
List
<
ValidationInfo
>
getValidationData
(
Integer
typeId
,
Integer
periodId
)
{
ValidationInfoExample
example
=
new
ValidationInfoExample
();
if
(
periodId
!=
null
&&
periodId
>
0
)
{
example
.
createCriteria
().
andImportTypeIdEqualTo
(
typeId
.
intValue
()).
andPeriodIdEqualTo
(
periodId
.
intValue
());
}
else
example
.
createCriteria
().
andImportTypeIdEqualTo
(
typeId
.
intValue
());
List
<
ValidationInfo
>
infos
=
validationInfoMapper
.
selectByExample
(
example
);
List
<
ValidationInfoDto
>
dots
=
new
ArrayList
<>(
infos
.
size
());
infos
.
forEach
(
m
->
{
ValidationInfoDto
dto
=
new
ValidationInfoDto
();
try
{
FieldsMapper
.
map
(
m
,
dto
);
}
catch
(
ClassNotFoundException
e
)
{
e
.
printStackTrace
();
}
catch
(
IllegalAccessException
e
)
{
e
.
printStackTrace
();
}
dots
.
add
(
dto
);
});
return
dots
;
return
validationInfoMapper
.
selectByExample
(
example
);
}
private
List
<
ValidationInfo
Dto
>
getValidationData
(
Integer
typeId
)
{
private
List
<
ValidationInfo
>
getValidationData
(
Integer
typeId
)
{
return
getValidationData
(
typeId
,
null
);
}
}
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/InputInvoiceDataImportServiceImpl.java
View file @
56492875
...
...
@@ -3,26 +3,21 @@ package pwc.taxtech.atms.vat.service.impl;
import
org.springframework.stereotype.Service
;
import
pwc.taxtech.atms.common.CommonUtils
;
import
pwc.taxtech.atms.dto.FieldsMapper
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.dto.PagingResultDto
;
import
pwc.taxtech.atms.dto.vatdto.InputInvoicePreviewQueryParam
;
import
pwc.taxtech.atms.dto.vatdto.InputVATInvoiceDto
;
import
pwc.taxtech.atms.dto.vatdto.InputVATInvoiceItemDto
;
import
pwc.taxtech.atms.dto.vatdto.QueryOutputDto
;
import
pwc.taxtech.atms.vat.entity.InputVATInvoice
;
import
pwc.taxtech.atms.vat.entity.InputVATInvoiceExample
;
import
pwc.taxtech.atms.vat.entity.InputVATInvoiceItem
;
import
pwc.taxtech.atms.vat.entity.InputVATInvoiceItemExample
;
import
pwc.taxtech.atms.vat.service.InputInvoiceDataImportService
;
import
java.util.ArrayList
;
import
java.util.Comparator
;
import
java.util.List
;
@Service
public
class
InputInvoiceDataImportServiceImpl
extends
VatAbstractService
implements
InputInvoiceDataImportService
{
public
class
InputInvoiceDataImportServiceImpl
extends
VatAbstractService
{
@Override
public
PagingResultDto
<
InputVATInvoiceDto
>
getInputInvoiceTreeViewData
(
InputInvoicePreviewQueryParam
paras
)
{
PagingResultDto
<
InputVATInvoiceDto
>
qResult
=
new
PagingResultDto
<>();
qResult
.
setPageInfo
(
paras
.
getPageInfo
());
...
...
@@ -42,34 +37,25 @@ public class InputInvoiceDataImportServiceImpl extends VatAbstractService implem
return
qResult
;
}
@Override
public
List
<
InputVATInvoiceItemDto
>
getInputInvoiceItemTreeViewData
(
String
id
)
{
public
List
<
InputVATInvoiceItem
>
getInputInvoiceItemTreeViewData
(
String
id
)
{
InputVATInvoiceItemExample
example
=
new
InputVATInvoiceItemExample
();
example
.
createCriteria
().
andInputVATInvoiceIDEqualTo
(
id
);
List
<
InputVATInvoiceItem
>
list
=
inputVATInvoiceItemMapper
.
selectByExample
(
example
);
List
<
InputVATInvoiceItemDto
>
result
=
new
ArrayList
<>();
list
.
forEach
(
a
->
{
InputVATInvoiceItemDto
dto
=
new
InputVATInvoiceItemDto
();
CommonUtils
.
copyProperties
(
a
,
dto
);
result
.
add
(
dto
);
});
return
result
;
return
inputVATInvoiceItemMapper
.
selectByExample
(
example
);
}
@Override
public
List
<
InputVATInvoiceDto
>
getInputInvoiceList
(
Integer
period
)
{
InputVATInvoiceExample
inputVATInvoiceExample
=
new
InputVATInvoiceExample
();
inputVATInvoiceExample
.
createCriteria
().
andPeriodIDEqualTo
(
period
.
intValue
());
List
<
InputVATInvoice
>
inputVatEntity
=
inputVATInvoiceMapper
.
selectByExample
(
inputVATInvoiceExample
);
List
<
InputVATInvoice
>
inputVatEntity
=
inputVATInvoiceMapper
.
selectByExample
(
inputVATInvoiceExample
);
inputVatEntity
.
sort
(
Comparator
.
comparing
(
InputVATInvoice:
:
getInvoiceNumber
));
inputVatEntity
.
sort
(
Comparator
.
comparing
(
InputVATInvoice:
:
getCreateTime
));
List
<
InputVATInvoiceDto
>
result
=
new
ArrayList
<>(
inputVatEntity
.
size
());
inputVatEntity
.
forEach
(
m
->
{
InputVATInvoiceDto
dto
=
new
InputVATInvoiceDto
();
inputVatEntity
.
forEach
(
m
->
{
InputVATInvoiceDto
dto
=
new
InputVATInvoiceDto
();
try
{
FieldsMapper
.
map
(
m
,
dto
);
FieldsMapper
.
map
(
m
,
dto
);
}
catch
(
ClassNotFoundException
e
)
{
e
.
printStackTrace
();
//TODO:should be fixed with exception filter (neo)
}
catch
(
IllegalAccessException
e
)
{
...
...
@@ -80,4 +66,10 @@ public class InputInvoiceDataImportServiceImpl extends VatAbstractService implem
return
result
;
}
public
List
<
InputVATInvoiceItem
>
getInputInvoiceItemList
(
Integer
period
)
{
InputVATInvoiceItemExample
example
=
new
InputVATInvoiceItemExample
();
example
.
createCriteria
().
andPeriodIDEqualTo
(
period
.
intValue
());
return
inputVATInvoiceItemMapper
.
selectByExample
(
example
);
}
}
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/JournalEntryImportServiceImpl.java
View file @
56492875
...
...
@@ -6,14 +6,12 @@ import pwc.taxtech.atms.constant.enums.VatImportType;
import
pwc.taxtech.atms.dto.FieldsMapper
;
import
pwc.taxtech.atms.dto.PagingResultDto
;
import
pwc.taxtech.atms.dto.vatdto.QueryJeDto
;
import
pwc.taxtech.atms.dto.vatdto.ValidationInfoDto
;
import
pwc.taxtech.atms.dto.vatdto.VoucherDto
;
import
pwc.taxtech.atms.vat.dao.JournalEntryImportMapper
;
import
pwc.taxtech.atms.vat.dao.ValidationInfoMapper
;
import
pwc.taxtech.atms.vat.entity.ValidationInfo
;
import
pwc.taxtech.atms.vat.entity.ValidationInfoExample
;
import
pwc.taxtech.atms.vat.entity.Voucher
;
import
pwc.taxtech.atms.vat.service.JournalEntryImportService
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
...
...
@@ -22,14 +20,13 @@ import java.util.List;
import
static
pwc
.
taxtech
.
atms
.
constant
.
Constant
.
WholeYear
;
@Service
public
class
JournalEntryImportServiceImpl
implements
JournalEntryImportService
{
public
class
JournalEntryImportServiceImpl
{
@Autowired
JournalEntryImportMapper
journalEntryImportMapper
;
@Autowired
ValidationInfoMapper
validationInfoMapper
;
@Override
public
PagingResultDto
<
VoucherDto
>
qeryJournalEntryData
(
QueryJeDto
queryJeDto
)
{
PagingResultDto
<
VoucherDto
>
qResult
=
new
PagingResultDto
<
VoucherDto
>();
qResult
.
setPageInfo
(
queryJeDto
.
getPageInfo
());
...
...
@@ -84,28 +81,13 @@ public class JournalEntryImportServiceImpl implements JournalEntryImportService
return
qResult
;
}
@Override
public
List
<
ValidationInfoDto
>
getValidationInfoList
(
Integer
type
,
Integer
period
)
{
public
List
<
ValidationInfo
>
getValidationInfoList
(
Integer
type
,
Integer
period
)
{
ValidationInfoExample
validationInfoExample
=
new
ValidationInfoExample
();
if
(
period
.
intValue
()
!=
WholeYear
)
validationInfoExample
.
createCriteria
().
andImportTypeIdEqualTo
(
type
).
andPeriodIdEqualTo
(
period
);
else
validationInfoExample
.
createCriteria
().
andImportTypeIdEqualTo
(
type
);
List
<
ValidationInfo
>
result
=
validationInfoMapper
.
selectByExample
(
validationInfoExample
);
List
<
ValidationInfoDto
>
validationInfoDtos
=
new
ArrayList
<>(
result
.
size
());
result
.
forEach
(
m
->{
ValidationInfoDto
dto
=
new
ValidationInfoDto
();
try
{
FieldsMapper
.
map
(
result
,
dto
);
}
catch
(
ClassNotFoundException
e
)
{
e
.
printStackTrace
();
}
catch
(
IllegalAccessException
e
)
{
e
.
printStackTrace
();
}
});
return
validationInfoDtos
;
return
validationInfoMapper
.
selectByExample
(
validationInfoExample
);
}
}
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