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
0e53c287
Commit
0e53c287
authored
Apr 08, 2019
by
chase
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge 档案管理
parent
22730fee
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
6 deletions
+50
-6
FileTypesController.java
...java/pwc/taxtech/atms/controller/FileTypesController.java
+2
-2
FileTypesServiceImpl.java
...a/pwc/taxtech/atms/service/impl/FileTypesServiceImpl.java
+28
-3
tax-document-list.ctrl.js
...ocumentManage/tax-document-list/tax-document-list.ctrl.js
+20
-1
tax-document-list.html
...axDocumentManage/tax-document-list/tax-document-list.html
+0
-0
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/FileTypesController.java
View file @
0e53c287
...
...
@@ -61,7 +61,7 @@ public class FileTypesController {
@ResponseBody
public
Map
<
String
,
String
>
query4SelectionBox
(){
List
<
FileTypes
>
fileTypes
=
fileTypesService
.
query4SelectionBox
();
Map
<
String
,
String
>
result
=
fileTypes
.
stream
().
collect
(
Collectors
.
toMap
(
FileTypes:
:
getFileType
,
FileTypes:
:
getFileAttr
));
Map
<
String
,
String
>
result
=
fileTypes
.
stream
().
distinct
().
collect
(
Collectors
.
toMap
(
FileTypes:
:
getFileType
,
FileTypes:
:
getFileAttr
));
return
result
;
}
...
...
@@ -73,7 +73,7 @@ public class FileTypesController {
@ResponseBody
public
Map
<
String
,
String
>
query4SelectionBoxEnable
(){
List
<
FileTypes
>
fileTypes
=
fileTypesService
.
query4SelectionBoxEnable
();
Map
<
String
,
String
>
result
=
fileTypes
.
stream
().
collect
(
Collectors
.
toMap
(
FileTypes:
:
getFileType
,
FileTypes:
:
getFileAttr
));
Map
<
String
,
String
>
result
=
fileTypes
.
stream
().
distinct
().
collect
(
Collectors
.
toMap
(
FileTypes:
:
getFileType
,
FileTypes:
:
getFileAttr
));
return
result
;
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/FileTypesServiceImpl.java
View file @
0e53c287
...
...
@@ -2,6 +2,7 @@ package pwc.taxtech.atms.service.impl;
import
com.alibaba.fastjson.JSONObject
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -45,6 +46,7 @@ public class FileTypesServiceImpl {
/**
* 查询档案属性和档案类型给前端下拉选择框
*
* @return
*/
public
List
<
FileTypes
>
query4SelectionBox
()
{
...
...
@@ -54,6 +56,8 @@ public class FileTypesServiceImpl {
@Transactional
public
boolean
addFileTypesList
(
FileTypes
fileTypes
)
{
try
{
//检测添加类型是否已存在,存在则返回false先(后期改进为多异常)
checkFileType
(
fileTypes
);
//对必填字段进行转换成json对象
requiredFieldFormatToJson
(
fileTypes
);
//设置当前时间 当前创建人信息
...
...
@@ -77,11 +81,29 @@ public class FileTypesServiceImpl {
return
false
;
}
}
catch
(
Exception
e
)
{
//
log.error("FileTypesServiceImpl addFileTypesList error : " + e.getMessage());
log
.
error
(
"FileTypesServiceImpl addFileTypesList error : "
+
e
.
getMessage
());
return
false
;
}
}
/**
* //检测添加类型是否已存在,存在则返回false先(后期改进为多异常)
*
* @param fileTypes
* @return
*/
private
void
checkFileType
(
FileTypes
fileTypes
)
{
FileTypesExample
example
=
new
FileTypesExample
();
FileTypesExample
.
Criteria
criteria
=
example
.
createCriteria
();
if
(
StringUtils
.
isNotBlank
(
fileTypes
.
getFileType
()))
{
criteria
.
andFileTypeEqualTo
(
fileTypes
.
getFileType
());
}
List
<
FileTypes
>
results
=
fileTypesMapper
.
selectByExample
(
example
);
if
(
results
.
size
()
>
0
)
{
throw
new
RuntimeException
(
"filetype已存在: "
+
fileTypes
.
getFileType
());
}
}
@Transactional
public
boolean
deleteFileTypes
(
Long
id
)
{
try
{
...
...
@@ -100,7 +122,7 @@ public class FileTypesServiceImpl {
return
false
;
}
}
catch
(
Exception
e
)
{
//
log.error("FileTypesServiceImpl deleteFileTypes error : " + e.getMessage());
log
.
error
(
"FileTypesServiceImpl deleteFileTypes error : "
+
e
.
getMessage
());
return
false
;
}
}
...
...
@@ -108,6 +130,8 @@ public class FileTypesServiceImpl {
@Transactional
public
boolean
editFilesType
(
FileTypes
fileTypes
)
{
try
{
//检测添加类型是否已存在,存在则返回false先(后期改进为多异常)
checkFileType
(
fileTypes
);
//对必填字段进行转换成json对象
requiredFieldFormatToJson
(
fileTypes
);
fileTypes
.
setUpdateTime
(
new
Date
());
...
...
@@ -128,7 +152,7 @@ public class FileTypesServiceImpl {
return
false
;
}
}
catch
(
Exception
e
)
{
//
log.error("FileTypesServiceImpl editFilesType error : " + e.getMessage());
log
.
error
(
"FileTypesServiceImpl editFilesType error : "
+
e
.
getMessage
());
return
false
;
}
}
...
...
@@ -160,6 +184,7 @@ public class FileTypesServiceImpl {
fileTypes
.
setRequiredFieldJson
(
requiredFieldJson
);
}
}
public
List
<
FileTypes
>
query4SelectionBoxEnable
()
{
return
fileTypesMapper
.
query4SelectionBoxEnable
();
}
...
...
atms-web/src/main/webapp/app/taxDocumentManage/tax-document-list/tax-document-list.ctrl.js
View file @
0e53c287
...
...
@@ -275,6 +275,20 @@ taxDocumentManageModule.controller('taxDocumentListController',
},
],
onCellClick
:
function
(
e
)
{
//单元格点击— e.columnIndex=0 排除复选框列
if
(
e
.
columnIndex
>
0
&&
e
.
data
){
$
(
"input[name='dataGridCheckBox']"
).
each
(
function
(
index
,
item
)
{
if
((
item
.
dataset
)
&&
(
item
.
dataset
.
id
==
e
.
data
.
id
)){
if
(
item
.
checked
){
item
.
checked
=
false
;
}
else
{
item
.
checked
=
true
;
}
}
});
}
}
};
$scope
.
getTableHeight
=
function
(){
var
row_height
=
$
(
"table"
).
find
(
"tr"
).
height
();
...
...
@@ -952,7 +966,12 @@ taxDocumentManageModule.directive('multiFileUploader', function () {
if
(
$scope
.
multiUploadErrorItems
.
length
||
$scope
.
uploadResultSuccessList
.
length
)
$
(
"#uploadResultPop"
).
modal
(
"show"
);
$scope
.
FileItem
.
isSuccess
=
true
;
//文件上传成功标识
//是否都上传成功
if
(
$scope
.
multiUploadErrorItems
.
length
>
0
){
$scope
.
FileItem
.
isSuccess
=
false
;
}
else
{
$scope
.
FileItem
.
isSuccess
=
true
;
}
$
(
'#busy-indicator-container'
).
hide
();
$scope
.
loadMainData
();
...
...
atms-web/src/main/webapp/app/taxDocumentManage/tax-document-list/tax-document-list.html
View file @
0e53c287
This diff is collapsed.
Click to expand it.
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