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