Commit 0e53c287 authored by chase's avatar chase

merge 档案管理

parent 22730fee
...@@ -61,7 +61,7 @@ public class FileTypesController { ...@@ -61,7 +61,7 @@ public class FileTypesController {
@ResponseBody @ResponseBody
public Map<String,String> query4SelectionBox(){ public Map<String,String> query4SelectionBox(){
List<FileTypes> fileTypes = fileTypesService.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; return result;
} }
...@@ -73,7 +73,7 @@ public class FileTypesController { ...@@ -73,7 +73,7 @@ public class FileTypesController {
@ResponseBody @ResponseBody
public Map<String,String> query4SelectionBoxEnable(){ public Map<String,String> query4SelectionBoxEnable(){
List<FileTypes> fileTypes = fileTypesService.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; return result;
} }
......
...@@ -2,6 +2,7 @@ package pwc.taxtech.atms.service.impl; ...@@ -2,6 +2,7 @@ package pwc.taxtech.atms.service.impl;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -45,6 +46,7 @@ public class FileTypesServiceImpl { ...@@ -45,6 +46,7 @@ public class FileTypesServiceImpl {
/** /**
* 查询档案属性和档案类型给前端下拉选择框 * 查询档案属性和档案类型给前端下拉选择框
*
* @return * @return
*/ */
public List<FileTypes> query4SelectionBox() { public List<FileTypes> query4SelectionBox() {
...@@ -54,6 +56,8 @@ public class FileTypesServiceImpl { ...@@ -54,6 +56,8 @@ public class FileTypesServiceImpl {
@Transactional @Transactional
public boolean addFileTypesList(FileTypes fileTypes) { public boolean addFileTypesList(FileTypes fileTypes) {
try { try {
//检测添加类型是否已存在,存在则返回false先(后期改进为多异常)
checkFileType(fileTypes);
//对必填字段进行转换成json对象 //对必填字段进行转换成json对象
requiredFieldFormatToJson(fileTypes); requiredFieldFormatToJson(fileTypes);
//设置当前时间 当前创建人信息 //设置当前时间 当前创建人信息
...@@ -77,11 +81,29 @@ public class FileTypesServiceImpl { ...@@ -77,11 +81,29 @@ public class FileTypesServiceImpl {
return false; return false;
} }
} catch (Exception e) { } catch (Exception e) {
// log.error("FileTypesServiceImpl addFileTypesList error : " + e.getMessage()); log.error("FileTypesServiceImpl addFileTypesList error : " + e.getMessage());
return false; 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 @Transactional
public boolean deleteFileTypes(Long id) { public boolean deleteFileTypes(Long id) {
try { try {
...@@ -100,7 +122,7 @@ public class FileTypesServiceImpl { ...@@ -100,7 +122,7 @@ public class FileTypesServiceImpl {
return false; return false;
} }
} catch (Exception e) { } catch (Exception e) {
// log.error("FileTypesServiceImpl deleteFileTypes error : " + e.getMessage()); log.error("FileTypesServiceImpl deleteFileTypes error : " + e.getMessage());
return false; return false;
} }
} }
...@@ -108,6 +130,8 @@ public class FileTypesServiceImpl { ...@@ -108,6 +130,8 @@ public class FileTypesServiceImpl {
@Transactional @Transactional
public boolean editFilesType(FileTypes fileTypes) { public boolean editFilesType(FileTypes fileTypes) {
try { try {
//检测添加类型是否已存在,存在则返回false先(后期改进为多异常)
checkFileType(fileTypes);
//对必填字段进行转换成json对象 //对必填字段进行转换成json对象
requiredFieldFormatToJson(fileTypes); requiredFieldFormatToJson(fileTypes);
fileTypes.setUpdateTime(new Date()); fileTypes.setUpdateTime(new Date());
...@@ -128,7 +152,7 @@ public class FileTypesServiceImpl { ...@@ -128,7 +152,7 @@ public class FileTypesServiceImpl {
return false; return false;
} }
} catch (Exception e) { } catch (Exception e) {
// log.error("FileTypesServiceImpl editFilesType error : " + e.getMessage()); log.error("FileTypesServiceImpl editFilesType error : " + e.getMessage());
return false; return false;
} }
} }
...@@ -160,6 +184,7 @@ public class FileTypesServiceImpl { ...@@ -160,6 +184,7 @@ public class FileTypesServiceImpl {
fileTypes.setRequiredFieldJson(requiredFieldJson); fileTypes.setRequiredFieldJson(requiredFieldJson);
} }
} }
public List<FileTypes> query4SelectionBoxEnable() { public List<FileTypes> query4SelectionBoxEnable() {
return fileTypesMapper.query4SelectionBoxEnable(); return fileTypesMapper.query4SelectionBoxEnable();
} }
......
...@@ -275,6 +275,20 @@ taxDocumentManageModule.controller('taxDocumentListController', ...@@ -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(){ $scope.getTableHeight=function(){
var row_height=$("table").find("tr").height(); var row_height=$("table").find("tr").height();
...@@ -952,7 +966,12 @@ taxDocumentManageModule.directive('multiFileUploader', function () { ...@@ -952,7 +966,12 @@ taxDocumentManageModule.directive('multiFileUploader', function () {
if($scope.multiUploadErrorItems.length if($scope.multiUploadErrorItems.length
|| $scope.uploadResultSuccessList.length) || $scope.uploadResultSuccessList.length)
$("#uploadResultPop").modal("show"); $("#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(); $('#busy-indicator-container').hide();
$scope.loadMainData(); $scope.loadMainData();
......
...@@ -354,6 +354,21 @@ ...@@ -354,6 +354,21 @@
box-shadow: 0 0 12px #9e9e9e; box-shadow: 0 0 12px #9e9e9e;
animation: showSweetAlert 0.3s; animation: showSweetAlert 0.3s;
} }
/*页脚固定100px*/
.wrapper{
min-height: calc(100vh - 100px);
}
.page-footer{
height: 100px;
}
/* id="uploadResultPop"*/
.modal-dialog-stage{
color:#9999BB;
}
.modal-dialog-erroritems{
background-color: #F3F3F3;
color:#C53232;
}
</style> </style>
<div class="menu-header TDL-header"> <div class="menu-header TDL-header">
<div class="TDL-query-bar" ng-init="MoreFields = false"> <div class="TDL-query-bar" ng-init="MoreFields = false">
...@@ -366,8 +381,9 @@ ...@@ -366,8 +381,9 @@
<select ng-model="queryFieldModel.fileAttr" <select ng-model="queryFieldModel.fileAttr"
class="form-control radius3" class="form-control radius3"
placeholder="{{'PleaseSelected' | translate}}"> placeholder="{{'PleaseSelected' | translate}}">
<option ng-repeat="fileAttr in fileAttrOptions track by $index" <option value=""></option>
value="{{fileAttr}}">{{fileAttr}} <option ng-repeat="fileAttr in fileAttrOptions track by $index"
value="{{fileAttr}}">{{fileAttr}}
</option> </option>
</select> </select>
<!--<input type="text" class="form-control radius3"--> <!--<input type="text" class="form-control radius3"-->
...@@ -382,6 +398,7 @@ ...@@ -382,6 +398,7 @@
<select ng-model="queryFieldModel.fileType" <select ng-model="queryFieldModel.fileType"
class="form-control radius3" class="form-control radius3"
placeholder="{{'PleaseSelected' | translate}}"> placeholder="{{'PleaseSelected' | translate}}">
<option value=""></option>
<option ng-repeat="fileType in fileTypeOptions track by $index" value="{{fileType}}"> <option ng-repeat="fileType in fileTypeOptions track by $index" value="{{fileType}}">
{{fileType}} {{fileType}}
</option> </option>
...@@ -447,6 +464,7 @@ ...@@ -447,6 +464,7 @@
<select ng-model="queryFieldModel.businessLine" <select ng-model="queryFieldModel.businessLine"
class="form-control radius3" class="form-control radius3"
placeholder="{{'PleaseSelected' | translate}}"> placeholder="{{'PleaseSelected' | translate}}">
<option value=""></option>
<option ng-repeat="businessLine in businessLineOptions track by $index" value="{{businessLine.name}}"> <option ng-repeat="businessLine in businessLineOptions track by $index" value="{{businessLine.name}}">
{{businessLine.name}} {{businessLine.name}}
</option> </option>
...@@ -464,7 +482,7 @@ ...@@ -464,7 +482,7 @@
title="{{queryFieldModel.companyName}}" required title="{{queryFieldModel.companyName}}" required
ng-change="matchCompanyId(queryFieldModel,companyNameOptionsMap)" ng-change="matchCompanyId(queryFieldModel,companyNameOptionsMap)"
placeholder="{{'PleaseSelected' | translate}}"> placeholder="{{'PleaseSelected' | translate}}">
<option value=""></option>
<option ng-repeat="(key,companyName) in companyNameOptionsMap" <option ng-repeat="(key,companyName) in companyNameOptionsMap"
ng-slected="queryFieldModel.companyName == companyName" ng-slected="queryFieldModel.companyName == companyName"
value="{{companyName}}">{{companyName}} value="{{companyName}}">{{companyName}}
...@@ -501,6 +519,7 @@ ...@@ -501,6 +519,7 @@
<select ng-model="queryFieldModel.taxType" <select ng-model="queryFieldModel.taxType"
class="form-control radius3"> class="form-control radius3">
<option value=""></option>
<option ng-repeat="taxType in taxTypeSelects track by $index" <option ng-repeat="taxType in taxTypeSelects track by $index"
ng-selected="(queryFieldModel.taxType == taxType)" ng-selected="(queryFieldModel.taxType == taxType)"
value="{{taxType}}">{{taxType}} value="{{taxType}}">{{taxType}}
...@@ -546,6 +565,7 @@ ...@@ -546,6 +565,7 @@
<select ng-model="queryFieldModel.auditStatus" <select ng-model="queryFieldModel.auditStatus"
class="form-control radius3"> class="form-control radius3">
<option value=""></option>
<option ng-repeat="(code,val) in auditSelectsMap track by $index" <option ng-repeat="(code,val) in auditSelectsMap track by $index"
ng-selected="(queryFieldModel.auditStatus == code || queryFieldModel.auditStatus == val)" ng-selected="(queryFieldModel.auditStatus == code || queryFieldModel.auditStatus == val)"
value="{{code}}">{{val}} value="{{code}}">{{val}}
...@@ -704,6 +724,7 @@ ...@@ -704,6 +724,7 @@
ng-change="syncFileType(editFieldModel.fileAttr)" ng-change="syncFileType(editFieldModel.fileAttr)"
class="form-control" class="form-control"
required placeholder="{{'PleaseSelected' | translate}}"> required placeholder="{{'PleaseSelected' | translate}}">
<option value=""></option>
<option ng-repeat="fileAttr in fileAttrEnableOptions track by $index" <option ng-repeat="fileAttr in fileAttrEnableOptions track by $index"
ng-selected="(editFieldModel.fileAttr == fileAttr)" ng-selected="(editFieldModel.fileAttr == fileAttr)"
value="{{fileAttr}}">{{fileAttr}} value="{{fileAttr}}">{{fileAttr}}
...@@ -727,6 +748,7 @@ ...@@ -727,6 +748,7 @@
title="{{editFieldModel.companyName}}" required title="{{editFieldModel.companyName}}" required
ng-change="matchCompanyId(editFieldModel,companyNameOptionsMap)" ng-change="matchCompanyId(editFieldModel,companyNameOptionsMap)"
placeholder="{{'PleaseSelected' | translate}}"> placeholder="{{'PleaseSelected' | translate}}">
<option value=""></option>
<option ng-repeat="(key,companyName) in companyNameOptionsMap" <option ng-repeat="(key,companyName) in companyNameOptionsMap"
ng-selected="(editFieldModel.companyName == companyName)" ng-selected="(editFieldModel.companyName == companyName)"
value="{{companyName}}">{{companyName}} value="{{companyName}}">{{companyName}}
...@@ -745,6 +767,7 @@ ...@@ -745,6 +767,7 @@
class="form-control" class="form-control"
ng-change="syncRequiredFields(editFieldModel)" ng-change="syncRequiredFields(editFieldModel)"
required placeholder="{{'PleaseSelected' | translate}}"> required placeholder="{{'PleaseSelected' | translate}}">
<option value=""></option>
<option ng-repeat="fileType in curFileTypeOptions track by $index" <option ng-repeat="fileType in curFileTypeOptions track by $index"
ng-selected="(editFieldModel.fileType == fileType)" ng-selected="(editFieldModel.fileType == fileType)"
value="{{fileType}}">{{fileType}} value="{{fileType}}">{{fileType}}
...@@ -767,6 +790,7 @@ ...@@ -767,6 +790,7 @@
class="form-control" class="form-control"
ng-required="isRequired('TaxType')" ng-required="isRequired('TaxType')"
placeholder="{{'PleaseSelected' | translate}}"> placeholder="{{'PleaseSelected' | translate}}">
<option value=""></option>
<option ng-repeat="taxType in taxTypeSelects track by $index" <option ng-repeat="taxType in taxTypeSelects track by $index"
ng-selected="(editFieldModel.taxType == taxType)" ng-selected="(editFieldModel.taxType == taxType)"
value="{{taxType}}">{{taxType}} value="{{taxType}}">{{taxType}}
...@@ -943,6 +967,7 @@ ...@@ -943,6 +967,7 @@
ng-class="{'upload-fail-mark':!editFieldItem.fileAttr}" ng-class="{'upload-fail-mark':!editFieldItem.fileAttr}"
ng-change="syncFileType(editFieldItem.fileAttr)" ng-change="syncFileType(editFieldItem.fileAttr)"
class="form-control" placeholder="{{'PleaseSelected' | translate}}"> class="form-control" placeholder="{{'PleaseSelected' | translate}}">
<option value=""></option>
<option ng-repeat="fileAttr in fileAttrOptions track by $index" <option ng-repeat="fileAttr in fileAttrOptions track by $index"
ng-selected="(editFieldItem.fileAttr == fileAttr)" ng-selected="(editFieldItem.fileAttr == fileAttr)"
value="{{fileAttr}}">{{fileAttr}} value="{{fileAttr}}">{{fileAttr}}
...@@ -966,7 +991,7 @@ ...@@ -966,7 +991,7 @@
ng-class="{'upload-fail-mark':!editFieldItem.companyName}" ng-class="{'upload-fail-mark':!editFieldItem.companyName}"
ng-change="matchCompanyId(editFieldItem,companyNameOptionsMap)" ng-change="matchCompanyId(editFieldItem,companyNameOptionsMap)"
placeholder="{{'PleaseSelected' | translate}}"> placeholder="{{'PleaseSelected' | translate}}">
<option value=""></option>
<option ng-repeat="(key,companyName) in companyNameOptionsMap" <option ng-repeat="(key,companyName) in companyNameOptionsMap"
ng-selected="(editFieldItem.companyName == companyName)" ng-selected="(editFieldItem.companyName == companyName)"
value="{{companyName}}">{{companyName}} value="{{companyName}}">{{companyName}}
...@@ -986,6 +1011,7 @@ ...@@ -986,6 +1011,7 @@
class="form-control" class="form-control"
ng-class="{'upload-fail-mark':!editFieldItem.fileType}" ng-class="{'upload-fail-mark':!editFieldItem.fileType}"
placeholder="{{'PleaseSelected' | translate}}"> placeholder="{{'PleaseSelected' | translate}}">
<option value=""></option>
<option ng-repeat="fileType in curFileTypeOptions track by $index" <option ng-repeat="fileType in curFileTypeOptions track by $index"
ng-selected="(editFieldItem.fileType == fileType)" ng-selected="(editFieldItem.fileType == fileType)"
value="{{fileType}}">{{fileType}} value="{{fileType}}">{{fileType}}
...@@ -1004,6 +1030,7 @@ ...@@ -1004,6 +1030,7 @@
ng-required="isRequired('TaxType')" ng-required="isRequired('TaxType')"
ng-class="{'upload-fail-mark':isRequired('TaxType') && !editFieldItem.taxType}" ng-class="{'upload-fail-mark':isRequired('TaxType') && !editFieldItem.taxType}"
placeholder="{{'PleaseSelected' | translate}}"> placeholder="{{'PleaseSelected' | translate}}">
<option value=""></option>
<option ng-repeat="taxType in taxTypeSelects track by $index" <option ng-repeat="taxType in taxTypeSelects track by $index"
ng-selected="(editFieldItem.taxType == taxType)" ng-selected="(editFieldItem.taxType == taxType)"
value="{{taxType}}">{{taxType}} value="{{taxType}}">{{taxType}}
...@@ -1401,14 +1428,15 @@ ...@@ -1401,14 +1428,15 @@
<div class="modal-title" translate="Tips"></div> <div class="modal-title" translate="Tips"></div>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<p ng-if="uploadResultSuccessList.length">{{uploadResultSuccessList.length}}{{'UploadSuccessCount'|translate}}</p> <p class="modal-dialog-stage" ng-if="uploadResultSuccessList.length">{{uploadResultSuccessList.length}}{{'UploadSuccessCount'|translate}}</p>
<ul> <ul >
<li ng-repeat="item in uploadResultSuccessList"> <li ng-repeat="item in uploadResultSuccessList">
<span>{{item.fileName}}</span> <span>{{item.fileName}}</span>
</li> </li>
</ul> </ul>
<p class="text-danger" ng-if="multiUploadErrorItems.length">{{multiUploadErrorItems.length}}{{'UploadFailCount'|translate}}</p> <br ng-if="uploadResultSuccessList.length">
<ul class="text-danger"> <p class="modal-dialog-stage" ng-if="multiUploadErrorItems.length">{{multiUploadErrorItems.length}}{{'UploadFailCount'|translate}}</p>
<ul class="modal-dialog-erroritems">
<li ng-repeat="item in multiUploadErrorItems"> <li ng-repeat="item in multiUploadErrorItems">
<span>{{item.fileName}}</span> <span>{{item.fileName}}</span>
</li> </li>
...@@ -1416,7 +1444,7 @@ ...@@ -1416,7 +1444,7 @@
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button class="btn btn-primary" translate="Confirm" ng-click="confirmUploadResult()"></button> <button class="btn btn-primary" translate="Confirm" ng-click="confirmUploadResult()"></button>
<!--<button type="button" class="btn btn-third" data-dismiss="modal" translate="Cancel"></button>--> <button type="button" class="btn btn-third" ng-if="multiUploadErrorItems.length" data-dismiss="modal" translate="Cancel"></button>
</div> </div>
</div> </div>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment