Commit 525ff4e5 authored by chase's avatar chase

fix bug

parent 2aeee399
......@@ -37,7 +37,6 @@ public class TaxDocumentController {
taxDocumentService.selectTaxDocumentList(taxDocumentDto);
PageInfo<TaxDocument> taxDocumentPageInfo = page.toPageInfo();
List<TaxDocument> list = taxDocumentPageInfo.getList();
return PageResultVo.getPageResultVo(taxDocumentPageInfo, list);
}
......@@ -49,8 +48,8 @@ public class TaxDocumentController {
@PostMapping("add")
@ResponseBody
public boolean addTaxDocument(@RequestBody TaxDocument taxDocument,
@RequestParam MultipartFile file) {
public boolean addTaxDocument(TaxDocument taxDocument,
@RequestParam("file") MultipartFile file) {
return taxDocumentService.addTaxDocumentList(file,taxDocument);
}
......@@ -72,7 +71,6 @@ public class TaxDocumentController {
return taxDocumentService.editFilesType(taxDocument);
}
@RequestMapping("exportExcel")
@ResponseBody
public void exportExcelFile(HttpServletResponse response, @RequestBody TaxDocumentDto taxDocumentDto) {
......@@ -120,12 +118,12 @@ public class TaxDocumentController {
/**
* 生成上传url
*
* @param picture
* @param file
* @param modual
* @return
*/
private String getUploadUrl(MultipartFile picture, String modual) {
String fileName = picture.getOriginalFilename();
private String getUploadUrl(MultipartFile file, String modual) {
String fileName = file.getOriginalFilename();
String pictureName = UUID.randomUUID().toString() + fileName.substring(fileName.lastIndexOf("."));
String dir = DateUtils.getStringDateShort();
String typePath = "";
......@@ -141,7 +139,7 @@ public class TaxDocumentController {
if (!basePath.exists()) {
basePath.mkdirs();
}
picture.transferTo(new File(fileSavePath + File.separator + typePath + File.separator + pictureName));
file.transferTo(new File(fileSavePath + File.separator + typePath + File.separator + pictureName));
} catch (Exception e) {
e.printStackTrace();
}
......
......@@ -91,7 +91,7 @@ public class TaxDocumentServiceImpl {
}
//档案名称 fileName
if (StringUtils.isNotBlank(taxDocumentDto.getFileName())) {
criteria.andFileNameLike(taxDocumentDto.getFileName());
criteria.andFileNameLike("%"+taxDocumentDto.getFileName()+"%");
}
//业务线 businessLine
if (StringUtils.isNotBlank(taxDocumentDto.getBusinessLine())) {
......
......@@ -231,7 +231,7 @@ taxDocumentManageModule.controller('taxDocumentListController',
$scope.isCreatePop = false;
$scope.simpleUploadSubmit = editDocFileRecord;
$scope.localData.forEach(function (item) {
if (item.id === rowId) {
if (item.id == rowId) {
$scope.editFieldModel = angular.copy(item);
$scope.editFieldModel.ownTime = dateFormat(item.ownTime);
$scope.editFieldModel.fileTime = dateFormat(item.fileTime);
......@@ -285,7 +285,7 @@ taxDocumentManageModule.controller('taxDocumentListController',
$scope.uploader.uploadItem(0);
$scope.isCoverOperation = false;
$('#busy-indicator-container').show();
// $('#busy-indicator-container').show();
// addLogicAfterUploadFile($scope.editFieldModel,'simple');
} else {
SweetAlert.swal({
......@@ -305,7 +305,7 @@ taxDocumentManageModule.controller('taxDocumentListController',
$scope.uploader.uploadItem(0);
// editDocFileRecord($scope.editFieldModel, 'simple');
$('#busy-indicator-container').show();
// $('#busy-indicator-container').show();
$scope.isCoverOperation = true;
}
})
......@@ -530,27 +530,38 @@ taxDocumentManageModule.directive("multiDatePicker", function () {
$('#period-picker1').rangePicker(setModel)
.on('datePicker.done', function (e, result) {
// $scope.queryFieldModel.AvailabilityDate
$scope.queryFieldModel.fileBeginTime = result[0].reverse().join("-");
$scope.queryFieldModel.fileEndTTime = result[1].reverse().join("-");
$scope.queryFieldModel.fileBeginTime = dateFormat(result[0].reverse());
$scope.queryFieldModel.fileEndTTime = dateFormat(result[1].reverse());
});
$('#period-picker2').rangePicker(setModel)
.on('datePicker.done', function (e, result) {
// queryFieldModel.Duration
$scope.queryFieldModel.ownBeginTime = result[0].reverse().join("-");
$scope.queryFieldModel.ownEndTime = result[1].reverse().join("-");
$scope.queryFieldModel.ownBeginTime = dateFormat(result[0].reverse());
$scope.queryFieldModel.ownEndTime = dateFormat(result[1].reverse());
});
$('#period-picker3').rangePicker(setModel)
.on('datePicker.done', function (e, result) {
// queryFieldModel.DueDate
$scope.queryFieldModel.effectiveBeginTime = result[0].reverse().join("-");
$scope.queryFieldModel.effectiveEndTime = result[1].reverse().join("-");
$scope.queryFieldModel.effectiveBeginTime = dateFormat(result[0].reverse());
$scope.queryFieldModel.effectiveEndTime = dateFormat(result[1].reverse());
});
$('#period-picker4').rangePicker(setModel)
.on('datePicker.done', function (e, result) {
// queryFieldModel.UploadDate
$scope.queryFieldModel.uploadBeginTime = result[0].reverse().join("-");
$scope.queryFieldModel.uploadEndTime = result[1].reverse().join("-");
$scope.queryFieldModel.uploadBeginTime = dateFormat(result[0].reverse());
$scope.queryFieldModel.uploadEndTime = dateFormat(result[1].reverse());
});
function dateFormat(dateArr){
var result = [];
dateArr.forEach(function(dateItem){
dateItem = dateItem + "";
dateItem = dateItem.length < 2 ? "0" + dateItem : dateItem;
result.push(dateItem);
});
//默认填充每月的1号
result.push("01");
return result.join("-");
}
}]
}
......@@ -640,7 +651,11 @@ taxDocumentManageModule.directive('fileUploader',function () {
$scope.uploader = new FileUploader({
url: apiInterceptor.webApiHostUrl + "/taxDoc/add",
// autoUpload: true,//添加后,自动上传
headers:{"Authorization":apiInterceptor.tokenType + ' ' + apiInterceptor.apiToken()},
headers:{
'Access-Control-Allow-Origin': '*',
Authorization: apiInterceptor.tokenType + ' ' + apiInterceptor.apiToken(),
withCredentials: true
},
removeAfterUpload:true,
});
$scope.uploader.filters.push({//xls限制
......@@ -666,7 +681,7 @@ taxDocumentManageModule.directive('fileUploader',function () {
// $scope.uploader.clearQueue();
$scope.editFieldModel = {};
$('#busy-indicator-container').hide();
// $('#busy-indicator-container').hide();
};
// $scope.uploader.onCancelItem = function(fileItem, response, status, headers) {
// console.info('onCancelItem', fileItem, response, status, headers);
......@@ -1073,4 +1088,70 @@ taxDocumentManageModule.directive('pdfPreview',function(){
}]
}
});
taxDocumentManageModule.directive('helpPop',function(){
return{
restrict:'EA',
controller:['$scope','taxDocumentListService','$translate','$compile',
function($scope,taxDocumentListService,$translate,$compile){
$scope.openHelpPop = function(){
$scope.help_loadData();
};
$scope.help_cacheData = {};
$scope.help_loadData = function () {
taxDocumentListService.getDocumentsAttrAndType({params:{}}).then(function (data) {
$scope.help_dataGridUpdate(data);
var dataGrid = $('<div dx-data-grid="help_dataGridOptions">');
$("#helpPopContainer").html("").append(dataGrid);
$compile(dataGrid)($scope);
$("#helpPopDialog").modal("show");
})
};
$scope.help_dataGridUpdate = function (_data) {
$scope.help_cacheData = _data.items;
$scope.help_dataGridOptions = {
bindingOptions: {
dataSource: 'help_cacheData',
},
paging: {
enable: true,
pageIndex: 0,
pageSize: 10
},
pager: {
allowedPageSizes: 5,
infoText: "当前 {0} / {1} ({2} )",
showInfo: true,
showNavigationButtons: true,
showPageSizeSelector: true,
visible: true
},
showBorders: true,
showRowLines: true,
columnAutoWidth: true,
allowColumnReordering: true,
columns: [
{
dataField: "fileAttr",
caption: $translate.instant('DocumentAttr'),
},
{
dataField: "fileType",
caption: $translate.instant('DocumentType'),
},
{
dataField: "description",
caption: $translate.instant('Description'),
},
],
};
};
}]
}
});
\ No newline at end of file
......@@ -27,6 +27,9 @@ taxDocumentManageModule.factory('taxDocumentListService',
delFileRecordItems: function (params) {
return jqFetch.post(apiInterceptor.webApiHostUrl + '/taxDoc/batchDelete', params);
},
getDocumentsAttrAndType:function(params){
return jqFetch.post(apiInterceptor.webApiHostUrl + '/fileTypes/selectList', params);
},
getBinaryData: function (url) {
var defer = $q.defer();
var oReq = new XMLHttpRequest();
......
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