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
5c2055a4
Commit
5c2055a4
authored
Mar 31, 2019
by
eddie.woo
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
c290952a
1b463230
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
2075 additions
and
279 deletions
+2075
-279
POIUtil.java
atms-api/src/main/java/pwc/taxtech/atms/common/POIUtil.java
+2
-1
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
SpringContextUtil.java
.../java/pwc/taxtech/atms/common/util/SpringContextUtil.java
+2
-1
ReportController.java
...in/java/pwc/taxtech/atms/controller/ReportController.java
+20
-9
DidiFileUploadService.java
.../pwc/taxtech/atms/service/impl/DidiFileUploadService.java
+3
-4
ReportGeneratorImpl.java
...wc/taxtech/atms/vat/service/impl/ReportGeneratorImpl.java
+1
-1
ReportServiceImpl.java
.../pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
+139
-35
TBM.java
...c/taxtech/atms/vat/service/impl/report/functions/TBM.java
+194
-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
TrialBalanceMappingMapper.java
...a/pwc/taxtech/atms/vat/dao/TrialBalanceMappingMapper.java
+109
-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
TrialBalanceMapping.java
...java/pwc/taxtech/atms/vat/entity/TrialBalanceMapping.java
+216
-0
TrialBalanceMappingExample.java
...c/taxtech/atms/vat/entity/TrialBalanceMappingExample.java
+643
-0
PwcReportAttachMapper.xml
...ources/pwc/taxtech/atms/vat/dao/PwcReportAttachMapper.xml
+22
-7
TrialBalanceMappingMapper.xml
...es/pwc/taxtech/atms/vat/dao/TrialBalanceMappingMapper.xml
+290
-0
organization-manage.html
...nfrastructure/organizationManage/organization-manage.html
+28
-23
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
edit-template-modal.html
...mon/controls/edit-template-modal/edit-template-modal.html
+11
-6
tax-report-cell-detail-modal.ctrl.js
...rt-cell-detail-modal/tax-report-cell-detail-modal.ctrl.js
+23
-12
vatReportService.js
...rc/main/webapp/app/common/vatservices/vatReportService.js
+1
-3
app-nav.ctrl.js
...web/src/main/webapp/app/framework/app-nav/app-nav.ctrl.js
+3
-0
app-nav.html
atms-web/src/main/webapp/app/framework/app-nav/app-nav.html
+2
-2
app-nav.less
atms-web/src/main/webapp/app/framework/app-nav/app-nav.less
+11
-3
No files found.
atms-api/src/main/java/pwc/taxtech/atms/common/POIUtil.java
View file @
5c2055a4
...
...
@@ -210,7 +210,8 @@ public class POIUtil {
public
static
void
copyCell
(
Workbook
wb
,
Cell
srcCell
,
Cell
distCell
,
boolean
copyValueFlag
)
{
CellStyle
newstyle
=
wb
.
createCellStyle
();
copyCellStyle
(
wb
,
srcCell
.
getCellStyle
(),
newstyle
);
newstyle
.
cloneStyleFrom
(
srcCell
.
getCellStyle
());
// copyCellStyle(wb,srcCell.getCellStyle(), newstyle);
// distCell.setEncoding(srcCell.getEncoding());
//样式
distCell
.
setCellStyle
(
newstyle
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/common/util/DateUtils.java
View file @
5c2055a4
...
...
@@ -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 @
5c2055a4
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 @
c290952a
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/common/util/SpringContextUtil.java
View file @
5c2055a4
...
...
@@ -62,7 +62,7 @@ public class SpringContextUtil implements ApplicationContextAware {
public
static
RevenueTypeMappingMapper
revenueTypeMappingMapper
;
public
static
InvoiceRecordMapper
invoiceRecordMapper
;
public
static
CertifiedInvoicesListMapper
certifiedInvoicesListMapper
;
public
static
TrialBalanceMappingMapper
trialBalanceMappingMapper
;
public
static
CashFlowMapper
cashFlowMapper
;
...
...
@@ -147,6 +147,7 @@ public class SpringContextUtil implements ApplicationContextAware {
revenueTypeMappingMapper
=
webApplicationContext
.
getBean
(
RevenueTypeMappingMapper
.
class
);
invoiceRecordMapper
=
webApplicationContext
.
getBean
(
InvoiceRecordMapper
.
class
);
certifiedInvoicesListMapper
=
webApplicationContext
.
getBean
(
CertifiedInvoicesListMapper
.
class
);
trialBalanceMappingMapper
=
webApplicationContext
.
getBean
(
TrialBalanceMappingMapper
.
class
);
/* map.put("balance_sheet", balanceMapper);
map.put("profit_loss_statement",profitLossStatementMapper);
map.put("cash_flow", cashFlowMapper);
...
...
atms-api/src/main/java/pwc/taxtech/atms/controller/ReportController.java
View file @
5c2055a4
...
...
@@ -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/service/impl/DidiFileUploadService.java
View file @
5c2055a4
...
...
@@ -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/vat/service/impl/ReportGeneratorImpl.java
View file @
5c2055a4
...
...
@@ -596,7 +596,7 @@ public class ReportGeneratorImpl {
new
BB
(
formulaContext
),
new
XXFP
(
formulaContext
),
new
GZSD
(
formulaContext
),
new
PC
(
formulaContext
)
,
new
JXFPMX
(
formulaContext
),
new
JXFP
(
formulaContext
),
new
PSUM
(
formulaContext
),
new
DFFS
(
formulaContext
),
new
JFFS
(
formulaContext
),
new
WPSR
(
formulaContext
),
new
WPNAME
(
formulaContext
),
new
WPTYPE
(
formulaContext
),
new
SUM2
(
formulaContext
),
new
RSUMIF
(
formulaContext
),
new
SUM
(
formulaContext
),
new
KPSR
(
formulaContext
)};
new
SUM2
(
formulaContext
),
new
RSUMIF
(
formulaContext
),
new
SUM
(
formulaContext
),
new
KPSR
(
formulaContext
)
,
new
TBM
(
formulaContext
)
};
UDFFinder
udfs
=
new
DefaultUDFFinder
(
functions
,
functionImpls
);
UDFFinder
udfToolpack
=
new
AggregatingUDFFinder
(
udfs
);
workbook
.
addToolPack
(
udfToolpack
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
View file @
5c2055a4
...
...
@@ -6,9 +6,11 @@ import com.github.pagehelper.PageHelper;
import
com.github.pagehelper.PageInfo
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Sets
;
import
javassist.expr.NewArray
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.map.HashedMap
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.poi.openxml4j.exceptions.InvalidFormatException
;
import
org.apache.poi.ss.usermodel.*
;
import
org.apache.poi.xssf.usermodel.XSSFCell
;
import
org.apache.poi.xssf.usermodel.XSSFFormulaEvaluator
;
...
...
@@ -20,11 +22,11 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.multipart.MultipartFile
;
import
pwc.taxtech.atms.analysis.entity.AnalysisActualTaxReturn
;
import
pwc.taxtech.atms.common.CommonUtils
;
import
pwc.taxtech.atms.common.POIUtil
;
import
pwc.taxtech.atms.common.message.ErrorMessage
;
import
pwc.taxtech.atms.common.util.DataUtil
;
import
pwc.taxtech.atms.common.util.FileUploadUtil
;
import
pwc.taxtech.atms.common.util.MyAsserts
;
import
pwc.taxtech.atms.common.util.SpringContextUtil
;
import
pwc.taxtech.atms.constant.Constant
;
...
...
@@ -49,10 +51,9 @@ import pwc.taxtech.atms.vat.entity.*;
import
pwc.taxtech.atms.vat.service.impl.report.functions.FormulaHelper
;
import
javax.annotation.Resource
;
import
java.io.ByteArrayOutputStream
;
import
java.io.File
;
import
java.io.InputStream
;
import
java.io.*
;
import
java.math.BigDecimal
;
import
java.net.URISyntaxException
;
import
java.util.*
;
import
java.util.concurrent.BlockingQueue
;
import
java.util.concurrent.LinkedBlockingQueue
;
...
...
@@ -67,7 +68,7 @@ public class ReportServiceImpl extends BaseService {
private
final
static
Logger
logger
=
LoggerFactory
.
getLogger
(
ReportServiceImpl
.
class
);
private
BlockingQueue
<
PeriodJob
>
queue
=
new
LinkedBlockingQueue
<>();
private
final
static
String
[]
functions
=
{
"SGSR"
,
"FSJZ"
,
"ND"
,
"BB"
,
"XXFP"
,
"GZSD"
,
"PC"
,
"JXFPMX"
,
"JXFP"
,
"PSUM"
,
"DFFS"
,
"JFFS"
,
"WPSR"
,
"WPNAME"
,
"WPTYPE"
,
"SUM2"
,
"RSUMIF"
,
"SUM"
,
"KPSR"
};
"JXFP"
,
"PSUM"
,
"DFFS"
,
"JFFS"
,
"WPSR"
,
"WPNAME"
,
"WPTYPE"
,
"SUM2"
,
"RSUMIF"
,
"SUM"
,
"KPSR"
,
"TBM"
};
@Autowired
private
ReportGeneratorImpl
reportGenerator
;
...
...
@@ -913,7 +914,8 @@ public class ReportServiceImpl extends BaseService {
}
}
public
Workbook
generateReportData
(
List
<
Long
>
reportIds
,
String
projectId
,
Integer
period
){
public
Workbook
generateReportData
(
List
<
Long
>
reportIds
,
String
projectId
,
Integer
period
)
{
PeriodReportExample
reportExample
=
new
PeriodReportExample
();
reportExample
.
createCriteria
().
andIdIn
(
reportIds
);
List
<
PeriodReport
>
reports
=
periodReportMapper
.
selectByExample
(
reportExample
);
...
...
@@ -937,8 +939,11 @@ public class ReportServiceImpl extends BaseService {
}
}
return
tWorkbook
;
};
return
tWorkbook
;
}
;
public
OperationResultDto
generateData
(
String
projectId
,
EnumServiceType
serviceType
,
Boolean
isMergeManualData
,
Integer
periodParam
,
Integer
reportType
,
Optional
<
String
>
generator
)
{
OperationResultDto
operationResultDto
=
new
OperationResultDto
();
...
...
@@ -2208,43 +2213,21 @@ public class ReportServiceImpl extends BaseService {
}
public
OperationResultDto
doUploadAttach
(
MultipartFile
file
,
String
remarks
)
{
OperationResultDto
operationResultDto
=
new
OperationResultDto
();
try
{
FileDto
fileDto
=
new
FileDto
();
int
i
=
file
.
getOriginalFilename
().
lastIndexOf
(
"."
);
fileDto
.
setFileName
(
file
.
getOriginalFilename
());
if
(
remarks
!=
null
)
{
fileDto
.
setRemarks
(
remarks
);
}
fileDto
.
setFileUrl
(
FileUploadUtil
.
upload
(
file
,
null
));
//绑定
fileDto
.
setSize
(
String
.
valueOf
(
file
.
getSize
()
/
1024
)
+
"KB"
);
fileDto
.
setUploadUser
(
authUserHelper
.
getCurrentAuditor
().
get
());
fileDto
.
setCreateTime
(
new
Date
());
operationResultDto
.
setData
(
fileDto
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
operationResultDto
.
setResultMsg
(
"error"
);
}
return
operationResultDto
;
}
@Resource
private
PwcReportAttachMapper
pwcReportAttachMapper
;
public
void
bindPwcAttach
(
Long
activeCol
,
Long
activeRow
,
String
activeTemplateId
,
File
Dto
file
)
{
public
void
bindPwcAttach
(
Long
activeCol
,
Long
activeRow
,
String
activeTemplateId
,
File
Upload
file
,
String
remarks
)
{
PwcReportAttach
pwcReportAttach
=
new
PwcReportAttach
();
pwcReportAttach
.
setCol
(
activeCol
);
pwcReportAttach
.
setCreateTime
(
file
.
getCreateTime
());
pwcReportAttach
.
setRow
(
activeRow
);
pwcReportAttach
.
setTemplateId
(
activeTemplateId
);
pwcReportAttach
.
setFileName
(
file
.
getFileName
());
pwcReportAttach
.
setUploadUser
(
file
.
get
UploadUser
());
pwcReportAttach
.
setFileUrl
(
file
.
get
File
Url
());
pwcReportAttach
.
set
Size
(
file
.
getSize
());
pwcReportAttach
.
setRemarks
(
file
.
getRemarks
()
);
pwcReportAttach
.
setUploadUser
(
file
.
get
CreateBy
());
pwcReportAttach
.
setFileUrl
(
file
.
get
ViewHttp
Url
());
pwcReportAttach
.
set
FileUploadId
(
file
.
getUid
());
pwcReportAttach
.
setRemarks
(
remarks
);
pwcReportAttachMapper
.
insert
(
pwcReportAttach
);
System
.
out
.
println
(
"==>>>附件绑定成功"
);
}
...
...
@@ -2376,4 +2359,125 @@ public class ReportServiceImpl extends BaseService {
return
operationResultDto
.
success
();
}
private
boolean
isSheetEmpty
(
Sheet
sheet
)
{
if
(
sheet
.
getLastRowNum
()
>
0
&&
(
null
==
sheet
.
getRow
(
0
).
getCell
(
0
)
||
"Version"
.
equals
(
sheet
.
getRow
(
0
).
getCell
(
0
).
getStringCellValue
()))
&&
null
==
sheet
.
getRow
(
0
).
getCell
(
2
))
{
return
true
;
}
return
false
;
}
@Autowired
TemplateServiceImpl
templateService
;
/**
* 批量导出Excel ebit利润表
*
* @param requestParameterDto
*/
public
void
manyExport
(
RequestParameterDto
requestParameterDto
,
String
zipFileName
)
throws
URISyntaxException
{
try
{
FileOutputStream
out
=
new
FileOutputStream
(
zipFileName
);
//要输出的文件名字
}
catch
(
FileNotFoundException
e
)
{
e
.
printStackTrace
();
}
String
filePath
;
File
templateFile
;
InputStream
inputStream
=
null
;
List
<
PeriodTemplate
>
templates
=
null
;
templates
=
templateService
.
getTemplates
(
Long
.
parseLong
(
requestParameterDto
.
getTemplateId
()));
MyAsserts
.
assertNotEmpty
(
templates
,
new
NotFoundException
());
PeriodTemplate
template
=
templates
.
get
(
0
);
String
templatePath
=
template
.
getPath
();
MyAsserts
.
assertNotEmpty
(
templatePath
,
new
NotFoundException
());
filePath
=
this
.
getClass
().
getResource
(
""
).
toURI
().
getPath
();
String
tempPath
=
filePath
.
substring
(
0
,
filePath
.
indexOf
(
"classes"
)
+
"\\classes"
.
length
());
templateFile
=
new
File
(
tempPath
+
templatePath
);
OutputStream
out
=
null
;
//获取当前期间进行过保存更新的机构的数据
EbitCellDataExample
example
=
new
EbitCellDataExample
();
EbitCellDataExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andPeriodEqualTo
(
requestParameterDto
.
getPeriod
());
List
<
EbitCellData
>
ebitCellDataList
=
ebitCellDataMapper
.
selectByExample
(
example
);
//获取当前期间下所有的数据
List
<
List
<
EbitCellData
>>
dataList
=
Lists
.
newArrayList
();
List
<
EbitCellData
>
orgList
=
ebitCellDataMapper
.
selectOrgType
(
requestParameterDto
.
getPeriod
());
List
<
EbitCellData
>
orgTypeList
=
null
;
for
(
int
i
=
0
;
i
<
orgList
.
size
();
i
++)
{
orgTypeList
=
Lists
.
newArrayList
();
for
(
EbitCellData
ebitCellData
:
ebitCellDataList
)
{
if
(!
ebitCellData
.
getOrganizationId
().
equals
(
orgList
.
get
(
i
).
getOrganizationId
()))
continue
;
orgTypeList
.
add
(
ebitCellData
);
}
dataList
.
add
(
orgTypeList
);
}
if
(
template
.
getIsSystemType
())
{
try
{
inputStream
=
new
BufferedInputStream
(
new
FileInputStream
(
templateFile
));
}
catch
(
FileNotFoundException
e
)
{
e
.
printStackTrace
();
}
}
else
{
if
(
templatePath
.
indexOf
(
"/"
)
<=
0
)
{
DidiFileIUploadParam
fileParam
=
new
DidiFileIUploadParam
();
fileParam
.
setUuids
(
Arrays
.
asList
(
templatePath
));
PageInfo
<
DidiFileUploadDetailResult
>
uploadDetail
=
didiFileUploadService
.
queryPage
(
fileParam
);
Map
<
String
,
String
>
urlMap
=
null
;
if
(
CollectionUtils
.
isNotEmpty
(
uploadDetail
.
getList
()))
{
templatePath
=
uploadDetail
.
getList
().
get
(
0
).
getViewHttpUrl
();
}
}
inputStream
=
httpFileService
.
getUserTemplate
(
templatePath
);
try
{
Cell
cell
=
null
;
List
<
Workbook
>
workbooksList
=
Lists
.
newArrayList
();
for
(
List
<
EbitCellData
>
ebitCellDataList1
:
dataList
)
{
Workbook
workbook
=
WorkbookFactory
.
create
(
inputStream
);
Sheet
sheet
=
workbook
.
getSheetAt
(
0
);
if
(
isSheetEmpty
(
sheet
))
throw
new
Exception
(
"模板异常"
);
for
(
EbitCellData
ebitCellData
:
ebitCellDataList1
)
{
for
(
int
j
=
1
,
k
=
sheet
.
getLastRowNum
();
j
<
k
;
j
++)
{
for
(
int
m
=
1
,
n
=
sheet
.
getRow
(
j
).
getLastCellNum
();
m
<
n
;
m
++)
{
cell
=
sheet
.
getRow
(
j
).
getCell
(
m
);
if
(
""
.
equals
(
getCellStringValue
(
cell
))
&&
ebitCellData
.
getRow
()
==
j
&&
ebitCellData
.
getCol
()
==
m
)
{
cell
.
setCellValue
(
ebitCellData
.
getData
());
}
}
}
}
workbooksList
.
add
(
workbook
);
}
//将workbook转成流
/* ByteArrayOutputStream bos = new ByteArrayOutputStream();
workbook.write(bos);
byte[] barray = bos.toByteArray();
InputStream is = new ByteArrayInputStream(barray);*/
// FileOutputStream fileOut = new FileOutputStream(path);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
catch
(
InvalidFormatException
e
)
{
e
.
printStackTrace
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
private
String
getCellStringValue
(
Cell
cell
)
{
if
(
cell
.
getCellTypeEnum
().
equals
(
CellType
.
STRING
))
{
return
cell
.
getStringCellValue
();
}
else
if
(
cell
.
getCellTypeEnum
().
equals
(
CellType
.
NUMERIC
))
{
// 取整
return
String
.
valueOf
((
int
)
cell
.
getNumericCellValue
());
}
logger
.
warn
(
"获取单元格数据类型未匹配"
);
return
null
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/TBM.java
0 → 100644
View file @
5c2055a4
package
pwc
.
taxtech
.
atms
.
vat
.
service
.
impl
.
report
.
functions
;
import
com.google.common.collect.Lists
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.poi.ss.formula.OperationEvaluationContext
;
import
org.apache.poi.ss.formula.eval.NumberEval
;
import
org.apache.poi.ss.formula.eval.ValueEval
;
import
org.apache.poi.ss.formula.functions.FreeRefFunction
;
import
pwc.taxtech.atms.common.util.SpringContextUtil
;
import
pwc.taxtech.atms.constant.Constant
;
import
pwc.taxtech.atms.constant.enums.FormulaDataSourceDetailType
;
import
pwc.taxtech.atms.constant.enums.FormulaDataSourceType
;
import
pwc.taxtech.atms.dto.vatdto.ReportCellDataSourceDto
;
import
pwc.taxtech.atms.entity.Organization
;
import
pwc.taxtech.atms.vat.entity.*
;
import
java.math.BigDecimal
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
* 根据报表项目与科目映射取出科目代码,再通过入参进行TB表数据计算
*/
public
class
TBM
extends
FunctionBase
implements
FreeRefFunction
{
public
TBM
(
FormulaContext
formulaContext
)
{
super
(
formulaContext
);
}
@Override
public
ValueEval
evaluate
(
ValueEval
[]
args
,
OperationEvaluationContext
ec
)
{
if
(
args
.
length
<
4
)
{
return
null
;
}
int
evenType
=
getIntParam
(
args
[
0
],
ec
);
//事件类型,1:利润映射,2:资产映射
String
mappingName
=
getStringParam
(
args
[
1
],
ec
);
//映射名称
int
calculateType
=
getIntParam
(
args
[
2
],
ec
);
//计算类型,当取利润时候,1:贷方-借方,2:借方-贷方。当取资产时,1:正数,2:负数
int
sourceDataType
=
getIntParam
(
args
[
3
],
ec
);
//取值数据源
String
formulaExpression
=
"TBM("
+
evenType
+
",\""
+
mappingName
+
"\","
+
calculateType
+
","
+
sourceDataType
+
")"
;
List
<
ReportCellDataSourceDto
>
dataSource
=
Lists
.
newArrayList
();
List
<
String
>
segment3List
=
getSegment3List
(
evenType
,
mappingName
);
if
(
CollectionUtils
.
isEmpty
(
segment3List
)){
return
NumberEval
.
ZERO
;
}
double
result
=
0.00
;
if
(
sourceDataType
==
1
)
{
result
=
countForTrialBalance
(
evenType
,
calculateType
,
segment3List
,
dataSource
,
formulaContext
.
getPeriod
(),
formulaContext
.
getYear
(),
formulaContext
.
getOrganizationId
());
}
else
if
(
sourceDataType
==
2
)
{
result
=
countForAdjBalance
(
evenType
,
calculateType
,
segment3List
,
dataSource
,
formulaContext
.
getPeriod
(),
formulaContext
.
getYear
(),
formulaContext
.
getOrganizationId
());
}
else
if
(
sourceDataType
==
3
)
{
result
=
countForTrialFinalBalance
(
evenType
,
calculateType
,
segment3List
,
dataSource
,
formulaContext
.
getPeriod
(),
formulaContext
.
getYear
(),
formulaContext
.
getOrganizationId
());
}
else
{
return
NumberEval
.
ZERO
;
}
Long
dataSoureId
=
saveDataSource
(
ec
,
Collections
.
singletonList
(
dataSource
),
FormulaDataSourceDetailType
.
FormulaDataSourceDto
,
new
BigDecimal
(
result
),
formulaContext
.
getPeriod
(),
formulaContext
.
getReportTemplateGroupId
(),
formulaContext
.
getProjectId
());
saveFormulaBlock
(
formulaContext
.
getPeriod
(),
ec
,
formulaExpression
,
new
BigDecimal
(
result
),
dataSoureId
,
formulaContext
.
getProjectId
());
return
new
NumberEval
(
result
);
}
public
List
<
String
>
getSegment3List
(
int
eventType
,
String
mappingName
){
TrialBalanceMappingExample
example
=
new
TrialBalanceMappingExample
();
if
(
eventType
==
1
){
example
.
createCriteria
().
andPlTypeEqualTo
(
mappingName
);
}
else
if
(
eventType
==
2
){
example
.
createCriteria
().
andBsTypeEqualTo
(
mappingName
);
}
List
<
TrialBalanceMapping
>
dataList
=
SpringContextUtil
.
trialBalanceMappingMapper
.
selectByExample
(
example
);
return
dataList
.
stream
()
.
map
(
o
->
o
.
getSegment3
()).
collect
(
Collectors
.
toList
());
}
private
int
pardePeriod
(
int
period
,
int
year
)
{
return
Integer
.
parseInt
(
""
+
year
+
(
period
>
9
?
period
:
(
"0"
+
period
)));
}
private
double
countForTrialBalance
(
int
eventType
,
int
calculateType
,
List
<
String
>
segment3List
,
List
<
ReportCellDataSourceDto
>
contain
,
int
period
,
int
year
,
String
orgId
)
{
Organization
organization
=
SpringContextUtil
.
organizationMapper
.
selectByPrimaryKey
(
orgId
);
TrialBalanceExample
glBalanceExample
=
new
TrialBalanceExample
();
TrialBalanceExample
.
Criteria
c1
=
glBalanceExample
.
createCriteria
().
andSegment3In
(
segment3List
)
.
andPeriodEqualTo
(
pardePeriod
(
period
,
year
));
if
(
organization
!=
null
)
{
c1
.
andOrganizationIdEqualTo
(
organization
.
getId
());
}
List
<
TrialBalance
>
list
=
SpringContextUtil
.
trialBalanceMapper
.
selectByExample
(
glBalanceExample
);
if
(
CollectionUtils
.
isEmpty
(
list
))
{
return
0.0
;
}
BigDecimal
amount
=
new
BigDecimal
(
0
);
for
(
TrialBalance
balance
:
list
)
{
ReportCellDataSourceDto
dto
=
new
ReportCellDataSourceDto
();
if
(
eventType
==
1
){
if
(
calculateType
==
1
){
dto
.
setAmount
(
balance
.
getPeriodCrBeq
().
subtract
(
balance
.
getPeriodDrBeq
()));
}
else
if
(
calculateType
==
2
){
dto
.
setAmount
(
balance
.
getPeriodDrBeq
().
subtract
(
balance
.
getPeriodCrBeq
()));
}
}
else
if
(
eventType
==
2
){
if
(
calculateType
==
1
){
dto
.
setAmount
(
balance
.
getEndBalBeq
());
}
else
if
(
calculateType
==
2
){
dto
.
setAmount
(
balance
.
getEndBalBeq
().
multiply
(
new
BigDecimal
(-
1
)));
}
}
amount
=
amount
.
add
(
dto
.
getAmount
());
dto
.
setPeriod
(
period
);
dto
.
setIsOnlyManualInput
(
Boolean
.
FALSE
);
dto
.
setName
(
Constant
.
DataSourceName
.
ReportDataSource
);
dto
.
setType
(
FormulaDataSourceType
.
TrialBalanceSource
.
getCode
());
contain
.
add
(
dto
);
}
return
amount
.
doubleValue
();
}
private
double
countForAdjBalance
(
int
eventType
,
int
calculateType
,
List
<
String
>
segment3List
,
List
<
ReportCellDataSourceDto
>
contain
,
int
period
,
int
year
,
String
orgId
)
{
Organization
organization
=
SpringContextUtil
.
organizationMapper
.
selectByPrimaryKey
(
orgId
);
AdjustmentTableExample
glBalanceExample
=
new
AdjustmentTableExample
();
AdjustmentTableExample
.
Criteria
c1
=
glBalanceExample
.
createCriteria
().
andSegment3In
(
segment3List
)
.
andPeriodEqualTo
(
pardePeriod
(
period
,
year
));
if
(
organization
!=
null
)
{
c1
.
andOrganizationIdEqualTo
(
organization
.
getId
());
}
List
<
AdjustmentTable
>
list
=
SpringContextUtil
.
adjustmentTableMapper
.
selectByExample
(
glBalanceExample
);
if
(
CollectionUtils
.
isEmpty
(
list
))
{
return
0.0
;
}
BigDecimal
amount
=
new
BigDecimal
(
0
);
for
(
AdjustmentTable
balance
:
list
)
{
ReportCellDataSourceDto
dto
=
new
ReportCellDataSourceDto
();
if
(
eventType
==
1
){
if
(
calculateType
==
1
){
dto
.
setAmount
(
balance
.
getPeriodCrBeq
().
subtract
(
balance
.
getPeriodDrBeq
()));
}
else
if
(
calculateType
==
2
){
dto
.
setAmount
(
balance
.
getPeriodDrBeq
().
subtract
(
balance
.
getPeriodCrBeq
()));
}
}
else
if
(
eventType
==
2
){
if
(
calculateType
==
1
){
dto
.
setAmount
(
balance
.
getEndBalBeq
());
}
else
if
(
calculateType
==
2
){
dto
.
setAmount
(
balance
.
getEndBalBeq
().
multiply
(
new
BigDecimal
(-
1
)));
}
}
amount
.
add
(
dto
.
getAmount
());
dto
.
setPeriod
(
period
);
dto
.
setIsOnlyManualInput
(
Boolean
.
FALSE
);
dto
.
setName
(
Constant
.
DataSourceName
.
ReportDataSource
);
dto
.
setType
(
FormulaDataSourceType
.
TrialBalanceSource
.
getCode
());
contain
.
add
(
dto
);
}
return
amount
.
doubleValue
();
}
private
double
countForTrialFinalBalance
(
int
eventType
,
int
calculateType
,
List
<
String
>
segment3List
,
List
<
ReportCellDataSourceDto
>
contain
,
int
period
,
int
year
,
String
orgId
)
{
Organization
organization
=
SpringContextUtil
.
organizationMapper
.
selectByPrimaryKey
(
orgId
);
TrialBalanceFinalExample
glBalanceExample
=
new
TrialBalanceFinalExample
();
TrialBalanceFinalExample
.
Criteria
c1
=
glBalanceExample
.
createCriteria
().
andSegment3In
(
segment3List
)
.
andPeriodEqualTo
(
pardePeriod
(
period
,
year
));
if
(
organization
!=
null
)
{
c1
.
andOrganizationIdEqualTo
(
organization
.
getId
());
}
List
<
TrialBalanceFinal
>
list
=
SpringContextUtil
.
trialBalanceFinalMapper
.
selectByExample
(
glBalanceExample
);
if
(
CollectionUtils
.
isEmpty
(
list
))
{
return
0.0
;
}
BigDecimal
amount
=
new
BigDecimal
(
0
);
for
(
TrialBalanceFinal
balance
:
list
)
{
ReportCellDataSourceDto
dto
=
new
ReportCellDataSourceDto
();
if
(
eventType
==
1
){
if
(
calculateType
==
1
){
dto
.
setAmount
(
balance
.
getPeriodCrBeq
().
subtract
(
balance
.
getPeriodDrBeq
()));
}
else
if
(
calculateType
==
2
){
dto
.
setAmount
(
balance
.
getPeriodDrBeq
().
subtract
(
balance
.
getPeriodCrBeq
()));
}
}
else
if
(
eventType
==
2
){
if
(
calculateType
==
1
){
dto
.
setAmount
(
balance
.
getEndBalBeq
());
}
else
if
(
calculateType
==
2
){
dto
.
setAmount
(
balance
.
getEndBalBeq
().
multiply
(
new
BigDecimal
(-
1
)));
}
}
amount
.
add
(
dto
.
getAmount
());
dto
.
setPeriod
(
period
);
dto
.
setIsOnlyManualInput
(
Boolean
.
FALSE
);
dto
.
setName
(
Constant
.
DataSourceName
.
ReportDataSource
);
dto
.
setType
(
FormulaDataSourceType
.
TrialBalanceSource
.
getCode
());
contain
.
add
(
dto
);
}
return
amount
.
doubleValue
();
}
}
atms-dao/etc/generator-mysql/vatGeneratorConfig.xml
View file @
5c2055a4
...
...
@@ -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 @
5c2055a4
...
...
@@ -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/dao/TrialBalanceMappingMapper.java
0 → 100644
View file @
5c2055a4
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.session.RowBounds
;
import
pwc.taxtech.atms.MyVatMapper
;
import
pwc.taxtech.atms.vat.entity.TrialBalanceMapping
;
import
pwc.taxtech.atms.vat.entity.TrialBalanceMappingExample
;
@Mapper
public
interface
TrialBalanceMappingMapper
extends
MyVatMapper
{
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table trial_balance_mapping
*
* @mbg.generated
*/
long
countByExample
(
TrialBalanceMappingExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table trial_balance_mapping
*
* @mbg.generated
*/
int
deleteByExample
(
TrialBalanceMappingExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table trial_balance_mapping
*
* @mbg.generated
*/
int
deleteByPrimaryKey
(
Long
id
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table trial_balance_mapping
*
* @mbg.generated
*/
int
insert
(
TrialBalanceMapping
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table trial_balance_mapping
*
* @mbg.generated
*/
int
insertSelective
(
TrialBalanceMapping
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table trial_balance_mapping
*
* @mbg.generated
*/
List
<
TrialBalanceMapping
>
selectByExampleWithRowbounds
(
TrialBalanceMappingExample
example
,
RowBounds
rowBounds
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table trial_balance_mapping
*
* @mbg.generated
*/
List
<
TrialBalanceMapping
>
selectByExample
(
TrialBalanceMappingExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table trial_balance_mapping
*
* @mbg.generated
*/
TrialBalanceMapping
selectByPrimaryKey
(
Long
id
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table trial_balance_mapping
*
* @mbg.generated
*/
int
updateByExampleSelective
(
@Param
(
"record"
)
TrialBalanceMapping
record
,
@Param
(
"example"
)
TrialBalanceMappingExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table trial_balance_mapping
*
* @mbg.generated
*/
int
updateByExample
(
@Param
(
"record"
)
TrialBalanceMapping
record
,
@Param
(
"example"
)
TrialBalanceMappingExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table trial_balance_mapping
*
* @mbg.generated
*/
int
updateByPrimaryKeySelective
(
TrialBalanceMapping
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table trial_balance_mapping
*
* @mbg.generated
*/
int
updateByPrimaryKey
(
TrialBalanceMapping
record
);
}
\ No newline at end of file
atms-dao/src/main/java/pwc/taxtech/atms/vat/entity/PwcReportAttach.java
View file @
5c2055a4
...
...
@@ -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 @
5c2055a4
...
...
@@ -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/java/pwc/taxtech/atms/vat/entity/TrialBalanceMapping.java
0 → 100644
View file @
5c2055a4
package
pwc
.
taxtech
.
atms
.
vat
.
entity
;
import
java.io.Serializable
;
import
pwc.taxtech.atms.entity.BaseEntity
;
/**
*
* This class was generated by MyBatis Generator.
* This class corresponds to the database table trial_balance_mapping
*
* @mbg.generated do_not_delete_during_merge
*/
public
class
TrialBalanceMapping
extends
BaseEntity
implements
Serializable
{
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column trial_balance_mapping.id
*
* @mbg.generated
*/
private
Long
id
;
/**
* Database Column Remarks:
* 科目代码
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column trial_balance_mapping.segment3
*
* @mbg.generated
*/
private
String
segment3
;
/**
* Database Column Remarks:
* 科目名称
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column trial_balance_mapping.segment3_name
*
* @mbg.generated
*/
private
String
segment3Name
;
/**
* Database Column Remarks:
* 资产负债表类型
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column trial_balance_mapping.bs_type
*
* @mbg.generated
*/
private
String
bsType
;
/**
* Database Column Remarks:
* 利润表类型映射
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column trial_balance_mapping.pl_type
*
* @mbg.generated
*/
private
String
plType
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table trial_balance_mapping
*
* @mbg.generated
*/
private
static
final
long
serialVersionUID
=
1L
;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column trial_balance_mapping.id
*
* @return the value of trial_balance_mapping.id
*
* @mbg.generated
*/
public
Long
getId
()
{
return
id
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column trial_balance_mapping.id
*
* @param id the value for trial_balance_mapping.id
*
* @mbg.generated
*/
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column trial_balance_mapping.segment3
*
* @return the value of trial_balance_mapping.segment3
*
* @mbg.generated
*/
public
String
getSegment3
()
{
return
segment3
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column trial_balance_mapping.segment3
*
* @param segment3 the value for trial_balance_mapping.segment3
*
* @mbg.generated
*/
public
void
setSegment3
(
String
segment3
)
{
this
.
segment3
=
segment3
==
null
?
null
:
segment3
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column trial_balance_mapping.segment3_name
*
* @return the value of trial_balance_mapping.segment3_name
*
* @mbg.generated
*/
public
String
getSegment3Name
()
{
return
segment3Name
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column trial_balance_mapping.segment3_name
*
* @param segment3Name the value for trial_balance_mapping.segment3_name
*
* @mbg.generated
*/
public
void
setSegment3Name
(
String
segment3Name
)
{
this
.
segment3Name
=
segment3Name
==
null
?
null
:
segment3Name
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column trial_balance_mapping.bs_type
*
* @return the value of trial_balance_mapping.bs_type
*
* @mbg.generated
*/
public
String
getBsType
()
{
return
bsType
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column trial_balance_mapping.bs_type
*
* @param bsType the value for trial_balance_mapping.bs_type
*
* @mbg.generated
*/
public
void
setBsType
(
String
bsType
)
{
this
.
bsType
=
bsType
==
null
?
null
:
bsType
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column trial_balance_mapping.pl_type
*
* @return the value of trial_balance_mapping.pl_type
*
* @mbg.generated
*/
public
String
getPlType
()
{
return
plType
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column trial_balance_mapping.pl_type
*
* @param plType the value for trial_balance_mapping.pl_type
*
* @mbg.generated
*/
public
void
setPlType
(
String
plType
)
{
this
.
plType
=
plType
==
null
?
null
:
plType
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table trial_balance_mapping
*
* @mbg.generated
*/
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
getClass
().
getSimpleName
());
sb
.
append
(
" ["
);
sb
.
append
(
"Hash = "
).
append
(
hashCode
());
sb
.
append
(
", id="
).
append
(
id
);
sb
.
append
(
", segment3="
).
append
(
segment3
);
sb
.
append
(
", segment3Name="
).
append
(
segment3Name
);
sb
.
append
(
", bsType="
).
append
(
bsType
);
sb
.
append
(
", plType="
).
append
(
plType
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
}
}
\ No newline at end of file
atms-dao/src/main/java/pwc/taxtech/atms/vat/entity/TrialBalanceMappingExample.java
0 → 100644
View file @
5c2055a4
package
pwc
.
taxtech
.
atms
.
vat
.
entity
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
TrialBalanceMappingExample
{
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table trial_balance_mapping
*
* @mbg.generated
*/
protected
String
orderByClause
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table trial_balance_mapping
*
* @mbg.generated
*/
protected
boolean
distinct
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table trial_balance_mapping
*
* @mbg.generated
*/
protected
List
<
Criteria
>
oredCriteria
;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table trial_balance_mapping
*
* @mbg.generated
*/
public
TrialBalanceMappingExample
()
{
oredCriteria
=
new
ArrayList
<
Criteria
>();
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table trial_balance_mapping
*
* @mbg.generated
*/
public
void
setOrderByClause
(
String
orderByClause
)
{
this
.
orderByClause
=
orderByClause
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table trial_balance_mapping
*
* @mbg.generated
*/
public
String
getOrderByClause
()
{
return
orderByClause
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table trial_balance_mapping
*
* @mbg.generated
*/
public
void
setDistinct
(
boolean
distinct
)
{
this
.
distinct
=
distinct
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table trial_balance_mapping
*
* @mbg.generated
*/
public
boolean
isDistinct
()
{
return
distinct
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table trial_balance_mapping
*
* @mbg.generated
*/
public
List
<
Criteria
>
getOredCriteria
()
{
return
oredCriteria
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table trial_balance_mapping
*
* @mbg.generated
*/
public
void
or
(
Criteria
criteria
)
{
oredCriteria
.
add
(
criteria
);
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table trial_balance_mapping
*
* @mbg.generated
*/
public
Criteria
or
()
{
Criteria
criteria
=
createCriteriaInternal
();
oredCriteria
.
add
(
criteria
);
return
criteria
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table trial_balance_mapping
*
* @mbg.generated
*/
public
Criteria
createCriteria
()
{
Criteria
criteria
=
createCriteriaInternal
();
if
(
oredCriteria
.
size
()
==
0
)
{
oredCriteria
.
add
(
criteria
);
}
return
criteria
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table trial_balance_mapping
*
* @mbg.generated
*/
protected
Criteria
createCriteriaInternal
()
{
Criteria
criteria
=
new
Criteria
();
return
criteria
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table trial_balance_mapping
*
* @mbg.generated
*/
public
void
clear
()
{
oredCriteria
.
clear
();
orderByClause
=
null
;
distinct
=
false
;
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table trial_balance_mapping
*
* @mbg.generated
*/
protected
abstract
static
class
GeneratedCriteria
{
protected
List
<
Criterion
>
criteria
;
protected
GeneratedCriteria
()
{
super
();
criteria
=
new
ArrayList
<
Criterion
>();
}
public
boolean
isValid
()
{
return
criteria
.
size
()
>
0
;
}
public
List
<
Criterion
>
getAllCriteria
()
{
return
criteria
;
}
public
List
<
Criterion
>
getCriteria
()
{
return
criteria
;
}
protected
void
addCriterion
(
String
condition
)
{
if
(
condition
==
null
)
{
throw
new
RuntimeException
(
"Value for condition cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
));
}
protected
void
addCriterion
(
String
condition
,
Object
value
,
String
property
)
{
if
(
value
==
null
)
{
throw
new
RuntimeException
(
"Value for "
+
property
+
" cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
,
value
));
}
protected
void
addCriterion
(
String
condition
,
Object
value1
,
Object
value2
,
String
property
)
{
if
(
value1
==
null
||
value2
==
null
)
{
throw
new
RuntimeException
(
"Between values for "
+
property
+
" cannot be null"
);
}
criteria
.
add
(
new
Criterion
(
condition
,
value1
,
value2
));
}
public
Criteria
andIdIsNull
()
{
addCriterion
(
"id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdIsNotNull
()
{
addCriterion
(
"id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdEqualTo
(
Long
value
)
{
addCriterion
(
"id ="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"id <>"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThan
(
Long
value
)
{
addCriterion
(
"id >"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"id >="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThan
(
Long
value
)
{
addCriterion
(
"id <"
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"id <="
,
value
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"id in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"id not in"
,
values
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"id between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"id not between"
,
value1
,
value2
,
"id"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSegment3IsNull
()
{
addCriterion
(
"segment3 is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSegment3IsNotNull
()
{
addCriterion
(
"segment3 is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSegment3EqualTo
(
String
value
)
{
addCriterion
(
"segment3 ="
,
value
,
"segment3"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSegment3NotEqualTo
(
String
value
)
{
addCriterion
(
"segment3 <>"
,
value
,
"segment3"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSegment3GreaterThan
(
String
value
)
{
addCriterion
(
"segment3 >"
,
value
,
"segment3"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSegment3GreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"segment3 >="
,
value
,
"segment3"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSegment3LessThan
(
String
value
)
{
addCriterion
(
"segment3 <"
,
value
,
"segment3"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSegment3LessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"segment3 <="
,
value
,
"segment3"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSegment3Like
(
String
value
)
{
addCriterion
(
"segment3 like"
,
value
,
"segment3"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSegment3NotLike
(
String
value
)
{
addCriterion
(
"segment3 not like"
,
value
,
"segment3"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSegment3In
(
List
<
String
>
values
)
{
addCriterion
(
"segment3 in"
,
values
,
"segment3"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSegment3NotIn
(
List
<
String
>
values
)
{
addCriterion
(
"segment3 not in"
,
values
,
"segment3"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSegment3Between
(
String
value1
,
String
value2
)
{
addCriterion
(
"segment3 between"
,
value1
,
value2
,
"segment3"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSegment3NotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"segment3 not between"
,
value1
,
value2
,
"segment3"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSegment3NameIsNull
()
{
addCriterion
(
"segment3_name is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSegment3NameIsNotNull
()
{
addCriterion
(
"segment3_name is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSegment3NameEqualTo
(
String
value
)
{
addCriterion
(
"segment3_name ="
,
value
,
"segment3Name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSegment3NameNotEqualTo
(
String
value
)
{
addCriterion
(
"segment3_name <>"
,
value
,
"segment3Name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSegment3NameGreaterThan
(
String
value
)
{
addCriterion
(
"segment3_name >"
,
value
,
"segment3Name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSegment3NameGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"segment3_name >="
,
value
,
"segment3Name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSegment3NameLessThan
(
String
value
)
{
addCriterion
(
"segment3_name <"
,
value
,
"segment3Name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSegment3NameLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"segment3_name <="
,
value
,
"segment3Name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSegment3NameLike
(
String
value
)
{
addCriterion
(
"segment3_name like"
,
value
,
"segment3Name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSegment3NameNotLike
(
String
value
)
{
addCriterion
(
"segment3_name not like"
,
value
,
"segment3Name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSegment3NameIn
(
List
<
String
>
values
)
{
addCriterion
(
"segment3_name in"
,
values
,
"segment3Name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSegment3NameNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"segment3_name not in"
,
values
,
"segment3Name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSegment3NameBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"segment3_name between"
,
value1
,
value2
,
"segment3Name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andSegment3NameNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"segment3_name not between"
,
value1
,
value2
,
"segment3Name"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBsTypeIsNull
()
{
addCriterion
(
"bs_type is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBsTypeIsNotNull
()
{
addCriterion
(
"bs_type is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBsTypeEqualTo
(
String
value
)
{
addCriterion
(
"bs_type ="
,
value
,
"bsType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBsTypeNotEqualTo
(
String
value
)
{
addCriterion
(
"bs_type <>"
,
value
,
"bsType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBsTypeGreaterThan
(
String
value
)
{
addCriterion
(
"bs_type >"
,
value
,
"bsType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBsTypeGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"bs_type >="
,
value
,
"bsType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBsTypeLessThan
(
String
value
)
{
addCriterion
(
"bs_type <"
,
value
,
"bsType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBsTypeLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"bs_type <="
,
value
,
"bsType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBsTypeLike
(
String
value
)
{
addCriterion
(
"bs_type like"
,
value
,
"bsType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBsTypeNotLike
(
String
value
)
{
addCriterion
(
"bs_type not like"
,
value
,
"bsType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBsTypeIn
(
List
<
String
>
values
)
{
addCriterion
(
"bs_type in"
,
values
,
"bsType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBsTypeNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"bs_type not in"
,
values
,
"bsType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBsTypeBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"bs_type between"
,
value1
,
value2
,
"bsType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andBsTypeNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"bs_type not between"
,
value1
,
value2
,
"bsType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlTypeIsNull
()
{
addCriterion
(
"pl_type is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlTypeIsNotNull
()
{
addCriterion
(
"pl_type is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlTypeEqualTo
(
String
value
)
{
addCriterion
(
"pl_type ="
,
value
,
"plType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlTypeNotEqualTo
(
String
value
)
{
addCriterion
(
"pl_type <>"
,
value
,
"plType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlTypeGreaterThan
(
String
value
)
{
addCriterion
(
"pl_type >"
,
value
,
"plType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlTypeGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"pl_type >="
,
value
,
"plType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlTypeLessThan
(
String
value
)
{
addCriterion
(
"pl_type <"
,
value
,
"plType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlTypeLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"pl_type <="
,
value
,
"plType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlTypeLike
(
String
value
)
{
addCriterion
(
"pl_type like"
,
value
,
"plType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlTypeNotLike
(
String
value
)
{
addCriterion
(
"pl_type not like"
,
value
,
"plType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlTypeIn
(
List
<
String
>
values
)
{
addCriterion
(
"pl_type in"
,
values
,
"plType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlTypeNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"pl_type not in"
,
values
,
"plType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlTypeBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"pl_type between"
,
value1
,
value2
,
"plType"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPlTypeNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"pl_type not between"
,
value1
,
value2
,
"plType"
);
return
(
Criteria
)
this
;
}
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table trial_balance_mapping
*
* @mbg.generated do_not_delete_during_merge
*/
public
static
class
Criteria
extends
GeneratedCriteria
{
protected
Criteria
()
{
super
();
}
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table trial_balance_mapping
*
* @mbg.generated
*/
public
static
class
Criterion
{
private
String
condition
;
private
Object
value
;
private
Object
secondValue
;
private
boolean
noValue
;
private
boolean
singleValue
;
private
boolean
betweenValue
;
private
boolean
listValue
;
private
String
typeHandler
;
public
String
getCondition
()
{
return
condition
;
}
public
Object
getValue
()
{
return
value
;
}
public
Object
getSecondValue
()
{
return
secondValue
;
}
public
boolean
isNoValue
()
{
return
noValue
;
}
public
boolean
isSingleValue
()
{
return
singleValue
;
}
public
boolean
isBetweenValue
()
{
return
betweenValue
;
}
public
boolean
isListValue
()
{
return
listValue
;
}
public
String
getTypeHandler
()
{
return
typeHandler
;
}
protected
Criterion
(
String
condition
)
{
super
();
this
.
condition
=
condition
;
this
.
typeHandler
=
null
;
this
.
noValue
=
true
;
}
protected
Criterion
(
String
condition
,
Object
value
,
String
typeHandler
)
{
super
();
this
.
condition
=
condition
;
this
.
value
=
value
;
this
.
typeHandler
=
typeHandler
;
if
(
value
instanceof
List
<?>)
{
this
.
listValue
=
true
;
}
else
{
this
.
singleValue
=
true
;
}
}
protected
Criterion
(
String
condition
,
Object
value
)
{
this
(
condition
,
value
,
null
);
}
protected
Criterion
(
String
condition
,
Object
value
,
Object
secondValue
,
String
typeHandler
)
{
super
();
this
.
condition
=
condition
;
this
.
value
=
value
;
this
.
secondValue
=
secondValue
;
this
.
typeHandler
=
typeHandler
;
this
.
betweenValue
=
true
;
}
protected
Criterion
(
String
condition
,
Object
value
,
Object
secondValue
)
{
this
(
condition
,
value
,
secondValue
,
null
);
}
}
}
\ No newline at end of file
atms-dao/src/main/resources/pwc/taxtech/atms/vat/dao/PwcReportAttachMapper.xml
View file @
5c2055a4
...
...
@@ -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-dao/src/main/resources/pwc/taxtech/atms/vat/dao/TrialBalanceMappingMapper.xml
0 → 100644
View file @
5c2055a4
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"pwc.taxtech.atms.vat.dao.TrialBalanceMappingMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"pwc.taxtech.atms.vat.entity.TrialBalanceMapping"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"segment3"
jdbcType=
"VARCHAR"
property=
"segment3"
/>
<result
column=
"segment3_name"
jdbcType=
"VARCHAR"
property=
"segment3Name"
/>
<result
column=
"bs_type"
jdbcType=
"VARCHAR"
property=
"bsType"
/>
<result
column=
"pl_type"
jdbcType=
"VARCHAR"
property=
"plType"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Base_Column_List"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, segment3, segment3_name, bs_type, pl_type
</sql>
<select
id=
"selectByExample"
parameterType=
"pwc.taxtech.atms.vat.entity.TrialBalanceMappingExample"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from trial_balance_mapping
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include
refid=
"Base_Column_List"
/>
from trial_balance_mapping
where id = #{id,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from trial_balance_mapping
where id = #{id,jdbcType=BIGINT}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"pwc.taxtech.atms.vat.entity.TrialBalanceMappingExample"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from trial_balance_mapping
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"pwc.taxtech.atms.vat.entity.TrialBalanceMapping"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into trial_balance_mapping (id, segment3, segment3_name,
bs_type, pl_type)
values (#{id,jdbcType=BIGINT}, #{segment3,jdbcType=VARCHAR}, #{segment3Name,jdbcType=VARCHAR},
#{bsType,jdbcType=VARCHAR}, #{plType,jdbcType=VARCHAR})
</insert>
<insert
id=
"insertSelective"
parameterType=
"pwc.taxtech.atms.vat.entity.TrialBalanceMapping"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into trial_balance_mapping
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"segment3 != null"
>
segment3,
</if>
<if
test=
"segment3Name != null"
>
segment3_name,
</if>
<if
test=
"bsType != null"
>
bs_type,
</if>
<if
test=
"plType != null"
>
pl_type,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=BIGINT},
</if>
<if
test=
"segment3 != null"
>
#{segment3,jdbcType=VARCHAR},
</if>
<if
test=
"segment3Name != null"
>
#{segment3Name,jdbcType=VARCHAR},
</if>
<if
test=
"bsType != null"
>
#{bsType,jdbcType=VARCHAR},
</if>
<if
test=
"plType != null"
>
#{plType,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"pwc.taxtech.atms.vat.entity.TrialBalanceMappingExample"
resultType=
"java.lang.Long"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select count(*) from trial_balance_mapping
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update trial_balance_mapping
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=BIGINT},
</if>
<if
test=
"record.segment3 != null"
>
segment3 = #{record.segment3,jdbcType=VARCHAR},
</if>
<if
test=
"record.segment3Name != null"
>
segment3_name = #{record.segment3Name,jdbcType=VARCHAR},
</if>
<if
test=
"record.bsType != null"
>
bs_type = #{record.bsType,jdbcType=VARCHAR},
</if>
<if
test=
"record.plType != null"
>
pl_type = #{record.plType,jdbcType=VARCHAR},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update trial_balance_mapping
set id = #{record.id,jdbcType=BIGINT},
segment3 = #{record.segment3,jdbcType=VARCHAR},
segment3_name = #{record.segment3Name,jdbcType=VARCHAR},
bs_type = #{record.bsType,jdbcType=VARCHAR},
pl_type = #{record.plType,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"pwc.taxtech.atms.vat.entity.TrialBalanceMapping"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update trial_balance_mapping
<set>
<if
test=
"segment3 != null"
>
segment3 = #{segment3,jdbcType=VARCHAR},
</if>
<if
test=
"segment3Name != null"
>
segment3_name = #{segment3Name,jdbcType=VARCHAR},
</if>
<if
test=
"bsType != null"
>
bs_type = #{bsType,jdbcType=VARCHAR},
</if>
<if
test=
"plType != null"
>
pl_type = #{plType,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"pwc.taxtech.atms.vat.entity.TrialBalanceMapping"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update trial_balance_mapping
set segment3 = #{segment3,jdbcType=VARCHAR},
segment3_name = #{segment3Name,jdbcType=VARCHAR},
bs_type = #{bsType,jdbcType=VARCHAR},
pl_type = #{plType,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<select
id=
"selectByExampleWithRowbounds"
parameterType=
"pwc.taxtech.atms.vat.entity.TrialBalanceMappingExample"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from trial_balance_mapping
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
</mapper>
\ No newline at end of file
atms-web/src/main/webapp/app/admin/infrastructure/organizationManage/organization-manage.html
View file @
5c2055a4
...
...
@@ -410,7 +410,7 @@
<label
class=
"basic-label"
ng-click=
"visiableTaxRegInfo()"
>
{{'TaxRegistrationInformation' |
translate}}
</label>
</div>
<div
class=
"tax-reg-info-content"
ng-show=
"showTaxRegInfoContent"
>
<div
class=
"tax-reg-info-content
swxx
"
ng-show=
"showTaxRegInfoContent"
>
<div
class=
"row"
>
<div
class=
"col-sm-2"
style=
"text-align: right;margin-top: 7px;"
>
<span
class=
"control-label"
>
{{'TaxPayerNumber' | translate}}:
</span>
...
...
@@ -730,6 +730,7 @@
</div>
<div
class=
"tax-extra-info-content"
ng-show=
"showExtraRegInfoContent"
>
<div
class=
"quarter-div leftUp"
>
<form
class=
"form-horizontal"
>
<div
class=
"form-group"
ng-show=
"isInternational"
>
<div
class=
"col-sm-4"
style=
"text-align: right;"
>
<span
class=
"control-label"
>
{{'TaxPayerNumberVat' | translate}}:
</span>
...
...
@@ -744,6 +745,7 @@
</div>
</div>
</form>
<div
class=
"form-group"
ng-show=
"!isInternational"
>
<div
class=
"col-sm-4"
style=
"text-align: right;"
>
<span
class=
"control-label"
>
{{'TaxCreditRating' | translate}}:
</span>
...
...
@@ -911,13 +913,16 @@
</select>
</div>
</div>
</form>
</div>
<div
class=
"quarter-div rightUp"
>
<form
class=
"form-horizontal"
>
<div
class=
"form-group"
ng-show=
"isInternational"
>
<div
class=
"col-sm-4"
style=
"text-align: right;"
>
<div
class=
"col-sm-4
col-sm-pull-1
"
style=
"text-align: right;"
>
<span
class=
"control-label"
>
{{'TaxPayerNumberCit' | translate}}:
</span>
</div>
<div
class =
"col-sm-8"
>
<div
class =
"col-sm-8
col-sm-pull-1
"
>
<span
title=
"{{selectCompanyExtra.taxPayerNumberCit}}"
>
{{(selectCompanyExtra.taxPayerNumberCit ? (selectCompanyExtra.taxPayerNumberCit):'无')}}
</span>
<input
class=
"input-group"
style=
"display: none"
ng-model=
"editOrgExtraModel.taxPayerNumberCit"
...
...
@@ -926,10 +931,10 @@
</div>
</div>
<div
class=
"form-group"
ng-show=
"!isInternational"
>
<div
class=
"col-sm-4"
style=
"text-align: right;"
>
<div
class=
"col-sm-4
col-sm-pull-1
"
style=
"text-align: right;"
>
<span
class=
"control-label"
>
{{'ActualBusinessAddress' | translate}}:
</span>
</div>
<div
class =
"col-sm-8"
>
<div
class =
"col-sm-8
col-sm-pull-1
"
>
<span
title=
"{{selectCompanyExtra.actualBusinessAddress}}"
>
{{(selectCompanyExtra.actualBusinessAddress ? (selectCompanyExtra.actualBusinessAddress):'无')}}
</span>
<input
class=
"input-group"
style=
"display: none"
ng-model=
"editOrgExtraModel.actualBusinessAddress"
...
...
@@ -938,10 +943,10 @@
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"col-sm-4"
style=
"text-align: right;"
>
<div
class=
"col-sm-4
col-sm-pull-1
"
style=
"text-align: right;"
>
<span
class=
"control-label"
>
{{'ListedCompany' | translate}}:
</span>
</div>
<div
class =
"col-sm-8"
>
<div
class =
"col-sm-8
col-sm-pull-1
"
>
<span
title=
"{{selectCompanyExtra.listedCompany}}"
>
{{(selectCompanyExtra.listedCompany ? (selectCompanyExtra.listedCompany):'无')}}
</span>
<select
class=
"input-group"
style=
"display: none"
name=
"listedCompany"
...
...
@@ -951,10 +956,10 @@
</div>
</div>
<div
class=
"form-group"
ng-show=
"!isInternational"
>
<div
class=
"col-sm-4"
style=
"text-align: right;"
>
<div
class=
"col-sm-4
col-sm-pull-1
"
style=
"text-align: right;"
>
<span
class=
"control-label"
>
{{'SignTripartiteAgreement' | translate}}:
</span>
</div>
<div
class =
"col-sm-8"
>
<div
class =
"col-sm-8
col-sm-pull-1
"
>
<span
title=
"{{selectCompanyExtra.signTripartiteAgreement}}"
>
{{(selectCompanyExtra.signTripartiteAgreement ? (selectCompanyExtra.signTripartiteAgreement):'无')}}
</span>
<select
class=
"input-group"
style=
"display: none"
name=
"signTripartiteAgreement"
...
...
@@ -964,10 +969,10 @@
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"col-sm-4"
style=
"text-align: right;"
>
<div
class=
"col-sm-4
col-sm-pull-1
"
style=
"text-align: right;"
>
<span
class=
"control-label"
>
{{'ThirdPartyBankAccountNumber' | translate}}:
</span>
</div>
<div
class =
"col-sm-8"
>
<div
class =
"col-sm-8
col-sm-pull-1
"
>
<span
title=
"{{selectCompanyExtra.bankAccountNumber}}"
>
{{(selectCompanyExtra.bankAccountNumber ? (selectCompanyExtra.bankAccountNumber):'无')}}
</span>
<input
class=
"input-group"
style=
"display: none"
ng-model=
"editOrgExtraModel.bankAccountNumber"
...
...
@@ -976,10 +981,10 @@
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"col-sm-4"
style=
"text-align: right;"
>
<div
class=
"col-sm-4
col-sm-pull-1
"
style=
"text-align: right;"
>
<span
class=
"control-label"
>
{{'EtaWebsite' | translate}}:
</span>
</div>
<div
class =
"col-sm-8"
>
<div
class =
"col-sm-8
col-sm-pull-1
"
>
<span
title=
"{{selectCompanyExtra.etaWebsite}}"
>
{{(selectCompanyExtra.etaWebsite ? (selectCompanyExtra.etaWebsite):'无')}}
</span>
<input
class=
"input-group"
style=
"display: none"
ng-model=
"editOrgExtraModel.etaWebsite"
...
...
@@ -988,10 +993,10 @@
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"col-sm-4"
style=
"text-align: right;"
>
<div
class=
"col-sm-4
col-sm-pull-1
"
style=
"text-align: right;"
>
<span
class=
"control-label"
>
{{'TaxAgentContact' | translate}}:
</span>
</div>
<div
class =
"col-sm-8"
>
<div
class =
"col-sm-8
col-sm-pull-1
"
>
<span
title=
"{{selectCompanyExtra.taxAgentContact}}"
>
{{(selectCompanyExtra.taxAgentContact ? (selectCompanyExtra.taxAgentContact):'无')}}
</span>
<input
class=
"input-group"
style=
"display: none"
ng-model=
"editOrgExtraModel.taxAgentContact"
...
...
@@ -1000,10 +1005,10 @@
</div>
</div>
<div
class=
"form-group"
ng-show=
"!isInternational"
>
<div
class=
"col-sm-4"
style=
"text-align: right;"
>
<div
class=
"col-sm-4
col-sm-pull-1
"
style=
"text-align: right;"
>
<span
class=
"control-label"
>
{{'SmallMeagerProfit' | translate}}:
</span>
</div>
<div
class =
"col-sm-8"
>
<div
class =
"col-sm-8
col-sm-pull-1
"
>
<span
title=
"{{selectCompanyExtra.smallMeagerProfit}}"
>
{{(selectCompanyExtra.smallMeagerProfit ? (selectCompanyExtra.smallMeagerProfit):'无')}}
</span>
<select
class=
"input-group"
style=
"display: none"
name=
"smallMeagerProfit"
...
...
@@ -1013,10 +1018,10 @@
</div>
</div>
<div
class=
"form-group"
ng-show=
"isInternational"
>
<div
class=
"col-sm-4"
style=
"text-align: right;"
>
<div
class=
"col-sm-4
col-sm-pull-1
"
style=
"text-align: right;"
>
<span
class=
"control-label"
>
{{'AuditRequirements' | translate}}:
</span>
</div>
<div
class =
"col-sm-8"
>
<div
class =
"col-sm-8
col-sm-pull-1
"
>
<span
title=
"{{selectCompanyExtra.auditRequirements}}"
>
{{(selectCompanyExtra.auditRequirements ? (selectCompanyExtra.auditRequirements):'无')}}
</span>
<input
class=
"input-group"
style=
"display: none"
ng-model=
"editOrgExtraModel.auditRequirements"
...
...
@@ -1025,10 +1030,10 @@
</div>
</div>
<div
class=
"form-group"
ng-show=
"isInternational"
>
<div
class=
"col-sm-4"
style=
"text-align: right;"
>
<div
class=
"col-sm-4
col-sm-pull-1
"
style=
"text-align: right;"
>
<span
class=
"control-label"
>
{{'Directors' | translate}}:
</span>
</div>
<div
class =
"col-sm-8"
>
<div
class =
"col-sm-8
col-sm-pull-1
"
>
<span
title=
"{{selectCompanyExtra.directors}}"
>
{{(selectCompanyExtra.directors ? (selectCompanyExtra.directors):'无')}}
</span>
<input
class=
"input-group"
style=
"display: none"
ng-model=
"editOrgExtraModel.directors"
...
...
@@ -1037,10 +1042,10 @@
</div>
</div>
<div
class=
"form-group"
ng-show=
"isInternational"
>
<div
class=
"col-sm-4"
style=
"text-align: right;"
>
<div
class=
"col-sm-4
col-sm-pull-1
"
style=
"text-align: right;"
>
<span
class=
"control-label"
>
{{'ParValue' | translate}}:
</span>
</div>
<div
class =
"col-sm-8"
>
<div
class =
"col-sm-8
"
>
<span
title=
"{{selectCompanyExtra.parValue}}"
>
{{(selectCompanyExtra.parValue ? (selectCompanyExtra.parValue):'无')}}
</span>
<input
class=
"input-group"
style=
"display: none"
ng-model=
"editOrgExtraModel.parValue"
...
...
atms-web/src/main/webapp/app/admin/infrastructure/organizationManage/organization-manage.less
View file @
5c2055a4
...
...
@@ -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 @
5c2055a4
...
...
@@ -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 @
5c2055a4
...
...
@@ -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/edit-template-modal/edit-template-modal.html
View file @
5c2055a4
...
...
@@ -45,13 +45,18 @@
<
/div>
<
/div>
<
/div>
<
div
class
=
"form-group"
ng
-
show
=
"!editModel.addExists"
>
<
div
class
=
"col-sm-9 normal-label checkbox"
>
<
label
>
<
input
type
=
"checkbox"
ng
-
model
=
"editModel.defaultInput"
ng
-
true
-
value
=
"1"
ng
-
false
-
value
=
"0"
>
{{
'AllowKeyInByDefault'
|
translate
}}
<
/label>
<
/div>
<
div
class
=
"form-group radio-wrapper"
ng
-
show
=
"!editModel.addExists"
>
<
label
for
=
"telCode"
class
=
"col-sm-4 normal-label"
>
<
input
type
=
"radio"
id
=
"allowManual"
><
span
>
允许手工录入
<
/span>
<
/label>
<
/div>
<!--<
div
class
=
"form-group"
ng
-
show
=
"!editModel.addExists"
>-->
<!--<
div
class
=
"col-sm-9 normal-label checkbox"
>-->
<!--<
label
>-->
<!--<
input
type
=
"checkbox"
ng
-
model
=
"editModel.defaultInput"
ng
-
true
-
value
=
"1"
ng
-
false
-
value
=
"0"
>
{{
'AllowKeyInByDefault'
|
translate
}}
-->
<!--<
/label>-->
<!--<
/div>-->
<!--<
/div>-->
<
/form>
<
/div>
<
div
class
=
"modal-footer"
style
=
"padding-left: 22px;text-align: left;"
>
...
...
atms-web/src/main/webapp/app/common/controls/tax-report-cell-detail-modal/tax-report-cell-detail-modal.ctrl.js
View file @
5c2055a4
...
...
@@ -703,16 +703,16 @@
if
(
$scope
.
detail
.
dataGridSource
&&
$scope
.
detail
.
dataGridSource
.
length
>
0
)
{
//判断是否是动态生成sheet
if
(
new
Number
(
$scope
.
detail
.
cellTemplateId
)
<
0
){
$
(
"#dataGridFooterSummary"
).
html
(
""
);
}
else
{
evalVal
=
_
.
reduce
(
$scope
.
detail
.
dataGridSource
,
function
(
memo
,
x
)
{
return
memo
+
x
.
cellValue
;
},
0
);
$
(
"#dataGridFooterSummary"
).
html
(
$translate
.
instant
(
'Conclusion'
)
+
' '
+
evalVal
.
formatAmount
(
precition
));
}
//
if(new Number($scope.detail.cellTemplateId)<0){
//
$("#dataGridFooterSummary").html("");
//
}else{
//
evalVal = _.reduce($scope.detail.dataGridSource, function (memo, x) {
//
return memo + x.cellValue;
//
}, 0);
//
$("#dataGridFooterSummary").html($translate.instant('Conclusion') +
//
' ' + evalVal.formatAmount(precition));
//
}
$
(
"#dataGridFooterSummary"
).
html
(
""
);
}
...
...
@@ -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/vatservices/vatReportService.js
View file @
5c2055a4
...
...
@@ -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/framework/app-nav/app-nav.ctrl.js
View file @
5c2055a4
...
...
@@ -121,6 +121,7 @@ frameworkModule.controller('AppNavController', ['$rootScope', '$scope', '$log',
list
.
push
(
constant
.
analysisPermisson
.
code
);
list
.
push
(
constant
.
menuRecordManagePermission
.
code
);
list
.
push
(
constant
.
menuListApprovalPermission
.
code
);
list
.
push
(
constant
.
batchImportPermisson
.
batchImportPermissonCode
);
$scope
.
$root
.
checkUserPermissionList
(
list
).
success
(
function
(
data
)
{
$scope
.
adminSettingShow
=
data
[
constant
.
adminPermission
.
WebAdmin
];
...
...
@@ -130,6 +131,8 @@ frameworkModule.controller('AppNavController', ['$rootScope', '$scope', '$log',
$scope
.
analysisShow
=
data
[
constant
.
analysisPermisson
.
code
];
$scope
.
menuRecordManageShow
=
data
[
constant
.
menuRecordManagePermission
.
code
];
$scope
.
menuListApprovalShow
=
data
[
constant
.
menuListApprovalPermission
.
code
];
$scope
.
batchImportShow
=
data
[
constant
.
batchImportPermisson
.
batchImportPermissonCode
];
});
};
...
...
atms-web/src/main/webapp/app/framework/app-nav/app-nav.html
View file @
5c2055a4
...
...
@@ -78,12 +78,12 @@
<!--</i>-->
<!--</a>-->
<!--</div>-->
<!--齿轮 进入管理入口-->
<div
class=
"nav-element-right"
>
<div
class=
"nav-element-right"
ng-show=
"batchImportShow"
>
<a
ui-sref=
"overviewDataImp"
>
<i
class=
"fa fa-circle-o-notch nav-icon-color"
></i>
</a>
</div>
<!--齿轮 进入管理入口-->
<div
class=
"nav-element-right"
ng-show=
"adminSettingShow"
>
<a
title=
"{{'settings'|translate}}"
href=
"/admin"
target=
"_blank"
>
<i
class=
"fa fa-cog nav-icon-color"
></i>
...
...
atms-web/src/main/webapp/app/framework/app-nav/app-nav.less
View file @
5c2055a4
...
...
@@ -17,7 +17,7 @@
}
}
@media (max-width:
992
px) {
@media (max-width:
1400
px) {
& {
min-width: 100%;
padding-left: 0;
...
...
@@ -45,10 +45,18 @@
.link-sm-show {
display: inline-block;
}
p {
color: #333;
}
};
}
}
}
@media screen and (max-width: 1400px) {
.user-menu{
position:absolute!important;
top: 55px!important;
left: -50px!important;
}
}
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