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
9d2c06f1
Commit
9d2c06f1
authored
Apr 01, 2019
by
chase
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge 档案管理
parent
31d2d014
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
120 additions
and
19 deletions
+120
-19
FileTypesController.java
...java/pwc/taxtech/atms/controller/FileTypesController.java
+12
-0
TaxDocumentController.java
...va/pwc/taxtech/atms/controller/TaxDocumentController.java
+4
-3
FileTypesServiceImpl.java
...a/pwc/taxtech/atms/service/impl/FileTypesServiceImpl.java
+3
-0
FileTypesMapper.java
...o/src/main/java/pwc/taxtech/atms/dao/FileTypesMapper.java
+3
-0
FileTypesMapper.xml
...esources/pwc/taxtech/atms/dao/extends/FileTypesMapper.xml
+9
-0
doc-manage.html
...webapp/app/admin/infrastructure/docManage/doc-manage.html
+14
-5
tax-document-list.ctrl.js
...ocumentManage/tax-document-list/tax-document-list.ctrl.js
+71
-10
tax-document-list.html
...axDocumentManage/tax-document-list/tax-document-list.html
+1
-1
tax-document-list.svc.js
...DocumentManage/tax-document-list/tax-document-list.svc.js
+3
-0
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/FileTypesController.java
View file @
9d2c06f1
...
...
@@ -65,6 +65,18 @@ public class FileTypesController {
return
result
;
}
/**
* 查询档案属性和档案类型给前端下拉选择框(可用)
* @return
*/
@PostMapping
(
"/query4SelectionBoxEnable"
)
@ResponseBody
public
Map
<
String
,
String
>
query4SelectionBoxEnable
(){
List
<
FileTypes
>
fileTypes
=
fileTypesService
.
query4SelectionBoxEnable
();
Map
<
String
,
String
>
result
=
fileTypes
.
stream
().
collect
(
Collectors
.
toMap
(
FileTypes:
:
getFileType
,
FileTypes:
:
getFileAttr
));
return
result
;
}
/**
* 添加档案文件类型
* @param fileTypes
...
...
atms-api/src/main/java/pwc/taxtech/atms/controller/TaxDocumentController.java
View file @
9d2c06f1
...
...
@@ -62,8 +62,9 @@ public class TaxDocumentController {
@PostMapping
(
"add"
)
@ResponseBody
public
boolean
addTaxDocument
(
TaxDocument
taxDocument
,
@RequestParam
(
"file"
)
MultipartFile
file
)
{
public
boolean
addTaxDocument
(
@RequestParam
(
value
=
"file"
)
MultipartFile
file
,
@RequestParam
(
required
=
false
)
String
modual
,
TaxDocument
taxDocument
)
{
return
taxDocumentService
.
addTaxDocumentList
(
file
,
taxDocument
);
}
...
...
@@ -82,7 +83,7 @@ public class TaxDocumentController {
@PostMapping
(
"edit"
)
@ResponseBody
public
boolean
editTaxDocument
(
TaxDocument
taxDocument
,
@RequestParam
(
"file"
)
MultipartFile
file
,
@RequestParam
(
value
=
"file"
,
required
=
false
)
MultipartFile
file
,
@RequestParam
(
required
=
false
)
String
modual
)
{
//TODO 判断file是否为null 为null则不做上传和设置新url地址值 若不为null 则上传文件并设置文件url地址值
if
(
file
!=
null
&&!
file
.
isEmpty
()){
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/FileTypesServiceImpl.java
View file @
9d2c06f1
...
...
@@ -160,4 +160,7 @@ public class FileTypesServiceImpl {
fileTypes
.
setRequiredFieldJson
(
requiredFieldJson
);
}
}
public
List
<
FileTypes
>
query4SelectionBoxEnable
()
{
return
fileTypesMapper
.
query4SelectionBoxEnable
();
}
}
atms-dao/src/main/java/pwc/taxtech/atms/dao/FileTypesMapper.java
View file @
9d2c06f1
...
...
@@ -108,4 +108,6 @@ public interface FileTypesMapper extends MyMapper {
int
updateByPrimaryKey
(
FileTypes
record
);
List
<
FileTypes
>
query4SelectionBox
();
List
<
FileTypes
>
query4SelectionBoxEnable
();
}
\ No newline at end of file
atms-dao/src/main/resources/pwc/taxtech/atms/dao/extends/FileTypesMapper.xml
View file @
9d2c06f1
...
...
@@ -405,4 +405,12 @@
FROM file_types
ORDER BY file_attr
</select>
<select
id=
"query4SelectionBoxEnable"
resultMap=
"BaseResultMap"
>
SELECT
id,file_attr, file_type
FROM file_types
WHERE status = 1
ORDER BY file_attr
</select>
</mapper>
\ No newline at end of file
atms-web/src/main/webapp/app/admin/infrastructure/docManage/doc-manage.html
View file @
9d2c06f1
...
...
@@ -110,7 +110,7 @@
</div>
<!--描述-->
<div
class=
"form-group"
>
<label
for=
"Description"
class=
"col-sm-3 control-label"
>
<label
for=
"Description"
class=
"col-sm-3 control-label
edit-panel-left-part
"
>
<span
translate=
"DescriptionWithOutColon"
></span>
</label>
<div
class=
"col-sm-11"
style=
"width:61.67%"
>
...
...
@@ -140,7 +140,7 @@
</div>
<!--备注-->
<div
class=
"form-group"
>
<label
for=
"Remarks"
class=
"col-sm-3 control-label"
translate=
"Remarks"
></label>
<label
for=
"Remarks"
class=
"col-sm-3 control-label
edit-panel-left-part
"
translate=
"Remarks"
></label>
<div
class=
"col-sm-11"
style=
"width:61.67%"
>
<input
class=
"form-control"
id=
"Remarks"
ng-model=
"editModel.remarks"
...
...
@@ -151,7 +151,7 @@
<!--状态-->
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
<label
class=
"col-sm-3 control-label
edit-panel-left-part
"
>
<span
translate=
"State"
></span>
</label>
<div
class=
"col-sm-11"
style=
"width:61.67%"
>
...
...
@@ -182,10 +182,19 @@
</div>
<div
class=
"modal-footer"
>
<
!--<
div class="modal-footer">
<button type="submit" class="btn btn-primary" translate="Confirm"
></button>
<!--ng-disabled="newDocFileTypeForm.roleName.$invalid || newDocFileTypeForm.service_id.$invalid"-->
></button><!–ng-disabled="newDocFileTypeForm.roleName.$invalid || newDocFileTypeForm.service_id.$invalid"–>
<button type="button" class="btn btn-third" data-dismiss="modal" ng-click="cancelDocFileType()" translate="Cancel"></button>
</div>-->
<div>
<center>
<button
type=
"submit"
class=
"btn btn-primary"
translate=
"Confirm"
></button>
<!--ng-disabled="newDocFileTypeForm.roleName.$invalid || newDocFileTypeForm.service_id.$invalid"-->
<button
type=
"button"
class=
"btn btn-third"
data-dismiss=
"modal"
ng-click=
"cancelDocFileType()"
translate=
"Cancel"
></button>
</center>
</div>
</form>
</div>
...
...
atms-web/src/main/webapp/app/taxDocumentManage/tax-document-list/tax-document-list.ctrl.js
View file @
9d2c06f1
...
...
@@ -1052,10 +1052,25 @@ taxDocumentManageModule.directive('multiFileUploader', function () {
params
.
fileTime
=
$scope
.
getQueryDate
(
params
.
fileTime
,
"-"
);
params
.
effectiveTime
=
$scope
.
getQueryDate
(
params
.
effectiveTime
,
"-"
);
_taxDocumentListService
.
verifyDuplicate
(
params
).
then
(
function
(
data
)
{
if
(
data
==
true
)
{
_fileItem
.
url
=
apiInterceptor
.
webApiHostUrl
+
"/taxDoc/add"
;
//data.id===null|| data.id===undefined,代表可以直接上传,否则属于覆盖行为
if
(
data
.
id
===
null
||
data
.
id
===
undefined
)
{
_fileItem
.
url
=
"http://etms.longi-silicon.com:8180//api/v1/taxDoc/add"
;
}
else
{
_fileItem
.
url
=
apiInterceptor
.
webApiHostUrl
+
"/taxDoc/edit"
;
//覆盖行为-需上传参数
for
(
var
name
in
data
)
{
if
((
data
[
name
]
==
null
)
||
(
name
==
'createTime'
||
name
==
'updateTime'
||
name
==
'fileName'
||
name
==
'fileAttr'
||
name
==
'fileType'
||
name
==
'fileTypeId'
||
name
==
'companyName'
||
name
==
'companyId'
||
name
==
'taxType'
||
name
==
'ownTime'
||
name
==
'effectiveTime'
||
name
==
'fileTime'
)){
continue
;
}
if
(
name
==
'uploadTime'
||
name
==
'fileTime'
||
name
==
'effectiveTime'
){
data
[
name
]
=
$scope
.
getQueryDate
(
data
[
name
],
"/"
)
}
var
cover_fields
=
{};
cover_fields
[
name
]
=
data
[
name
];
fileItem
.
formData
.
push
(
cover_fields
);
}
_fileItem
.
url
=
"http://etms.longi-silicon.com:8180//api/v1/taxDoc/edit"
;
}
_multiUploader
.
uploadItem
(
_i
);
});
...
...
@@ -1601,6 +1616,8 @@ taxDocumentManageModule.directive('tempModule', function () {
$scope
.
typeAndAttrMap
=
{};
$scope
.
fileTypeOptions
=
[];
$scope
.
fileAttrOptions
=
[];
$scope
.
fileTypeEnableOptions
=
[];
$scope
.
fileAttrEnableOptions
=
[];
$scope
.
curFileTypeOptions
=
[];
$scope
.
companyNameOptionsMap
=
{};
$scope
.
loadSelectMap
=
function
()
{
...
...
@@ -1641,18 +1658,61 @@ taxDocumentManageModule.directive('tempModule', function () {
}
});
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'
));
taxDocumentListService
.
getCompanyNameOptions
().
then
(
function
(
data
)
{
// console.log(data);
if
(
data
)
{
$scope
.
companyNameOptionsMap
=
data
;
}
});
};
//加载可用的档案属性
$scope
.
loadSelectEnableMap
=
function
()
{
taxDocumentListService
.
getFileInfoEnableOptions
().
then
(
function
(
data
)
{
// console.log(data);
if
(
data
)
{
$scope
.
typeAndAttrMap
=
data
;
// 抽取每个元素的头一个字串,用于排序;
// $scope.fileTypeEnableOptions = $scope.sortByFirstCode(Object.keys(data));
// $scope.fileAttrEnableOptions = $scope.sortByFirstCode(Object.values(data));
$scope
.
fileTypeEnableOptions
=
Object
.
keys
(
data
);
$scope
.
fileAttrEnableOptions
=
Object
.
values
(
data
);
// 过滤去重
var
temp
=
$scope
.
fileTypeEnableOptions
;
$scope
.
fileTypeEnableOptions
=
(
function
(){
var
result
=
[];
temp
.
forEach
(
function
(
typeItem
){
if
(
result
.
indexOf
(
typeItem
)
===
-
1
){
result
.
push
(
typeItem
);
}
});
return
result
;
})();
$scope
.
fileTypeEnableOptions
.
sort
();
temp
=
$scope
.
fileAttrEnableOptions
;
$scope
.
fileAttrEnableOptions
=
(
function
(){
var
result
=
[];
temp
.
forEach
(
function
(
attrItem
){
if
(
result
.
indexOf
(
attrItem
)
===
-
1
){
result
.
push
(
attrItem
);
}
});
return
result
;
})();
$scope
.
fileAttrEnableOptions
.
sort
();
}
});
taxDocumentListService
.
getCompanyNameOptions
().
then
(
function
(
data
)
{
// console.log(data);
if
(
data
)
{
$scope
.
companyNameOptionsMap
=
data
;
}
});
};
$scope
.
loadSelectMap
();
$scope
.
loadSelectEnableMap
();
$scope
.
businessLineOptions
=
[];
$scope
.
loadBusinessList
=
function
(){
taxDocumentListService
.
getBusinessList
().
then
(
function
(
resData
){
...
...
@@ -1800,6 +1860,7 @@ taxDocumentManageModule.directive('tempModule', function () {
}
return
result
;
};
$scope
.
queryFileUploadData
=
function
(
key
,
curItemValue
){
var
fields
=
{};
if
(
/ownTime/
.
test
(
key
))
{
...
...
atms-web/src/main/webapp/app/taxDocumentManage/tax-document-list/tax-document-list.html
View file @
9d2c06f1
...
...
@@ -704,7 +704,7 @@
ng-change=
"syncFileType(editFieldModel.fileAttr)"
class=
"form-control"
required
placeholder=
"{{'PleaseSelected' | translate}}"
>
<option
ng-repeat=
"fileAttr in fileAttrOptions track by $index"
<option
ng-repeat=
"fileAttr in fileAttr
Enable
Options track by $index"
ng-selected=
"(editFieldModel.fileAttr == fileAttr)"
value=
"{{fileAttr}}"
>
{{fileAttr}}
</option>
...
...
atms-web/src/main/webapp/app/taxDocumentManage/tax-document-list/tax-document-list.svc.js
View file @
9d2c06f1
...
...
@@ -66,6 +66,9 @@ taxDocumentManageModule.factory('taxDocumentListService',
getFileInfoOptions
:
function
(
params
){
return
jqFetch
.
post
(
apiInterceptor
.
webApiHostUrl
+
'/fileTypes/query4SelectionBox'
,
params
);
},
getFileInfoEnableOptions
:
function
(
params
){
return
jqFetch
.
post
(
apiInterceptor
.
webApiHostUrl
+
'/fileTypes/query4SelectionBoxEnable'
,
params
);
},
getCompanyNameOptions
:
function
(
params
){
return
jqFetch
.
get
(
apiInterceptor
.
webApiHostUrl
+
'/org/getMyOrgList'
,
params
);
},
...
...
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