Commit 3fcc0e38 authored by chase's avatar chase

merge 档案管理

parent 19fd2bbf
......@@ -71,28 +71,22 @@ public class OperationLogTaxDocController {
@RequestMapping("exportExcel")
@ResponseBody
// public void exportExcelFile(HttpServletResponse response, @RequestBody OperationLogTaxDocument operationLogTaxDocument) {
public void exportExcelFile(HttpServletResponse response) {
public void exportExcelFile(HttpServletResponse response, @RequestBody OperationLogTaxDocument operationLogTaxDocument) {
try {
Map<String, String> headers = new LinkedHashMap<>();
headers.put("id", "id");
// headers.put("operation_content", "操作内容");
// headers.put("module_name", "模块名称");
// headers.put("operation_object", "操作对象");
headers.put("operation_action", "操作action");
// headers.put("original_state", "原始状态");
// headers.put("update_state", "更新状态");
headers.put("update_state", "操作内容");
headers.put("operation_user", "操作者");
headers.put("ip", "操作ip");
headers.put("comment", "内容");
headers.put("create_time", "创建时间");
List<OperationLogTaxDocument> TaxDocuments = operationLogTaxDocService.selectTaxDocumentList();
// List<String> ids = operationLogTaxDocument.getIds() == null ? Lists.newArrayList() : operationLogTaxDocument.getIds();
List<String> ids = operationLogTaxDocument.getIds() == null ? Lists.newArrayList() : operationLogTaxDocument.getIds();
List<OperationLogTaxDocument> taxDocuments = operationLogTaxDocService.selectListForLog(ids);
response.setContentType("multipart/form-data");
response.setHeader("Content-Disposition", "attachment;fileName=" + new String("档案列表日志".getBytes("GB2312"), "ISO-8859-1"));
OutputStream ouputStream = response.getOutputStream();
ExcelUtil.exportExcel(headers, TaxDocuments, ouputStream);
ExcelUtil.exportExcel(headers, taxDocuments, ouputStream);
} catch (Exception e) {
e.printStackTrace();
}
......
......@@ -29,8 +29,8 @@ frameworkModule.controller('appUsrOperateLogController',
SweetAlert.warning("没有数据可以下载");
return;
}
$scope.thisModuleId=[];//清空查询id
$scope.dataGridUpdate(data);
$scope.thisModuleId=[];//清空查询id
})
};
// $scope.sniffHelpPopRadio = function(){
......@@ -206,16 +206,22 @@ frameworkModule.directive('usrLogExportPlugin',function(){
function($scope,SweetAlert,$translate,usrOperateLogService,$q,$log){
$scope.exportTableData = function ()
{
var checkedItems = $(".log-export-checked-item");
// var checkedItems = $(".log-export-checked-item");
var ids = [];
if(checkedItems.length)
/*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);
}
});
.each(function(index,checkedItem){
var idLike = checkedItem.getAttribute('data-id');
if(idLike || idLike == 0){
ids.push(idLike);
}
});*/
var datas=$scope.localData;
for(var i=0;i<datas.length;i++){
if(datas[i].id){
ids.push(datas[i].id);
}
}
usrOperateLogService[$scope.thisModuleName + "Export"]({
"ids":ids
}).then(function (data, status, headers) {
......
......@@ -18,7 +18,7 @@ taxDocumentManageModule.controller('taxDocumentListController',
};
$scope.localData = null;
$scope.loadMainData = function () {
checkReminder();
$scope.queryFieldModel.currentPage = $scope.pagingOptions.pageIndex;
$scope.queryFieldModel.pageSize = $scope.pagingOptions.pageSize;
......@@ -51,6 +51,36 @@ taxDocumentManageModule.controller('taxDocumentListController',
})
};
function checkReminder(){
var items=$scope.queryFieldModel;
var message="";
if (!PWC.isNullOrEmpty(items.fileBeginTime) && !PWC.isNullOrEmpty(items.fileEndTTime) &&
items.fileBeginTime > items.fileEndTTime)
{
message+=$translate.instant('AvailabilityDate')+",";
}
if (!PWC.isNullOrEmpty(items.ownBeginTime) && !PWC.isNullOrEmpty(items.ownEndTime) &&
items.ownBeginTime > items.ownEndTime)
{
message+=$translate.instant('Duration')+",";
}
if (!PWC.isNullOrEmpty(items.effectiveBeginTime) && !PWC.isNullOrEmpty(items.effectiveEndTime) &&
items.effectiveBeginTime > items.effectiveEndTime)
{
message+=$translate.instant('DueDate')+",";
}
if (!PWC.isNullOrEmpty(items.uploadBeginTime) && !PWC.isNullOrEmpty(items.uploadEndTime) &&
items.uploadBeginTime > items.uploadEndTime)
{
message+=$translate.instant('UploadDate')+",";
}
if(message){
message = (message.substring(message.length - 1) == ',') ? message.substring(0, message.length - 1) : message;
message+="-"+$translate.instant('DateWarningSearch');
window.swal(message);
return;
}
}
$scope.dataGridUpdate = function (_data) {
$scope.localData = _data.list;
$scope.pagingOptions.pageIndex = _data.pageNo;
......@@ -1827,7 +1857,7 @@ taxDocumentManageModule.directive('tempModule', function () {
$scope.checkedItemIds = [];
$scope.sniffCheckbox = function () {
$scope.checkedItemIds.length = 0;
$("input[name='dataGridCheckBox']").each(function (index, item) {
$("tr td[name='logCheckedItem']").each(function (index, item) {
if (item.checked) {
var cellId = $(item).attr("data-id");
$scope.checkedItemIds.push(cellId);
......@@ -1938,6 +1968,8 @@ taxDocumentManageModule.directive('tempModule', function () {
result = 1;
}else if(src === $translate.instant('ApprovalReject')){
result = -1;
}else{
result="";
}
return result;
};
......@@ -1950,6 +1982,8 @@ taxDocumentManageModule.directive('tempModule', function () {
result = $translate.instant('ApprovalPass');
}else if(src == -1){
result = $translate.instant('ApprovalReject');
}else{
result="";
}
return result;
};
......@@ -2068,7 +2102,15 @@ taxDocumentManageModule.directive('exportPlugin',function(){
$scope.queryFieldModel.currentPage = $scope.pagingOptions.pageIndex;
$scope.queryFieldModel.pageSize = $scope.pagingOptions.pageSize;
var delIDs = [];
$("input[name='dataGridCheckBox']").each(function (index, tdCell) {
if (tdCell.checked) {
var cellId = $(tdCell).attr('data-id');
delIDs.push(cellId);
}
});
var params = angular.copy($scope.queryFieldModel);
params.ids=delIDs;
params.fileBeginTime = getQueryDate(params.fileBeginTime,"-");
params.fileEndTTime = getQueryDate(params.fileEndTTime,"-");
params.ownBeginTime = getQueryDate(params.ownBeginTime,"-");
......
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