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
07b735d8
Commit
07b735d8
authored
Mar 26, 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
74b9352c
d4f36128
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
112 additions
and
43 deletions
+112
-43
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
+0
-0
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
tax-document-list.ctrl.js
...ocumentManage/tax-document-list/tax-document-list.ctrl.js
+8
-4
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/TaxDocumentController.java
View file @
07b735d8
...
...
@@ -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 @
07b735d8
...
...
@@ -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 @
07b735d8
...
...
@@ -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 @
07b735d8
This diff is collapsed.
Click to expand it.
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/BB.java
View file @
07b735d8
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 @
07b735d8
...
...
@@ -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 @
07b735d8
...
...
@@ -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 @
07b735d8
...
...
@@ -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 @
07b735d8
...
...
@@ -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 @
07b735d8
...
...
@@ -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 @
07b735d8
...
...
@@ -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
;
}
...
...
atms-web/src/main/webapp/app/taxDocumentManage/tax-document-list/tax-document-list.ctrl.js
View file @
07b735d8
...
...
@@ -1610,11 +1610,15 @@ taxDocumentManageModule.directive('tempModule', function () {
}
});
taxDocumentListService
.
getCompanyNameOptions
().
then
(
function
(
data
)
{
// console.log(data);
if
(
data
)
{
$scope
.
companyNameOptionsMap
=
data
;
taxDocumentListService
.
getCompanyNameOptions
().
then
(
function
(
res
){
if
(
res
&&
0
===
res
.
code
)
{
angular
.
forEach
(
res
.
data
,
function
(
item
)
{
$scope
.
companyNameOptionsMap
[
item
.
id
]
=
item
.
name
;
});
}
else
{
SweetAlert
.
error
(
$translate
.
instant
(
'RevenueGetOrgError'
));
}
});
};
$scope
.
loadSelectMap
();
...
...
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