Commit 0f54161e authored by chase's avatar chase

merge档案管理

parent f203dbd1
......@@ -83,7 +83,7 @@ public class FileTypesServiceImpl {
}
} catch (Exception e) {
log.error("FileTypesServiceImpl addFileTypesList error : " + e.getMessage());
return false;
throw new RuntimeException("添加档案类型异常!请联系管理员! : " + e.getMessage());
}
}
......
......@@ -193,15 +193,6 @@ public class TaxDocumentServiceImpl {
@Transactional
public synchronized boolean addTaxDocumentList(MultipartFile file, TaxDocument taxDocument) {
try {
TaxDocumentExample taxDocumentExample = new TaxDocumentExample();
taxDocumentExample.createCriteria().andFileNameEqualTo(taxDocument.getFileName());
List<TaxDocument> list = taxDocumentMapper.selectByExample(taxDocumentExample);
if (list.size() > 0) {
return false;
}
//上传文件
if (StringUtils.isBlank(taxDocument.getFileUploadId())) {
......@@ -369,9 +360,7 @@ public class TaxDocumentServiceImpl {
}
/**
* 根据档案属性 档案类型 公司名称 档案名称 查询是否已存在数据
* 不存在则返回 true
* 已存在则返回 false
* 根据档案属性 档案类型 公司名称 查询是否已存在数据
*
* @param taxDocument
* @return
......@@ -397,10 +386,6 @@ public class TaxDocumentServiceImpl {
if (null != taxDocument.getOwnTime()) {
criteria.andOwnTimeEqualTo(taxDocument.getOwnTime());
}
//档案名称 fileName
if (StringUtils.isNotBlank(taxDocument.getFileName())) {
criteria.andFileNameEqualTo(taxDocument.getFileName());
}
//业务线 businessLine
if (StringUtils.isNotBlank(taxDocument.getBusinessLine())) {
criteria.andBusinessLineEqualTo(taxDocument.getBusinessLine());
......@@ -435,7 +420,7 @@ public class TaxDocumentServiceImpl {
}
//创建人 creator
if (StringUtils.isNotBlank(taxDocument.getCreator())) {
criteria.andCreatorEqualTo(taxDocument.getCreator());
criteria.andCreatorEqualTo( taxDocument.getCreator());
}
//设置查询可用的数据
criteria.andEnableEqualTo("T");
......
......@@ -122,8 +122,9 @@ taxDocumentManageModule.controller('taxDocumentListController',
allowColumnReordering: true,
columns: [
{
dataField: "id",
dataField: "",
caption: "",
width: 40,
cellTemplate: function (container, options) {
var target = $('<input name="dataGridCheckBox" type="checkbox" ' +
'data-id="' + options.data.id + '" ' +
......@@ -132,8 +133,24 @@ taxDocumentManageModule.controller('taxDocumentListController',
$scope.sniffCheckbox();
});
container.append(target);
if($("input[name='dataGridCheckBoxALL']").length==0){
var func = function () {
var targetall = $('<input name="dataGridCheckBoxALL" type="checkbox" data-id=""data-url=""/>');
targetall.off('click').on('click', function () {
$scope.sniffCheckboxAll();
});
$("tr td:first[role='columnheader']").append(targetall);
func= function(){};
};
func();
}
}
},
{
dataField: "id",
caption: "",
visible: false
},
{
dataField: "fileAttr",
caption: $translate.instant('DocumentAttr'),
......@@ -2121,7 +2138,19 @@ taxDocumentManageModule.directive('tempModule', function () {
});
console.info($scope.checkedItemIds.join(","));
};
$scope.sniffCheckboxAll=function(){
$("input[name='dataGridCheckBoxALL']").each(function (index, item) {
if(item.checked){
$("input[name='dataGridCheckBox']").each(function (index, item) {
item.checked=true;
});
}else{
$("input[name='dataGridCheckBox']").each(function (index, item) {
item.checked=false;
});
}
});
};
$scope.getMonthLastDate = function (year, month) {
year = year ? year : new Date().getFullYear();
month = month ? month : (new Date().getMonth() + 1);
......
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