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
7db8502a
Commit
7db8502a
authored
Mar 22, 2019
by
zhkwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev_mysql' into dev_mysql
parents
fe5c89dc
08e321eb
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
184 additions
and
110 deletions
+184
-110
SpringContextUtil.java
.../java/pwc/taxtech/atms/common/util/SpringContextUtil.java
+2
-2
InvoiceRecordEnum.java
...va/pwc/taxtech/atms/constant/enums/InvoiceRecordEnum.java
+34
-5
TaxesCalculateReportEnum.java
...taxtech/atms/constant/enums/TaxesCalculateReportEnum.java
+12
-11
FileTypesController.java
...java/pwc/taxtech/atms/controller/FileTypesController.java
+2
-2
OperationLogFileTypeController.java
...xtech/atms/controller/OperationLogFileTypeController.java
+2
-2
OperationLogTaxDocController.java
...taxtech/atms/controller/OperationLogTaxDocController.java
+2
-2
TaxDocumentController.java
...va/pwc/taxtech/atms/controller/TaxDocumentController.java
+19
-22
AnalysisServiceImpl.java
...va/pwc/taxtech/atms/service/impl/AnalysisServiceImpl.java
+3
-3
TaxDocumentServiceImpl.java
...pwc/taxtech/atms/service/impl/TaxDocumentServiceImpl.java
+15
-14
ReportServiceImpl.java
.../pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
+0
-0
KPSR.java
.../taxtech/atms/vat/service/impl/report/functions/KPSR.java
+27
-21
international_bu_data.xlsx
...ources/analysis_excel_template/international_bu_data.xlsx
+0
-0
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
international-data-import.ctrl.js
...ternational-data-import/international-data-import.ctrl.js
+21
-18
tax-report-cell-detail-modal.ctrl.js
...rt-cell-detail-modal/tax-report-cell-detail-modal.ctrl.js
+4
-0
tax-document-list.ctrl.js
...ocumentManage/tax-document-list/tax-document-list.ctrl.js
+35
-8
tax-document-list.svc.js
...DocumentManage/tax-document-list/tax-document-list.svc.js
+2
-0
No files found.
atms-api/src/main/java/pwc/taxtech/atms/common/util/SpringContextUtil.java
View file @
7db8502a
...
...
@@ -60,7 +60,7 @@ public class SpringContextUtil implements ApplicationContextAware {
public
static
TrialBalanceFinalMapper
trialBalanceFinalMapper
;
public
static
ProfitLossStatementMapper
profitLossStatementMapper
;
public
static
RevenueTypeMappingMapper
revenueTypeMappingMapper
;
public
static
BillDetailMapper
billDetail
Mapper
;
public
static
InvoiceRecordMapper
invoiceRecord
Mapper
;
...
...
@@ -145,7 +145,7 @@ public class SpringContextUtil implements ApplicationContextAware {
balanceSheetMapper
=
webApplicationContext
.
getBean
(
BalanceSheetMapper
.
class
);
revenueTypeMappingMapper
=
webApplicationContext
.
getBean
(
RevenueTypeMappingMapper
.
class
);
billDetailMapper
=
webApplicationContext
.
getBean
(
BillDetail
Mapper
.
class
);
invoiceRecordMapper
=
webApplicationContext
.
getBean
(
InvoiceRecord
Mapper
.
class
);
/* map.put("balance_sheet", balanceMapper);
map.put("profit_loss_statement",profitLossStatementMapper);
...
...
atms-api/src/main/java/pwc/taxtech/atms/constant/enums/
BillDetail
Enum.java
→
atms-api/src/main/java/pwc/taxtech/atms/constant/enums/
InvoiceRecord
Enum.java
View file @
7db8502a
...
...
@@ -3,19 +3,19 @@ package pwc.taxtech.atms.constant.enums;
import
java.util.HashMap
;
import
java.util.Map
;
public
class
BillDetail
Enum
{
public
class
InvoiceRecord
Enum
{
/**
* 发票类型
*/
public
enum
Bill
Type
{
public
enum
Invoice
Type
{
ORDINARY
(
1
,
"增值税普票"
),
SPECIAL
(
2
,
"增值税专票"
);
private
Integer
code
;
private
String
name
;
public
static
final
Map
<
Integer
,
String
>
MAPPING
=
new
HashMap
<>();
Bill
Type
(
Integer
code
,
String
name
)
{
Invoice
Type
(
Integer
code
,
String
name
)
{
this
.
code
=
code
;
this
.
name
=
name
;
}
...
...
@@ -29,11 +29,40 @@ public class BillDetailEnum {
}
static
{
for
(
BillDetailEnum
.
BillType
billType
:
BillDetailEnum
.
Bill
Type
.
values
())
{
MAPPING
.
put
(
billType
.
getCode
(),
bill
Type
.
getName
());
for
(
InvoiceRecordEnum
.
InvoiceType
invoiceType
:
InvoiceRecordEnum
.
Invoice
Type
.
values
())
{
MAPPING
.
put
(
invoiceType
.
getCode
(),
invoice
Type
.
getName
());
}
}
}
/**
* 金额类型
*/
public
enum
AmountType
{
INVOICE_AMOUNT
(
1
,
"开票金额"
),
TAX_AMOUNT
(
2
,
"税额"
);
private
Integer
code
;
private
String
name
;
public
static
final
Map
<
Integer
,
String
>
MAPPING
=
new
HashMap
<>();
AmountType
(
Integer
code
,
String
name
)
{
this
.
code
=
code
;
this
.
name
=
name
;
}
public
Integer
getCode
()
{
return
code
;
}
public
String
getName
()
{
return
name
;
}
static
{
for
(
InvoiceRecordEnum
.
AmountType
amountType
:
InvoiceRecordEnum
.
AmountType
.
values
())
{
MAPPING
.
put
(
amountType
.
getCode
(),
amountType
.
getName
());
}
}
}
}
atms-api/src/main/java/pwc/taxtech/atms/constant/enums/TaxesCalculateReportEnum.java
View file @
7db8502a
...
...
@@ -8,18 +8,19 @@ public class TaxesCalculateReportEnum {
public
enum
Column
{
Column_1
(
0
,
"序号"
),
Column_2
(
1
,
"
收入类型名称
"
),
Column_3
(
2
,
"
税金项目
"
),
Column_4
(
3
,
"
期间
"
),
Column_5
(
4
,
"
账载收入-明细
"
),
Column_6
(
5
,
"销项开票
收入数
-专票"
),
Column_2
(
1
,
"
税金项目
"
),
Column_3
(
2
,
"
期间
"
),
Column_4
(
3
,
"
账载收入-明细
"
),
Column_5
(
4
,
"
销项开票收入数-专票
"
),
Column_6
(
5
,
"销项开票
税额
-专票"
),
Column_7
(
6
,
"销项开票收入数-普票"
),
Column_8
(
7
,
"计税基数(应税收入)"
),
Column_9
(
8
,
"税率"
),
Column_10
(
9
,
"税额(元)"
),
Column_11
(
10
,
"收入类别"
),
Column_12
(
11
,
"计税方式"
),
Column_13
(
12
,
"备注"
)
Column_8
(
7
,
"销项开票税额-普票"
),
Column_9
(
8
,
"计税基数 (应税收入)"
),
Column_10
(
9
,
"税率"
),
Column_11
(
10
,
"税额(元)"
),
Column_12
(
11
,
"收入类别"
),
Column_13
(
12
,
"计税方式"
),
Column_14
(
13
,
"备注"
)
;
private
Integer
index
;
private
String
name
;
...
...
atms-api/src/main/java/pwc/taxtech/atms/controller/FileTypesController.java
View file @
7db8502a
...
...
@@ -13,7 +13,7 @@ import pwc.taxtech.atms.thirdparty.ExcelUtil;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.OutputStream
;
import
java.util.HashMap
;
import
java.util.
Linked
HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
...
...
@@ -92,7 +92,7 @@ public class FileTypesController {
@ResponseBody
public
void
exportExcelFile
(
HttpServletResponse
response
){
try
{
Map
<
String
,
String
>
headers
=
new
HashMap
<
String
,
String
>();
Map
<
String
,
String
>
headers
=
new
LinkedHashMap
<
>();
headers
.
put
(
"id"
,
"id"
);
headers
.
put
(
"file_attr"
,
"档案属性"
);
headers
.
put
(
"file_type"
,
"档案类型"
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/controller/OperationLogFileTypeController.java
View file @
7db8502a
...
...
@@ -12,7 +12,7 @@ import pwc.taxtech.atms.thirdparty.ExcelUtil;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.OutputStream
;
import
java.util.HashMap
;
import
java.util.
Linked
HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -93,7 +93,7 @@ public class OperationLogFileTypeController {
public
void
exportExcelFile
(
HttpServletResponse
response
){
// public ReturnData selectListForLog(@RequestBody OperationLogFileType operationLogFileType){
try
{
Map
<
String
,
String
>
headers
=
new
HashMap
<
String
,
String
>();
Map
<
String
,
String
>
headers
=
new
LinkedHashMap
<
>();
headers
.
put
(
"id"
,
"id"
);
// headers.put("operation_content", "操作内容");
// headers.put("module_name", "模块名称");
...
...
atms-api/src/main/java/pwc/taxtech/atms/controller/OperationLogTaxDocController.java
View file @
7db8502a
...
...
@@ -13,7 +13,7 @@ import pwc.taxtech.atms.thirdparty.ExcelUtil;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.OutputStream
;
import
java.util.HashMap
;
import
java.util.
Linked
HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -74,7 +74,7 @@ public class OperationLogTaxDocController {
// public void exportExcelFile(HttpServletResponse response, @RequestBody OperationLogTaxDocument operationLogTaxDocument) {
public
void
exportExcelFile
(
HttpServletResponse
response
)
{
try
{
Map
<
String
,
String
>
headers
=
new
HashMap
<
String
,
String
>();
Map
<
String
,
String
>
headers
=
new
LinkedHashMap
<
>();
headers
.
put
(
"id"
,
"id"
);
// headers.put("operation_content", "操作内容");
// headers.put("module_name", "模块名称");
...
...
atms-api/src/main/java/pwc/taxtech/atms/controller/TaxDocumentController.java
View file @
7db8502a
...
...
@@ -30,10 +30,7 @@ import java.net.HttpURLConnection;
import
java.net.URL
;
import
java.net.URLDecoder
;
import
java.text.SimpleDateFormat
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.UUID
;
import
java.util.*
;
@Controller
@RequestMapping
(
"/api/v1/taxDoc"
)
...
...
@@ -88,24 +85,24 @@ public class TaxDocumentController {
@ResponseBody
public
void
exportExcelFile
(
HttpServletResponse
response
,
@RequestBody
TaxDocumentDto
taxDocumentDto
)
{
try
{
Map
<
String
,
String
>
headers
=
new
HashMap
<
String
,
String
>();
headers
.
put
(
"
id"
,
"id
"
);
headers
.
put
(
"
file_a
ttr"
,
"档案属性"
);
headers
.
put
(
"
file_t
ype"
,
"档案类型"
);
headers
.
put
(
"
file_n
ame"
,
"档案名称"
);
headers
.
put
(
"
business_l
ine"
,
"业务线"
);
headers
.
put
(
"
company_n
ame"
,
"公司名称"
);
headers
.
put
(
"
tax_t
ype"
,
"税种"
);
headers
.
put
(
"
file_t
ime"
,
"文件生效日期"
);
headers
.
put
(
"
effective_t
ime"
,
"有效日期"
);
headers
.
put
(
"
c
reator"
,
"创建人"
);
headers
.
put
(
"
create_t
ime"
,
"创建时间"
);
headers
.
put
(
"
upload_t
ime"
,
"上传日期"
);
headers
.
put
(
"
storage_a
rea"
,
"实物存放地点"
);
headers
.
put
(
"
k
eeper"
,
"保管人"
);
headers
.
put
(
"
r
emark"
,
"档案备注"
);
headers
.
put
(
"
file_position_u
rl"
,
"文件存储的位置"
);
headers
.
put
(
"
own_t
ime"
,
"所属期间"
);
Map
<
String
,
String
>
headers
=
new
LinkedHashMap
<
>();
headers
.
put
(
"
Id"
,
"序号
"
);
headers
.
put
(
"
FileA
ttr"
,
"档案属性"
);
headers
.
put
(
"
FileT
ype"
,
"档案类型"
);
headers
.
put
(
"
FileN
ame"
,
"档案名称"
);
headers
.
put
(
"
BusinessL
ine"
,
"业务线"
);
headers
.
put
(
"
CompanyN
ame"
,
"公司名称"
);
headers
.
put
(
"
TaxT
ype"
,
"税种"
);
headers
.
put
(
"
FileT
ime"
,
"文件生效日期"
);
headers
.
put
(
"
EffectiveT
ime"
,
"有效日期"
);
headers
.
put
(
"
C
reator"
,
"创建人"
);
headers
.
put
(
"
CreateT
ime"
,
"创建时间"
);
headers
.
put
(
"
UploadT
ime"
,
"上传日期"
);
headers
.
put
(
"
StorageA
rea"
,
"实物存放地点"
);
headers
.
put
(
"
K
eeper"
,
"保管人"
);
headers
.
put
(
"
R
emark"
,
"档案备注"
);
headers
.
put
(
"
FilePositionU
rl"
,
"文件存储的位置"
);
headers
.
put
(
"
OwnT
ime"
,
"所属期间"
);
List
<
TaxDocument
>
TaxDocument
=
taxDocumentService
.
selectTaxDocumentList
(
taxDocumentDto
);
response
.
setContentType
(
"multipart/form-data"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;fileName="
+
new
String
(
"taxDocument.xlsx"
.
getBytes
(
"GB2312"
),
"ISO-8859-1"
));
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/AnalysisServiceImpl.java
View file @
7db8502a
...
...
@@ -490,7 +490,7 @@ public class AnalysisServiceImpl extends BaseService {
Sheet
sheet
=
workbook
.
getSheetAt
(
i
);
if
(
isSheetEmpty
(
sheet
))
continue
;
List
<
AnalysisInternationalTaxData
>
lists
=
Lists
.
newArrayList
();
for
(
int
j
=
1
;
j
<=
sheet
.
getLastRowNum
()
;
j
++)
{
for
(
int
j
=
1
;
j
<=
1
;
j
++)
{
Cell
cell1
=
sheet
.
getRow
(
j
).
getCell
(
0
);
if
(
null
==
cell1
||
StringUtils
.
isEmpty
(
getCellStringValue
(
cell1
)))
{
continue
;
...
...
@@ -506,7 +506,7 @@ public class AnalysisServiceImpl extends BaseService {
lists
.
add
(
model
);
}
AnalysisInternationalTaxDataExample
example
=
new
AnalysisInternationalTaxDataExample
();
example
.
createCriteria
().
andPeriodEqualTo
(
selectedPer
);
example
.
createCriteria
().
andPeriodEqualTo
(
selectedPer
)
.
andCountryEqualTo
(
country
).
andCompanyNameEqualTo
(
companyName
)
;
analysisInternationalTaxDataMapper
.
deleteByExample
(
example
);
lists
.
forEach
(
l
->{
analysisInternationalTaxDataMapper
.
insertSelective
(
l
);
...
...
@@ -554,7 +554,7 @@ public class AnalysisServiceImpl extends BaseService {
lists
.
add
(
model
);
}
AnalysisInternationalBusinessDataExample
example
=
new
AnalysisInternationalBusinessDataExample
();
example
.
createCriteria
().
andPeriodEqualTo
(
selectedPer
);
example
.
createCriteria
().
andPeriodEqualTo
(
selectedPer
)
.
andCountryEqualTo
(
country
).
andCompanyNameEqualTo
(
companyName
)
;
analysisInternationalBusinessDataMapper
.
deleteByExample
(
example
);
lists
.
forEach
(
l
->{
analysisInternationalBusinessDataMapper
.
insertSelective
(
l
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/TaxDocumentServiceImpl.java
View file @
7db8502a
...
...
@@ -28,10 +28,7 @@ import java.net.HttpURLConnection;
import
java.net.URL
;
import
java.net.URLDecoder
;
import
java.net.URLEncoder
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.zip.ZipEntry
;
import
java.util.zip.ZipOutputStream
;
...
...
@@ -350,7 +347,7 @@ public class TaxDocumentServiceImpl {
}
public
void
downloadAllFile
(
HttpServletResponse
response
,
List
<
Long
>
ids
)
{
//如果只选择了一个附件,则不打包
if
(
null
!=
ids
&&
ids
.
size
()==
1
)
{
if
(
null
!=
ids
&&
ids
.
size
()
==
1
)
{
TaxDocumentExample
example
=
new
TaxDocumentExample
();
TaxDocumentExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andIdIn
(
ids
);
...
...
@@ -360,8 +357,10 @@ public class TaxDocumentServiceImpl {
if
(
StringUtils
.
isBlank
(
urlPath
))
{
throw
new
RuntimeException
(
"文件url为空,id为:"
+
taxDocument
.
getId
());
}
//文件名称(带后缀)
String
fileName
=
StringUtils
.
isBlank
(
taxDocument
.
getFileOriginalName
())
?
"未知文件(请修改后缀名).xlsx"
:
taxDocument
.
getFileOriginalName
();
//文件名称(带后缀) 文件名前+7位uuid截取码以防文件名相同
String
fileName
=
StringUtils
.
isBlank
(
taxDocument
.
getFileName
())
?
"未知文件(请修改后缀名).xlsx"
:
UUID
.
randomUUID
().
toString
().
substring
(
0
,
6
)
+
"_"
+
taxDocument
.
getFileOriginalName
();
//设置输出流信息
try
{
response
.
setContentType
(
"multipart/form-data"
);
...
...
@@ -399,27 +398,27 @@ public class TaxDocumentServiceImpl {
out
.
write
(
buffer
,
0
,
len
);
}
}
catch
(
IOException
e
)
{
log
.
error
(
"单个附件下载异常:"
+
e
.
getMessage
());
log
.
error
(
"单个附件下载异常:"
+
e
.
getMessage
());
}
finally
{
if
(
null
!=
out
){
if
(
null
!=
out
)
{
try
{
out
.
close
();
}
catch
(
IOException
e
)
{
log
.
error
(
"关闭输出流错误:"
+
e
.
getMessage
());
log
.
error
(
"关闭输出流错误:"
+
e
.
getMessage
());
}
}
if
(
null
!=
is
)
{
try
{
is
.
close
();
}
catch
(
IOException
e
)
{
log
.
error
(
"关闭输入流错误:"
+
e
.
getMessage
());
log
.
error
(
"关闭输入流错误:"
+
e
.
getMessage
());
}
}
if
(
null
!=
in
)
{
try
{
in
.
close
();
}
catch
(
IOException
e
)
{
log
.
error
(
"关闭缓存输入流错误:"
+
e
.
getMessage
());
log
.
error
(
"关闭缓存输入流错误:"
+
e
.
getMessage
());
}
}
}
...
...
@@ -485,8 +484,10 @@ public class TaxDocumentServiceImpl {
if
(
StringUtils
.
isBlank
(
urlPath
))
{
throw
new
RuntimeException
(
"文件url为空,id为:"
+
item
.
getId
());
}
//文件名称(带后缀)
String
fileName
=
StringUtils
.
isBlank
(
item
.
getFileOriginalName
())
?
"未知文件(请修改后缀名).xlsx"
:
item
.
getFileOriginalName
();
//文件名称(带后缀) 文件名前+7位uuid截取码以防文件名相同
String
fileName
=
StringUtils
.
isBlank
(
item
.
getFileName
())
?
"未知文件(请修改后缀名).xlsx"
:
UUID
.
randomUUID
().
toString
().
substring
(
0
,
6
)
+
"_"
+
item
.
getFileName
();
InputStream
is
=
null
;
BufferedInputStream
in
=
null
;
byte
[]
buffer
=
new
byte
[
1024
];
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
View file @
7db8502a
This diff is collapsed.
Click to expand it.
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/KPSR.java
View file @
7db8502a
...
...
@@ -5,16 +5,15 @@ 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.DateUtils
;
import
pwc.taxtech.atms.common.util.SpringContextUtil
;
import
pwc.taxtech.atms.constant.Constant
;
import
pwc.taxtech.atms.constant.enums.
BillDetail
Enum
;
import
pwc.taxtech.atms.constant.enums.
InvoiceRecord
Enum
;
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.OutputInvoiceDataSourceDto
;
import
pwc.taxtech.atms.vat.entity.
BillDetail
;
import
pwc.taxtech.atms.vat.entity.
BillDetail
Example
;
import
pwc.taxtech.atms.vat.entity.
InvoiceRecord
;
import
pwc.taxtech.atms.vat.entity.
InvoiceRecord
Example
;
import
pwc.taxtech.atms.vat.entity.RevenueTypeMapping
;
import
pwc.taxtech.atms.vat.entity.RevenueTypeMappingExample
;
...
...
@@ -34,16 +33,17 @@ public class KPSR extends FunctionBase implements FreeRefFunction {
@Override
public
ValueEval
evaluate
(
ValueEval
[]
args
,
OperationEvaluationContext
ec
)
{
if
(
args
.
length
<
2
)
{
if
(
args
.
length
<
3
)
{
return
null
;
}
String
revenueTypeName
=
getStringParam
(
args
[
0
],
ec
);
//收入类型名称
Integer
billType
=
getIntParam
(
args
[
1
],
ec
);
//发票类型
String
formulaExpression
=
"KPSR(\""
+
revenueTypeName
+
"\","
+
billType
+
")"
;
Integer
amountType
=
getIntParam
(
args
[
2
],
ec
);
//金额类型
String
formulaExpression
=
"KPSR(\""
+
revenueTypeName
+
"\","
+
billType
+
","
+
amountType
+
")"
;
logger
.
debug
(
formulaExpression
);
List
<
OutputInvoiceDataSourceDto
>
dataSource
=
new
ArrayList
<>();
double
result
=
assembleData
(
revenueTypeName
,
dataSource
,
billType
,
ec
);
double
result
=
assembleData
(
revenueTypeName
,
dataSource
,
billType
,
amountType
,
ec
);
Long
dataSoureId
=
saveDataSource
(
ec
,
Collections
.
singletonList
(
dataSource
),
FormulaDataSourceDetailType
.
OutputInvoiceDataSourceDto
,
new
BigDecimal
(
result
),
formulaContext
.
getPeriod
(),
formulaContext
.
getReportTemplateGroupId
(),
formulaContext
.
getProjectId
());
saveFormulaBlock
(
formulaContext
.
getPeriod
(),
ec
,
formulaExpression
,
new
BigDecimal
(
result
),
dataSoureId
,
formulaContext
.
getProjectId
());
...
...
@@ -51,7 +51,7 @@ public class KPSR extends FunctionBase implements FreeRefFunction {
}
private
double
assembleData
(
String
revenueTypeName
,
List
<
OutputInvoiceDataSourceDto
>
contain
,
Integer
billType
,
OperationEvaluationContext
ec
)
{
private
double
assembleData
(
String
revenueTypeName
,
List
<
OutputInvoiceDataSourceDto
>
contain
,
Integer
billType
,
Integer
amountType
,
OperationEvaluationContext
ec
)
{
String
queryDate
=
formulaContext
.
getYear
()+(
formulaContext
.
getPeriod
()<
10
?(
"0"
+
formulaContext
.
getPeriod
()):(
formulaContext
.
getPeriod
()+
""
));
RevenueTypeMappingExample
typeMappingExample
=
new
RevenueTypeMappingExample
();
...
...
@@ -67,30 +67,36 @@ public class KPSR extends FunctionBase implements FreeRefFunction {
if
(
CollectionUtils
.
isEmpty
(
contens
))
{
return
0.0
;
}
BillDetailExample
billDetailExample
=
new
BillDetailExample
();
BillDetailExample
.
Criteria
c
=
billDetailExample
.
createCriteria
().
andBillContentIn
(
contens
).
andProjectIdEqualTo
(
formulaContext
.
getProjectId
())
InvoiceRecordExample
invoiceRecordExample
=
new
InvoiceRecordExample
();
InvoiceRecordExample
.
Criteria
c
=
invoiceRecordExample
.
createCriteria
().
andBillingContentIn
(
contens
)
.
andProjectIdEqualTo
(
formulaContext
.
getProjectId
())
.
andPeriodEqualTo
(
Integer
.
valueOf
(
queryDate
))
.
and
BillTypeEqualTo
(
BillDetailEnum
.
Bill
Type
.
MAPPING
.
get
(
billType
));
List
<
BillDetail
>
billDetails
=
SpringContextUtil
.
billDetailMapper
.
selectByExample
(
billDetail
Example
);
for
(
BillDetail
billDetail
:
billDetails
)
{
.
and
InvoiceTypeEqualTo
(
InvoiceRecordEnum
.
Invoice
Type
.
MAPPING
.
get
(
billType
));
List
<
InvoiceRecord
>
billDetails
=
SpringContextUtil
.
invoiceRecordMapper
.
selectByExample
(
invoiceRecord
Example
);
for
(
InvoiceRecord
invoiceRecord
:
billDetails
)
{
OutputInvoiceDataSourceDto
outputInvoiceDataSourceDto
=
new
OutputInvoiceDataSourceDto
();
outputInvoiceDataSourceDto
.
setAmount
(
FormulaHelper
.
roundValue
(
billDetail
.
getBill
Amount
(),
outputInvoiceDataSourceDto
.
setAmount
(
FormulaHelper
.
roundValue
(
invoiceRecord
.
getInvoice
Amount
(),
KeyValueConfigResultType
.
Accounting
,
null
,
formulaContext
));
outputInvoiceDataSourceDto
.
setResultType
(
KeyValueConfigResultType
.
Accounting
.
getCode
());
outputInvoiceDataSourceDto
.
setTaxAmount
(
FormulaHelper
.
roundValue
(
billDetail
.
getTaxAmount
(),
outputInvoiceDataSourceDto
.
setTaxAmount
(
FormulaHelper
.
roundValue
(
invoiceRecord
.
getTaxAmount
(),
KeyValueConfigResultType
.
Accounting
,
null
,
formulaContext
));
outputInvoiceDataSourceDto
.
setTaxRate
(
billDetail
.
getTaxRate
());
outputInvoiceDataSourceDto
.
setBuyerName
(
billDetail
.
getCustomer
());
outputInvoiceDataSourceDto
.
setInvoiceCode
(
billDetail
.
getBill
Code
());
outputInvoiceDataSourceDto
.
setInvoiceNumber
(
billDetail
.
getBillNo
());
outputInvoiceDataSourceDto
.
setInvoiceDate
(
DateUtils
.
strToDate
(
billDetail
.
getBillDate
()
));
outputInvoiceDataSourceDto
.
setTaxRate
(
invoiceRecord
.
getTaxRate
());
outputInvoiceDataSourceDto
.
setBuyerName
(
invoiceRecord
.
getCustomerCompanyName
());
outputInvoiceDataSourceDto
.
setInvoiceCode
(
invoiceRecord
.
getInvoice
Code
());
outputInvoiceDataSourceDto
.
setInvoiceNumber
(
invoiceRecord
.
getInvoiceNum
());
outputInvoiceDataSourceDto
.
setInvoiceDate
(
invoiceRecord
.
getBillingDate
(
));
outputInvoiceDataSourceDto
.
setInvoiceType
(
billType
);
outputInvoiceDataSourceDto
.
setPeriod
(
formulaContext
.
getPeriod
());
outputInvoiceDataSourceDto
.
setName
(
Constant
.
DataSourceName
.
OutputInvoiceDataSource
);
outputInvoiceDataSourceDto
.
setOperationType
(
EnumOperationType
.
Single
.
getCode
());
contain
.
add
(
outputInvoiceDataSourceDto
);
}
return
billDetails
.
stream
().
mapToDouble
(
a
->
a
.
getBillAmount
().
doubleValue
()).
sum
();
if
(
InvoiceRecordEnum
.
AmountType
.
INVOICE_AMOUNT
.
getCode
().
equals
(
amountType
)){
return
billDetails
.
stream
().
mapToDouble
(
a
->
a
.
getInvoiceAmount
().
doubleValue
()).
sum
();
}
else
if
(
InvoiceRecordEnum
.
AmountType
.
TAX_AMOUNT
.
getCode
().
equals
(
amountType
)){
return
billDetails
.
stream
().
mapToDouble
(
a
->
a
.
getTaxAmount
().
doubleValue
()).
sum
();
}
return
0
;
}
...
...
atms-api/src/main/resources/analysis_excel_template/international_bu_data.xlsx
View file @
7db8502a
No preview for this file type
atms-web/src/main/webapp/app-resources/i18n/en-us/vat.json
View file @
7db8502a
...
...
@@ -996,6 +996,8 @@
"PleaseSelect"
:
"Please Select..."
,
"PleaseSelectColumn"
:
"Please Select Column Name"
,
"PleaseSelectFileFirst"
:
"Please Choose at Lease One File!"
,
"PleaseSelectCountryFirst"
:
"Please Choose at one country!"
,
"PleaseSelectCompanyFirst"
:
"Please Choose at one company!"
,
"PostedBy"
:
"Posted by"
,
"PostingPeriod"
:
"Posting Period"
,
"PreVoucherNumber"
:
"Initial Value of Voucher Number"
,
...
...
atms-web/src/main/webapp/app-resources/i18n/zh-CN/vat.json
View file @
7db8502a
...
...
@@ -1293,6 +1293,8 @@
"PleaseSelectColumn"
:
"请选择列名"
,
"PleaseSelectFile"
:
"请先选择文件"
,
"PleaseSelectFileFirst"
:
"请先选择文件!"
,
"PleaseSelectCountryFirst"
:
"请先选择国家!"
,
"PleaseSelectCompanyFirst"
:
"请先选择公司!"
,
"PleaseSelectProductType"
:
"请选择商品种类"
,
"PleaseSelectRecordToDelete"
:
"请选择需要删除的记录!"
,
"PleaseSelectServiceType"
:
"请选择服务类型"
,
...
...
atms-web/src/main/webapp/app/analysis/data-import/international-data-import/international-data-import.ctrl.js
View file @
7db8502a
...
...
@@ -30,11 +30,8 @@
$scope
.
showTotalSecondRow
=
false
;
$scope
.
importExcelFileUrlList
=
{
taxData
:
apiInterceptor
.
webApiHostUrl
+
'/Analysis/InternationalExcelFile'
,
returnTax
:
apiInterceptor
.
webApiHostUrl
+
'/Analysis/InternationalExcelFile'
,
gmvSubsidy
:
apiInterceptor
.
webApiHostUrl
+
'/Analysis/InternationalExcelFile'
,
employeeNum
:
apiInterceptor
.
webApiHostUrl
+
'/Analysis/InternationalExcelFile'
,
driverNum
:
apiInterceptor
.
webApiHostUrl
+
'/Analysis/InternationalExcelFile'
internationalBU
:
apiInterceptor
.
webApiHostUrl
+
'/Analysis/InternationalExcelFile'
,
internationalTax
:
apiInterceptor
.
webApiHostUrl
+
'/Analysis/InternationalExcelFile'
};
$scope
.
maxTitleLength
=
constant
.
maxButtonTitleLength
;
...
...
@@ -197,10 +194,21 @@
return
;
}
if
(
!
$scope
.
selectCountry
||
''
===
$scope
.
selectCountry
){
SweetAlert
.
warning
(
$translate
.
instant
(
'PleaseSelectFileFirst'
));
return
;
}
if
(
!
$scope
.
selectCompany
||
''
===
$scope
.
selectCompany
){
SweetAlert
.
warning
(
$translate
.
instant
(
'PleaseSelectFileFirst'
));
return
;
}
var
url
=
getUploadUrl
();
var
period
=
$scope
.
UploadPeriodTime
;
Upload
.
upload
({
url
:
url
,
data
:
{
...
...
@@ -254,10 +262,10 @@
var
url
=
""
;
switch
(
$scope
.
importType
)
{
case
100
:
url
=
$scope
.
importExcelFileUrlList
.
taxData
;
url
=
$scope
.
importExcelFileUrlList
.
internationalBU
;
break
;
case
101
:
url
=
$scope
.
importExcelFileUrlList
.
return
Tax
;
url
=
$scope
.
importExcelFileUrlList
.
international
Tax
;
break
;
default
:
break
;
...
...
@@ -300,39 +308,34 @@
columns
:
[
{
dataField
:
"gmv"
,
width
:
'1
4
%'
,
width
:
'1
6
%'
,
allowHeaderFiltering
:
false
,
caption
:
'Gmv'
},
{
dataField
:
"trips"
,
allowHeaderFiltering
:
false
,
caption
:
'Trips'
,
width
:
'1
4
%'
width
:
'1
6
%'
},
{
dataField
:
"subsidyB"
,
allowHeaderFiltering
:
false
,
width
:
'1
4
%'
,
width
:
'1
6
%'
,
caption
:
'SubsidyB'
},
{
dataField
:
"subsidyC"
,
allowHeaderFiltering
:
false
,
width
:
'1
4
%'
,
width
:
'1
6
%'
,
caption
:
'SubsidyC'
},
{
dataField
:
"revenue"
,
allowHeaderFiltering
:
false
,
width
:
'1
4
%'
,
width
:
'1
6
%'
,
caption
:
'Revenue'
},
{
dataField
:
"profit"
,
allowHeaderFiltering
:
false
,
width
:
'1
4
%'
,
width
:
'1
6
%'
,
caption
:
'Profit'
},
{
dataField
:
"exchangeRate"
,
allowHeaderFiltering
:
false
,
width
:
'14%'
,
caption
:
'ExchangeRate'
}],
onContentReady
:
function
(
e
)
{
$scope
.
accountingRateListInstance
=
e
.
component
;
...
...
atms-web/src/main/webapp/app/common/controls/tax-report-cell-detail-modal/tax-report-cell-detail-modal.ctrl.js
View file @
7db8502a
...
...
@@ -642,6 +642,9 @@
||
$scope
.
selectedTabIndex
===
enums
.
formulaDataSourceType
.
InputInvoiceDetail
||
$scope
.
selectedTabIndex
===
enums
.
formulaDataSourceType
.
OutputInvoice
||
$scope
.
selectedTabIndex
===
enums
.
formulaDataSourceType
.
InvoiceFilter
)
{
if
(
new
Number
(
$scope
.
detail
.
cellTemplateId
)
<
0
){
$
(
"#dataGridFooterSummary"
).
html
(
""
);
}
else
{
evalVal
=
_
.
reduce
(
$scope
.
detail
.
dataGridSource
,
function
(
memo
,
x
)
{
if
(
x
.
money
){
return
memo
+
x
.
money
;
...
...
@@ -667,6 +670,7 @@
+
evalVal
.
formatAmount
(
precition
)
+
' '
+
$translate
.
instant
(
'TaxAmount'
)
+
': '
+
evalTaxVal
.
formatAmount
(
precition
));
}
}
else
if
(
$scope
.
selectedTabIndex
===
enums
.
formulaDataSourceType
.
Voucher
)
{
evalVal
=
_
.
reduce
(
$scope
.
detail
.
dataGridSource
,
function
(
memo
,
x
)
{
return
memo
+
x
.
debit
-
x
.
credit
;
...
...
atms-web/src/main/webapp/app/taxDocumentManage/tax-document-list/tax-document-list.ctrl.js
View file @
7db8502a
...
...
@@ -875,9 +875,9 @@ taxDocumentManageModule.directive('multiFileUploader', function () {
params.effectiveTime = $scope.getQueryDate(params.effectiveTime, "
-
");
_taxDocumentListService.verifyDuplicate(params).then(function (data) {
if (data == true) {
_fileItem.url =
"
http
:
//etms.longi-silicon.com:8180//api/v1
/taxDoc/add";
_fileItem.url =
apiInterceptor.webApiHostUrl + "
/
taxDoc
/
add
";
} else {
_fileItem
.
url
=
"http://etms.longi-silicon.com:8180//api/v1
/taxDoc/edit"
;
_fileItem.url =
apiInterceptor.webApiHostUrl + "
/
taxDoc
/
edit
";
}
_multiUploader.uploadItem(_i);
});
...
...
@@ -1543,8 +1543,9 @@ taxDocumentManageModule.directive('downLoadModule', function () {
controller: ['$scope', 'taxDocumentListService', '$translate','SweetAlert',
function ($scope, taxDocumentListService, $translate,SweetAlert) {
/* $scope.downloadAttachment = function () {
var checkedIDs = [
$scope.downloadAttachment = function () {
var checkedIDs = [];
var checkedUrls = [
// 'http://47.94.233.173:11007/static/erp_tax_system/3221D133-85B8-4E22-AE9B-DBEBD942D217?expire=1552361736&signiture=_Wz1_8Z6T8h5qnZAGpoRa8kNZeqmE7KoztKeehzYK4U=',
// 'http://47.94.233.173:11007/static/erp_tax_system/3221D133-85B8-4E22-AE9B-DBEBD942D217?expire=1552361736&signiture=_Wz1_8Z6T8h5qnZAGpoRa8kNZeqmE7KoztKeehzYK4U=',
// 'http://47.94.233.173:11007/static/erp_tax_system/3221D133-85B8-4E22-AE9B-DBEBD942D217?expire=1552361736&signiture=_Wz1_8Z6T8h5qnZAGpoRa8kNZeqmE7KoztKeehzYK4U=',
...
...
@@ -1553,14 +1554,40 @@ taxDocumentManageModule.directive('downLoadModule', function () {
$("
input
[
name
=
'dataGridCheckBox'
]
").each(function (index, item) {
if (item.checked) {
var cellId = $(item).attr("
data
-
id
");
var cellUrl = $(item).attr("
data
-
url
");
checkedIDs.push(cellId);
checkedUrls.push(cellUrl);
}
});
if(checkedIDs.length === 1 && checkedUrls.length === 1){
simpDownload(checkedUrls[0]);
}else{
multiDownToZip(checkedIDs);
}
};
function simpDownload(url){
if (!url) return SweetAlert.warning($translate.instant("
NeedChecked
"));
// setTimeout(function () {
var frame = $('<iframe style="
display
:
none
;
" class="
multi
-
download
"></iframe>');
frame.attr('src', url);
document.body.appendChild(frame[0]);
setTimeout(function () {
frame.remove();
}, 1000);
// }, 100);
}
function multiDownToZip(ids){
if (!ids.length) return SweetAlert.warning($translate.instant("
NeedChecked
"));
setTimeout(function(){
taxDocumentListService.downloadAllFile({
"ids":checkedID
s
"
ids
":id
s
});
};*/
$scope
.
downloadAttachment
=
function
()
{
},500);
}
/*$scope.downloadAttachment = function () {
var checkedURLs = [
// 'http://47.94.233.173:11007/static/erp_tax_system/3221D133-85B8-4E22-AE9B-DBEBD942D217?expire=1552361736&signiture=_Wz1_8Z6T8h5qnZAGpoRa8kNZeqmE7KoztKeehzYK4U=',
// 'http://47.94.233.173:11007/static/erp_tax_system/3221D133-85B8-4E22-AE9B-DBEBD942D217?expire=1552361736&signiture=_Wz1_8Z6T8h5qnZAGpoRa8kNZeqmE7KoztKeehzYK4U=',
...
...
@@ -1589,7 +1616,7 @@ taxDocumentManageModule.directive('downLoadModule', function () {
}, _removeDelay);
}, _triggerDelay);
}
};
};
*/
}]
}
});
...
...
atms-web/src/main/webapp/app/taxDocumentManage/tax-document-list/tax-document-list.svc.js
View file @
7db8502a
...
...
@@ -79,6 +79,7 @@ taxDocumentManageModule.factory('taxDocumentListService',
return
jqFetch
.
get
(
apiInterceptor
.
webApiHostUrl
+
'/businessunit/getlist'
,
params
);
},
downloadAllFile
:
function
(
params
){
$
(
'#busy-indicator-container'
).
show
();
//post请求会自带http://etms.longi-silicon.com:8180//api/v1的前缀路径,get请求不会
var
xhr
=
new
XMLHttpRequest
();
xhr
.
open
(
'POST'
,
apiInterceptor
.
webApiHostUrl
+
"/taxDoc/downloadAllFile"
,
true
);
...
...
@@ -119,6 +120,7 @@ taxDocumentManageModule.factory('taxDocumentListService',
}
else
{
window
.
location
=
objectUrl
;
}
$
(
'#busy-indicator-container'
).
hide
();
}
}
};
...
...
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