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
b88c4703
Commit
b88c4703
authored
Mar 31, 2019
by
chase
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_mysql' of
http://code.tech.tax.asia.pwcinternal.com/root/atms
into dev_mysql
parents
b1ffe129
d28dd2cc
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
501 additions
and
213 deletions
+501
-213
DateUtils.java
...src/main/java/pwc/taxtech/atms/common/util/DateUtils.java
+7
-0
FileExcelUtil.java
...main/java/pwc/taxtech/atms/common/util/FileExcelUtil.java
+210
-0
FileUploadUtil.java
...ain/java/pwc/taxtech/atms/common/util/FileUploadUtil.java
+0
-164
EnumImportType.java
.../java/pwc/taxtech/atms/constant/enums/EnumImportType.java
+2
-1
ReportController.java
...in/java/pwc/taxtech/atms/controller/ReportController.java
+20
-9
RevenueTypeResult.java
...va/pwc/taxtech/atms/dto/revenuconf/RevenueTypeResult.java
+6
-0
DidiFileUploadService.java
.../pwc/taxtech/atms/service/impl/DidiFileUploadService.java
+3
-4
RevenueConfService.java
...ava/pwc/taxtech/atms/service/impl/RevenueConfService.java
+1
-0
RevenueTypeMappingService.java
.../taxtech/atms/service/impl/RevenueTypeMappingService.java
+1
-0
ReportServiceImpl.java
.../pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
+0
-0
RevenueMapping.xlsx
...rc/main/resources/Document/DataImport/RevenueMapping.xlsx
+0
-0
vatGeneratorConfig.xml
atms-dao/etc/generator-mysql/vatGeneratorConfig.xml
+3
-3
EbitCellDataMapper.java
...ain/java/pwc/taxtech/atms/vat/dao/EbitCellDataMapper.java
+6
-0
PwcReportAttach.java
...ain/java/pwc/taxtech/atms/vat/entity/PwcReportAttach.java
+36
-0
PwcReportAttachExample.java
...a/pwc/taxtech/atms/vat/entity/PwcReportAttachExample.java
+70
-0
PwcReportAttachMapper.xml
...ources/pwc/taxtech/atms/vat/dao/PwcReportAttachMapper.xml
+22
-7
organization-manage.html
...nfrastructure/organizationManage/organization-manage.html
+0
-0
organization-manage.less
...nfrastructure/organizationManage/organization-manage.less
+20
-1
tb-ebit-form.ctrl.js
...b/src/main/webapp/app/analysis/table/tb-ebit-form.ctrl.js
+2
-3
tax-report-cell-detail-modal.ctrl.js
...rt-cell-detail-modal/tax-report-cell-detail-modal.ctrl.js
+1
-1
tax-report-cell-detail-modal.ctrl.js
...rt-cell-detail-modal/tax-report-cell-detail-modal.ctrl.js
+13
-2
constant.js
atms-web/src/main/webapp/app/common/utils/constant.js
+2
-1
vatReportService.js
...rc/main/webapp/app/common/vatservices/vatReportService.js
+1
-3
extract-financial-data.ctrl.js
...ion/extract-financial-data/extract-financial-data.ctrl.js
+5
-0
extract-financial-data.html
...action/extract-financial-data/extract-financial-data.html
+5
-3
vat-revenue-conf-mapping.ctrl.js
...vat-revenue-conf-mapping/vat-revenue-conf-mapping.ctrl.js
+59
-7
vat-revenue-conf-mapping.html
...rt/vat-revenue-conf-mapping/vat-revenue-conf-mapping.html
+3
-3
vat-revenue-config.ctrl.js
.../dataImport/vat-revenue-config/vat-revenue-config.ctrl.js
+2
-0
vat-revenue-config.html
...app/dataImport/vat-revenue-config/vat-revenue-config.html
+1
-1
No files found.
atms-api/src/main/java/pwc/taxtech/atms/common/util/DateUtils.java
View file @
b88c4703
...
...
@@ -754,6 +754,13 @@ public class DateUtils {
return
getPeriodEndFormat
(
year
,
period
,
Constant
.
DateFormat
.
DEFAULT
);
}
//获取当前 格式化成stirng的日期 yyyy-MM-dd
public
static
String
nowDateFormat
()
{
Date
date
=
new
Date
();
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
return
simpleDateFormat
.
format
(
date
);
}
// /***************************************************************************
// * //nd=1表示返回的值中包含年度 //yf=1表示返回的值中包含月份 //rq=1表示返回的值中包含日期 //format表示返回的格式 1
// * 以年月日中文返回 2 以横线-返回 // 3 以斜线/返回 4 以缩写不带其它符号形式返回 // 5 以点号.返回
...
...
atms-api/src/main/java/pwc/taxtech/atms/common/util/FileExcelUtil.java
0 → 100644
View file @
b88c4703
package
pwc
.
taxtech
.
atms
.
common
.
util
;
/**
* @ClassName FileExcelUtil
* Description TODO
* @Author pwc kevin
* @Date 3/31/2019 12:35 PM
* Version 1.0
**/
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
sun.misc.BASE64Encoder
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.*
;
import
java.net.URLEncoder
;
import
java.util.zip.ZipEntry
;
import
java.util.zip.ZipOutputStream
;
@SuppressWarnings
(
"restriction"
)
public
class
FileExcelUtil
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
FileExcelUtil
.
class
);
/**
* 编译下载的文件名
* @param filename
* @param agent
* @return
* @throws IOException
*/
public
static
String
encodeDownloadFilename
(
String
filename
,
String
agent
)
throws
IOException
{
if
(
agent
.
contains
(
"Firefox"
))
{
// 火狐浏览器
filename
=
"=?UTF-8?B?"
+
new
BASE64Encoder
().
encode
(
filename
.
getBytes
(
"utf-8"
))
+
"?="
;
filename
=
filename
.
replaceAll
(
"\r\n"
,
""
);
}
else
{
// IE及其他浏览器
filename
=
URLEncoder
.
encode
(
filename
,
"utf-8"
);
filename
=
filename
.
replace
(
"+"
,
" "
);
}
return
filename
;
}
/**
* 创建文件夹;
* @param path
*/
public
static
void
createFile
(
String
path
)
{
File
file
=
new
File
(
path
);
//判断文件是否存在;
if
(!
file
.
exists
())
{
//创建文件;
file
.
mkdirs
();
}
}
/**
* 生成.zip文件;
* @param path
* @throws IOException
*/
public
static
ZipOutputStream
craeteZipPath
(
String
path
)
throws
IOException
{
ZipOutputStream
zipOutputStream
=
null
;
File
file
=
new
File
(
path
+
DateUtils
.
nowDateFormat
()+
".zip"
);
zipOutputStream
=
new
ZipOutputStream
(
new
BufferedOutputStream
(
new
FileOutputStream
(
file
)));
File
[]
files
=
new
File
(
path
).
listFiles
();
FileInputStream
fileInputStream
=
null
;
byte
[]
buf
=
new
byte
[
1024
];
int
len
=
0
;
if
(
files
!=
null
&&
files
.
length
>
0
){
for
(
File
excelFile:
files
){
String
fileName
=
excelFile
.
getName
();
fileInputStream
=
new
FileInputStream
(
excelFile
);
//放入压缩zip包中;
zipOutputStream
.
putNextEntry
(
new
ZipEntry
(
path
+
"/"
+
fileName
));
//读取文件;
while
((
len
=
fileInputStream
.
read
(
buf
))
>
0
){
zipOutputStream
.
write
(
buf
,
0
,
len
);
}
//关闭;
zipOutputStream
.
closeEntry
();
if
(
fileInputStream
!=
null
){
fileInputStream
.
close
();
}
}
}
/*if(zipOutputStream !=null){
zipOutputStream.close();
}*/
return
zipOutputStream
;
}
/**
* //压缩文件
* @param srcfile 要压缩的文件数组
* @param zipfile 生成的zip文件对象
*/
public
static
void
ZipFiles
(
java
.
io
.
File
[]
srcfile
,
File
zipfile
)
throws
Exception
{
byte
[]
buf
=
new
byte
[
1024
];
FileOutputStream
fos
=
new
FileOutputStream
(
zipfile
);
ZipOutputStream
out
=
new
ZipOutputStream
(
fos
);
for
(
int
i
=
0
;
i
<
srcfile
.
length
;
i
++)
{
FileInputStream
in
=
new
FileInputStream
(
srcfile
[
i
]);
out
.
putNextEntry
(
new
ZipEntry
(
srcfile
[
i
].
getName
()));
int
len
;
while
((
len
=
in
.
read
(
buf
))
>
0
)
{
out
.
write
(
buf
,
0
,
len
);
}
out
.
closeEntry
();
in
.
close
();
}
out
.
close
();
fos
.
flush
();
fos
.
close
();
}
/**
* 删除文件夹及文件夹下所有文件
* @param dir
* @return
*/
public
static
boolean
deleteDir
(
File
dir
)
{
if
(
dir
==
null
||
!
dir
.
exists
()){
return
true
;
}
if
(
dir
.
isDirectory
())
{
String
[]
children
=
dir
.
list
();
//递归删除目录中的子目录下
for
(
int
i
=
0
;
i
<
children
.
length
;
i
++)
{
boolean
success
=
deleteDir
(
new
File
(
dir
,
children
[
i
]));
if
(!
success
)
{
return
false
;
}
}
}
// 目录此时为空,可以删除
return
dir
.
delete
();
}
/**
* 生成html
* @param msg
* @return
*/
public
static
String
getErrorHtml
(
String
msg
)
{
StringBuffer
sb
=
new
StringBuffer
();
sb
.
append
(
"<html>"
);
sb
.
append
(
"<head>"
);
sb
.
append
(
"<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>"
);
sb
.
append
(
"</head>"
);
sb
.
append
(
"<body>"
);
sb
.
append
(
"<div id='errorInfo'> "
);
sb
.
append
(
"</div>"
);
sb
.
append
(
"<script>alert('"
+
msg
+
"')</script>"
);
sb
.
append
(
"</body>"
);
sb
.
append
(
"</html>"
);
return
sb
.
toString
();
}
/**
* 设置下载excel的响应头信息
* @param response
* @param request
* @param fileName
* @throws IOException
*/
public
static
void
setExcelHeadInfo
(
HttpServletResponse
response
,
HttpServletRequest
request
,
String
fileName
)
{
try
{
// 获取客户端浏览器的类型
String
agent
=
request
.
getHeader
(
"User-Agent"
);
// 对文件名重新编码
String
encodingFileName
=
FileExcelUtil
.
encodeDownloadFilename
(
fileName
,
agent
);
// 告诉客户端允许断点续传多线程连接下载
response
.
setHeader
(
"Accept-Ranges"
,
"bytes"
);
//文件后缀
response
.
setContentType
(
"application/vnd.ms-excel;charset=UTF-8"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment; filename="
+
encodingFileName
);
}
catch
(
IOException
e
)
{
logger
.
error
(
Thread
.
currentThread
().
getStackTrace
()[
1
].
getMethodName
()
+
"发生的异常是: "
,
e
);
throw
new
RuntimeException
(
e
);
}
}
/**
* 设置下载zip的响应头信息
* @param response
* @param fileName 文件名
* @param request
* @throws IOException
*/
public
static
void
setZipDownLoadHeadInfo
(
HttpServletResponse
response
,
HttpServletRequest
request
,
String
fileName
)
throws
IOException
{
// 获取客户端浏览器的类型
String
agent
=
request
.
getHeader
(
"User-Agent"
);
response
.
setContentType
(
"application/octet-stream "
);
// 表示不能用浏览器直接打开
response
.
setHeader
(
"Connection"
,
"close"
);
// 告诉客户端允许断点续传多线程连接下载
response
.
setHeader
(
"Accept-Ranges"
,
"bytes"
);
// 对文件名重新编码
String
encodingFileName
=
FileExcelUtil
.
encodeDownloadFilename
(
fileName
,
agent
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment; filename="
+
encodingFileName
);
}
}
\ No newline at end of file
atms-api/src/main/java/pwc/taxtech/atms/common/util/FileUploadUtil.java
deleted
100644 → 0
View file @
b1ffe129
package
pwc
.
taxtech
.
atms
.
common
.
util
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
org.apache.commons.io.IOUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.http.HttpEntity
;
import
org.apache.http.HttpHeaders
;
import
org.apache.http.HttpResponse
;
import
org.apache.http.client.HttpClient
;
import
org.apache.http.client.methods.HttpGet
;
import
org.apache.http.client.methods.HttpPost
;
import
org.apache.http.entity.ContentType
;
import
org.apache.http.entity.StringEntity
;
import
org.apache.http.entity.mime.MultipartEntityBuilder
;
import
org.apache.http.entity.mime.content.ByteArrayBody
;
import
org.apache.http.entity.mime.content.StringBody
;
import
org.apache.http.impl.client.CloseableHttpClient
;
import
org.apache.http.impl.client.HttpClients
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.ApplicationContextAware
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.web.multipart.MultipartFile
;
import
pwc.taxtech.atms.common.CommonUtils
;
import
pwc.taxtech.atms.common.config.FileServiceConfig
;
import
pwc.taxtech.atms.dto.ApiResultDto
;
import
pwc.taxtech.atms.exception.ServiceException
;
import
java.io.IOException
;
import
java.net.URLEncoder
;
import
java.security.MessageDigest
;
/**
* author kevin
* ver 1.0
*/
@Configuration
public
class
FileUploadUtil
implements
ApplicationContextAware
{
protected
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
FileUploadUtil
.
class
);
// Spring应用上下文环境
private
static
ApplicationContext
applicationContext
;
private
static
FileServiceConfig
config
;
private
static
final
String
HTTP_SUCCESS_CODE
=
"200"
;
protected
static
char
hexDigits
[]
=
{
'0'
,
'1'
,
'2'
,
'3'
,
'4'
,
'5'
,
'6'
,
'7'
,
'8'
,
'9'
,
'a'
,
'b'
,
'c'
,
'd'
,
'e'
,
'f'
};
public
static
String
getUploadUrl
()
{
config
=
(
FileServiceConfig
)
applicationContext
.
getBean
(
"fileServiceConfig"
);
return
config
.
getUploadUrl
();
}
public
static
String
downLoadUrl
()
{
config
=
(
FileServiceConfig
)
applicationContext
.
getBean
(
"fileServiceConfig"
);
return
config
.
getDownloadUrl
();
}
/**
* 上传模板
*
* @param file MultipartFile
* @return Boolean
*/
public
static
String
upload
(
MultipartFile
file
,
String
fileName
)
throws
ServiceException
{
if
(
StringUtils
.
isBlank
(
file
.
getOriginalFilename
())
||
null
==
file
)
{
throw
new
IllegalArgumentException
(
"上传参数为空"
);
}
if
(
fileName
==
null
)
{
fileName
=
file
.
getOriginalFilename
();
}
CloseableHttpClient
httpClient
=
null
;
String
requestKey
=
CommonUtils
.
getUUID
();
String
requestUrl
=
getUploadUrl
()
+
"/"
+
requestKey
;
try
{
/*String serverPath = serverPath();
httpClient = HttpClients.createDefault();
HttpPost httpPost = new HttpPost(serverPath);
httpPost.addHeader(HttpHeaders.CONTENT_TYPE, ContentType.APPLICATION_JSON.getMimeType());*/
httpClient
=
HttpClients
.
createDefault
();
HttpPost
httpPost
=
new
HttpPost
(
requestUrl
);
String
md5Str
=
getFileMD5String
(
file
);
ByteArrayBody
byteBody
=
new
ByteArrayBody
(
file
.
getBytes
(),
ContentType
.
MULTIPART_FORM_DATA
,
StringUtils
.
isBlank
(
fileName
)
?
URLEncoder
.
encode
(
file
.
getOriginalFilename
(),
"UTF-8"
)
:
URLEncoder
.
encode
(
fileName
,
"UTF-8"
));
StringBody
md5
=
new
StringBody
(
md5Str
,
ContentType
.
create
(
"text/plain"
));
HttpEntity
httpEntity
=
MultipartEntityBuilder
.
create
().
addPart
(
"filecontent"
,
byteBody
).
addPart
(
"md5"
,
md5
).
build
();
httpPost
.
setEntity
(
httpEntity
);
HttpResponse
httpResponse
=
httpClient
.
execute
(
httpPost
);
JSONObject
resultDto
=
JSON
.
parseObject
(
IOUtils
.
toString
(
httpResponse
.
getEntity
().
getContent
(),
"UTF-8"
));
if
(
HTTP_SUCCESS_CODE
.
equals
(
resultDto
.
getString
(
"status_code"
)))
return
requestKey
;
return
null
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
logger
.
error
(
"uploadTemplate error."
,
e
);
return
null
;
}
finally
{
if
(
null
!=
httpClient
)
{
try
{
httpClient
.
close
();
}
catch
(
IOException
e
)
{
logger
.
error
(
"close httpClient error."
,
e
);
}
}
}
}
public
static
boolean
downLoad
(
String
download_url
)
{
CloseableHttpClient
httpClient
=
HttpClients
.
createDefault
();
HttpGet
httpGet
=
new
HttpGet
(
downLoadUrl
()
+
"/"
+
download_url
);
HttpResponse
httpResponse
=
null
;
try
{
httpResponse
=
httpClient
.
execute
(
httpGet
);
JSONObject
resultDto
=
JSON
.
parseObject
(
IOUtils
.
toString
(
httpResponse
.
getEntity
().
getContent
(),
"UTF-8"
));
if
(
resultDto
.
getString
(
"status_code"
).
equals
(
HTTP_SUCCESS_CODE
))
return
true
;
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
return
false
;
}
return
false
;
}
/**
* 实现ApplicationContextAware接口的回调方法。设置上下文环境
*
* @param applicationContext
*/
public
void
setApplicationContext
(
ApplicationContext
applicationContext
)
{
this
.
applicationContext
=
applicationContext
;
}
/**
* @return ApplicationContext
*/
public
static
ApplicationContext
getApplicationContext
()
{
return
applicationContext
;
}
public
static
String
getFileMD5String
(
MultipartFile
file
)
throws
Exception
{
MessageDigest
messagedigest
=
MessageDigest
.
getInstance
(
"MD5"
);
messagedigest
.
update
(
file
.
getBytes
());
byte
bytes
[]
=
messagedigest
.
digest
();
return
bufferToHex
(
bytes
,
0
,
bytes
.
length
);
}
private
static
String
bufferToHex
(
byte
bytes
[],
int
m
,
int
n
)
{
StringBuffer
stringbuffer
=
new
StringBuffer
(
2
*
n
);
int
k
=
m
+
n
;
for
(
int
l
=
m
;
l
<
k
;
l
++)
{
appendHexPair
(
bytes
[
l
],
stringbuffer
);
}
return
stringbuffer
.
toString
();
}
private
static
void
appendHexPair
(
byte
bt
,
StringBuffer
stringbuffer
)
{
char
c0
=
hexDigits
[(
bt
&
0xf0
)
>>
4
];
char
c1
=
hexDigits
[
bt
&
0xf
];
stringbuffer
.
append
(
c0
);
stringbuffer
.
append
(
c1
);
}
}
atms-api/src/main/java/pwc/taxtech/atms/constant/enums/EnumImportType.java
View file @
b88c4703
...
...
@@ -12,7 +12,8 @@ public enum EnumImportType {
CertifiedInvoicesList
(
8
),
InvoiceRecord
(
9
),
ExtractFinancialData
(
10
),
ExtractInvoiceData
(
11
)
ExtractInvoiceData
(
11
),
RevenueMapping
(
12
)
;
private
Integer
code
;
...
...
atms-api/src/main/java/pwc/taxtech/atms/controller/ReportController.java
View file @
b88c4703
...
...
@@ -8,7 +8,6 @@ import org.springframework.http.ResponseEntity;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
pwc.taxtech.atms.common.message.ErrorMessage
;
import
pwc.taxtech.atms.common.util.FileUploadUtil
;
import
pwc.taxtech.atms.constant.enums.EnumServiceType
;
import
pwc.taxtech.atms.dao.OrganizationMapper
;
import
pwc.taxtech.atms.dao.ProjectMapper
;
...
...
@@ -20,6 +19,7 @@ import pwc.taxtech.atms.entity.OrganizationExample;
import
pwc.taxtech.atms.entity.Project
;
import
pwc.taxtech.atms.entity.ProjectExample
;
import
pwc.taxtech.atms.service.impl.BaseService
;
import
pwc.taxtech.atms.service.impl.DidiFileUploadService
;
import
pwc.taxtech.atms.service.impl.ReportUploadService
;
import
pwc.taxtech.atms.vat.dao.PwcReportAttachMapper
;
import
pwc.taxtech.atms.vat.entity.*
;
...
...
@@ -29,6 +29,7 @@ import javax.annotation.Resource;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.ByteArrayOutputStream
;
import
java.io.OutputStream
;
import
java.net.URISyntaxException
;
import
java.util.List
;
import
java.util.Optional
;
...
...
@@ -251,13 +252,18 @@ public class ReportController {
}
@Autowired
private
DidiFileUploadService
didiFileUploadService
;
@RequestMapping
(
value
=
"doUpload"
,
method
=
RequestMethod
.
POST
)
public
OperationResultDto
doUploadAttach
(
@RequestParam
(
"fileName"
)
String
fileName
,
MultipartFile
file
,
String
remarks
,
@RequestParam
(
"activeCol"
)
Long
activeCol
,
@RequestParam
(
"activeRow"
)
Long
activeRow
,
@RequestParam
(
"activeTemplateId"
)
String
activeTemplateId
)
{
System
.
out
.
println
(
activeCol
+
"----"
+
activeRow
+
"-----"
+
activeTemplateId
);
OperationResultDto
operationResultDto
=
reportService
.
doUploadAttach
(
file
,
remarks
);
if
(!
"error"
.
equals
(
operationResultDto
.
getResultMsg
()))
{
//上传成功绑定
reportService
.
bindPwcAttach
(
activeCol
,
activeRow
,
activeTemplateId
,
(
FileDto
)
operationResultDto
.
getData
());
FileUpload
fileUpload
=
null
;
try
{
fileUpload
=
didiFileUploadService
.
uploadFile
(
file
,
file
.
getOriginalFilename
(),
"附件上传"
);
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
operationResultDto
.
success
();
reportService
.
bindPwcAttach
(
activeCol
,
activeRow
,
activeTemplateId
,
fileUpload
,
remarks
);
return
operationResultDto
;
}
...
...
@@ -274,20 +280,19 @@ public class ReportController {
@Resource
private
PwcReportAttachMapper
pwcReportAttachMapper
;
@RequestMapping
(
"
"
)
/* @RequestMapping("downLoadAttach
")
public OperationResultDto downLoadAttach(Long id) {
OperationResultDto operationResultDto = new OperationResultDto();
PwcReportAttachExample example = new PwcReportAttachExample();
PwcReportAttachExample.Criteria criteria = example.createCriteria();
criteria.andIdEqualTo(id);
if
(
FileUploadUtil
.
downLoad
(
pwcReportAttachMapper
.
selectByExample
(
example
).
get
(
0
).
getFileUrl
())
==
true
)
{
if (
didiFileUploadService.queryPage
(pwcReportAttachMapper.selectByExample(example).get(0).getFileUrl()) == true) {
return operationResultDto.success();
}
;
operationResultDto.setResultMsg("附件导出失败");
return operationResultDto;
}
*/
@Resource
private
OrganizationMapper
organizationMapper
;
...
...
@@ -342,6 +347,12 @@ public class ReportController {
@RequestMapping
(
"manyExport"
)
public
OperationResultDto
manyExport
(
@RequestBody
RequestParameterDto
requestParameterDto
)
{
OperationResultDto
operationResultDto
=
new
OperationResultDto
();
String
zipName
=
"利润表"
;
try
{
reportService
.
manyExport
(
requestParameterDto
,
zipName
);
}
catch
(
URISyntaxException
e
)
{
e
.
printStackTrace
();
}
operationResultDto
.
setResult
(
null
);
return
operationResultDto
;
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/revenuconf/RevenueTypeResult.java
View file @
b88c4703
package
pwc
.
taxtech
.
atms
.
dto
.
revenuconf
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
pwc.taxtech.atms.common.util.PwCIdSerialize
;
import
pwc.taxtech.atms.constant.enums.RevenueConfEnum
;
import
pwc.taxtech.atms.vat.entity.RevenueTypeMapping
;
public
class
RevenueTypeResult
extends
RevenueTypeMapping
{
@JsonSerialize
(
using
=
PwCIdSerialize
.
class
)
private
String
id
;
public
String
getStatusStr
()
{
return
RevenueConfEnum
.
Status
.
MAPPING
.
get
(
this
.
getStatus
());
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/DidiFileUploadService.java
View file @
b88c4703
...
...
@@ -75,7 +75,7 @@ public class DidiFileUploadService extends BaseService {
private
static
final
String
PROXY_PORT
=
"11007"
;
public
FileUpload
getFileUpload
(
String
uid
){
public
FileUpload
getFileUpload
(
String
uid
)
{
return
fileUploadMapper
.
selectByPrimaryKey
(
uid
);
}
...
...
@@ -127,8 +127,7 @@ public class DidiFileUploadService extends BaseService {
throw
new
ServiceException
(
"uploadFile error."
);
}
public
FileUpload
uploadFile
(
byte
[]
bytes
,
String
fileName
,
String
bizSource
)
throws
ServiceException
{
public
FileUpload
uploadFile
(
byte
[]
bytes
,
String
fileName
,
String
bizSource
)
throws
ServiceException
{
CloseableHttpClient
httpClient
=
null
;
String
requestKey
=
CommonUtils
.
getUUID
();
String
requestUrl
=
upload_post_url
+
"/"
+
requestKey
;
...
...
@@ -173,6 +172,7 @@ public class DidiFileUploadService extends BaseService {
}
throw
new
ServiceException
(
"uploadFile error."
);
}
public
static
String
getFileMD5String
(
MultipartFile
file
)
throws
Exception
{
MessageDigest
messagedigest
=
MessageDigest
.
getInstance
(
"MD5"
);
messagedigest
.
update
(
file
.
getBytes
());
...
...
@@ -197,7 +197,6 @@ public class DidiFileUploadService extends BaseService {
}
public
PageInfo
<
DidiFileUploadDetailResult
>
queryPage
(
DidiFileIUploadParam
param
)
{
Page
page
=
null
;
if
(
param
.
getPageInfo
()
!=
null
&&
param
.
getPageInfo
().
getPageSize
()
!=
null
&&
param
.
getPageInfo
().
getPageIndex
()
!=
null
)
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/RevenueConfService.java
View file @
b88c4703
...
...
@@ -41,6 +41,7 @@ public class RevenueConfService extends BaseService {
Page
page
=
PageHelper
.
startPage
(
param
.
getPageInfo
().
getPageIndex
(),
param
.
getPageInfo
().
getPageSize
());
RevenueConfigExample
example
=
new
RevenueConfigExample
();
example
.
createCriteria
().
andOrgIdIn
(
orgDtoList
.
stream
().
map
(
OrgSelectDto:
:
getId
).
collect
(
Collectors
.
toList
()));
example
.
setOrderByClause
(
"org_id"
);
PageInfo
<
RevenueConfResult
>
pageInfo
=
new
PageInfo
<>(
revenueConfigMapper
.
selectByExample
(
example
).
stream
()
.
map
(
o
->
beanUtil
.
copyProperties
(
o
,
new
RevenueConfResult
())).
collect
(
Collectors
.
toList
()));
pageInfo
.
setTotal
(
page
.
getTotal
());
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/RevenueTypeMappingService.java
View file @
b88c4703
...
...
@@ -53,6 +53,7 @@ public class RevenueTypeMappingService extends BaseService {
Page
page
=
PageHelper
.
startPage
(
param
.
getPageInfo
().
getPageIndex
(),
param
.
getPageInfo
().
getPageSize
());
RevenueTypeMappingExample
example
=
new
RevenueTypeMappingExample
();
example
.
createCriteria
().
andOrgIdIn
(
orgDtoList
.
stream
().
map
(
OrgSelectDto:
:
getId
).
collect
(
Collectors
.
toList
()));
example
.
setOrderByClause
(
"org_id"
);
PageInfo
<
RevenueTypeResult
>
pageInfo
=
new
PageInfo
<>(
typeMappingMapper
.
selectByExample
(
example
).
stream
()
.
map
(
o
->
beanUtil
.
copyProperties
(
o
,
new
RevenueTypeResult
())).
collect
(
Collectors
.
toList
()));
pageInfo
.
setTotal
(
page
.
getTotal
());
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
View file @
b88c4703
This diff is collapsed.
Click to expand it.
atms-api/src/main/resources/Document/DataImport/RevenueMapping.xlsx
0 → 100644
View file @
b88c4703
File added
atms-dao/etc/generator-mysql/vatGeneratorConfig.xml
View file @
b88c4703
...
...
@@ -40,7 +40,7 @@
<javaClientGenerator
type=
"XMLMAPPER"
targetPackage=
"pwc.taxtech.atms.vat.dao"
targetProject=
"../../src/main/java"
>
<property
name=
"rootInterface"
value=
"pwc.taxtech.atms.MyVatMapper"
/>
</javaClientGenerator>
<table
tableName=
"
ebit_spread_data"
domainObjectName=
"EbitSpreadData
"
>
<table
tableName=
"
pwc_report_attach"
domainObjectName=
"PwcReportAttach
"
>
<property
name=
"useActualColumnNames"
value=
"false"
/>
<property
name=
"ignoreQualifiersAtRuntime"
value=
"true"
/>
</table>
...
...
@@ -548,11 +548,11 @@
<property name="useActualColumnNames" value="false"/>
<property name="ignoreQualifiersAtRuntime" value="true"/>
</table>-->
<!--
<table tableName="period_cell_data" domainObjectName="PeriodCellData">
<property name="useActualColumnNames" value="false"/>
<property name="ignoreQualifiersAtRuntime" value="true"/>
</table>
</table>
-->
<!--<table tableName="period_cell_data_source" domainObjectName="PeriodCellDataSource">
<property name="useActualColumnNames" value="false"/>
...
...
atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/EbitCellDataMapper.java
View file @
b88c4703
...
...
@@ -3,6 +3,7 @@ package pwc.taxtech.atms.vat.dao;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
org.apache.ibatis.session.RowBounds
;
import
pwc.taxtech.atms.MyVatMapper
;
import
pwc.taxtech.atms.vat.entity.EbitCellData
;
...
...
@@ -109,4 +110,8 @@ public interface EbitCellDataMapper extends MyVatMapper {
int
insertBatch
(
List
<
EbitCellData
>
pls
);
@Select
({
"SELECT DISTINCT t.organization_id as organizationId FROM ebit_cell_data t WHERE 1=1 AND t.`period` = #{period}"
})
List
<
EbitCellData
>
selectOrgType
(
@Param
(
"period"
)
Integer
period
);
}
\ No newline at end of file
atms-dao/src/main/java/pwc/taxtech/atms/vat/entity/PwcReportAttach.java
View file @
b88c4703
...
...
@@ -126,6 +126,17 @@ public class PwcReportAttach extends BaseEntity implements Serializable {
*/
private
Date
updateTime
;
/**
* Database Column Remarks:
* 文件上传id,绑定文件库(file_upload)
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column pwc_report_attach.file_upload_id
*
* @mbg.generated
*/
private
String
fileUploadId
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table pwc_report_attach
...
...
@@ -422,6 +433,30 @@ public class PwcReportAttach extends BaseEntity implements Serializable {
this
.
updateTime
=
updateTime
;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column pwc_report_attach.file_upload_id
*
* @return the value of pwc_report_attach.file_upload_id
*
* @mbg.generated
*/
public
String
getFileUploadId
()
{
return
fileUploadId
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column pwc_report_attach.file_upload_id
*
* @param fileUploadId the value for pwc_report_attach.file_upload_id
*
* @mbg.generated
*/
public
void
setFileUploadId
(
String
fileUploadId
)
{
this
.
fileUploadId
=
fileUploadId
==
null
?
null
:
fileUploadId
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_report_attach
...
...
@@ -446,6 +481,7 @@ public class PwcReportAttach extends BaseEntity implements Serializable {
sb
.
append
(
", remarks="
).
append
(
remarks
);
sb
.
append
(
", createTime="
).
append
(
createTime
);
sb
.
append
(
", updateTime="
).
append
(
updateTime
);
sb
.
append
(
", fileUploadId="
).
append
(
fileUploadId
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
}
...
...
atms-dao/src/main/java/pwc/taxtech/atms/vat/entity/PwcReportAttachExample.java
View file @
b88c4703
...
...
@@ -984,6 +984,76 @@ public class PwcReportAttachExample {
addCriterion
(
"update_time not between"
,
value1
,
value2
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFileUploadIdIsNull
()
{
addCriterion
(
"file_upload_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFileUploadIdIsNotNull
()
{
addCriterion
(
"file_upload_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFileUploadIdEqualTo
(
String
value
)
{
addCriterion
(
"file_upload_id ="
,
value
,
"fileUploadId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFileUploadIdNotEqualTo
(
String
value
)
{
addCriterion
(
"file_upload_id <>"
,
value
,
"fileUploadId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFileUploadIdGreaterThan
(
String
value
)
{
addCriterion
(
"file_upload_id >"
,
value
,
"fileUploadId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFileUploadIdGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"file_upload_id >="
,
value
,
"fileUploadId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFileUploadIdLessThan
(
String
value
)
{
addCriterion
(
"file_upload_id <"
,
value
,
"fileUploadId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFileUploadIdLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"file_upload_id <="
,
value
,
"fileUploadId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFileUploadIdLike
(
String
value
)
{
addCriterion
(
"file_upload_id like"
,
value
,
"fileUploadId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFileUploadIdNotLike
(
String
value
)
{
addCriterion
(
"file_upload_id not like"
,
value
,
"fileUploadId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFileUploadIdIn
(
List
<
String
>
values
)
{
addCriterion
(
"file_upload_id in"
,
values
,
"fileUploadId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFileUploadIdNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"file_upload_id not in"
,
values
,
"fileUploadId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFileUploadIdBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"file_upload_id between"
,
value1
,
value2
,
"fileUploadId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andFileUploadIdNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"file_upload_id not between"
,
value1
,
value2
,
"fileUploadId"
);
return
(
Criteria
)
this
;
}
}
/**
...
...
atms-dao/src/main/resources/pwc/taxtech/atms/vat/dao/PwcReportAttachMapper.xml
View file @
b88c4703
...
...
@@ -18,6 +18,7 @@
<result
column=
"remarks"
jdbcType=
"VARCHAR"
property=
"remarks"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"file_upload_id"
jdbcType=
"VARCHAR"
property=
"fileUploadId"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<!--
...
...
@@ -91,7 +92,7 @@
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, template_id, col, `row`, del_flag, file_name, file_url, upload_user, `size`,
remarks, create_time, update_time
remarks, create_time, update_time
, file_upload_id
</sql>
<select
id=
"selectByExample"
parameterType=
"pwc.taxtech.atms.vat.entity.PwcReportAttachExample"
resultMap=
"BaseResultMap"
>
<!--
...
...
@@ -147,13 +148,13 @@
insert into pwc_report_attach (id, template_id, col,
`row`, del_flag, file_name,
file_url, upload_user, `size`,
remarks, create_time, update_time
)
remarks, create_time, update_time
,
file_upload_id
)
values (#{id,jdbcType=BIGINT}, #{templateId,jdbcType=VARCHAR}, #{col,jdbcType=BIGINT},
#{row,jdbcType=BIGINT}, #{delFlag,jdbcType=VARCHAR}, #{fileName,jdbcType=VARCHAR},
#{fileUrl,jdbcType=VARCHAR}, #{uploadUser,jdbcType=VARCHAR}, #{size,jdbcType=VARCHAR},
#{remarks,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
#{remarks,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
,
#{fileUploadId,jdbcType=VARCHAR}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"pwc.taxtech.atms.vat.entity.PwcReportAttach"
>
<!--
...
...
@@ -198,6 +199,9 @@
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"fileUploadId != null"
>
file_upload_id,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
...
...
@@ -236,6 +240,9 @@
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"fileUploadId != null"
>
#{fileUploadId,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"pwc.taxtech.atms.vat.entity.PwcReportAttachExample"
resultType=
"java.lang.Long"
>
...
...
@@ -291,6 +298,9 @@
<if
test=
"record.updateTime != null"
>
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.fileUploadId != null"
>
file_upload_id = #{record.fileUploadId,jdbcType=VARCHAR},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
...
...
@@ -313,7 +323,8 @@
`size` = #{record.size,jdbcType=VARCHAR},
remarks = #{record.remarks,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
file_upload_id = #{record.fileUploadId,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
...
...
@@ -358,6 +369,9 @@
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"fileUploadId != null"
>
file_upload_id = #{fileUploadId,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
...
...
@@ -377,7 +391,8 @@
`size` = #{size,jdbcType=VARCHAR},
remarks = #{remarks,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
update_time = #{updateTime,jdbcType=TIMESTAMP},
file_upload_id = #{fileUploadId,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<select
id=
"selectByExampleWithRowbounds"
parameterType=
"pwc.taxtech.atms.vat.entity.PwcReportAttachExample"
resultMap=
"BaseResultMap"
>
...
...
atms-web/src/main/webapp/app/admin/infrastructure/organizationManage/organization-manage.html
View file @
b88c4703
This diff is collapsed.
Click to expand it.
atms-web/src/main/webapp/app/admin/infrastructure/organizationManage/organization-manage.less
View file @
b88c4703
...
...
@@ -809,7 +809,7 @@
.sub-title-span {
line-height: 1.42857143;
font-family: 'Microsoft YaHei';
font-weight: 409;
font-weight: 409
px
;
font-style: normal;
font-size: 13px;
color: #434343;
...
...
@@ -1136,3 +1136,22 @@
}
}
}
.col-sm-8{
width: 52.666667%;
text-align: left!important;
}
.col-sm-4{
width: 45.333333%;
text-align: left!important;
}
.swxx {
.col-sm-4{
width: 25.333333%;
text-align: left!important;
}
.col-sm-2{
width: 23.666667%;
}
margin-top: 20px;
}
atms-web/src/main/webapp/app/analysis/table/tb-ebit-form.ctrl.js
View file @
b88c4703
...
...
@@ -3068,7 +3068,7 @@
templateId
:
$scope
.
templateId
}
$timeout
(
function
()
{
/*
$timeout(function () {
$('#busy-indicator-container').show();
var mainSpread = new GC.Spread.Sheets.Workbook(document.getElementById("report"), {sheetCount: 1});
mainSpread.isPaintSuspended(true);
...
...
@@ -3087,7 +3087,6 @@
}
var excelIo = new GC.Spread.Excel.IO();
// here is excel IO API
excelIo.save(mainSpread.toJSON(), function (blob) {
if ('export' == $scope.evenType) {
saveAs(blob, vatSessionService.project.name + '-' + vatSessionService.month + '-纳税申报.xlsx');
...
...
@@ -3099,7 +3098,7 @@
$('.export-container').html('');
$('#export').html('');
$log.debug(mainSpread);
},
500
);
}, 500);
*/
vatReportService
.
manyExport
(
JSON
.
stringify
(
param
)).
success
(
function
(
res
){
}).
error
(
function
(
error
){
...
...
atms-web/src/main/webapp/app/cit/report/tax-report-cell-detail-modal/tax-report-cell-detail-modal.ctrl.js
View file @
b88c4703
...
...
@@ -2487,7 +2487,7 @@
{
caption
:
'文件名'
,
dataField
:
"fileName"
,
cellTemplate
:
function
(
container
,
options
)
{
try
{
$
(
'<a href="
javascript:;" onClick = "downLoadAttach('
+
options
.
data
.
id
+
')"
target="_blank" style="cursor: pointer">"'
+
options
.
data
.
fileName
+
'"</a> '
)
$
(
'<a href="
'
+
options
.
data
.
fileUrl
+
'"
target="_blank" style="cursor: pointer">"'
+
options
.
data
.
fileName
+
'"</a> '
)
.
appendTo
(
container
);
}
catch
(
e
)
{
...
...
atms-web/src/main/webapp/app/common/controls/tax-report-cell-detail-modal/tax-report-cell-detail-modal.ctrl.js
View file @
b88c4703
...
...
@@ -2322,7 +2322,7 @@
{
caption
:
'文件名'
,
dataField
:
"fileName"
,
cellTemplate
:
function
(
container
,
options
)
{
try
{
$
(
'<a href="'
+
options
.
data
.
fileUrl
+
'"
target="_blank" style="cursor: pointer">"'
+
options
.
data
.
fileName
+
'"</a> '
)
$
(
'<a href="'
+
options
.
data
.
fileUrl
+
'"
target="_blank" style="cursor: pointer">"'
+
options
.
data
.
fileName
+
'"</a> '
)
.
appendTo
(
container
);
}
catch
(
e
)
{
...
...
@@ -2337,7 +2337,7 @@
{
caption
:
'操作'
,
cellTemplate
:
function
(
container
,
options
)
{
try
{
$
(
'<button type="button" class="btn btn-in-grid" onclick = "deleteAttach('
+
options
.
data
.
id
+
')"><i class="material-icons middle" style="vertical-align: text-bottom">delete</i>删除</button> '
)
$
(
'<button type="button" class="btn btn-in-grid"
style="margin-top: -11px;"
onclick = "deleteAttach('
+
options
.
data
.
id
+
')"><i class="material-icons middle" style="vertical-align: text-bottom">delete</i>删除</button> '
)
.
appendTo
(
container
);
}
catch
(
e
)
{
...
...
@@ -2361,6 +2361,17 @@
dataSource
:
'_gridData'
}
};
window
.
downLoadAttach
=
function
(
id
){
vatReportService
.
downLoadAttach
(
id
).
success
(
function
(
res
)
{
if
(
res
.
result
){
//导出成功
}
else
{
SweetAlert
.
error
(
res
.
resultMsg
);
}
}).
error
();
}
window
.
deleteAttach
=
function
(
id
,
data
)
{
swal
({
title
:
"warning!"
,
...
...
atms-web/src/main/webapp/app/common/utils/constant.js
View file @
b88c4703
...
...
@@ -1545,7 +1545,8 @@ constant.importFileType = {
certifiedInvoicesList
:
8
,
invoiceRecord
:
9
,
ExtractFinancialData
:
10
,
ExtractInvoiceData
:
11
ExtractInvoiceData
:
11
,
RevenueMapping
:
12
};
constant
.
citImportFileType
=
{
...
...
atms-web/src/main/webapp/app/common/vatservices/vatReportService.js
View file @
b88c4703
...
...
@@ -244,9 +244,8 @@
},
downLoadAttach
:
function
(
id
){
return
$http
.
get
(
'/Report/downLoadAttach?id='
+
id
);
return
$http
.
get
(
'/Report/downLoadAttach?id='
+
id
,
apiConfig
.
createVat
()
);
}
};
}]);
\ No newline at end of file
atms-web/src/main/webapp/app/dataImport/data-extraction/extract-financial-data/extract-financial-data.ctrl.js
View file @
b88c4703
...
...
@@ -106,6 +106,11 @@
//导入事件
var
callFinancialApi
=
function
()
{
if
(
!
$scope
.
formParam
||
!
$scope
.
formParam
.
orgIds
||
!
$scope
.
formParam
.
dataTypes
||
!
$scope
.
formParam
.
period
)
{
SweetAlert
.
warning
(
$translate
.
instant
(
'PleaseSelectAtLeastOneItem'
));
return
;
}
dataImportService
.
callExtractFinancialData
(
$scope
.
formParam
).
success
(
function
(
data
)
{
if
(
data
)
{
getFinancialDataStatus
();
...
...
atms-web/src/main/webapp/app/dataImport/data-extraction/extract-financial-data/extract-financial-data.html
View file @
b88c4703
...
...
@@ -20,15 +20,17 @@
<div
dx-date-box=
"dateBoxStart"
></div>
</div>
<label
class=
"col-sm-1 control-label"
>
{{'SelectedDataType' | translate}}:
</label>
<div
class=
"col-sm-
3
"
>
<div
class=
"col-sm-
2
"
>
<div
dx-tag-box=
"selectTypeOptions"
></div>
</div>
<div
class=
"col-sm-
1
"
>
<div
class=
"col-sm-
2
"
>
<button
type=
"button"
atms-permission
permission-control-type=
"ngIf"
permission-code=
"{{$root.vatPermission.dataImport.balanceSheet.importCode}}"
class=
"btn btn-vat-primary"
translate=
"ImportBtn"
translate=
"ImportBtn"
style=
"min-width: 50px;"
ng-click=
"callFinancialApi()"
></button>
<button
type=
"button"
class=
"btn btn-vat-primary"
translate=
"Refresh"
ng-click=
"refreshConfigGrid()"
style=
"min-width: 50px;"
></button>
</div>
</div>
...
...
atms-web/src/main/webapp/app/dataImport/vat-revenue-conf-mapping/vat-revenue-conf-mapping.ctrl.js
View file @
b88c4703
vatModule
.
controller
(
'VatRevenueConfMappingController'
,
[
'$scope'
,
'$log'
,
'$translate'
,
'$timeout'
,
'SweetAlert'
,
'$q'
,
'$interval'
,
'dxDataGridService'
,
'$http'
,
'apiConfig'
,
'Upload'
,
'apiInterceptor'
,
function
(
$scope
,
$log
,
$translate
,
$timeout
,
SweetAlert
,
$q
,
$interval
,
dxDataGridService
,
$http
,
apiConfig
,
Upload
,
apiInterceptor
)
{
'$interval'
,
'dxDataGridService'
,
'$http'
,
'apiConfig'
,
'Upload'
,
'apiInterceptor'
,
'templateService'
,
function
(
$scope
,
$log
,
$translate
,
$timeout
,
SweetAlert
,
$q
,
$interval
,
dxDataGridService
,
$http
,
apiConfig
,
Upload
,
apiInterceptor
,
templateService
)
{
'use strict'
;
//表格配置
...
...
@@ -33,7 +34,7 @@
}).
appendTo
(
container
);
$
(
'<i class="fa fa-trash" style="cursor: pointer;margin-left: 5px;"></i>'
)
.
on
(
'click'
,
function
()
{
$scope
.
editConfig
(
options
.
data
);
$scope
.
delConfig
([
options
.
data
.
id
]
);
}).
appendTo
(
container
);
}
catch
(
e
)
{
...
...
@@ -48,7 +49,11 @@
mode
:
'multiple'
,
showCheckBoxesMode
:
'always'
,
allowSelectAll
:
true
}
},
onSelectionChanged
:
function
(
data
)
{
$scope
.
selectedItems
=
data
.
selectedRowsData
;
$scope
.
selectedRecourdCount
=
data
.
selectedRowsData
.
length
;
},
});
//刷新页面
...
...
@@ -71,9 +76,25 @@
$
(
$scope
.
revenueConfAddDiv
).
modal
(
'show'
);
};
//删除配置
$scope
.
delConfig
=
function
()
{
SweetAlert
.
info
(
'del'
);
$scope
.
batchDelConfig
=
function
()
{
if
(
!!
$scope
.
selectedRecourdCount
)
{
$scope
.
delConfig
(
_
.
map
(
$scope
.
selectedItems
,
function
(
item
){
return
item
.
id
;
}));
}
else
{
SweetAlert
.
warning
(
$translate
.
instant
(
'PleaseSelectAtLeastOneItem'
));
}
};
///删除配置
$scope
.
delConfig
=
function
(
idList
)
{
$http
.
post
(
'/revenueConfMapping/del'
,
idList
,
apiConfig
.
createVat
())
.
success
(
function
(
res
)
{
if
(
res
&&
0
===
res
.
code
)
{
SweetAlert
.
success
(
$translate
.
instant
(
'RevenueDelSuccess'
));
$scope
.
refreshConfigGrid
();
}
else
{
SweetAlert
.
error
(
$translate
.
instant
(
'SystemError'
));
}
})
};
//添加配置
...
...
@@ -85,6 +106,7 @@
SweetAlert
.
success
(
$translate
.
instant
(
'RevenueAddSuccess'
));
$scope
.
refreshConfigGrid
();
$
(
$scope
.
revenueConfAddDiv
).
modal
(
'hide'
);
$scope
.
cancelModal
();
}
else
{
SweetAlert
.
error
(
$translate
.
instant
(
'SystemError'
));
}
...
...
@@ -96,6 +118,7 @@
SweetAlert
.
success
(
$translate
.
instant
(
'RevenueAddSuccess'
));
$scope
.
refreshConfigGrid
();
$
(
$scope
.
revenueConfAddDiv
).
modal
(
'hide'
);
$scope
.
cancelModal
();
}
else
{
SweetAlert
.
error
(
$translate
.
instant
(
'SystemError'
));
}
...
...
@@ -182,6 +205,35 @@
});
};
$scope
.
downloadTemplate
=
function
()
{
templateService
.
downloadTemplate
(
constant
.
importFileType
.
RevenueMapping
).
success
(
function
(
data
,
status
,
headers
)
{
var
octetStreamMime
=
'application/octet-stream'
;
var
contentType
=
headers
(
'content-type'
)
||
octetStreamMime
;
if
(
window
.
navigator
.
msSaveBlob
)
{
var
blob
=
new
Blob
([
data
],
{
type
:
contentType
});
navigator
.
msSaveBlob
(
blob
,
"开票记录与收入类型映射模板"
);
}
else
{
var
urlCreator
=
window
.
URL
||
window
.
webkitURL
||
window
.
mozURL
||
window
.
msURL
;
if
(
urlCreator
)
{
var
a
=
document
.
createElement
(
'a'
);
var
blob
=
new
Blob
([
data
],
{
type
:
contentType
});
var
url
=
urlCreator
.
createObjectURL
(
blob
);
a
.
href
=
url
;
a
.
target
=
'_blank'
;
a
.
download
=
"开票记录与收入类型映射模板.xlsx"
;
document
.
body
.
appendChild
(
a
);
a
.
click
();
}
}
}).
error
(
function
()
{
SweetAlert
.
error
(
$translate
.
instant
(
'PleaseContactAdministrator'
));
});
};
(
function
initialize
()
{
...
...
atms-web/src/main/webapp/app/dataImport/vat-revenue-conf-mapping/vat-revenue-conf-mapping.html
View file @
b88c4703
...
...
@@ -5,16 +5,16 @@
</div>
<div
id=
"tab_total"
>
<form
class=
"form-inline"
>
<div
class=
"form-group"
>
<div
class=
"form-group"
style=
"margin-top: 5px;"
>
<button
type=
"button"
class=
"btn btn-secondary"
ng-click=
"addConfig()"
>
{{'RevenueAddBtn' | translate }}
</button>
<button
type=
"button"
class=
"btn btn-third"
ng-click=
"
d
elConfig()"
>
{{'RevenueDelBtn' | translate }}
</button>
<button
type=
"button"
class=
"btn btn-third"
ng-click=
"
batchD
elConfig()"
>
{{'RevenueDelBtn' | translate }}
</button>
<label
class=
"control-label"
>
文件:
</label>
<input
class=
"form-control"
type=
"text"
name=
"fileName"
ng-model=
"uploadFile.file.name"
readonly
placeholder=
""
/>
<button
type=
"button"
type=
"file"
ngf-select
ng-model=
"uploadFile.file"
accept=
".xls,.xlsx"
class=
"btn btn-secondary browse"
>
{{'SelectFile' | translate }}
</button>
<button
type=
"button"
class=
"btn btn-secondary"
translate=
"CoverImportBtn"
ng-click=
"upload()"
></button>
<button
type=
"button"
class=
"btn btn-secondary"
translate=
"AddImportBtn"
ng-click=
"upload()"
></button>
<button
type=
"button"
class=
"btn btn-in-grid inline-div"
ng-click=
"down
EntepriseAccount
Template()"
><i
<button
type=
"button"
class=
"btn btn-in-grid inline-div"
ng-click=
"down
load
Template()"
><i
class=
"fa fa-download"
aria-hidden=
"true"
></i>
下载模板
</button>
</div>
...
...
atms-web/src/main/webapp/app/dataImport/vat-revenue-config/vat-revenue-config.ctrl.js
View file @
b88c4703
...
...
@@ -108,6 +108,7 @@
SweetAlert
.
success
(
$translate
.
instant
(
'RevenueAddSuccess'
));
$scope
.
refreshConfigGrid
();
$
(
$scope
.
revenueConfAddDiv
).
modal
(
'hide'
);
$scope
.
cancelModal
();
}
else
{
SweetAlert
.
error
(
$translate
.
instant
(
'SystemError'
));
}
...
...
@@ -119,6 +120,7 @@
SweetAlert
.
success
(
$translate
.
instant
(
'RevenueAddSuccess'
));
$scope
.
refreshConfigGrid
();
$
(
$scope
.
revenueConfAddDiv
).
modal
(
'hide'
);
$scope
.
cancelModal
();
}
else
{
SweetAlert
.
error
(
$translate
.
instant
(
'SystemError'
));
}
...
...
atms-web/src/main/webapp/app/dataImport/vat-revenue-config/vat-revenue-config.html
View file @
b88c4703
...
...
@@ -5,7 +5,7 @@
</div>
<div
id=
"tab_total"
>
<form
class=
"form-inline"
>
<div
class=
"form-group"
><div
class=
"import-wrapper"
>
<div
class=
"form-group"
style=
"margin-top: 5px;"
><div
class=
"import-wrapper"
>
<button
type=
"button"
class=
"btn btn-primary"
ng-click=
"addConfig()"
>
{{'RevenueAddBtn' | translate }}
</button>
<button
type=
"button"
class=
"btn btn-third"
ng-click=
"batchDelConfig()"
>
{{'RevenueDelBtn' | translate }}
</button>
</div></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