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
d4f36128
Commit
d4f36128
authored
Mar 26, 2019
by
chase
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge 档案管理
parent
db69dda1
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
176 additions
and
90 deletions
+176
-90
TaxDocumentController.java
...va/pwc/taxtech/atms/controller/TaxDocumentController.java
+6
-6
CurrentPeriodBo.java
...ain/java/pwc/taxtech/atms/dto/vatdto/CurrentPeriodBo.java
+2
-2
TaxDocumentServiceImpl.java
...pwc/taxtech/atms/service/impl/TaxDocumentServiceImpl.java
+20
-5
ExcelUtil.java
.../src/main/java/pwc/taxtech/atms/thirdparty/ExcelUtil.java
+72
-51
BB.java
...wc/taxtech/atms/vat/service/impl/report/functions/BB.java
+8
-7
ExcelCell.java
atms-dao/src/main/java/pwc/taxtech/atms/anno/ExcelCell.java
+9
-1
FileTypes.java
...-dao/src/main/java/pwc/taxtech/atms/entity/FileTypes.java
+1
-1
TaxDocument.java
...ao/src/main/java/pwc/taxtech/atms/entity/TaxDocument.java
+7
-7
app-usr-operate-log.ctrl.js
...framework/app-usr-operate-log/app-usr-operate-log.ctrl.js
+38
-3
app-usr-operate-log.html
...pp/framework/app-usr-operate-log/app-usr-operate-log.html
+7
-1
app-usr-operate-log.svc.js
.../framework/app-usr-operate-log/app-usr-operate-log.svc.js
+6
-6
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/TaxDocumentController.java
View file @
d4f36128
...
...
@@ -94,15 +94,15 @@ public class TaxDocumentController {
headers
.
put
(
"CompanyName"
,
"公司名称"
);
headers
.
put
(
"TaxType"
,
"税种"
);
headers
.
put
(
"FileTime"
,
"文件生效日期"
);
headers
.
put
(
"
EffectiveTime"
,
"有效日期
"
);
headers
.
put
(
"
Creator"
,
"创建人
"
);
headers
.
put
(
"
CreateTime"
,
"创建时间
"
);
headers
.
put
(
"
UploadTime"
,
"上传日期
"
);
headers
.
put
(
"
OwnTime"
,
"所属期间
"
);
headers
.
put
(
"
EffectiveTime"
,
"到期日
"
);
headers
.
put
(
"
AuditStatus"
,
"审批状态
"
);
headers
.
put
(
"
PhysicalIndexNumber"
,
"实物索引号
"
);
headers
.
put
(
"StorageArea"
,
"实物存放地点"
);
headers
.
put
(
"Keeper"
,
"保管人"
);
headers
.
put
(
"UploadTime"
,
"上传日期"
);
headers
.
put
(
"Creator"
,
"创建人"
);
headers
.
put
(
"Remark"
,
"档案备注"
);
headers
.
put
(
"FilePositionUrl"
,
"文件存储的位置"
);
headers
.
put
(
"OwnTime"
,
"所属期间"
);
List
<
TaxDocument
>
TaxDocument
=
taxDocumentService
.
selectTaxDocumentList
(
taxDocumentDto
);
response
.
setContentType
(
"multipart/form-data"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;fileName="
+
new
String
(
"taxDocument.xlsx"
.
getBytes
(
"GB2312"
),
"ISO-8859-1"
));
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/vatdto/CurrentPeriodBo.java
View file @
d4f36128
...
...
@@ -20,8 +20,8 @@ public class CurrentPeriodBo {
public
static
CurrentPeriodBo
getPeriod
(
int
parameterPeriod
,
int
periodContent
)
{
int
yearOffset
=
0
;
if
(
parameterPeriod
==
-
99
)
{
return
new
CurrentPeriodBo
(
p
arameterPeriod
);
if
(
parameterPeriod
==
99
)
{
return
new
CurrentPeriodBo
(
p
eriodContent
);
}
else
if
(
parameterPeriod
<=
-
1
)
{
Integer
period
=
parameterPeriod
+
periodContent
;
while
(
period
<=
0
)
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/TaxDocumentServiceImpl.java
View file @
d4f36128
...
...
@@ -474,8 +474,10 @@ public class TaxDocumentServiceImpl {
throw
new
RuntimeException
(
"传入参数错误:空参数数组"
);
}
criteria
.
andIdIn
(
ids
);
//查询出根据条件过滤后需要下载的附件数据信息
List
<
TaxDocument
>
taxDocuments
=
taxDocumentMapper
.
selectByExample
(
example
);
//新建一个空集合,记录下载的名字,并用于判断是否重名,重名则修改名字为(n)
List
<
String
>
fileNameList
=
new
ArrayList
<>();
for
(
TaxDocument
item
:
taxDocuments
)
{
//文件url
String
urlPath
=
item
.
getFilePositionUrl
();
...
...
@@ -483,10 +485,23 @@ public class TaxDocumentServiceImpl {
if
(
StringUtils
.
isBlank
(
urlPath
))
{
throw
new
RuntimeException
(
"文件url为空,id为:"
+
item
.
getId
());
}
//文件名称(带后缀) 文件名前+7位uuid截取码以防文件名相同
String
fileName
=
StringUtils
.
isBlank
(
item
.
getFileName
())
?
"未知文件(请修改后缀名).xlsx"
:
item
.
getFileName
();
//检查文件名是否有重复
int
fileNameRepeatTimes
=
0
;
if
(
fileNameList
.
size
()>
0
){
fileNameRepeatTimes
=
Collections
.
frequency
(
fileNameList
,
item
.
getFileName
());
}
String
fileName
;
if
(
fileNameRepeatTimes
>
0
)
{
fileName
=
StringUtils
.
isBlank
(
item
.
getFileName
())
?
"未知文件(请修改后缀名).xlsx"
:
"("
+
fileNameRepeatTimes
+
")"
+
item
.
getFileName
();
}
else
{
//文件名称(带后缀
fileName
=
StringUtils
.
isBlank
(
item
.
getFileName
())
?
"未知文件(请修改后缀名).xlsx"
:
item
.
getFileName
();
}
fileNameList
.
add
(
item
.
getFileName
());
InputStream
is
=
null
;
BufferedInputStream
in
=
null
;
byte
[]
buffer
=
new
byte
[
1024
];
...
...
atms-api/src/main/java/pwc/taxtech/atms/thirdparty/ExcelUtil.java
View file @
d4f36128
...
...
@@ -22,6 +22,7 @@ import java.text.MessageFormat;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
* The <code>ExcelUtil</code> 与 {@link ExcelCell}搭配使用
...
...
@@ -57,27 +58,27 @@ public class ExcelUtil {
* 获取cell类型的文字描述
*
* @param cellType <pre>
* CellType.BLANK
* CellType.BOOLEAN
* CellType.ERROR
* CellType.FORMULA
* CellType.NUMERIC
* CellType.STRING
* </pre>
*
CellType.BLANK
*
CellType.BOOLEAN
*
CellType.ERROR
*
CellType.FORMULA
*
CellType.NUMERIC
*
CellType.STRING
*
</pre>
* @return
*/
private
static
String
getCellTypeByInt
(
CellType
cellType
)
{
if
(
cellType
==
CellType
.
BLANK
)
if
(
cellType
==
CellType
.
BLANK
)
return
"Null type"
;
else
if
(
cellType
==
CellType
.
BOOLEAN
)
else
if
(
cellType
==
CellType
.
BOOLEAN
)
return
"Boolean type"
;
else
if
(
cellType
==
CellType
.
ERROR
)
else
if
(
cellType
==
CellType
.
ERROR
)
return
"Error type"
;
else
if
(
cellType
==
CellType
.
FORMULA
)
else
if
(
cellType
==
CellType
.
FORMULA
)
return
"Formula type"
;
else
if
(
cellType
==
CellType
.
NUMERIC
)
else
if
(
cellType
==
CellType
.
NUMERIC
)
return
"Numeric type"
;
else
if
(
cellType
==
CellType
.
STRING
)
else
if
(
cellType
==
CellType
.
STRING
)
return
"String type"
;
else
return
"Unknown type"
;
...
...
@@ -96,13 +97,13 @@ public class ExcelUtil {
return
null
;
}
CellType
cellType
=
cell
.
getCellTypeEnum
();
if
(
cellType
==
CellType
.
BLANK
)
if
(
cellType
==
CellType
.
BLANK
)
return
null
;
else
if
(
cellType
==
CellType
.
BOOLEAN
)
else
if
(
cellType
==
CellType
.
BOOLEAN
)
return
cell
.
getBooleanCellValue
();
else
if
(
cellType
==
CellType
.
ERROR
)
else
if
(
cellType
==
CellType
.
ERROR
)
return
cell
.
getErrorCellValue
();
else
if
(
cellType
==
CellType
.
FORMULA
)
{
else
if
(
cellType
==
CellType
.
FORMULA
)
{
try
{
if
(
HSSFDateUtil
.
isCellDateFormatted
(
cell
))
{
return
cell
.
getDateCellValue
();
...
...
@@ -112,15 +113,13 @@ public class ExcelUtil {
}
catch
(
IllegalStateException
e
)
{
return
cell
.
getRichStringCellValue
();
}
}
else
if
(
cellType
==
CellType
.
NUMERIC
){
}
else
if
(
cellType
==
CellType
.
NUMERIC
)
{
if
(
DateUtil
.
isCellDateFormatted
(
cell
))
{
return
cell
.
getDateCellValue
();
}
else
{
return
cell
.
getNumericCellValue
();
}
}
else
if
(
cellType
==
CellType
.
STRING
)
}
else
if
(
cellType
==
CellType
.
STRING
)
return
cell
.
getStringCellValue
();
else
return
null
;
...
...
@@ -136,7 +135,7 @@ public class ExcelUtil {
* javabean属性的数据类型有基本数据类型及String,Date,String[],Double[]
* @param out 与输出设备关联的流对象,可以将EXCEL文档导出到本地文件或者网络中
*/
public
static
<
T
>
void
exportExcel
(
Map
<
String
,
String
>
headers
,
Collection
<
T
>
dataset
,
OutputStream
out
)
{
public
static
<
T
>
void
exportExcel
(
Map
<
String
,
String
>
headers
,
Collection
<
T
>
dataset
,
OutputStream
out
)
{
exportExcel
(
headers
,
dataset
,
out
,
null
);
}
...
...
@@ -152,7 +151,7 @@ public class ExcelUtil {
* @param pattern 如果有时间数据,设定输出格式。默认为"yyy-MM-dd"
*/
@SuppressWarnings
(
"resource"
)
public
static
<
T
>
void
exportExcel
(
Map
<
String
,
String
>
headers
,
Collection
<
T
>
dataset
,
OutputStream
out
,
public
static
<
T
>
void
exportExcel
(
Map
<
String
,
String
>
headers
,
Collection
<
T
>
dataset
,
OutputStream
out
,
String
pattern
)
{
// 声明一个工作薄
HSSFWorkbook
workbook
=
new
HSSFWorkbook
();
...
...
@@ -249,10 +248,10 @@ public class ExcelUtil {
* @param dataset 数据集合
* @param pattern 日期格式
*/
private
static
<
T
>
void
write2Sheet
(
HSSFSheet
sheet
,
Map
<
String
,
String
>
headers
,
Collection
<
T
>
dataset
,
private
static
<
T
>
void
write2Sheet
(
HSSFSheet
sheet
,
Map
<
String
,
String
>
headers
,
Collection
<
T
>
dataset
,
String
pattern
)
{
//时间格式默认"yyyy-MM-dd"
if
(
StringUtils
.
isEmpty
(
pattern
)){
if
(
StringUtils
.
isEmpty
(
pattern
))
{
pattern
=
"yyyy-MM-dd"
;
}
// 产生表格标题行
...
...
@@ -260,8 +259,8 @@ public class ExcelUtil {
// 标题行转中文
Iterator
<
Map
.
Entry
<
String
,
String
>>
it1
=
headers
.
entrySet
().
iterator
();
String
key
=
StringUtils
.
EMPTY
;
//存放临时键变量
int
c
=
0
;
//标题列数
while
(
it1
.
hasNext
()){
int
c
=
0
;
//标题列数
while
(
it1
.
hasNext
())
{
key
=
it1
.
next
().
getKey
();
if
(
headers
.
containsKey
(
key
))
{
HSSFCell
cell
=
row
.
createCell
(
c
);
...
...
@@ -285,7 +284,7 @@ public class ExcelUtil {
int
cellNum
=
0
;
//遍历列名
Iterator
<
String
>
it2
=
headers
.
keySet
().
iterator
();
while
(
it2
.
hasNext
()){
while
(
it2
.
hasNext
())
{
key
=
it2
.
next
();
if
(!
headers
.
containsKey
(
key
))
{
LG
.
error
(
"Map 中 不存在 key ["
+
key
+
"]"
);
...
...
@@ -293,8 +292,8 @@ public class ExcelUtil {
}
Object
value
=
map
.
get
(
key
);
HSSFCell
cell
=
row
.
createCell
(
cellNum
);
cellNum
=
setCellValue
(
cell
,
value
,
pattern
,
cellNum
,
null
,
row
);
//TODO
cellNum
=
setCellValue
(
cell
,
value
,
pattern
,
cellNum
,
null
,
row
);
cellNum
++;
}
...
...
@@ -307,7 +306,7 @@ public class ExcelUtil {
field
.
setAccessible
(
true
);
Object
value
=
field
.
get
(
t
);
cellNum
=
setCellValue
(
cell
,
value
,
pattern
,
cellNum
,
field
,
row
);
cellNum
=
setCellValue
(
cell
,
value
,
pattern
,
cellNum
,
field
,
row
);
cellNum
++;
}
...
...
@@ -322,12 +321,24 @@ public class ExcelUtil {
}
}
private
static
int
setCellValue
(
HSSFCell
cell
,
Object
value
,
String
pattern
,
int
cellNum
,
Field
field
,
HSSFRow
row
)
{
private
static
int
setCellValue
(
HSSFCell
cell
,
Object
value
,
String
pattern
,
int
cellNum
,
Field
field
,
HSSFRow
row
)
{
String
textValue
=
null
;
if
(
value
instanceof
Integer
)
{
int
intValue
=
(
Integer
)
value
;
cell
.
setCellValue
(
intValue
);
}
else
if
(
value
instanceof
BigDecimal
){
//判断int类型上是否有注解ExcelCell注解的isStatus属性
ExcelCell
anno
=
field
.
getAnnotation
(
ExcelCell
.
class
);
String
status
=
anno
.
isStatus
();
if
(
anno
!=
null
&&
StringUtils
.
isNotBlank
(
status
))
{
//把属性中设置的值分割
List
<
String
>
statusList
=
Arrays
.
asList
(
status
.
split
(
","
));
//获取:前的前缀进行对比
String
s
=
statusList
.
stream
().
filter
(
e
->
e
.
substring
(
0
,
e
.
indexOf
(
":"
)).
equals
(
value
.
toString
())).
collect
(
Collectors
.
toList
()).
get
(
0
);
//设置:后的后缀值进cell表格中
cell
.
setCellValue
(
s
.
substring
(
s
.
indexOf
(
":"
)
+
1
));
}
else
{
cell
.
setCellValue
(
intValue
);
}
}
else
if
(
value
instanceof
BigDecimal
)
{
textValue
=
DECIMAL_FORMAT
.
format
(
value
);
}
else
if
(
value
instanceof
Float
)
{
float
fValue
=
(
Float
)
value
;
...
...
@@ -372,13 +383,27 @@ public class ExcelUtil {
}
else
{
// 其它数据类型都当作字符串简单处理
String
empty
=
StringUtils
.
EMPTY
;
if
(
field
!=
null
)
{
if
(
field
!=
null
)
{
ExcelCell
anno
=
field
.
getAnnotation
(
ExcelCell
.
class
);
if
(
anno
!=
null
)
{
empty
=
anno
.
defaultValue
();
}
//判断字段是否有注解ExcelCell注解的isStatus属性
String
status
=
anno
.
isStatus
();
if
(
anno
!=
null
&&
StringUtils
.
isNotBlank
(
status
))
{
//把属性中设置的值分割
List
<
String
>
statusList
=
Arrays
.
asList
(
status
.
split
(
","
));
//获取:前的前缀进行对比
List
<
String
>
lists
=
statusList
.
stream
().
filter
(
e
->
e
.
substring
(
0
,
e
.
indexOf
(
":"
)).
equals
(
value
)).
collect
(
Collectors
.
toList
());
String
s
=
lists
.
size
()
>
0
?
lists
.
get
(
0
)
:
""
;
//设置:后的后缀值进cell表格中
textValue
=
s
==
null
?
empty
:
s
.
substring
(
s
.
indexOf
(
":"
)
+
1
);
}
else
{
textValue
=
value
==
null
?
empty
:
value
.
toString
();
}
}
else
{
textValue
=
value
==
null
?
empty
:
value
.
toString
();
}
textValue
=
value
==
null
?
empty
:
value
.
toString
();
}
if
(
textValue
!=
null
)
{
HSSFRichTextString
richString
=
new
HSSFRichTextString
(
textValue
);
...
...
@@ -390,11 +415,10 @@ public class ExcelUtil {
/**
* 把Excel的数据封装成voList
*
* @param clazz vo的Class
* @param inputStream excel输入流
* @param pattern 如果有时间数据,设定输入格式。默认为"yyy-MM-dd"
* @param logs 错误log集合
* @param arrayCount 如果vo中有数组类型,那就按照index顺序,把数组应该有几个值写上.
* @param clazz vo的Class
* @param pattern 如果有时间数据,设定输入格式。默认为"yyy-MM-dd"
* @param logs 错误log集合
* @param arrayCount 如果vo中有数组类型,那就按照index顺序,把数组应该有几个值写上.
* @return voList
* @throws RuntimeException
*/
...
...
@@ -410,14 +434,13 @@ public class ExcelUtil {
}*/
List
<
T
>
list
=
new
ArrayList
<>();
Sheet
sheet
;
if
(
null
==
sheetName
||
sheetName
.
isEmpty
())
{
if
(
null
==
sheetName
||
sheetName
.
isEmpty
())
{
sheet
=
workBook
.
getSheetAt
(
0
);
}
else
{
}
else
{
sheet
=
workBook
.
getSheet
(
sheetName
);
}
if
(
sheet
==
null
)
{
if
(
sheet
==
null
)
{
return
null
;
}
...
...
@@ -558,7 +581,6 @@ public class ExcelUtil {
/**
* 读取Excel的Header行, 并封装成Map<String, int)
*
* @param inputStream excel输入流
* @param sheetName sheet名, 如默认只有一个sheet, 传入null
* @return Header Map, Key - 字段名, Value - index
* @throws RuntimeException
...
...
@@ -574,17 +596,16 @@ public class ExcelUtil {
}*/
Sheet
sheet
;
if
(
null
==
sheetName
||
sheetName
.
isEmpty
())
{
if
(
null
==
sheetName
||
sheetName
.
isEmpty
())
{
sheet
=
workBook
.
getSheetAt
(
0
);
}
else
{
}
else
{
sheet
=
workBook
.
getSheet
(
sheetName
);
}
if
(
sheet
==
null
)
{
if
(
sheet
==
null
)
{
return
null
;
}
if
(
sheet
.
getFirstRowNum
()<
0
)
{
if
(
sheet
.
getFirstRowNum
()
<
0
)
{
return
titleMap
;
}
Row
headerRow
=
sheet
.
getRow
(
sheet
.
getFirstRowNum
());
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/BB.java
View file @
d4f36128
package
pwc
.
taxtech
.
atms
.
vat
.
service
.
impl
.
report
.
functions
;
import
org.apache.poi.ss.formula.OperationEvaluationContext
;
import
org.apache.poi.ss.formula.WorkbookEvaluator
;
import
org.apache.poi.ss.formula.eval.*
;
import
org.apache.poi.ss.formula.eval.NumberEval
;
import
org.apache.poi.ss.formula.eval.StringEval
;
import
org.apache.poi.ss.formula.eval.ValueEval
;
import
org.apache.poi.ss.formula.functions.FreeRefFunction
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -18,7 +19,6 @@ import pwc.taxtech.atms.exception.FormulaException;
import
pwc.taxtech.atms.vat.entity.PeriodCellData
;
import
pwc.taxtech.atms.vat.entity.PeriodDataSource
;
import
java.lang.reflect.Field
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -76,14 +76,14 @@ public class BB extends FunctionBase implements FreeRefFunction {
nullCellDto
.
fixedWithGroup
(
cellTemplateData
);
// todo: fix datasource name by templateList(neo)
if
(
curPeriod
.
getCurPeriod
()
==
-
99
)
{
if
(
bo
.
getPeriod
().
intValue
()
==
99
)
{
dataSource
.
clear
();
BigDecimal
returnEval
=
defaultBigDecimal
;
if
(
formulaContext
.
getPeriod
()
<=
1
)
{
return
defaultBigDecimal
;
}
for
(
int
p
=
1
;
p
<
formulaContext
.
getPeriod
(
);
p
++)
{
//如果是当年取到当期截至,往年取12期
for
(
int
p
=
1
;
p
<
(
curPeriod
.
getCurYear
()==
formulaContext
.
getYear
()?
formulaContext
.
getPeriod
():
12
);
p
++)
{
try
{
returnEval
=
returnEval
.
add
(
bb
(
new
BBParasBo
(
bo
,
p
,
curPeriod
.
getCurYear
()),
ec
,
dataSource
,
bo
));
}
catch
(
Exception
e
)
{
...
...
@@ -94,7 +94,8 @@ public class BB extends FunctionBase implements FreeRefFunction {
}
return
returnEval
;
}
else
if
(
bo
.
getPeriod
().
intValue
()
==
0
)
{
}
if
(
bo
.
getPeriod
().
intValue
()
==
0
&&
bo
.
getYear
().
intValue
()
==
0
)
{
int
index
=
ec
.
getWorkbook
().
getSheetIndex
(
bo
.
getReportCode
());
cellValue
=
getCellValue
(
index
,
ec
,
formulaContext
,
agent
,
bo
.
getRowIndex
()
-
1
,
bo
.
getColumnIndex
()
-
1
,
Long
.
parseLong
(
cellTemplateData
.
getCellTemplateId
()));
...
...
atms-dao/src/main/java/pwc/taxtech/atms/anno/ExcelCell.java
View file @
d4f36128
...
...
@@ -11,7 +11,6 @@ import java.lang.annotation.Target;
/**
* The <code>ExcelCell</code><br>
* 数值型的栏位只能使用Double
* @see {@link pwc.taxtech.atms.thirdparty.sargeraswang.util.ExcelUtil.ExcelUtil#exportExcel}
* @author sargeras.wang
* @version 1.0, Created at 2013年9月14日
* @version 1.1, Updated at 2013年10月20日 ,添加了专用于验证的子注解:Valid
...
...
@@ -83,5 +82,14 @@ public @interface ExcelCell {
* @return le
*/
double
le
()
default
Double
.
NaN
;
}
/**
* 如果有状态 或 int类型转换为String
* 可通过此注解转换为String
* 格式: 中间用逗号 , 隔开
* 例 0:待审核,1:审核通过,-1:已拒绝
* @return
*/
String
isStatus
()
default
StringUtils
.
EMPTY
;
}
atms-dao/src/main/java/pwc/taxtech/atms/entity/FileTypes.java
View file @
d4f36128
...
...
@@ -147,7 +147,7 @@ public class FileTypes implements Serializable {
*
* @mbg.generated
*/
@ExcelCell
(
index
=
9
)
@ExcelCell
(
index
=
9
,
isStatus
=
"0:停用,1:启用"
)
private
String
status
;
/**
...
...
atms-dao/src/main/java/pwc/taxtech/atms/entity/TaxDocument.java
View file @
d4f36128
...
...
@@ -140,7 +140,7 @@ public class TaxDocument implements Serializable {
*
* @mbg.generated
*/
@ExcelCell
(
index
=
9
)
@ExcelCell
(
index
=
10
)
private
Date
effectiveTime
;
/**
...
...
@@ -152,7 +152,7 @@ public class TaxDocument implements Serializable {
*
* @mbg.generated
*/
@ExcelCell
(
index
=
17
)
@ExcelCell
(
index
=
9
)
private
Integer
ownTime
;
/**
...
...
@@ -173,7 +173,7 @@ public class TaxDocument implements Serializable {
*
* @mbg.generated
*/
@ExcelCell
(
index
=
1
0
)
@ExcelCell
(
index
=
1
6
)
private
String
creator
;
/**
...
...
@@ -183,7 +183,6 @@ public class TaxDocument implements Serializable {
*
* @mbg.generated
*/
@ExcelCell
(
index
=
11
)
private
Date
createTime
;
/**
...
...
@@ -204,7 +203,7 @@ public class TaxDocument implements Serializable {
*
* @mbg.generated
*/
@ExcelCell
(
index
=
1
2
)
@ExcelCell
(
index
=
1
5
)
private
Date
uploadTime
;
/**
...
...
@@ -249,6 +248,7 @@ public class TaxDocument implements Serializable {
*
* @mbg.generated
*/
@ExcelCell
(
index
=
12
)
private
String
physicalIndexNumber
;
/**
...
...
@@ -260,7 +260,7 @@ public class TaxDocument implements Serializable {
*
* @mbg.generated
*/
@ExcelCell
(
index
=
1
5
)
@ExcelCell
(
index
=
1
7
)
private
String
remark
;
/**
...
...
@@ -283,7 +283,6 @@ public class TaxDocument implements Serializable {
*
* @mbg.generated
*/
@ExcelCell
(
index
=
16
)
private
String
filePositionUrl
;
/**
...
...
@@ -317,6 +316,7 @@ public class TaxDocument implements Serializable {
*
* @mbg.generated
*/
@ExcelCell
(
index
=
11
,
isStatus
=
"0:未审核,1:审核通过,-1:审核不通过"
)
private
Integer
auditStatus
;
/**
...
...
atms-web/src/main/webapp/app/framework/app-usr-operate-log/app-usr-operate-log.ctrl.js
View file @
d4f36128
...
...
@@ -8,6 +8,7 @@ frameworkModule.controller('appUsrOperateLogController',
// thisTitle:"@",
// thisParams:"=",
$scope
.
localData
=
null
;
$scope
.
loadMainData
=
function
()
{
$scope
.
thisModuleId
=
$scope
.
thisModuleId
?
$scope
.
thisModuleId
:
[];
var
config
=
{
...
...
@@ -23,7 +24,17 @@ frameworkModule.controller('appUsrOperateLogController',
$scope
.
dataGridUpdate
(
data
);
})
};
// $scope.sniffHelpPopRadio = function(){
// taxDocumentListService.getDocumentsAttrAndType({params: {}}).then(function (data) {
// $scope.FileAttrAndTypeCache = data.items;
// //根据文件属性来匹配出 文件类型下拉列表
// $scope.syncFileType($scope.editFieldModel.fileAttr);
// $scope.editFieldModel.fileType = checkedItem.getAttribute("data-fileType");
// $scope.syncRequiredFields($scope.editFieldModel);
// });
//
// $("#helpPopDialog").modal("hide");
// };
// comment: "767"
// createTime: "2019-01-28T11:38:31.000+08:00"
// id: "1"
...
...
@@ -88,6 +99,19 @@ frameworkModule.controller('appUsrOperateLogController',
dataField
:
"id"
,
caption
:
$translate
.
instant
(
'LogIndex'
),
allowHeaderFiltering
:
true
,
cellTemplate
:
function
(
container
,
options
)
{
var
target
=
$
(
'<span data-name="logCheckedItem" type="checkbox" '
+
'data-id="'
+
options
.
data
.
id
+
'" '
+
'>'
+
options
.
data
.
id
+
'</span>'
);
container
.
append
(
target
);
var
table
=
$
(
"#appUsrLogTable"
).
find
(
"table"
);
$
(
table
).
off
(
"click"
).
on
(
"click"
,
function
(
e
){
var
target
=
$
(
e
.
target
);
if
(
target
.
parents
(
"tr"
).
length
)
target
.
parents
(
"tr"
).
find
(
"td"
).
toggleClass
(
'log-export-checked-item'
);
})
}
},
{
dataField
:
"createTime"
,
...
...
@@ -173,8 +197,19 @@ frameworkModule.directive('usrLogExportPlugin',function(){
function
(
$scope
,
SweetAlert
,
$translate
,
usrOperateLogService
,
$q
,
$log
){
$scope
.
exportTableData
=
function
()
{
usrOperateLogService
[
$scope
.
thisModuleName
+
"Export"
]().
then
(
function
(
data
,
status
,
headers
)
{
var
checkedItems
=
$
(
".log-export-checked-item"
);
var
ids
=
[];
if
(
checkedItems
.
length
)
checkedItems
.
find
(
"span[data-name='logCheckedItem']"
)
.
each
(
function
(
index
,
checkedItem
){
var
idLike
=
checkedItem
.
getAttribute
(
'data-id'
);
if
(
idLike
||
idLike
==
0
){
ids
.
push
(
idLike
);
}
});
usrOperateLogService
[
$scope
.
thisModuleName
+
"Export"
]({
"ids"
:
ids
}).
then
(
function
(
data
,
status
,
headers
)
{
if
(
status
===
204
){
SweetAlert
.
warning
(
"没有数据可以下载"
);
return
;
...
...
atms-web/src/main/webapp/app/framework/app-usr-operate-log/app-usr-operate-log.html
View file @
d4f36128
...
...
@@ -10,6 +10,12 @@
.log-export-btn
:hover
{
background
:
#E6E6E6
;
}
/*事件样式,只发生在事件触发期间,用important影响不大*/
td
.log-export-checked-item
{
background
:
#337ab7
!important
;
color
:
#fff
!important
;
}
</style>
<button
class=
"btn btn-not-important"
ng-click=
"openUsrOperateLogPop()"
><i
class=
"material-icons"
>
description
</i><span
translate=
"log"
>
日志
</span></button>
<script
type=
"text/html"
id=
"usrOperateLogPopContainer"
>
...
...
@@ -30,7 +36,7 @@
<!--<
/div>--
>
<!--<
div
ui
-
grid
=
"operateLogGridOptions"
ui
-
grid
-
selection
style
=
"width:1140px; height:510px;margin:0px;"
><
/div>--
>
<
div
class
=
"dx-viewport demo-container"
>
<
div
class
=
"dx-viewport demo-container"
id
=
"appUsrLogTable"
>
<
button
class
=
"btn log-export-btn"
ng
-
click
=
"exportTableData()"
>
<
i
class
=
"fa fa-file-excel-o"
><
/i
>
...
...
atms-web/src/main/webapp/app/framework/app-usr-operate-log/app-usr-operate-log.svc.js
View file @
d4f36128
...
...
@@ -12,22 +12,22 @@ frameworkModule.factory('usrOperateLogService',
docManageListLog
:
function
(
params
)
{
return
jqFetch
.
post
(
apiInterceptor
.
webApiHostUrl
+
'/operLogTaxDoc/selectListForLog'
,
params
);
},
docManageListLogExport
:
function
(){
docManageListLogExport
:
function
(
params
){
$
(
'#busy-indicator-container'
).
show
();
return
exportFn
(
apiInterceptor
.
webApiHostUrl
+
'/operLogTaxDoc/exportExcel'
);
return
exportFn
(
apiInterceptor
.
webApiHostUrl
+
'/operLogTaxDoc/exportExcel'
,
params
);
},
docManageTypeLogExport
:
function
(){
docManageTypeLogExport
:
function
(
params
){
$
(
'#busy-indicator-container'
).
show
();
return
exportFn
(
apiInterceptor
.
webApiHostUrl
+
'/operLogFileTypes/exportExcel'
);
return
exportFn
(
apiInterceptor
.
webApiHostUrl
+
'/operLogFileTypes/exportExcel'
,
params
);
// http://etms.longi-silicon.com:8180//api/v1/operLogFileTypes/exportExcel
}
};
function
exportFn
(
url
)
{
function
exportFn
(
url
,
params
)
{
var
defer
=
$q
.
defer
();
var
xhr
=
new
XMLHttpRequest
();
...
...
@@ -41,7 +41,7 @@ frameworkModule.factory('usrOperateLogService',
xhr
.
setRequestHeader
(
"Authorization"
,
apiInterceptor
.
tokenType
+
' '
+
apiInterceptor
.
apiToken
());
xhr
.
setRequestHeader
(
"Content-Type"
,
'application/json;charset=UTF-8'
);
xhr
.
responseType
=
"arraybuffer"
;
xhr
.
send
();
xhr
.
send
(
JSON
.
stringify
(
params
)
);
return
defer
.
promise
;
}
...
...
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