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
68f705b9
Commit
68f705b9
authored
Feb 19, 2019
by
Ken you
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix vat cash flow view---Ken
parent
59e0d05f
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
296 additions
and
417 deletions
+296
-417
pom.xml
atms-api/pom.xml
+34
-0
ResponseMessageBuilder.java
.../java/pwc/taxtech/atms/common/ResponseMessageBuilder.java
+37
-0
DataPreviewController.java
...va/pwc/taxtech/atms/controller/DataPreviewController.java
+7
-0
CashFlowHeader.java
...c/taxtech/atms/dto/vatdto/excelheader/CashFlowHeader.java
+16
-0
BaseService.java
.../main/java/pwc/taxtech/atms/service/impl/BaseService.java
+5
-0
CommonDocumentHelper.java
...a/pwc/taxtech/atms/service/impl/CommonDocumentHelper.java
+83
-0
DataPreviewSerivceImpl.java
...pwc/taxtech/atms/service/impl/DataPreviewSerivceImpl.java
+51
-5
JxlsUtils.java
...rc/main/java/pwc/taxtech/atms/service/impl/JxlsUtils.java
+20
-0
sqlMapConfig.xml
atms-api/src/main/resources/sqlMapConfig.xml
+1
-1
cash_flow.xlsx
...-api/src/main/resources/vat_excel_template/cash_flow.xlsx
+0
-0
CashFlowMapper.java
...rc/main/java/pwc/taxtech/atms/vat/dao/CashFlowMapper.java
+5
-1
CashFlowExtendsMapper.xml
...wc/taxtech/atms/vat/dao/extends/CashFlowExtendsMapper.xml
+7
-0
constant.js
atms-web/src/main/webapp/app/common/utils/constant.js
+1
-1
vatPreviewService.js
...c/main/webapp/app/common/vatservices/vatPreviewService.js
+9
-3
vat-preview-cash-flow.ctrl.js
...eview/vat-preview-cash-flow/vat-preview-cash-flow.ctrl.js
+17
-385
vat-preview-cash-flow.html
.../preview/vat-preview-cash-flow/vat-preview-cash-flow.html
+3
-21
No files found.
atms-api/pom.xml
View file @
68f705b9
...
@@ -397,6 +397,32 @@
...
@@ -397,6 +397,32 @@
<version>
3.2.6
</version>
<version>
3.2.6
</version>
</dependency>
</dependency>
<!--CXF END-->
<!--CXF END-->
<!-- https://mvnrepository.com/artifact/org.jxls/jxls -->
<dependency>
<groupId>
org.jxls
</groupId>
<artifactId>
jxls
</artifactId>
<version>
2.4.5
</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.jxls/jxls-poi -->
<dependency>
<groupId>
org.jxls
</groupId>
<artifactId>
jxls-poi
</artifactId>
<version>
1.0.15
</version>
</dependency>
<!-- https://mvnrepository.com/artifact/net.sf.jxls/jxls-core -->
<dependency>
<groupId>
net.sf.jxls
</groupId>
<artifactId>
jxls-core
</artifactId>
<version>
1.0.6
</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
<dependency>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
<version>
1.18.0
</version>
<scope>
provided
</scope>
</dependency>
</dependencies>
</dependencies>
<profiles>
<profiles>
...
@@ -468,6 +494,14 @@
...
@@ -468,6 +494,14 @@
</includes>
</includes>
<targetPath>
${basedir}/target/classes/userTemplate
</targetPath>
<targetPath>
${basedir}/target/classes/userTemplate
</targetPath>
</resource>
</resource>
<resource>
<directory>
src/main/resources/vat_excel_template
</directory>
<includes>
<include>
**/*.xls
</include>
<include>
**/*.xlsx
</include>
</includes>
<targetPath>
${basedir}/target/classes/vat_excel_template
</targetPath>
</resource>
</resources>
</resources>
<plugins>
<plugins>
<plugin>
<plugin>
...
...
atms-api/src/main/java/pwc/taxtech/atms/common/ResponseMessageBuilder.java
0 → 100644
View file @
68f705b9
package
pwc
.
taxtech
.
atms
.
common
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.stereotype.Component
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.ByteArrayOutputStream
;
import
java.io.OutputStream
;
import
java.net.URLEncoder
;
import
java.time.LocalDateTime
;
import
java.time.format.DateTimeFormatter
;
@Component
public
class
ResponseMessageBuilder
{
private
final
Logger
logger
=
LoggerFactory
.
getLogger
(
this
.
getClass
());
public
HttpServletResponse
getDownloadTmpResponseMessage
(
HttpServletResponse
response
,
OutputStream
outputStream
,
String
fileName
)
throws
Exception
{
fileName
=
fileName
+
DateTimeFormatter
.
ofPattern
(
"yyyyMMddHHmmssSSS"
).
format
(
LocalDateTime
.
now
())
+
".xlsx"
;
response
.
setContentType
(
"application/octet-stream;charset=UTF-8"
);
response
.
setHeader
(
"Access-Control-Expose-Headers"
,
"x-file-name"
);
response
.
addHeader
(
"Content-Disposition"
,
"attachment; filename="
+
fileName
);
try
(
OutputStream
responseOutputStream
=
response
.
getOutputStream
())
{
response
.
setHeader
(
"x-file-name"
,
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
ByteArrayOutputStream
byteArrayOutputStream
=
(
ByteArrayOutputStream
)
outputStream
;
responseOutputStream
.
write
(
byteArrayOutputStream
.
toByteArray
());
}
catch
(
Exception
e
)
{
logger
.
error
(
"Error write data to response output stream"
);
e
.
printStackTrace
();
throw
new
Exception
(
e
.
getMessage
());
}
return
response
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/controller/DataPreviewController.java
View file @
68f705b9
...
@@ -55,6 +55,13 @@ public class DataPreviewController extends BaseController {
...
@@ -55,6 +55,13 @@ public class DataPreviewController extends BaseController {
return
dataPreviewSerivceImpl
.
getBSDataForDisplay
(
param
);
return
dataPreviewSerivceImpl
.
getBSDataForDisplay
(
param
);
}
}
@RequestMapping
(
value
=
"exportCFData/get"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
void
downloadCFQueryData
(
@RequestBody
CashFlowParam
param
,
HttpServletResponse
response
)
{
logger
.
debug
(
"enter downloadCFQueryData"
);
String
fileName
=
"testFile"
;
dataPreviewSerivceImpl
.
exportCashFlowList
(
response
,
param
,
fileName
);
}
@RequestMapping
(
value
=
"exportTBData/get"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@RequestMapping
(
value
=
"exportTBData/get"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
void
downloadTBQueryData
(
@RequestBody
TrialBalanceParam
paras
,
HttpServletResponse
response
)
{
public
void
downloadTBQueryData
(
@RequestBody
TrialBalanceParam
paras
,
HttpServletResponse
response
)
{
response
.
setContentType
(
"application/vnd.ms-excel;charset=utf-8"
);
response
.
setContentType
(
"application/vnd.ms-excel;charset=utf-8"
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/vatdto/excelheader/CashFlowHeader.java
0 → 100644
View file @
68f705b9
package
pwc
.
taxtech
.
atms
.
dto
.
vatdto
.
excelheader
;
import
lombok.Getter
;
import
lombok.Setter
;
@Getter
@Setter
public
class
CashFlowHeader
{
private
String
companyNameCn
;
private
String
companyNameEn
;
private
Integer
periodStart
;
private
Integer
periodEnd
;
private
String
ledgerName
;
private
String
ledgerCurrencyCode
;
private
String
status
;
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/BaseService.java
View file @
68f705b9
...
@@ -6,6 +6,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -6,6 +6,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.client.RestTemplate
;
import
pwc.taxtech.atms.common.AtmsApiSettings
;
import
pwc.taxtech.atms.common.AtmsApiSettings
;
import
pwc.taxtech.atms.common.AuthUserHelper
;
import
pwc.taxtech.atms.common.AuthUserHelper
;
import
pwc.taxtech.atms.common.ResponseMessageBuilder
;
import
pwc.taxtech.atms.common.util.BeanUtil
;
import
pwc.taxtech.atms.common.util.BeanUtil
;
public
class
BaseService
{
public
class
BaseService
{
...
@@ -23,5 +24,9 @@ public class BaseService {
...
@@ -23,5 +24,9 @@ public class BaseService {
protected
BeanUtil
beanUtil
;
protected
BeanUtil
beanUtil
;
@Autowired
@Autowired
protected
RestTemplate
restTemplate
;
protected
RestTemplate
restTemplate
;
@Autowired
protected
CommonDocumentHelper
commonDocumentHelper
;
@Autowired
protected
ResponseMessageBuilder
responseMessageBuilder
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/CommonDocumentHelper.java
0 → 100644
View file @
68f705b9
package
pwc
.
taxtech
.
atms
.
service
.
impl
;
import
org.jxls.common.Context
;
import
org.jxls.expression.JexlExpressionEvaluator
;
import
org.jxls.transform.Transformer
;
import
org.jxls.util.JxlsHelper
;
import
org.nutz.lang.Lang
;
import
org.nutz.lang.Streams
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.stereotype.Component
;
import
java.io.ByteArrayOutputStream
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.OutputStream
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@Component
public
class
CommonDocumentHelper
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
CommonDocumentHelper
.
class
);
public
void
toXlsxFileUsingJxls
(
List
<?>
list
,
String
excelTemplatePathInClassPath
,
String
outputFilePath
)
{
//InputStream is = Streams.fileIn(excelTemplatePathInClassPath);
InputStream
is
=
this
.
getClass
().
getResourceAsStream
(
excelTemplatePathInClassPath
);
OutputStream
os
=
Streams
.
fileOut
(
outputFilePath
);
Context
context
=
new
Context
();
context
.
putVar
(
"list"
,
list
);
context
.
putVar
(
"REPORT_DATE"
,
new
Date
());
JxlsHelper
jxlsHelper
=
JxlsHelper
.
getInstance
();
Transformer
transformer
=
jxlsHelper
.
createTransformer
(
is
,
os
);
JexlExpressionEvaluator
evaluator
=
(
JexlExpressionEvaluator
)
transformer
.
getTransformationConfig
()
.
getExpressionEvaluator
();
// evaluator.getJexlEngine().setSilent(true); // 设置静默模式,不报警告
Map
<
String
,
Object
>
funcs
=
new
HashMap
<
String
,
Object
>();
funcs
.
put
(
"myutils"
,
new
JxlsUtils
());
evaluator
.
getJexlEngine
().
setFunctions
(
funcs
);
// jxlsHelper.setUseFastFormulaProcessor(false); //与统计函数有关
try
{
jxlsHelper
.
processTemplate
(
context
,
transformer
);
}
catch
(
IOException
e
)
{
logger
.
error
(
"error when calling processTemplate:"
+
e
,
e
);
throw
Lang
.
wrapThrow
(
e
);
}
finally
{
Streams
.
safeClose
(
is
);
Streams
.
safeClose
(
os
);
}
}
public
OutputStream
toXlsxFileUsingJxls
(
Object
header
,
List
<?>
list
,
String
excelTemplatePathInClassPath
)
{
//InputStream is = Streams.fileIn(excelTemplatePathInClassPath);
InputStream
is
=
this
.
getClass
().
getResourceAsStream
(
excelTemplatePathInClassPath
);
OutputStream
os
=
new
ByteArrayOutputStream
();
Context
context
=
new
Context
();
context
.
putVar
(
"header"
,
header
);
context
.
putVar
(
"list"
,
list
);
context
.
putVar
(
"REPORT_DATE"
,
new
Date
());
JxlsHelper
jxlsHelper
=
JxlsHelper
.
getInstance
();
Transformer
transformer
=
jxlsHelper
.
createTransformer
(
is
,
os
);
JexlExpressionEvaluator
evaluator
=
(
JexlExpressionEvaluator
)
transformer
.
getTransformationConfig
()
.
getExpressionEvaluator
();
// evaluator.getJexlEngine().setSilent(true); // 设置静默模式,不报警告
Map
<
String
,
Object
>
funcs
=
new
HashMap
<
String
,
Object
>();
funcs
.
put
(
"myutils"
,
new
JxlsUtils
());
evaluator
.
getJexlEngine
().
setFunctions
(
funcs
);
// jxlsHelper.setUseFastFormulaProcessor(false); //与统计函数有关
try
{
jxlsHelper
.
processTemplate
(
context
,
transformer
);
}
catch
(
IOException
e
)
{
logger
.
error
(
"error when calling processTemplate:"
+
e
,
e
);
throw
Lang
.
wrapThrow
(
e
);
}
finally
{
Streams
.
safeClose
(
is
);
Streams
.
safeClose
(
os
);
}
return
os
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/DataPreviewSerivceImpl.java
View file @
68f705b9
package
pwc
.
taxtech
.
atms
.
service
.
impl
;
package
pwc
.
taxtech
.
atms
.
service
.
impl
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
pwc.taxtech.atms.dao.OrganizationMapper
;
import
pwc.taxtech.atms.dto.vatdto.*
;
import
pwc.taxtech.atms.dto.vatdto.*
;
import
pwc.taxtech.atms.dto.vatdto.dd.*
;
import
pwc.taxtech.atms.dto.vatdto.dd.*
;
import
pwc.taxtech.atms.dto.vatdto.dd.TrialBalanceDto
;
import
pwc.taxtech.atms.dto.vatdto.dd.TrialBalanceDto
;
import
pwc.taxtech.atms.dto.vatdto.excelheader.CashFlowHeader
;
import
pwc.taxtech.atms.entity.Organization
;
import
pwc.taxtech.atms.thirdparty.ExcelUtil
;
import
pwc.taxtech.atms.thirdparty.ExcelUtil
;
import
pwc.taxtech.atms.vat.dao.*
;
import
pwc.taxtech.atms.vat.dao.*
;
import
pwc.taxtech.atms.vat.dpo.*
;
import
pwc.taxtech.atms.vat.dpo.*
;
...
@@ -14,11 +18,9 @@ import pwc.taxtech.atms.vat.dpo.TrialBalanceCondition;
...
@@ -14,11 +18,9 @@ import pwc.taxtech.atms.vat.dpo.TrialBalanceCondition;
import
pwc.taxtech.atms.vat.entity.*
;
import
pwc.taxtech.atms.vat.entity.*
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.OutputStream
;
import
java.io.OutputStream
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* @Auther: Gary J Li
* @Auther: Gary J Li
...
@@ -42,6 +44,8 @@ public class DataPreviewSerivceImpl extends BaseService {
...
@@ -42,6 +44,8 @@ public class DataPreviewSerivceImpl extends BaseService {
@Resource
@Resource
private
CashFlowMapper
cashFlowMapper
;
private
CashFlowMapper
cashFlowMapper
;
@Resource
private
OrganizationMapper
organizationMapper
;
public
PageInfo
<
TrialBalanceDto
>
getTBDataForDisplay
(
TrialBalanceParam
param
)
{
public
PageInfo
<
TrialBalanceDto
>
getTBDataForDisplay
(
TrialBalanceParam
param
)
{
...
@@ -85,6 +89,30 @@ public class DataPreviewSerivceImpl extends BaseService {
...
@@ -85,6 +89,30 @@ public class DataPreviewSerivceImpl extends BaseService {
}
}
public
PageInfo
<
CashFlowDto
>
getCFDataForDisplay
(
CashFlowParam
param
)
{
public
PageInfo
<
CashFlowDto
>
getCFDataForDisplay
(
CashFlowParam
param
)
{
CashFlowCondition
condition
=
new
CashFlowCondition
();
beanUtil
.
copyProperties
(
param
,
condition
);
//Integer totalCount=cashFlowMapper.selectCountByCondition(condition);
List
<
CashFlowDto
>
cashFlowDtos
=
Lists
.
newArrayList
();
Page
page
=
PageHelper
.
startPage
(
param
.
getPageInfo
().
getPageIndex
(),
param
.
getPageInfo
().
getPageSize
());
List
<
CashFlow
>
cashFlows
=
cashFlowMapper
.
selectByCondition
(
condition
);
//使用page的getTotal()
Long
total
=
page
.
getTotal
();
cashFlows
.
forEach
(
cf
->
{
CashFlowDto
cashFlowDto
=
new
CashFlowDto
();
beanUtil
.
copyProperties
(
cf
,
cashFlowDto
);
cashFlowDtos
.
add
(
cashFlowDto
);
});
PageInfo
<
CashFlowDto
>
pageInfo
=
new
PageInfo
<>(
cashFlowDtos
);
pageInfo
.
setTotal
(
total
);
pageInfo
.
setPageNum
(
param
.
getPageInfo
().
getPageIndex
());
return
pageInfo
;
}
public
HttpServletResponse
exportCashFlowList
(
HttpServletResponse
response
,
CashFlowParam
param
,
String
fileName
)
{
//Boolean isEn = StringUtils.equals(language, "en-us");
logger
.
debug
(
"start export input invoice list to excel"
);
//String excelTemplatePathInClassPath = "/vat_excel_template/cash_flow"+(isEn?"":"_cn") + ".xlsx";
String
excelTemplatePathInClassPath
=
"/vat_excel_template/cash_flow.xlsx"
;
CashFlowCondition
condition
=
new
CashFlowCondition
();
CashFlowCondition
condition
=
new
CashFlowCondition
();
beanUtil
.
copyProperties
(
param
,
condition
);
beanUtil
.
copyProperties
(
param
,
condition
);
PageHelper
.
startPage
(
param
.
getPageInfo
().
getPageIndex
(),
param
.
getPageInfo
().
getPageSize
());
PageHelper
.
startPage
(
param
.
getPageInfo
().
getPageIndex
(),
param
.
getPageInfo
().
getPageSize
());
...
@@ -95,7 +123,25 @@ public class DataPreviewSerivceImpl extends BaseService {
...
@@ -95,7 +123,25 @@ public class DataPreviewSerivceImpl extends BaseService {
beanUtil
.
copyProperties
(
cf
,
cashFlowDto
);
beanUtil
.
copyProperties
(
cf
,
cashFlowDto
);
cashFlowDtos
.
add
(
cashFlowDto
);
cashFlowDtos
.
add
(
cashFlowDto
);
});
});
return
new
PageInfo
<>(
cashFlowDtos
);
CashFlowHeader
cashFlowHeader
=
new
CashFlowHeader
();
if
(
cashFlowDtos
.
size
()>
0
){
Organization
org
=
organizationMapper
.
selectByPrimaryKey
(
param
.
getOrgId
());
cashFlowHeader
.
setCompanyNameCn
(
org
.
getName
());
cashFlowHeader
.
setPeriodStart
(
param
.
getPeriodStart
());
cashFlowHeader
.
setPeriodEnd
(
param
.
getPeriodEnd
());
cashFlowHeader
.
setLedgerName
(
cashFlowDtos
.
get
(
0
).
getLedgerName
());
cashFlowHeader
.
setLedgerCurrencyCode
(
cashFlowDtos
.
get
(
0
).
getLedgerCurrencyCode
());
cashFlowHeader
.
setStatus
(
cashFlowDtos
.
get
(
0
).
getStatus
());
}
OutputStream
outputStream
=
commonDocumentHelper
.
toXlsxFileUsingJxls
(
cashFlowHeader
,
cashFlowDtos
,
excelTemplatePathInClassPath
);
try
{
return
responseMessageBuilder
.
getDownloadTmpResponseMessage
(
response
,
outputStream
,
fileName
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
logger
.
error
(
e
.
getMessage
());
}
return
null
;
}
}
public
PageInfo
<
JournalEntryDto
>
getJEDataForDisplay
(
JournalEntryParam
param
)
{
public
PageInfo
<
JournalEntryDto
>
getJEDataForDisplay
(
JournalEntryParam
param
)
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/JxlsUtils.java
0 → 100644
View file @
68f705b9
package
pwc
.
taxtech
.
atms
.
service
.
impl
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.Locale
;
import
java.util.TimeZone
;
public
class
JxlsUtils
{
public
String
formatDate
(
Date
date
,
String
pattern
)
{
if
(
null
==
date
)
return
""
;
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
pattern
,
Locale
.
US
);
sdf
.
setTimeZone
(
TimeZone
.
getTimeZone
(
"Asia/Shanghai"
));
try
{
return
sdf
.
format
(
date
);
}
catch
(
Exception
e
)
{
return
"<Invalid date pattern:"
+
pattern
+
">"
;
}
}
}
atms-api/src/main/resources/sqlMapConfig.xml
View file @
68f705b9
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
<plugins>
<plugins>
<plugin
interceptor=
"com.github.pagehelper.PageInterceptor"
>
<plugin
interceptor=
"com.github.pagehelper.PageInterceptor"
>
<!-- 4.0.0以后版本可以不设置该参数 -->
<!-- 4.0.0以后版本可以不设置该参数 -->
<property
name=
"
diaect"
value=
"oracle
"
/>
<property
name=
"
helperDialect"
value=
"mysql
"
/>
<!--
<!--
该参数默认为false
该参数默认为false
设置为true时,会将RowBounds第一个参数offset当成pageNum页码使用
设置为true时,会将RowBounds第一个参数offset当成pageNum页码使用
...
...
atms-api/src/main/resources/vat_excel_template/cash_flow.xlsx
0 → 100644
View file @
68f705b9
File added
atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/CashFlowMapper.java
View file @
68f705b9
package
pwc
.
taxtech
.
atms
.
vat
.
dao
;
package
pwc
.
taxtech
.
atms
.
vat
.
dao
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.session.RowBounds
;
import
org.apache.ibatis.session.RowBounds
;
...
@@ -9,6 +8,8 @@ import pwc.taxtech.atms.vat.dpo.CashFlowCondition;
...
@@ -9,6 +8,8 @@ import pwc.taxtech.atms.vat.dpo.CashFlowCondition;
import
pwc.taxtech.atms.vat.entity.CashFlow
;
import
pwc.taxtech.atms.vat.entity.CashFlow
;
import
pwc.taxtech.atms.vat.entity.CashFlowExample
;
import
pwc.taxtech.atms.vat.entity.CashFlowExample
;
import
java.util.List
;
@Mapper
@Mapper
public
interface
CashFlowMapper
extends
MyVatMapper
{
public
interface
CashFlowMapper
extends
MyVatMapper
{
/**
/**
...
@@ -109,5 +110,7 @@ public interface CashFlowMapper extends MyVatMapper {
...
@@ -109,5 +110,7 @@ public interface CashFlowMapper extends MyVatMapper {
List
<
CashFlow
>
selectByCondition
(
@Param
(
"cfCondition"
)
CashFlowCondition
condition
);
List
<
CashFlow
>
selectByCondition
(
@Param
(
"cfCondition"
)
CashFlowCondition
condition
);
Integer
selectCountByCondition
(
@Param
(
"cfCondition"
)
CashFlowCondition
condition
);
int
insertBatch
(
List
<
CashFlow
>
cfs
);
int
insertBatch
(
List
<
CashFlow
>
cfs
);
}
}
\ No newline at end of file
atms-dao/src/main/resources/pwc/taxtech/atms/vat/dao/extends/CashFlowExtendsMapper.xml
View file @
68f705b9
...
@@ -35,6 +35,13 @@
...
@@ -35,6 +35,13 @@
where
where
<include
refid=
"QueryCondition"
/>
<include
refid=
"QueryCondition"
/>
</select>
</select>
<select
id=
"selectCountByCondition"
parameterType=
"pwc.taxtech.atms.vat.dpo.CashFlowCondition"
resultType=
"Integer"
>
select
count(*)
from cash_flow
where
<include
refid=
"QueryCondition"
/>
</select>
<insert
id=
"insertBatch"
parameterType=
"java.util.List"
>
<insert
id=
"insertBatch"
parameterType=
"java.util.List"
>
insert into cash_flow
insert into cash_flow
...
...
atms-web/src/main/webapp/app/common/utils/constant.js
View file @
68f705b9
...
@@ -928,7 +928,7 @@ constant.outputTaxRate = ['17%', '13%', '11%', '6%', '5%', '3%', '1.5%', '0%', '
...
@@ -928,7 +928,7 @@ constant.outputTaxRate = ['17%', '13%', '11%', '6%', '5%', '3%', '1.5%', '0%', '
constant
.
AccountMappingProcessKey
=
{
UnSelected
:
'UnSelected'
,
Submit
:
'Submit'
,
Undo
:
'Undo'
}
constant
.
AccountMappingProcessKey
=
{
UnSelected
:
'UnSelected'
,
Submit
:
'Submit'
,
Undo
:
'Undo'
}
constant
.
pagesize
=
10
0
;
constant
.
pagesize
=
5
0
;
constant
.
ErpCheckType
=
{
constant
.
ErpCheckType
=
{
CustomInvoice_DuplicatePayNum
:
20
CustomInvoice_DuplicatePayNum
:
20
...
...
atms-web/src/main/webapp/app/common/vatservices/vatPreviewService.js
View file @
68f705b9
webservices
.
factory
(
'vatPreviewService'
,
[
'$http'
,
'apiConfig'
,
function
(
$http
,
apiConfig
)
{
webservices
.
factory
(
'vatPreviewService'
,
[
'$http'
,
'apiConfig'
,
'FileSaver'
,
function
(
$http
,
apiConfig
,
FileSaver
)
{
'use strict'
;
'use strict'
;
return
{
return
{
sample
:
function
()
{
sample
:
function
()
{
...
@@ -189,8 +189,14 @@
...
@@ -189,8 +189,14 @@
getCFDataForDisplay
:
function
(
queryParams
)
{
getCFDataForDisplay
:
function
(
queryParams
)
{
return
$http
.
post
(
'/dataPreview/getCFDataForDisplay'
,
queryParams
,
apiConfig
.
createVat
());
return
$http
.
post
(
'/dataPreview/getCFDataForDisplay'
,
queryParams
,
apiConfig
.
createVat
());
},
},
initExportCFData
:
function
(
queryParams
)
{
//服务器导出
return
$http
.
post
(
'/dataPreview/exportCFData/get'
,
queryParams
,
apiConfig
.
create
({
responseType
:
'arraybuffer'
}));
initExportCFData
:
function
(
queryParm
,
fileName
)
{
var
thisConfig
=
apiConfig
.
create
();
thisConfig
.
responseType
=
"arraybuffer"
;
return
$http
.
post
(
'/dataPreview/exportCFData/get'
,
queryParm
,
thisConfig
).
then
(
function
(
response
)
{
var
data
=
new
Blob
([
response
.
data
],
{
type
:
response
.
headers
(
'Content-Type'
)});
FileSaver
.
saveAs
(
data
,
fileName
+
'.xlsx'
);
});
},
},
getPLDataForDisplay
:
function
(
queryParams
)
{
getPLDataForDisplay
:
function
(
queryParams
)
{
return
$http
.
post
(
'/dataPreview/getPLDataForDisplay'
,
queryParams
,
apiConfig
.
createVat
());
return
$http
.
post
(
'/dataPreview/getPLDataForDisplay'
,
queryParams
,
apiConfig
.
createVat
());
...
...
atms-web/src/main/webapp/app/vat/preview/vat-preview-cash-flow/vat-preview-cash-flow.ctrl.js
View file @
68f705b9
...
@@ -18,14 +18,6 @@
...
@@ -18,14 +18,6 @@
[
vatSessionService
.
month
,
vatSessionService
.
project
.
year
],
[
vatSessionService
.
month
,
vatSessionService
.
project
.
year
],
[
vatSessionService
.
month
,
vatSessionService
.
project
.
year
]];
[
vatSessionService
.
month
,
vatSessionService
.
project
.
year
]];
//发票类型
var
invoiceTypeEnum
=
{
VATInvoice
:
$translate
.
instant
(
'VATInvoice'
),
FreightTransport
:
$translate
.
instant
(
'FreightTransport'
),
MotorVehicle
:
$translate
.
instant
(
'MotorVehicle'
),
AgriculturalProduct
:
$translate
.
instant
(
'AgriculturalProduct'
)
};
$scope
.
monthList
=
[
$translate
.
instant
(
'Month01'
),
$scope
.
monthList
=
[
$translate
.
instant
(
'Month01'
),
$translate
.
instant
(
'Month02'
),
$translate
.
instant
(
'Month02'
),
$translate
.
instant
(
'Month03'
),
$translate
.
instant
(
'Month03'
),
...
@@ -40,13 +32,6 @@
...
@@ -40,13 +32,6 @@
$translate
.
instant
(
'Month12'
)
$translate
.
instant
(
'Month12'
)
];
];
//认证结果
$scope
.
cetificationResultList
=
[
{
id
:
999
,
name
:
$translate
.
instant
(
'AllTheItems'
)
},
{
id
:
1
,
name
:
$translate
.
instant
(
'CertificationPass'
)
},
{
id
:
2
,
name
:
$translate
.
instant
(
'CertificationNotPass'
)
}
];
//发票类型
//发票类型
$scope
.
invoiceTypeList
=
[
$scope
.
invoiceTypeList
=
[
{
id
:
999
,
name
:
$translate
.
instant
(
'AllTheItems'
)
},
{
id
:
999
,
name
:
$translate
.
instant
(
'AllTheItems'
)
},
...
@@ -56,7 +41,6 @@
...
@@ -56,7 +41,6 @@
{
id
:
enums
.
invoiceType
.
AgriculturalProduct
,
name
:
$translate
.
instant
(
'AgriculturalProduct'
)
}
{
id
:
enums
.
invoiceType
.
AgriculturalProduct
,
name
:
$translate
.
instant
(
'AgriculturalProduct'
)
}
];
];
$scope
.
InvoiceType
=
{};
$scope
.
InvoiceType
=
{};
$scope
.
CertificationStatus
=
{};
$scope
.
CertificationStatus
=
{};
...
@@ -71,27 +55,6 @@
...
@@ -71,27 +55,6 @@
};
};
};
};
// var countTotal = function(){
// $scope.queryParams.pageInfo = {
// totalCount: -1,
// pageIndex: 1,
// pageSize: -1,
// totalPage: 0,
// };
// // vatPreviewService.queryInputInvoiceAllList($scope.queryParams).success(function (data) {
// // if (data) {
// // var totalMoneyAmount = 0;
// // var totalTaxAmount = 0;
// // _.each(data, function (x) {
// // totalMoneyAmount = totalMoneyAmount + parseFloat(x.hjje.replace(/,/g, ""));
// // totalTaxAmount = totalTaxAmount + parseFloat(x.hjse.replace(/,/g, ""));
// // })
// // $scope.totalMoneyAmount = totalMoneyAmount.toLocaleString();
// // $scope.totalTaxAmount = totalTaxAmount.toLocaleString();
// // }
// // });
// };
//从数据库中load数据
//从数据库中load数据
var
loadIncomeInvoiceItemDataFromDB
=
function
(
pageIndex
)
{
var
loadIncomeInvoiceItemDataFromDB
=
function
(
pageIndex
)
{
initIncomeInvoiceItemPagination
();
initIncomeInvoiceItemPagination
();
...
@@ -100,13 +63,12 @@
...
@@ -100,13 +63,12 @@
//初始化查询信息
//初始化查询信息
$scope
.
queryParams
.
pageInfo
=
{
$scope
.
queryParams
.
pageInfo
=
{
totalCount
:
$scope
.
queryIncomeInvoiceItemResult
.
pageInfo
.
total
Count
,
totalCount
:
$scope
.
queryIncomeInvoiceItemResult
.
pageInfo
.
total
,
pageIndex
:
pageIndex
,
pageIndex
:
pageIndex
,
pageSize
:
$scope
.
queryIncomeInvoiceItemResult
.
pageInfo
.
pageS
ize
,
pageSize
:
constant
.
pages
ize
,
totalPage
:
0
,
totalPage
:
0
,
};
};
vatPreviewService
.
getCFDataForDisplay
(
$scope
.
queryParams
).
success
(
function
(
data
)
{
vatPreviewService
.
getCFDataForDisplay
(
$scope
.
queryParams
).
success
(
function
(
data
)
{
if
(
data
)
{
if
(
data
)
{
if
(
data
.
list
.
length
>
0
){
if
(
data
.
list
.
length
>
0
){
...
@@ -132,15 +94,16 @@
...
@@ -132,15 +94,16 @@
if
(
$scope
.
queryIncomeInvoiceItemResult
.
pageInfo
&&
$scope
.
queryIncomeInvoiceItemResult
.
pageInfo
.
total
>
0
)
{
if
(
$scope
.
queryIncomeInvoiceItemResult
.
pageInfo
&&
$scope
.
queryIncomeInvoiceItemResult
.
pageInfo
.
total
>
0
)
{
var
totalPage
=
parseInt
(
$scope
.
queryIncomeInvoiceItemResult
.
pageInfo
.
total
/
$scope
.
queryIncomeInvoiceItemResult
.
pageInfo
.
pageS
ize
);
var
totalPage
=
parseInt
(
$scope
.
queryIncomeInvoiceItemResult
.
pageInfo
.
total
/
constant
.
pages
ize
);
totalPage
=
$scope
.
queryIncomeInvoiceItemResult
.
pageInfo
.
total
Count
%
$scope
.
queryIncomeInvoiceItemResult
.
pageInfo
.
pageS
ize
==
0
?
totalPage
:
totalPage
+
1
;
totalPage
=
$scope
.
queryIncomeInvoiceItemResult
.
pageInfo
.
total
%
constant
.
pages
ize
==
0
?
totalPage
:
totalPage
+
1
;
//计算本页记录数
//计算本页记录数
if
(
$scope
.
queryIncomeInvoiceItemResult
.
pageInfo
.
pageNum
===
totalPage
)
{
if
(
$scope
.
queryIncomeInvoiceItemResult
.
pageInfo
.
pageNum
===
totalPage
)
{
$scope
.
curPageItemCount
=
$scope
.
queryIncomeInvoiceItemResult
.
pageInfo
.
total
%
$scope
.
queryIncomeInvoiceItemResult
.
pageInfo
.
pageSize
;
var
pageItemCount
=
$scope
.
queryIncomeInvoiceItemResult
.
pageInfo
.
total
%
constant
.
pagesize
;
$scope
.
curPageItemCount
=
pageItemCount
==
0
?
constant
.
pagesize
:
pageItemCount
;
}
}
else
{
else
{
$scope
.
curPageItemCount
=
$scope
.
queryIncomeInvoiceItemResult
.
pageInfo
.
pageS
ize
;
$scope
.
curPageItemCount
=
constant
.
pages
ize
;
}
}
$scope
.
queryIncomeInvoiceItemResult
.
pageInfo
.
totalPage
=
totalPage
;
$scope
.
queryIncomeInvoiceItemResult
.
pageInfo
.
totalPage
=
totalPage
;
...
@@ -185,264 +148,6 @@
...
@@ -185,264 +148,6 @@
$scope
.
curIncomeInvoiceItemPage
=
1
;
$scope
.
curIncomeInvoiceItemPage
=
1
;
};
};
//将选择了的查询条件显示在grid上方
var
doDataFilter
=
function
(
removeData
)
{
if
(
$scope
.
queryParams
.
periodStart
>
$scope
.
queryParams
.
periodEnd
)
{
$scope
.
queryParams
.
periodEnd
=
$scope
.
queryParams
.
periodStart
;
}
//设置需要去掉的查询条件的值为空
if
(
!
PWC
.
isNullOrEmpty
(
removeData
))
{
var
removeItem
=
removeData
.
split
(
"|"
);
removeItem
.
forEach
(
function
(
v
)
{
$scope
.
queryParams
[
v
]
=
null
;
//如果去掉了发票代码的查询条件,则将查询条件设置为'',因为是字符串,设置为null会导致查询结果错误
if
(
$scope
.
queryParams
.
invoiceCode
===
null
)
{
$scope
.
queryParams
.
invoiceCode
=
''
;
}
//如果去掉了发票号码的查询条件,则将查询条件设置为'',因为是字符串,设置为null会导致查询结果错误
if
(
$scope
.
queryParams
.
invoiceNumber
===
null
)
{
$scope
.
queryParams
.
invoiceNumber
=
''
;
}
//如果去掉了供货方税号的查询条件,则将查询条件设置为'',因为是字符串,设置为null会导致查询结果错误
if
(
$scope
.
queryParams
.
sellerTaxNumber
===
null
)
{
$scope
.
queryParams
.
sellerTaxNumber
=
''
;
}
if
(
$scope
.
queryParams
.
invoiceType
===
null
)
{
$scope
.
InvoiceType
.
selected
=
undefined
;
}
if
(
$scope
.
queryParams
.
certificationStatus
===
null
)
{
$scope
.
CertificationStatus
.
selected
=
undefined
;
}
});
}
//设置发票类型和认证结果
if
(
$scope
.
InvoiceType
.
selected
!==
undefined
)
$scope
.
queryParams
.
invoiceType
=
$scope
.
InvoiceType
.
selected
.
id
;
else
$scope
.
queryParams
.
invoiceType
=
null
;
if
(
$scope
.
CertificationStatus
.
selected
!==
undefined
)
$scope
.
queryParams
.
certificationStatus
=
$scope
.
CertificationStatus
.
selected
.
id
;
else
$scope
.
queryParams
.
certificationStatus
=
null
;
// 将查询条件加入到grid上方
var
crits
=
$scope
.
queryParams
;
//定义查询条件数组用于存放已选的查询条件
$scope
.
criteriaList
=
[];
var
crit
=
[];
//认证日期
if
(
!
PWC
.
isNullOrEmpty
(
crits
.
certificationDateStart
)
&&
!
PWC
.
isNullOrEmpty
(
crits
.
certificationDateEnd
))
{
if
(
new
Date
(
crits
.
certificationDateStart
.
replace
(
/
[\.
-
]
/g
,
'/'
))
>
new
Date
(
crits
.
certificationDateEnd
.
replace
(
/
[\.
-
]
/g
,
'/'
)))
{
$scope
.
criteriaList
=
[];
SweetAlert
.
warning
(
$translate
.
instant
(
'InvoiceDateQueryError'
));
return
;
}
crit
=
new
Object
;
crit
.
name
=
$translate
.
instant
(
'InvoiceRZRQQuery'
)
+
crits
.
certificationDateStart
+
"-"
+
crits
.
certificationDateEnd
;;
crit
.
fullName
=
$translate
.
instant
(
'InvoiceRZRQQuery'
)
+
crits
.
certificationDateStart
+
"-"
+
crits
.
certificationDateEnd
;
crit
.
valueFrom
=
crits
.
certificationDateStart
;
crit
.
valueTo
=
crits
.
certificationDateEnd
;
crit
.
propertyName
=
"certificationDateStart|certificationDateEnd"
;
$scope
.
criteriaList
.
push
(
crit
);
}
else
if
(
!
PWC
.
isNullOrEmpty
(
crits
.
certificationDateStart
)
&&
PWC
.
isNullOrEmpty
(
crits
.
invoiceDateEnd
))
{
crit
=
new
Object
;
crit
.
name
=
$translate
.
instant
(
'InvoiceRZRQQuery'
)
+
crits
.
certificationDateStart
+
$translate
.
instant
(
'After'
);
crit
.
fullName
=
$translate
.
instant
(
'InvoiceRZRQQuery'
)
+
crits
.
certificationDateStart
+
$translate
.
instant
(
'After'
);
crit
.
valueFrom
=
crits
.
certificationDateStart
;
crit
.
valueTo
=
crits
.
certificationDateEnd
;
crit
.
propertyName
=
"certificationDateStart|certificationDateEnd"
;
$scope
.
criteriaList
.
push
(
crit
);
}
else
if
(
PWC
.
isNullOrEmpty
(
crits
.
certificationDateStart
)
&&
!
PWC
.
isNullOrEmpty
(
crits
.
certificationDateEnd
))
{
crit
=
new
Object
;
crit
.
name
=
$translate
.
instant
(
'InvoiceRZRQQuery'
)
+
crits
.
certificationDateEnd
+
$translate
.
instant
(
'Before'
);
crit
.
fullName
=
$translate
.
instant
(
'InvoiceRZRQQuery'
)
+
crits
.
certificationDateEnd
+
$translate
.
instant
(
'Before'
);
crit
.
valueFrom
=
crits
.
certificationDateStart
;
crit
.
valueTo
=
crits
.
certificationDateEnd
;
crit
.
propertyName
=
"certificationDateStart|certificationDateEnd"
;
$scope
.
criteriaList
.
push
(
crit
);
}
//发票代码
if
(
!
PWC
.
isNullOrEmpty
(
crits
.
invoiceCode
))
{
crit
=
new
Object
;
crit
.
name
=
$translate
.
instant
(
'InvoiceFPDMQuery'
)
+
PWC
.
limitString
(
crits
.
invoiceCode
,
10
);
crit
.
fullName
=
$translate
.
instant
(
'InvoiceFPDMQuery'
)
+
crits
.
invoiceCode
;
crit
.
valueFrom
=
crits
.
invoiceCode
;
crit
.
propertyName
=
"invoiceCode"
;
$scope
.
criteriaList
.
push
(
crit
);
}
//发票号码
if
(
!
PWC
.
isNullOrEmpty
(
crits
.
invoiceNumber
))
{
crit
=
new
Object
;
crit
.
name
=
$translate
.
instant
(
'InvoiceFPHMQuery'
)
+
PWC
.
limitString
(
crits
.
invoiceNumber
,
10
);
crit
.
fullName
=
$translate
.
instant
(
'InvoiceFPHMQuery'
)
+
crits
.
invoiceNumber
;
crit
.
valueFrom
=
crits
.
invoiceNumber
;
crit
.
propertyName
=
"invoiceNumber"
;
$scope
.
criteriaList
.
push
(
crit
);
}
//销方识别号
if
(
!
PWC
.
isNullOrEmpty
(
crits
.
sellerTaxNumber
))
{
crit
=
new
Object
;
crit
.
name
=
$translate
.
instant
(
'InvoiceGHFSHQuery'
)
+
PWC
.
limitString
(
crits
.
sellerTaxNumber
,
10
);
crit
.
fullName
=
$translate
.
instant
(
'InvoiceGHFSHQuery'
)
+
crits
.
sellerTaxNumber
;
crit
.
valueFrom
=
crits
.
sellerTaxNumber
;
crit
.
propertyName
=
"sellerTaxNumber"
;
$scope
.
criteriaList
.
push
(
crit
);
}
//金额
if
(
!
PWC
.
isNullOrEmpty
(
crits
.
amountStart
)
&&
!
PWC
.
isNullOrEmpty
(
crits
.
amountEnd
))
{
if
(
Number
(
crits
.
amountStart
)
>
Number
(
crits
.
amountEnd
))
{
SweetAlert
.
warning
(
$translate
.
instant
(
'AmountQueryError'
));
return
;
}
crit
=
new
Object
;
crit
.
name
=
$translate
.
instant
(
'InvoiceJEQuery'
)
+
PWC
.
limitString
(
crits
.
amountStart
,
5
)
+
' - '
+
PWC
.
limitString
(
crits
.
amountEnd
,
5
);
crit
.
fullName
=
$translate
.
instant
(
'InvoiceJEQuery'
)
+
crits
.
amountStart
+
' - '
+
crits
.
amountEnd
;
crit
.
valueFrom
=
crits
.
amountStart
;
crit
.
valueTo
=
crits
.
amountEnd
;
crit
.
propertyName
=
"amountStart|amountEnd"
;
$scope
.
criteriaList
.
push
(
crit
);
}
else
if
(
!
PWC
.
isNullOrEmpty
(
crits
.
amountStart
)
&&
PWC
.
isNullOrEmpty
(
crits
.
amountEnd
))
{
crit
=
new
Object
;
crit
.
name
=
$translate
.
instant
(
'InvoiceJEQuery'
)
+
PWC
.
limitString
(
crits
.
amountStart
,
5
)
+
$translate
.
instant
(
'MoreThan'
);
crit
.
fullName
=
$translate
.
instant
(
'InvoiceJEQuery'
)
+
crits
.
amountStart
+
$translate
.
instant
(
'MoreThan'
);
crit
.
valueFrom
=
crits
.
amountStart
;
crit
.
valueTo
=
crits
.
amountEnd
;
crit
.
propertyName
=
"amountStart|amountEnd"
;
$scope
.
criteriaList
.
push
(
crit
);
}
else
if
(
PWC
.
isNullOrEmpty
(
crits
.
amountStart
)
&&
!
PWC
.
isNullOrEmpty
(
crits
.
amountEnd
))
{
crit
=
new
Object
;
crit
.
name
=
$translate
.
instant
(
'InvoiceJEQuery'
)
+
PWC
.
limitString
(
crits
.
amountEnd
,
5
)
+
$translate
.
instant
(
'LessThan'
);
crit
.
fullName
=
$translate
.
instant
(
'InvoiceJEQuery'
)
+
crits
.
amountEnd
+
$translate
.
instant
(
'LessThan'
);
crit
.
valueFrom
=
crits
.
amountStart
;
crit
.
valueTo
=
crits
.
amountEnd
;
crit
.
propertyName
=
"amountStart|amountEnd"
;
$scope
.
criteriaList
.
push
(
crit
);
}
//税额
if
(
!
PWC
.
isNullOrEmpty
(
crits
.
taxAmountStart
)
&&
!
PWC
.
isNullOrEmpty
(
crits
.
taxAmountEnd
))
{
if
(
Number
(
crits
.
taxAmountStart
)
>
Number
(
crits
.
taxAmountEnd
))
{
SweetAlert
.
warning
(
$translate
.
instant
(
'TaxAmountQueryError'
));
return
;
}
crit
=
new
Object
;
crit
.
name
=
$translate
.
instant
(
'InvoiceSEQuery'
)
+
PWC
.
limitString
(
crits
.
taxAmountStart
,
5
)
+
' - '
+
PWC
.
limitString
(
crits
.
taxAmountEnd
,
5
);
crit
.
fullName
=
$translate
.
instant
(
'InvoiceSEQuery'
)
+
crits
.
taxAmountStart
+
' - '
+
crits
.
taxAmountEnd
;
crit
.
valueFrom
=
crits
.
taxAmountStart
;
crit
.
valueTo
=
crits
.
taxAmountEnd
;
crit
.
propertyName
=
"taxAmountStart|taxAmountEnd"
;
$scope
.
criteriaList
.
push
(
crit
);
}
else
if
(
!
PWC
.
isNullOrEmpty
(
crits
.
taxAmountStart
)
&&
PWC
.
isNullOrEmpty
(
crits
.
taxAmountEnd
))
{
crit
=
new
Object
;
crit
.
name
=
$translate
.
instant
(
'InvoiceSEQuery'
)
+
PWC
.
limitString
(
crits
.
taxAmountStart
,
5
)
+
$translate
.
instant
(
'MoreThan'
);
crit
.
fullName
=
$translate
.
instant
(
'InvoiceSEQuery'
)
+
crits
.
taxAmountStart
+
$translate
.
instant
(
'MoreThan'
);
crit
.
valueFrom
=
crits
.
taxAmountStart
;
crit
.
valueTo
=
crits
.
taxAmountEnd
;
crit
.
propertyName
=
"taxAmountStart|taxAmountEnd"
;
$scope
.
criteriaList
.
push
(
crit
);
}
else
if
(
PWC
.
isNullOrEmpty
(
crits
.
taxAmountStart
)
&&
!
PWC
.
isNullOrEmpty
(
crits
.
taxAmountEnd
))
{
crit
=
new
Object
;
crit
.
name
=
$translate
.
instant
(
'InvoiceSEQuery'
)
+
PWC
.
limitString
(
crits
.
taxAmountEnd
,
5
)
+
$translate
.
instant
(
'LessThan'
);
crit
.
fullName
=
$translate
.
instant
(
'InvoiceSEQuery'
)
+
crits
.
taxAmountEnd
+
$translate
.
instant
(
'LessThan'
);
crit
.
valueFrom
=
crits
.
taxAmountStart
;
crit
.
valueTo
=
crits
.
taxAmountEnd
;
crit
.
propertyName
=
"taxAmountStart|taxAmountEnd"
;
$scope
.
criteriaList
.
push
(
crit
);
}
//发票类型
if
(
!
PWC
.
isNullOrEmpty
(
crits
.
invoiceType
))
{
crit
=
new
Object
;
crit
.
valueFrom
=
_
.
find
(
$scope
.
invoiceTypeList
,
function
(
v
)
{
return
v
.
id
===
crits
.
invoiceType
;
}).
name
;
crit
.
name
=
$translate
.
instant
(
'InvoiceFPLXQuery'
)
+
crit
.
valueFrom
;
crit
.
fullName
=
$translate
.
instant
(
'InvoiceFPLXQuery'
)
+
crit
.
valueFrom
;
crit
.
propertyName
=
"invoiceType"
;
$scope
.
criteriaList
.
push
(
crit
);
}
//认证结果
if
(
!
PWC
.
isNullOrEmpty
(
crits
.
certificationStatus
))
{
crit
=
new
Object
;
crit
.
valueFrom
=
_
.
find
(
$scope
.
cetificationResultList
,
function
(
v
)
{
return
v
.
id
===
crits
.
certificationStatus
;
}).
name
;
crit
.
name
=
$translate
.
instant
(
'InvoiceRZJGQuery'
)
+
crit
.
valueFrom
;
crit
.
fullName
=
$translate
.
instant
(
'InvoiceRZJGQuery'
)
+
crit
.
valueFrom
;
crit
.
propertyName
=
"certificationStatus"
;
$scope
.
criteriaList
.
push
(
crit
);
}
// add to Criteria List for display on top of the grid:
//********************************************************************************
var
criteria
=
JSON
.
stringify
(
$scope
.
queryParams
);
if
(
browserService
.
isIE
()
||
browserService
.
isEdge
())
criteria
=
encodeURIComponent
(
criteria
);
countTotal
();
loadIncomeInvoiceItemDataFromDB
(
1
);
if
(
$scope
.
criteriaList
.
length
>
6
)
{
$scope
.
criteriaListFirstRow
=
$scope
.
criteriaList
.
slice
(
0
,
6
);
$scope
.
criteriaListSecondRow
=
$scope
.
criteriaList
.
slice
(
6
,
$scope
.
criteriaList
.
length
);
}
else
{
$scope
.
criteriaListFirstRow
=
$scope
.
criteriaList
.
slice
(
0
,
$scope
.
criteriaList
.
length
);
}
$
(
'.filter-button'
).
popover
(
"hide"
);
};
//去掉所有的查询条件,重新load数据
var
doDataFilterReset
=
function
()
{
$scope
.
queryParams
=
{
pageInfo
:
{},
periodStart
:
''
,
periodEnd
:
''
,
orgId
:
''
};
$scope
.
criteriaList
=
[];
$scope
.
queryParams
.
periodStart
=
$scope
.
startMonth
;
$scope
.
queryParams
.
periodEnd
=
$scope
.
endMonth
;
//countTotal();
loadIncomeInvoiceItemDataFromDB
(
1
);
$
(
'.filter-button'
).
popover
(
"hide"
);
};
var
prepareSummary
=
function
()
{
// do something before show popover
};
//在popover打开时执行事件
//在popover打开时执行事件
var
showPopover
=
function
()
{
var
showPopover
=
function
()
{
$timeout
(
function
()
{
$timeout
(
function
()
{
...
@@ -488,40 +193,16 @@
...
@@ -488,40 +193,16 @@
})
})
};
};
//发票类型转换
$scope
.
typeToString
=
function
(
strType
)
{
var
type
=
invoiceTypeEnum
.
VATInvoice
;
switch
(
strType
)
{
case
1
:
type
=
invoiceTypeEnum
.
VATInvoice
;
break
;
case
2
:
type
=
invoiceTypeEnum
.
FreightTransport
;
break
;
case
3
:
type
=
invoiceTypeEnum
.
MotorVehicle
;
break
;
case
4
:
type
=
invoiceTypeEnum
.
AgriculturalProduct
;
break
;
default
:
type
=
""
;
}
return
type
;
};
//导出进项发票数据
//导出进项发票数据
var
downloadInputInvoice
=
function
()
{
$scope
.
downloadCashFlow
=
function
()
{
va
tPreviewService
.
getExportInputInvoiceList
(
$scope
.
queryParams
).
success
(
function
(
data
,
status
,
headers
)
{
va
r
fileName
=
"cash_flow"
if
(
status
===
204
)
{
vatPreviewService
.
initExportCFData
(
$scope
.
queryParams
,
fileName
).
then
(
function
(
data
)
{
SweetAlert
.
warning
(
"没有数据可以下载"
);
if
(
data
)
{
return
;
ackMessageBox
.
success
(
translate
(
'FileExportSuccess'
))
;
}
}
vatExportService
.
exportToExcel
(
data
,
status
,
headers
,
'进项发票信息.xls'
);
});
});
};
};
(
function
initialize
()
{
(
function
initialize
()
{
$log
.
debug
(
'VatPreviewInputInvoiceController.ctor()...'
);
$log
.
debug
(
'VatPreviewInputInvoiceController.ctor()...'
);
$
(
'#input-invoice-period-picker'
).
focus
(
function
()
{
$
(
'#input-invoice-period-picker'
).
focus
(
function
()
{
...
@@ -538,23 +219,20 @@
...
@@ -538,23 +219,20 @@
})
})
.
on
(
'datePicker.done'
,
function
(
e
,
result
)
{
.
on
(
'datePicker.done'
,
function
(
e
,
result
)
{
//开始月份
//开始月份
var
startMonth
=
result
[
0
][
0
];
var
startMonth
=
result
[
0
][
1
]
*
100
+
result
[
0
][
0
];
//结束月份
//结束月份
var
endMonth
=
result
[
1
][
0
];
var
endMonth
=
result
[
1
][
1
]
*
100
+
result
[
1
][
0
];
$scope
.
startMonth
=
startMonth
;
$scope
.
startMonth
=
startMonth
;
$scope
.
endMonth
=
endMonth
;
$scope
.
endMonth
=
endMonth
;
$scope
.
queryParams
.
periodStart
=
startMonth
;
$scope
.
queryParams
.
periodStart
=
startMonth
;
$scope
.
queryParams
.
periodEnd
=
endMonth
;
$scope
.
queryParams
.
periodEnd
=
endMonth
;
countTotal
();
loadIncomeInvoiceItemDataFromDB
(
1
);
loadIncomeInvoiceItemDataFromDB
(
1
);
});
});
$scope
.
gridOptions
=
{
$scope
.
gridOptions
=
{
rowHeight
:
constant
.
UIGrid
.
rowHeight
,
rowHeight
:
constant
.
UIGrid
.
rowHeight
,
selectionRowHeaderWidth
:
constant
.
UIGrid
.
rowHeight
,
selectionRowHeaderWidth
:
constant
.
UIGrid
.
rowHeight
,
//expandableRowTemplate: '<div ui-grid="row.entity.subGridOptions" style="height:150px;"></div>',
virtualizationThreshold
:
50
,
//默认加载50条数据,避免在数据展示时,只显示前面4条
virtualizationThreshold
:
50
,
//默认加载50条数据,避免在数据展示时,只显示前面4条
enableSorting
:
false
,
enableSorting
:
false
,
enableColumnMenus
:
false
,
enableColumnMenus
:
false
,
...
@@ -563,61 +241,15 @@
...
@@ -563,61 +241,15 @@
{
name
:
$translate
.
instant
(
'Item'
),
width
:
'38%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents"><span>{{row.entity.itemName2}}<span></div>'
},
{
name
:
$translate
.
instant
(
'Item'
),
width
:
'38%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents"><span>{{row.entity.itemName2}}<span></div>'
},
{
name
:
$translate
.
instant
(
'CurrentPeriodAmount'
),
width
:
'15%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents"><span>{{row.entity.periodAmt}}<span></div>'
},
{
name
:
$translate
.
instant
(
'CurrentPeriodAmount'
),
width
:
'15%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents"><span>{{row.entity.periodAmt}}<span></div>'
},
{
name
:
$translate
.
instant
(
'ThisYearAccumulatedAmount'
),
width
:
'15%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents"><span>{{row.entity.ytdAmt}}<span></div>'
}
{
name
:
$translate
.
instant
(
'ThisYearAccumulatedAmount'
),
width
:
'15%'
,
cellTemplate
:
'<div class="ui-grid-cell-contents"><span>{{row.entity.ytdAmt}}<span></div>'
}
],
]
// onRegisterApi: function (gridApi) {
// $scope.gridApi = gridApi;
// //定义子table属性
// gridApi.expandable.on.rowExpandedStateChanged($scope, function (row) {
// if (row.isExpanded) {
// row.entity.subGridOptions = {
// rowHeight: constant.UIGrid.rowHeight,
// selectionRowHeaderWidth: constant.UIGrid.rowHeight,
// virtualizationThreshold: 50,//默认加载50条数据,避免在数据展示时,只显示前面4条
// enableSorting: false,
// enableColumnMenus: false,
// columnDefs: [
// // { name: $translate.instant('ImportErrorPopUpNoCol'), width: '10%', cellTemplate: '<div class="ui-grid-cell-contents"><span>{{row.entity.index}}<span></div>' },
// { name: $translate.instant('InvoiceHWMC'), headerCellClass:'right', width: '20%', cellTemplate: '<div class="ui-grid-cell-contents"><span style="float:right" title="{{row.entity.spmc}}">{{row.entity.spmc}}<span></div>' },
// { name: $translate.instant('InvoiceJE'), headerCellClass:'right', width: '13%', cellTemplate: '<div class="ui-grid-cell-contents"><span style="float:right">{{row.entity.je}}<span></div>' },
// { name: $translate.instant('InvoiceSL'), headerCellClass:'right', width: '13%', cellTemplate: '<div class="ui-grid-cell-contents"><span style="float:right">{{row.entity.slv}}%<span></div>' },
// { name: $translate.instant('InvoiceSE'), headerCellClass:'right', width: '13%', cellTemplate: '<div class="ui-grid-cell-contents"><span style="float:right">{{row.entity.se}}<span></div>' }
// ]
// };
// //获取子table数据
// vatPreviewService.queryInputInvoiceItemList(row.entity.id).success(function (data) {
// if (data) {
// var index = 1;
// data.forEach(function (v) {
// v.index = index++;
// v.je = PWC.round(v.je, 2);
// v.se = PWC.round(v.se, 2);
// });
// row.entity.subGridOptions.data = data;
// }
// });
// }
// });
// $interval(function () {
// $scope.gridApi.core.handleWindowResize();
// }, 500, 60 * 60 * 8);
// }
};
};
//$scope.doDataFilter = doDataFilter;
$scope
.
doDataFilterReset
=
doDataFilterReset
;
//$scope.prepareSummary = prepareSummary;
$scope
.
showPopover
=
showPopover
;
$scope
.
showPopover
=
showPopover
;
$scope
.
downloadInputInvoice
=
downloadInputInvoice
;
initPeriods
();
initPeriods
();
initIncomeInvoiceItemPagination
();
initIncomeInvoiceItemPagination
();
//初始化查询条件-期间范围
//初始化查询条件-期间范围
$scope
.
queryParams
.
periodStart
=
vatSessionService
.
month
;
$scope
.
queryParams
.
periodStart
=
vatSessionService
.
year
*
100
+
vatSessionService
.
month
;
$scope
.
queryParams
.
periodEnd
=
vatSessionService
.
month
;
$scope
.
queryParams
.
periodEnd
=
vatSessionService
.
year
*
100
+
vatSessionService
.
month
;
countTotal
();
$scope
.
queryParams
.
orgId
=
vatSessionService
.
project
.
organizationID
;
$scope
.
queryParams
.
orgId
=
vatSessionService
.
project
.
organizationID
;
loadIncomeInvoiceItemDataFromDB
(
1
);
loadIncomeInvoiceItemDataFromDB
(
1
);
...
...
atms-web/src/main/webapp/app/vat/preview/vat-preview-cash-flow/vat-preview-cash-flow.html
View file @
68f705b9
<div
class=
"vat-preview-cash-flow"
id=
"mainPreviewDiv"
>
<div
class=
"vat-preview-cash-flow"
id=
"mainPreviewDiv"
>
<div
class=
"top-area-wrapper"
style=
"margin-top: 10px"
>
<div
class=
"top-area-wrapper"
style=
"margin-top: 10px"
>
<span
translate=
"
ImportCFStatusGridSource
DDTitle"
class=
"text-bold"
></span>
|
<span
class=
"text-bold"
translate=
"InvoiceQJ"
></span>
:
<span
translate=
"
CashFlow
DDTitle"
class=
"text-bold"
></span>
|
<span
class=
"text-bold"
translate=
"InvoiceQJ"
></span>
:
<input
type=
"text"
class=
"form-control input-width-middle"
style=
"position: relative; top: -30px; left: 130px;"
id=
"input-invoice-period-picker"
/>
<input
type=
"text"
class=
"form-control input-width-middle"
style=
"position: relative; top: -30px; left: 130px;"
id=
"input-invoice-period-picker"
/>
<span
ng-click=
"download
InputInvoice
()"
style=
"position: relative; top: -13px; left: 95%;"
><i
class=
"fa fa-file-excel-o"
aria-hidden=
"true"
></i>
{{'ExportBtn' | translate}}
</span>
<span
ng-click=
"download
CashFlow
()"
style=
"position: relative; top: -13px; left: 95%;"
><i
class=
"fa fa-file-excel-o"
aria-hidden=
"true"
></i>
{{'ExportBtn' | translate}}
</span>
</div>
</div>
<div
style=
"margin-bottom: 10px;margin-left: 20px;margin-top: 10px;"
>
<div
style=
"margin-bottom: 10px;margin-left: 20px;margin-top: 10px;"
>
...
@@ -11,26 +11,8 @@
...
@@ -11,26 +11,8 @@
是否关账:
<span
class=
"numAmount"
>
{{ledgerStatusFirst}}
</span>
是否关账:
<span
class=
"numAmount"
>
{{ledgerStatusFirst}}
</span>
</div>
</div>
<!-- <div id="filterCriteriaDiv" style="max-width:98%;margin-bottom:2px;" ng-show="criteriaList.length>0">
<span class="text-bold margin-left20" translate="FilterCriteriaTags"></span>:
<span class="tag label label-default" ng-repeat="criteria in criteriaListFirstRow">
<span title="{{criteria.fullName}}">
{{criteria.name}}
</span>
<a><i class="remove glyphicon glyphicon-remove-sign glyphicon-white" ng-click="doDataFilter(criteria.propertyName)"></i></a>
</span>
<span ng-if="criteriaList.length>6"><br /></span>
<span ng-if="criteriaList.length>6" style="margin-left: 81px; margin-top: 19px; display: inline-block;"></span>
<span ng-if="criteriaList.length>6" class="tag label label-default" ng-repeat="criteria in criteriaListSecondRow">
<span title="{{criteria.fullName}}">
{{criteria.name}}
</span>
<a><i class="remove glyphicon glyphicon-remove-sign glyphicon-white" ng-click="doDataFilter(criteria.propertyName)"></i></a>
</span>
</div> -->
<div
id=
"mainAreaDiv"
class=
"main-area"
>
<div
id=
"mainAreaDiv"
class=
"main-area"
>
<div
class=
"inputInvoiceGrid"
ui-grid-expandable
ui-grid=
"gridOptions"
>
<div
class=
"inputInvoiceGrid"
ui-grid=
"gridOptions"
>
<div
class=
"watermark"
ng-show=
"!gridOptions.data.length"
><span
translate=
"NoDataAvailable"
></span></div>
<div
class=
"watermark"
ng-show=
"!gridOptions.data.length"
><span
translate=
"NoDataAvailable"
></span></div>
</div>
</div>
<div
class=
"pagination-container"
>
<div
class=
"pagination-container"
>
...
...
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