Commit 0dbc5049 authored by kevin's avatar kevin

Merge branch 'dev_mysql' of http://code.tech.tax.asia.pwcinternal.com/root/atms into dev_mysql

parents 5202f711 0e12b330
......@@ -260,23 +260,26 @@ public class TemplateServiceImpl extends AbstractService {
String path = "";
if (templateDb != null) {
TemplateExample example = new TemplateExample();
example.createCriteria().andCodeEqualTo(templateDb.getCode()).andIdEqualTo(templateDb.getId()).andIsActiveAssociationEqualTo(false);
long count = templateMapper.countByExample(example);
if (count > 0) {
path = templateDb.getPath();
//物理删除
deleteIsAtiveAssociation(templateDb);
} else {
if (param.isDeletePermanent() && !templateDb.getIsSystemType()) {
path = templateDb.getPath();
// TemplateExample example = new TemplateExample();
// example.createCriteria().andCodeEqualTo(templateDb.getCode()).andIdEqualTo(templateDb.getId()).andIsActiveAssociationEqualTo(false);
path = templateDb.getPath();
//物理删除
deleteIsAtiveAssociation(templateDb);
} else {
//逻辑删除
logicDeleteIsActiveAssociation(templateDb);
}
}
deleteIsAtiveAssociation(templateDb);
// long count = templateMapper.countByExample(example);
// if (count > 0) {
// path = templateDb.getPath();
// //物理删除
// deleteIsAtiveAssociation(templateDb);
// } else {
// if (param.isDeletePermanent() && !templateDb.getIsSystemType()) {
// path = templateDb.getPath();
// //物理删除
// deleteIsAtiveAssociation(templateDb);
// } else {
// //逻辑删除
// logicDeleteIsActiveAssociation(templateDb);
// }
// }
}
result.setResult(true);
......@@ -406,10 +409,16 @@ public class TemplateServiceImpl extends AbstractService {
}
private void deleteIsAtiveAssociation(Template templateDb) {
if(templateDb.getId() == null){
return;
}
cellTemplateConfigMapper.deleteCellTemplateConfigByCellTemplate(templateDb.getId());
keyValueReferenceMapper.deleteKeyValueReferenceByCellTemplate(templateDb.getId());
CellTemplateExample example = new CellTemplateExample();
example.createCriteria().andReportTemplateIdEqualTo(templateDb.getId());
cellTemplateMapper.deleteByExample(example);
TemplateExample templateExample = new TemplateExample();
templateExample.createCriteria().andIdEqualTo(templateDb.getId());
templateMapper.deleteByExample(templateExample);
}
}
......@@ -403,6 +403,6 @@
"WordLibraryTitle": "字库",
"notAllowDisableMessage": "机构中已关联,不允许停用",
"UnSave": "未点击保存按钮!",
"addFileType": "增加档案类型",
"addFileType": "新建档案类型",
"~MustBeEndOneApp": "I Must be the End One, please!"
}
\ No newline at end of file
......@@ -109,7 +109,7 @@
"DocumentTypeSets": "税务档案类型设置",
"Explain": "说明",
"RequiredFields": "必填字段",
"CreateDocFileType":"新建文档类型",
"CreateDocFileType":"新建档案类型",
"State": "状态",
"PCompany": "所属机构",
"Enable": "启用",
......
......@@ -187,7 +187,7 @@
></button>&lt;!&ndash;ng-disabled="newDocFileTypeForm.roleName.$invalid || newDocFileTypeForm.service_id.$invalid"&ndash;&gt;
<button type="button" class="btn btn-third" data-dismiss="modal" ng-click="cancelDocFileType()" translate="Cancel"></button>
</div>-->
<div>
<div style="margin-bottom: 20px;">
<center>
<button type="submit" class="btn btn-primary" translate="Confirm"
></button>
......
......@@ -576,7 +576,7 @@ taxDocumentManageModule.directive('dateTimePicker', function () {
minViewMode: $attrs["minViewMode"] ? parseInt($attrs["minViewMode"]) : 0,
autoclose: true,
language: region,
todayBtn: true,
todayBtn: 'linked',
clearBtn: true //清除按钮
}).off("changeDate").on('changeDate', function (ev) {
runCallback(ev);
......@@ -719,6 +719,7 @@ taxDocumentManageModule.directive('multiFileUploader', function () {
};
$scope.openMultiUploadPop = function () {
clearCache();//清空缓存
$("#multiUploadFilePlugin").click();
$scope.multiUploader.clearQueue();
$("#multiUploadFilePlugin").val(null); //这一步主要防止第二次选择相同文件的时候无响应
......
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