提交 fa8f4041 编写于 作者: O o2sword

云文件修改2

上级 1bb66098
......@@ -38,7 +38,8 @@ class ActionResume extends BaseAction {
usedSize = usedSize + att.getLength();
int vResult = business.verifyConstraint(effectivePerson.getDistinguishedName(), usedSize);
if(vResult > 0){
throw new ExceptionCapacityOut(usedSize, vResult);
long usedCapacity = usedSize / (1024 * 1024);
throw new ExceptionCapacityOut(usedCapacity, vResult);
}
EntityManager aem = emc.beginTransaction(Attachment2.class);
att.setStatus(FileStatus.VALID.getName());
......@@ -62,7 +63,8 @@ class ActionResume extends BaseAction {
usedSize = usedSize + att.getLength();
int vResult = business.verifyConstraint(effectivePerson.getDistinguishedName(), usedSize);
if(vResult > 0){
throw new ExceptionCapacityOut(usedSize, vResult);
long usedCapacity = usedSize / (1024 * 1024);
throw new ExceptionCapacityOut(usedCapacity, vResult);
}
EntityManager aem = emc.beginTransaction(Attachment2.class);
att.setStatus(FileStatus.VALID.getName());
......
......@@ -63,7 +63,8 @@ class ActionSaveToFolder extends BaseAction {
usedSize = usedSize + att.getLength();
int vResult = business.verifyConstraint(effectivePerson.getDistinguishedName(), usedSize);
if(vResult > 0){
throw new ExceptionCapacityOut(usedSize, vResult);
long usedCapacity = usedSize / (1024 * 1024);
throw new ExceptionCapacityOut(usedCapacity, vResult);
}
Attachment2 newAtt = new Attachment2(att.getName(), effectivePerson.getDistinguishedName(),
folderId, att.getOriginFile(), att.getLength(), att.getType());
......@@ -91,7 +92,8 @@ class ActionSaveToFolder extends BaseAction {
usedSize = usedSize + att.getLength();
int vResult = business.verifyConstraint(effectivePerson.getDistinguishedName(), usedSize);
if(vResult > 0){
throw new ExceptionCapacityOut(usedSize, vResult);
long usedCapacity = usedSize / (1024 * 1024);
throw new ExceptionCapacityOut(usedCapacity, vResult);
}
Attachment2 newAtt = new Attachment2(att.getName(), effectivePerson.getDistinguishedName(),
folderId, att.getOriginFile(), att.getLength(), att.getType());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册