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
b93354c2
Commit
b93354c2
authored
Apr 23, 2019
by
zhkwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev_mysql' into dev_mysql
parents
088cd98f
26e11df2
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
191 additions
and
55 deletions
+191
-55
DataImportService.java
...java/pwc/taxtech/atms/service/impl/DataImportService.java
+128
-47
vat.json
atms-web/src/main/webapp/app-resources/i18n/en-us/vat.json
+2
-0
vat.json
atms-web/src/main/webapp/app-resources/i18n/zh-CN/vat.json
+2
-0
import-certified-invoices-list.ctrl.js
...fied-invoices-list/import-certified-invoices-list.ctrl.js
+6
-2
import-invoice-record.ctrl.js
...mport/import-invoice-record/import-invoice-record.ctrl.js
+6
-2
tax-document-list.html
...axDocumentManage/tax-document-list/tax-document-list.html
+2
-2
vat-caculate-data.ctrl.js
...vat/reduction/vat-caculate-data/vat-caculate-data.ctrl.js
+44
-1
vat-caculate-data.html
...pp/vat/reduction/vat-caculate-data/vat-caculate-data.html
+1
-1
No files found.
atms-api/src/main/java/pwc/taxtech/atms/service/impl/DataImportService.java
View file @
b93354c2
package
pwc
.
taxtech
.
atms
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
...
...
@@ -10,6 +9,7 @@ import org.apache.commons.collections.CollectionUtils;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.poi.ss.usermodel.*
;
import
org.nutz.lang.Strings
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -51,7 +51,6 @@ import pwc.taxtech.atms.vat.entity.*;
import
javax.annotation.Resource
;
import
java.io.InputStream
;
import
java.math.BigDecimal
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.concurrent.*
;
...
...
@@ -739,6 +738,8 @@ public class DataImportService extends BaseService {
try
{
InputStream
inputStream
=
file
.
getInputStream
();
Workbook
workbook
=
WorkbookFactory
.
create
(
inputStream
);
FormulaEvaluator
evaluator
=
workbook
.
getCreationHelper
().
createFormulaEvaluator
();
evaluator
.
evaluateAll
();
if
(
StringUtils
.
isBlank
(
periodDate
)
||
"null"
.
equals
(
periodDate
))
{
throw
new
ServiceException
(
ErrorMessageCN
.
DoNotSelectPeriod
);
}
...
...
@@ -842,34 +843,34 @@ public class DataImportService extends BaseService {
iData
.
setSpecialInvoiceAmount4
(
getCellLongDecimalValue
(
cell5
));
Cell
cell6
=
sheet
.
getRow
(
6
).
getCell
(
j
);
iData
.
setSpecialInvoiceSalesAmount1
(
getCellBigDecimalValue
(
cell6
));
iData
.
setSpecialInvoiceSalesAmount1
(
getCellBigDecimalValue
(
cell6
,
evaluator
));
Cell
cell7
=
sheet
.
getRow
(
7
).
getCell
(
j
);
iData
.
setSpecialInvoiceSalesAmount2
(
getCellBigDecimalValue
(
cell7
));
iData
.
setSpecialInvoiceSalesAmount2
(
getCellBigDecimalValue
(
cell7
,
evaluator
));
Cell
cell8
=
sheet
.
getRow
(
8
).
getCell
(
j
);
iData
.
setSpecialInvoiceSalesAmount3
(
getCellBigDecimalValue
(
cell8
));
iData
.
setSpecialInvoiceSalesAmount3
(
getCellBigDecimalValue
(
cell8
,
evaluator
));
Cell
cell9
=
sheet
.
getRow
(
9
).
getCell
(
j
);
iData
.
setSpecialInvoiceSalesAmount4
(
getCellBigDecimalValue
(
cell9
));
iData
.
setSpecialInvoiceSalesAmount4
(
getCellBigDecimalValue
(
cell9
,
evaluator
));
Cell
cell10
=
sheet
.
getRow
(
10
).
getCell
(
j
);
iData
.
setSpecialInvoiceSalesAmount5
(
getCellBigDecimalValue
(
cell10
));
iData
.
setSpecialInvoiceSalesAmount5
(
getCellBigDecimalValue
(
cell10
,
evaluator
));
Cell
cell11
=
sheet
.
getRow
(
11
).
getCell
(
j
);
iData
.
setSpecialInvoiceTaxAmount1
(
getCellBigDecimalValue
(
cell11
));
iData
.
setSpecialInvoiceTaxAmount1
(
getCellBigDecimalValue
(
cell11
,
evaluator
));
Cell
cell12
=
sheet
.
getRow
(
12
).
getCell
(
j
);
iData
.
setSpecialInvoiceTaxAmount2
(
getCellBigDecimalValue
(
cell12
));
iData
.
setSpecialInvoiceTaxAmount2
(
getCellBigDecimalValue
(
cell12
,
evaluator
));
Cell
cell13
=
sheet
.
getRow
(
13
).
getCell
(
j
);
iData
.
setSpecialInvoiceTaxAmount3
(
getCellBigDecimalValue
(
cell13
));
iData
.
setSpecialInvoiceTaxAmount3
(
getCellBigDecimalValue
(
cell13
,
evaluator
));
Cell
cell14
=
sheet
.
getRow
(
14
).
getCell
(
j
);
iData
.
setSpecialInvoiceTaxAmount4
(
getCellBigDecimalValue
(
cell14
));
iData
.
setSpecialInvoiceTaxAmount4
(
getCellBigDecimalValue
(
cell14
,
evaluator
));
Cell
cell15
=
sheet
.
getRow
(
15
).
getCell
(
j
);
iData
.
setSpecialInvoiceTaxAmount5
(
getCellBigDecimalValue
(
cell15
));
iData
.
setSpecialInvoiceTaxAmount5
(
getCellBigDecimalValue
(
cell15
,
evaluator
));
Cell
cell16
=
sheet
.
getRow
(
16
).
getCell
(
j
);
iData
.
setInvoiceAmount1
(
getCellLongDecimalValue
(
cell16
));
...
...
@@ -884,34 +885,34 @@ public class DataImportService extends BaseService {
iData
.
setInvoiceAmount4
(
getCellLongDecimalValue
(
cell19
));
Cell
cell20
=
sheet
.
getRow
(
20
).
getCell
(
j
);
iData
.
setInvoiceSalesAmount1
(
getCellBigDecimalValue
(
cell20
));
iData
.
setInvoiceSalesAmount1
(
getCellBigDecimalValue
(
cell20
,
evaluator
));
Cell
cell21
=
sheet
.
getRow
(
21
).
getCell
(
j
);
iData
.
setInvoiceSalesAmount2
(
getCellBigDecimalValue
(
cell21
));
iData
.
setInvoiceSalesAmount2
(
getCellBigDecimalValue
(
cell21
,
evaluator
));
Cell
cell22
=
sheet
.
getRow
(
22
).
getCell
(
j
);
iData
.
setInvoiceSalesAmount3
(
getCellBigDecimalValue
(
cell22
));
iData
.
setInvoiceSalesAmount3
(
getCellBigDecimalValue
(
cell22
,
evaluator
));
Cell
cell23
=
sheet
.
getRow
(
23
).
getCell
(
j
);
iData
.
setInvoiceSalesAmount4
(
getCellBigDecimalValue
(
cell23
));
iData
.
setInvoiceSalesAmount4
(
getCellBigDecimalValue
(
cell23
,
evaluator
));
Cell
cell24
=
sheet
.
getRow
(
24
).
getCell
(
j
);
iData
.
setInvoiceSalesAmount5
(
getCellBigDecimalValue
(
cell24
));
iData
.
setInvoiceSalesAmount5
(
getCellBigDecimalValue
(
cell24
,
evaluator
));
Cell
cell25
=
sheet
.
getRow
(
25
).
getCell
(
j
);
iData
.
setInvoiceTaxAmount1
(
getCellBigDecimalValue
(
cell25
));
iData
.
setInvoiceTaxAmount1
(
getCellBigDecimalValue
(
cell25
,
evaluator
));
Cell
cell26
=
sheet
.
getRow
(
26
).
getCell
(
j
);
iData
.
setInvoiceTaxAmount2
(
getCellBigDecimalValue
(
cell26
));
iData
.
setInvoiceTaxAmount2
(
getCellBigDecimalValue
(
cell26
,
evaluator
));
Cell
cell27
=
sheet
.
getRow
(
27
).
getCell
(
j
);
iData
.
setInvoiceTaxAmount3
(
getCellBigDecimalValue
(
cell27
));
iData
.
setInvoiceTaxAmount3
(
getCellBigDecimalValue
(
cell27
,
evaluator
));
Cell
cell28
=
sheet
.
getRow
(
28
).
getCell
(
j
);
iData
.
setInvoiceTaxAmount4
(
getCellBigDecimalValue
(
cell28
));
iData
.
setInvoiceTaxAmount4
(
getCellBigDecimalValue
(
cell28
,
evaluator
));
Cell
cell29
=
sheet
.
getRow
(
29
).
getCell
(
j
);
iData
.
setInvoiceTaxAmount5
(
getCellBigDecimalValue
(
cell29
));
iData
.
setInvoiceTaxAmount5
(
getCellBigDecimalValue
(
cell29
,
evaluator
));
iDatas
.
add
(
iData
);
}
...
...
@@ -951,6 +952,8 @@ public class DataImportService extends BaseService {
OperationResultDto
operationResultDto
=
new
OperationResultDto
();
InputStream
inputStream
=
file
.
getInputStream
();
Workbook
workbook
=
WorkbookFactory
.
create
(
inputStream
);
FormulaEvaluator
evaluator
=
workbook
.
getCreationHelper
().
createFormulaEvaluator
();
evaluator
.
evaluateAll
();
if
(
StringUtils
.
isBlank
(
periodDate
)
||
"null"
.
equals
(
periodDate
))
{
throw
new
ServiceException
(
ErrorMessageCN
.
DoNotSelectPeriod
);
}
...
...
@@ -959,7 +962,7 @@ public class DataImportService extends BaseService {
for
(
int
i
=
0
;
i
<
workbook
.
getNumberOfSheets
();
i
++)
{
Sheet
sheet
=
workbook
.
getSheetAt
(
i
);
if
(
isSheetEmpty
(
sheet
))
continue
;
List
<
RedLetterInfoTable
>
rlits
=
generalRLITs
(
sheet
);
List
<
RedLetterInfoTable
>
rlits
=
generalRLITs
(
sheet
,
evaluator
);
if
(
rlits
.
size
()
<
1
)
continue
;
// 根据主体分组处理
Map
<
String
,
List
<
RedLetterInfoTable
>>
atsGroupRes
=
...
...
@@ -1059,6 +1062,8 @@ public class DataImportService extends BaseService {
try
{
InputStream
inputStream
=
file
.
getInputStream
();
Workbook
workbook
=
WorkbookFactory
.
create
(
inputStream
);
FormulaEvaluator
evaluator
=
workbook
.
getCreationHelper
().
createFormulaEvaluator
();
evaluator
.
evaluateAll
();
if
(
StringUtils
.
isBlank
(
periodDate
)
||
"null"
.
equals
(
periodDate
))
{
throw
new
ServiceException
(
ErrorMessageCN
.
DoNotSelectPeriod
);
}
...
...
@@ -1067,7 +1072,7 @@ public class DataImportService extends BaseService {
for
(
int
i
=
0
;
i
<
workbook
.
getNumberOfSheets
();
i
++)
{
Sheet
sheet
=
workbook
.
getSheetAt
(
i
);
if
(
isSheetEmpty
(
sheet
))
continue
;
List
<
AdjustmentTable
>
ats
=
generalATs
(
sheet
);
List
<
AdjustmentTable
>
ats
=
generalATs
(
sheet
,
evaluator
);
if
(
ats
.
size
()
<
1
)
continue
;
// 根据主体分组处理
Map
<
String
,
List
<
AdjustmentTable
>>
atsGroupRes
=
...
...
@@ -1165,6 +1170,8 @@ public class DataImportService extends BaseService {
try
{
InputStream
inputStream
=
file
.
getInputStream
();
Workbook
workbook
=
WorkbookFactory
.
create
(
inputStream
);
FormulaEvaluator
evaluator
=
workbook
.
getCreationHelper
().
createFormulaEvaluator
();
evaluator
.
evaluateAll
();
if
(
StringUtils
.
isBlank
(
periodDate
)
||
"null"
.
equals
(
periodDate
))
{
throw
new
ServiceException
(
ErrorMessageCN
.
DoNotSelectPeriod
);
}
...
...
@@ -1173,7 +1180,7 @@ public class DataImportService extends BaseService {
for
(
int
i
=
0
;
i
<
workbook
.
getNumberOfSheets
();
i
++)
{
Sheet
sheet
=
workbook
.
getSheetAt
(
i
);
if
(
isSheetEmpty
(
sheet
))
continue
;
List
<
CoupaPurchasingReport
>
ats
=
generalCPRs
(
sheet
);
List
<
CoupaPurchasingReport
>
ats
=
generalCPRs
(
sheet
,
evaluator
);
if
(
ats
.
size
()
<
1
)
continue
;
// 根据主体分组处理
Map
<
String
,
List
<
CoupaPurchasingReport
>>
atsGroupRes
=
...
...
@@ -1284,6 +1291,8 @@ public class DataImportService extends BaseService {
try
{
InputStream
inputStream
=
file
.
getInputStream
();
Workbook
workbook
=
WorkbookFactory
.
create
(
inputStream
);
FormulaEvaluator
evaluator
=
workbook
.
getCreationHelper
().
createFormulaEvaluator
();
evaluator
.
evaluateAll
();
if
(
StringUtils
.
isBlank
(
periodDate
)
||
"null"
.
equals
(
periodDate
))
{
throw
new
ServiceException
(
ErrorMessageCN
.
DoNotSelectPeriod
);
}
...
...
@@ -1404,10 +1413,10 @@ public class DataImportService extends BaseService {
cil
.
setSalespersonName
(
getCellStringValue
(
cell6
));
Cell
cell7
=
row
.
getCell
(
6
);
cil
.
setAmount
(
getCellBigDecimalValue
(
cell7
));
cil
.
setAmount
(
getCellBigDecimalValue
(
cell7
,
evaluator
));
Cell
cell8
=
row
.
getCell
(
7
);
cil
.
setTaxAmount
(
getCellBigDecimalValue
(
cell8
));
cil
.
setTaxAmount
(
getCellBigDecimalValue
(
cell8
,
evaluator
));
Cell
cell9
=
row
.
getCell
(
8
);
...
...
@@ -1462,7 +1471,7 @@ public class DataImportService extends BaseService {
//导入成功并将错误信息返回
OperationResultDto
a
=
new
OperationResultDto
();
a
.
setResult
(
true
);
a
.
setResultMsg
(
JSONArray
.
toJSONString
(
errorDtos
));
a
.
setResultMsg
(
reImportError
(
errorDtos
));
return
a
;
}
catch
(
ServiceException
e
)
{
throw
e
;
...
...
@@ -1564,6 +1573,8 @@ public class DataImportService extends BaseService {
try
{
InputStream
inputStream
=
file
.
getInputStream
();
Workbook
workbook
=
WorkbookFactory
.
create
(
inputStream
);
FormulaEvaluator
evaluator
=
workbook
.
getCreationHelper
().
createFormulaEvaluator
();
evaluator
.
evaluateAll
();
if
(
StringUtils
.
isBlank
(
periodDate
)
||
"null"
.
equals
(
periodDate
))
{
throw
new
ServiceException
(
ErrorMessageCN
.
DoNotSelectPeriod
);
}
...
...
@@ -1573,7 +1584,7 @@ public class DataImportService extends BaseService {
for
(
int
i
=
0
;
i
<
workbook
.
getNumberOfSheets
();
i
++)
{
Sheet
sheet
=
workbook
.
getSheetAt
(
i
);
if
(
isSheetEmpty
(
sheet
))
continue
;
DataImportResponseDto
<
InvoiceRecord
>
dataImportResponseDto
=
generalIRs
(
sheet
);
DataImportResponseDto
<
InvoiceRecord
>
dataImportResponseDto
=
generalIRs
(
sheet
,
evaluator
);
dataImportResponseDto1
.
addAll
(
dataImportResponseDto
.
getDataImportErrorDtos
());
//List<InvoiceRecord> irs = generalIRs(sheet);
List
<
InvoiceRecord
>
irs
=
dataImportResponseDto
.
getObjectList
();
...
...
@@ -1594,7 +1605,7 @@ public class DataImportService extends BaseService {
//导入成功并将错误信息返回
OperationResultDto
a
=
new
OperationResultDto
();
a
.
setResult
(
true
);
a
.
setResultMsg
(
JSONArray
.
toJSONString
(
dataImportResponseDto1
));
a
.
setResultMsg
(
reImportError
(
dataImportResponseDto1
));
return
a
;
}
catch
(
ServiceException
e
)
{
...
...
@@ -1605,6 +1616,55 @@ public class DataImportService extends BaseService {
}
}
private
String
reImportError
(
List
<
DataImportErrorDto
>
errorDtos
){
StringBuffer
sb
=
new
StringBuffer
();
for
(
DataImportErrorDto
row:
errorDtos
){
//Sheet
if
(
row
.
getSheet
()!=
null
){
sb
.
append
(
"第"
+
row
.
getSheet
()+
"Sheet,"
);
}
//行号
if
(
row
.
getCellLine
()!=
null
){
sb
.
append
(
"第"
+
row
.
getCellLine
()
+
"行,"
);
}
//发票类型
if
(!
Strings
.
isBlank
(
row
.
getInvoiceType
())){
sb
.
append
(
"发票类型"
+
row
.
getInvoiceType
()+
","
);
}
//开票内容
if
(!
Strings
.
isBlank
(
row
.
getInvoiceDetail
())){
sb
.
append
(
"开票内容"
+
row
.
getInvoiceDetail
()+
","
);
}
//开票主体
if
(!
Strings
.
isBlank
(
row
.
getOrg
())){
sb
.
append
(
"开票主体"
+
row
.
getOrg
()+
","
);
}
//税率
if
(!
Strings
.
isBlank
(
row
.
getTaxRate
())){
sb
.
append
(
"税率"
+
row
.
getTaxRate
()+
","
);
}
//税额
if
(!
Strings
.
isBlank
(
row
.
getAmountRate
())){
sb
.
append
(
"税额"
+
row
.
getAmountRate
()+
","
);
}
//开票金额
if
(!
Strings
.
isBlank
(
row
.
getAmount
())){
sb
.
append
(
"开票金额"
+
row
.
getAmount
()+
","
);
}
//确认/认证日期
if
(!
Strings
.
isBlank
(
row
.
getConfirmTime
())){
sb
.
append
(
"确认/认证日期"
+
row
.
getConfirmTime
()+
","
);
}
//金额
if
(!
Strings
.
isBlank
(
row
.
getCilAmount
())){
sb
.
append
(
"金额"
+
row
.
getCilAmount
()+
","
);
}
sb
.
append
(
";"
);
}
return
sb
.
toString
();
}
private
void
processIrs
(
String
billingBody
,
List
<
InvoiceRecord
>
irs
,
List
<
String
>
orgIds
,
Integer
tmsPeriod
,
Integer
importType
,
List
<
DataImportLog
>
dataImportLogs
)
{
OrganizationExample
organizationExample
=
new
OrganizationExample
();
...
...
@@ -1686,7 +1746,7 @@ public class DataImportService extends BaseService {
dataImportLogs
.
add
(
dataImportLog
);
}
private
List
<
RedLetterInfoTable
>
generalRLITs
(
Sheet
sheet
)
{
private
List
<
RedLetterInfoTable
>
generalRLITs
(
Sheet
sheet
,
FormulaEvaluator
evaluator
)
{
List
<
RedLetterInfoTable
>
rlits
=
Lists
.
newArrayList
();
for
(
int
j
=
1
;
j
<=
sheet
.
getLastRowNum
();
j
++)
{
RedLetterInfoTable
rlit
=
new
RedLetterInfoTable
();
...
...
@@ -1706,8 +1766,8 @@ public class DataImportService extends BaseService {
rlit
.
setFillInDate
(
row
.
getCell
(
3
).
getDateCellValue
());
rlit
.
setSalesTaxNumber
(
getCellStringValue
(
row
.
getCell
(
4
)));
rlit
.
setSalespersonName
(
getCellStringValue
(
row
.
getCell
(
5
)));
rlit
.
setTotalAmount
(
getCellBigDecimalValue
(
row
.
getCell
(
6
)));
rlit
.
setTotalTaxAmount
(
getCellBigDecimalValue
(
row
.
getCell
(
7
)));
rlit
.
setTotalAmount
(
getCellBigDecimalValue
(
row
.
getCell
(
6
)
,
evaluator
));
rlit
.
setTotalTaxAmount
(
getCellBigDecimalValue
(
row
.
getCell
(
7
)
,
evaluator
));
rlit
.
setApplicationDescription
(
getCellStringValue
(
row
.
getCell
(
8
)));
rlit
.
setApplicantManager
(
getCellStringValue
(
row
.
getCell
(
9
)));
rlit
.
setInvoiceCode
(
getCellStringValue
(
row
.
getCell
(
10
)));
...
...
@@ -1717,7 +1777,7 @@ public class DataImportService extends BaseService {
return
rlits
;
}
private
DataImportResponseDto
<
InvoiceRecord
>
generalIRs
(
Sheet
sheet
)
{
private
DataImportResponseDto
<
InvoiceRecord
>
generalIRs
(
Sheet
sheet
,
FormulaEvaluator
evaluator
)
{
List
<
InvoiceRecord
>
irs
=
Lists
.
newArrayList
();
List
<
DataImportErrorDto
>
errorDtos
=
Lists
.
newArrayList
();
Set
<
String
>
orgsNot
=
new
HashSet
<>();
...
...
@@ -1765,11 +1825,11 @@ public class DataImportService extends BaseService {
ir
.
setCustomerCompanyName
(
getCellStringValue
(
row
.
getCell
(
2
)));
ir
.
setInvoiceType
(
getCellStringValue
(
row
.
getCell
(
3
)));
ir
.
setBillingContent
(
getCellStringValue
(
row
.
getCell
(
4
)));
ir
.
setInvoiceAmount
(
getCellBigDecimalValue
(
row
.
getCell
(
5
)));
ir
.
setInvoiceAmount
(
getCellBigDecimalValue
(
row
.
getCell
(
5
)
,
evaluator
));
ir
.
setApplicant
(
getCellStringValue
(
row
.
getCell
(
6
)));
ir
.
setOaApplicationNum
(
getCellStringValue
(
row
.
getCell
(
7
)));
ir
.
setContractNo
(
getCellStringValue
(
row
.
getCell
(
8
)));
ir
.
setContractAmount
(
getCellBigDecimalValue
(
row
.
getCell
(
9
)));
ir
.
setContractAmount
(
getCellBigDecimalValue
(
row
.
getCell
(
9
)
,
evaluator
));
ir
.
setDepartment
(
getCellStringValue
(
row
.
getCell
(
10
)));
ir
.
setApplicationDate
(
row
.
getCell
(
11
).
getDateCellValue
());
ir
.
setBillingDate
(
row
.
getCell
(
12
).
getDateCellValue
());
...
...
@@ -1781,8 +1841,8 @@ public class DataImportService extends BaseService {
ir
.
setInvoicesAmount
(
getCellIntegerValue
(
row
.
getCell
(
17
)));
ir
.
setCustomerCompanyTaxNum
(
getCellStringValue
(
row
.
getCell
(
18
)));
ir
.
setContractSourceSystem
(
getCellStringValue
(
row
.
getCell
(
19
)));
ir
.
setTaxRate
(
getCellBigDecimalValue
(
row
.
getCell
(
20
)));
ir
.
setTaxAmount
(
getCellBigDecimalValue
(
row
.
getCell
(
21
)));
ir
.
setTaxRate
(
getCellBigDecimalValue
(
row
.
getCell
(
20
)
,
evaluator
));
ir
.
setTaxAmount
(
getCellBigDecimalValue
(
row
.
getCell
(
21
)
,
evaluator
));
ir
.
setInvoiceStatus
(
getCellStringValue
(
row
.
getCell
(
22
)));
ir
.
setSource
(
getCellStringValue
(
row
.
getCell
(
23
)));
irs
.
add
(
ir
);
...
...
@@ -1863,7 +1923,7 @@ public class DataImportService extends BaseService {
return
fg
;
}
private
List
<
AdjustmentTable
>
generalATs
(
Sheet
sheet
)
{
private
List
<
AdjustmentTable
>
generalATs
(
Sheet
sheet
,
FormulaEvaluator
evaluator
)
{
List
<
AdjustmentTable
>
ats
=
Lists
.
newArrayList
();
for
(
int
j
=
1
;
j
<=
sheet
.
getLastRowNum
();
j
++)
{
AdjustmentTable
at
=
new
AdjustmentTable
();
...
...
@@ -1905,15 +1965,15 @@ public class DataImportService extends BaseService {
at
.
setSegment8Name
(
getCellStringValue
(
row
.
getCell
(
18
)));
at
.
setSegment9Name
(
getCellStringValue
(
row
.
getCell
(
19
)));
at
.
setSegment10Name
(
getCellStringValue
(
row
.
getCell
(
20
)));
at
.
setPeriodDrBeq
(
getCellBigDecimalValue
(
row
.
getCell
(
2
1
)
));
at
.
setPeriodCrBeq
(
getCellBigDecimalValue
(
row
.
getCell
(
22
)));
at
.
setEndBalBeq
(
getCellBigDecimalValue
(
row
.
getCell
(
23
)));
at
.
setPeriodDrBeq
(
getCellBigDecimalValue
(
row
.
getCell
(
2
2
),
evaluator
));
at
.
setPeriodCrBeq
(
getCellBigDecimalValue
(
row
.
getCell
(
22
)
,
evaluator
));
at
.
setEndBalBeq
(
getCellBigDecimalValue
(
row
.
getCell
(
23
)
,
evaluator
));
ats
.
add
(
at
);
}
return
ats
;
}
private
List
<
CoupaPurchasingReport
>
generalCPRs
(
Sheet
sheet
)
{
private
List
<
CoupaPurchasingReport
>
generalCPRs
(
Sheet
sheet
,
FormulaEvaluator
evaluator
)
{
List
<
CoupaPurchasingReport
>
cprs
=
Lists
.
newArrayList
();
for
(
int
j
=
1
;
j
<=
sheet
.
getLastRowNum
();
j
++)
{
CoupaPurchasingReport
cpr
=
new
CoupaPurchasingReport
();
...
...
@@ -1934,7 +1994,7 @@ public class DataImportService extends BaseService {
cpr
.
setDescription
(
getCellStringValue
(
row
.
getCell
(
8
)));
cpr
.
setSupplierNum
(
getCellStringValue
(
row
.
getCell
(
9
)));
cpr
.
setSupplier
(
getCellStringValue
(
row
.
getCell
(
10
)));
cpr
.
setTotalAmount
(
getCellBigDecimalValue
(
row
.
getCell
(
11
)));
cpr
.
setTotalAmount
(
getCellBigDecimalValue
(
row
.
getCell
(
11
)
,
evaluator
));
cpr
.
setCurrency
(
getCellStringValue
(
row
.
getCell
(
12
)));
String
billNum
=
getCellStringValue
(
row
.
getCell
(
13
));
cpr
.
setBillNum
(
billNum
);
...
...
@@ -1951,8 +2011,8 @@ public class DataImportService extends BaseService {
cpr
.
setPeriod
(
DateUtils
.
dateToPeriod
(
cpr
.
getBillingDate
()));
cpr
.
setLastUpdatedDate
(
DateUtils
.
strToDate3
(
getCellStringValue
(
row
.
getCell
(
24
))));
cpr
.
setLastUpdatedPerson
(
getCellStringValue
(
row
.
getCell
(
25
)));
cpr
.
setTotalTaxAmount
(
getCellBigDecimalValue
(
row
.
getCell
(
26
)));
cpr
.
setTotalTaxAmountHeader
(
getCellBigDecimalValue
(
row
.
getCell
(
27
)));
cpr
.
setTotalTaxAmount
(
getCellBigDecimalValue
(
row
.
getCell
(
26
)
,
evaluator
));
cpr
.
setTotalTaxAmountHeader
(
getCellBigDecimalValue
(
row
.
getCell
(
27
)
,
evaluator
));
cpr
.
setBillingNote
(
getCellStringValue
(
row
.
getCell
(
28
)));
cprs
.
add
(
cpr
);
}
...
...
@@ -2010,10 +2070,19 @@ public class DataImportService extends BaseService {
return
null
;
}
private
BigDecimal
getCellBigDecimalValue
(
Cell
cell
)
{
private
BigDecimal
getCellBigDecimalValue
(
Cell
cell
,
FormulaEvaluator
evaluator
)
{
if
(
null
==
cell
)
{
return
null
;
}
if
(
cell
.
getCellTypeEnum
().
equals
(
CellType
.
FORMULA
)){
CellValue
cellValue
=
evaluator
.
evaluate
(
cell
);
if
(
cellValue
.
getCellTypeEnum
().
equals
(
CellType
.
STRING
))
{
return
new
BigDecimal
(
cellValue
.
getStringValue
().
trim
());
}
else
if
(
cellValue
.
getCellTypeEnum
().
equals
(
CellType
.
NUMERIC
))
{
return
new
BigDecimal
(
cellValue
.
getNumberValue
());
}
return
null
;
}
if
(
cell
.
getCellTypeEnum
().
equals
(
CellType
.
STRING
))
{
return
new
BigDecimal
(
cell
.
getStringCellValue
().
trim
());
}
else
if
(
cell
.
getCellTypeEnum
().
equals
(
CellType
.
NUMERIC
))
{
...
...
@@ -2022,6 +2091,18 @@ public class DataImportService extends BaseService {
logger
.
warn
(
"获取单元格数据类型未匹配"
);
return
null
;
}
// private BigDecimal getCellBigDecimalValue(Cell cell) {
// if (null == cell) {
// return null;
// }
// if (cell.getCellTypeEnum().equals(CellType.STRING)) {
// return new BigDecimal(cell.getStringCellValue().trim());
// } else if (cell.getCellTypeEnum().equals(CellType.NUMERIC)) {
// return new BigDecimal(cell.getNumericCellValue());
// }
// logger.warn("获取单元格数据类型未匹配");
// return null;
// }
private
Long
getCellLongDecimalValue
(
Cell
cell
)
{
if
(
null
==
cell
)
{
...
...
atms-web/src/main/webapp/app-resources/i18n/en-us/vat.json
View file @
b93354c2
...
...
@@ -623,6 +623,7 @@
"ImportOutputInvoice"
:
"Import Output Invoices"
,
"ImportShipmentList"
:
"Import Departure List"
,
"ImportShipmentListGd"
:
"Import Departure List- GD"
,
"ImportPartSuccess"
:
"Part Import Success"
,
"ImportSuccess"
:
"Import Success"
,
"ImportTrialBalance"
:
"Import TB"
,
"ImportTypeTip"
:
"Clear All Imported Financial Data for This Period, Proceed?"
,
...
...
@@ -720,6 +721,7 @@
"IsConfirmCancelMap"
:
"The System Has Reached the {status} State. Do You Confirm the Cancellation of Correspondence?"
,
"IsConfirmManualReClassify"
:
"The System Has Reached the {status} State. Are You Sure to Save Manual Reclassification?"
,
"IsConfirmReCalcuate"
:
"The System Has Reached the {status} State. Do You Confirm Recalculation??"
,
"IsConfirmTimeNotSame"
:
"数据处理期间非当前税款所属期,是否继续进行数据处理?"
,
"IsConfirmSaveReport"
:
"The System Has Reached the {status} Status. Are You Sure to Save the Report?"
,
"IsConfirmToApproveReport"
:
"Whether to Confirm the Approval?"
,
"IsConfirmToCompleteDeclaration"
:
"Whether to Confirm the Completion Of the Declaration?"
,
...
...
atms-web/src/main/webapp/app-resources/i18n/zh-CN/vat.json
View file @
b93354c2
...
...
@@ -779,6 +779,7 @@
"ImportOutputInvoice"
:
"导入销项发票"
,
"ImportShipmentList"
:
"导入发车清单"
,
"ImportShipmentListGd"
:
"导入发车清单-GD"
,
"ImportPartSuccess"
:
"部分导入成功"
,
"ImportSuccess"
:
"导入成功"
,
"ImportSuccessCount"
:
"导入成功,验证失败:"
,
"ImportTrialBalance"
:
"导入试算平衡表"
,
...
...
@@ -955,6 +956,7 @@
"IsConfirmCancelMap"
:
"系统已到达{status}状态,是否确认取消对应?"
,
"IsConfirmManualReClassify"
:
"系统已到达{status}状态,是否确认保存手工重分类?"
,
"IsConfirmReCalcuate"
:
"系统已到达{status}状态,是否确认重新计算?"
,
"IsConfirmTimeNotSame"
:
"数据处理期间非当前税款所属期,是否继续进行数据处理?"
,
"IsConfirmSaveReport"
:
"系统已到达{status}状态,是否确认保存报表?"
,
"IsConfirmToApproveReport"
:
"是否确认通过审核?"
,
"IsConfirmToApproveReportTitle"
:
"是否确定审核通过?"
,
...
...
atms-web/src/main/webapp/app/common/controls/import/import-certified-invoices-list/import-certified-invoices-list.ctrl.js
View file @
b93354c2
...
...
@@ -191,8 +191,12 @@
if
(
ret
.
result
)
{
logDto
.
UpdateState
=
$translate
.
instant
(
'ImportSuccess'
);
vatOperationLogService
.
addOperationLog
(
logDto
);
if
(
ret
.
resultMsg
){
swal
(
$translate
.
instant
(
'ImportSuccess'
),
ret
.
resultMsg
,
"warning"
);
//var errorObj=JSON.parse(ret.resultMsg);
if
(
ret
.
resultMsg
!=
""
&&
ret
.
resultMsg
){
var
reg
=
new
RegExp
(
";"
,
"g"
);
//g,表示全部替换
var
error
=
ret
.
resultMsg
.
replace
(
reg
,
'
\
n'
);
swal
(
$translate
.
instant
(
'ImportPartSuccess'
),
error
,
"warning"
);
//swal($translate.instant('ImportSuccess'), ret.resultMsg, "warning");
//SweetAlert.warning(ret.resultMsg);
}
else
{
SweetAlert
.
success
(
$translate
.
instant
(
'ImportSuccess'
));
...
...
atms-web/src/main/webapp/app/common/controls/import/import-invoice-record/import-invoice-record.ctrl.js
View file @
b93354c2
...
...
@@ -198,8 +198,12 @@
if
(
ret
.
result
)
{
logDto
.
UpdateState
=
$translate
.
instant
(
'ImportSuccess'
);
vatOperationLogService
.
addOperationLog
(
logDto
);
if
(
ret
.
resultMsg
){
swal
(
$translate
.
instant
(
'ImportSuccess'
),
ret
.
resultMsg
,
"warning"
);
//var errorObj=JSON.parse(ret.resultMsg);
if
(
ret
.
resultMsg
!=
""
&&
ret
.
resultMsg
){
var
reg
=
new
RegExp
(
";"
,
"g"
);
//g,表示全部替换
var
error
=
ret
.
resultMsg
.
replace
(
reg
,
'
\
n'
);
swal
(
$translate
.
instant
(
'ImportPartSuccess'
),
error
,
"warning"
);
//swal($translate.instant('ImportSuccess'), ret.resultMsg, "warning");
//SweetAlert.warning(ret.resultMsg);
}
else
{
SweetAlert
.
success
(
$translate
.
instant
(
'ImportSuccess'
));
...
...
atms-web/src/main/webapp/app/taxDocumentManage/tax-document-list/tax-document-list.html
View file @
b93354c2
...
...
@@ -744,7 +744,7 @@
<span
class=
"required-tip"
>
*
</span>
{{'Company Name' | translate}}
</label>
<div
class=
"col-sm-11"
style=
"width:61.67%"
id=
"companyNameOptionsMap"
>
<div
class=
"col-sm-11"
style=
"width:61.67%
;height: 13px
"
id=
"companyNameOptionsMap"
>
<div
dx-select-box=
"editOrgOptions"
></div>
<!--<select ng-model="editFieldModel.companyName" class="form-control"-->
<!--title="{{editFieldModel.companyName}}" required-->
...
...
@@ -987,7 +987,7 @@
<span
class=
"required-tip"
>
*
</span>
{{'Company Name' | translate}}
</label>
<div
class=
"col-sm-11"
style=
"width:61.67%"
>
<div
class=
"col-sm-11"
style=
"width:61.67%
;height: 13px
"
>
<div
ng-class=
"{'upload-fail-mark':!editFieldItem.companyName}"
dx-select-box=
"editFieldItemOrgOptions"
></div>
<!--<select ng-model="editFieldItem.companyName" class="form-control"-->
<!--title="{{editFieldItem.companyName}}"-->
...
...
atms-web/src/main/webapp/app/vat/reduction/vat-caculate-data/vat-caculate-data.ctrl.js
View file @
b93354c2
...
...
@@ -375,6 +375,49 @@
}
};
var
checkYearMonthCaculate2
=
function
(){
var
now
=
new
Date
();
var
month
=
now
.
getMonth
()
+
1
;
var
year
=
now
.
getFullYear
();
var
vatMonth
=
vatSessionService
.
month
;
if
(
vatSessionService
.
year
==
year
){
if
(
vatMonth
<
month
-
1
){
return
true
;
}
}
if
(
vatSessionService
.
year
==
year
-
1
&&
vatMonth
==
12
&&
month
==
0
){
return
false
;
}
return
true
;
}
var
startCaculate3
=
function
()
{
var
bool
=
checkYearMonthCaculate2
();
if
(
bool
){
swal
({
title
:
"warning!"
,
text
:
$translate
.
instant
(
'IsConfirmTimeNotSame'
),
type
:
"warning"
,
showCancelButton
:
true
,
confirmButtonColor
:
"#dd6b55"
,
confirmButtonText
:
$translate
.
instant
(
'Yes'
),
cancelButtonText
:
$translate
.
instant
(
'No'
),
closeOnConfirm
:
true
,
closeOnCancel
:
true
},
function
(
isConfirm
)
{
if
(
isConfirm
){
startCaculate2
();
}
else
{
return
;
}
})
}
else
{
startCaculate2
();
}
}
var
startCaculate2
=
function
()
{
if
(
vatSessionService
.
project
.
projectStatusList
[
vatSessionService
.
month
]
>=
constant
.
ProjectStatusEnum
.
Generated
)
{
swal
({
...
...
@@ -684,7 +727,7 @@
$scope
.
resolveRef
=
[];
initTasks
();
$scope
.
startCaculate
=
startCaculate
;
$scope
.
startCaculate
2
=
startCaculate2
;
$scope
.
startCaculate
3
=
startCaculate3
;
$scope
.
$on
(
'$destroy'
,
function
(){
if
(
$scope
.
timer
)
$interval
.
cancel
(
$scope
.
timer
);
});
...
...
atms-web/src/main/webapp/app/vat/reduction/vat-caculate-data/vat-caculate-data.html
View file @
b93354c2
...
...
@@ -3,7 +3,7 @@
<div
class=
"vat-caculate-data-title"
ng-if=
"tasks.length > 0"
>
<!--<span translate="vatCaculateDataDesc"></span>-->
<!--<button class="btn btn-vat-primary" translate="startCaculateData" ng-disabled="readonly" ng-click="startCaculate()"></button>-->
<button
class=
"btn btn-vat-primary"
translate=
"startCaculateData"
ng-disabled=
"readonly"
ng-click=
"startCaculate
2
()"
></button>
<button
class=
"btn btn-vat-primary"
translate=
"startCaculateData"
ng-disabled=
"readonly"
ng-click=
"startCaculate
3
()"
></button>
<span
ng-click=
"showOperateLogPop()"
><i
class=
"fa fa-file-excel-o"
aria-hidden=
"true"
></i>
{{'Remarks' | translate}}
</span>
</div>
...
...
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