提交 430ed39d 编写于 作者: O o2null

Merge branch 'fix/#360_update' into 'wrdp'

修复allowPause和allowResume的判断错误

See merge request o2oa/o2oa!2692
...@@ -45,6 +45,8 @@ class ActionGetWorkOrWorkCompleted extends BaseAction { ...@@ -45,6 +45,8 @@ class ActionGetWorkOrWorkCompleted extends BaseAction {
private Boolean hasTaskCompletedWithJob = null; private Boolean hasTaskCompletedWithJob = null;
private Boolean hasPauseTaskWithWork = null;
private Map<String, Boolean> hasTaskCompletedWithActivityToken = new HashMap<>(); private Map<String, Boolean> hasTaskCompletedWithActivityToken = new HashMap<>();
ActionResult<Wo> execute(EffectivePerson effectivePerson, String workOrWorkCompleted) ActionResult<Wo> execute(EffectivePerson effectivePerson, String workOrWorkCompleted)
...@@ -118,9 +120,7 @@ class ActionGetWorkOrWorkCompleted extends BaseAction { ...@@ -118,9 +120,7 @@ class ActionGetWorkOrWorkCompleted extends BaseAction {
wo.setAllowDelete(PropertyTools.getOrElse(activity, Manual.allowDeleteWork_FIELDNAME, Boolean.class, false) wo.setAllowDelete(PropertyTools.getOrElse(activity, Manual.allowDeleteWork_FIELDNAME, Boolean.class, false)
&& wo.getAllowSave()); && wo.getAllowSave());
// 是否可以挂起待办,暂停待办计时 // 是否可以挂起待办,暂停待办计时
if (PropertyTools.getOrElse(activity, Manual.allowPause_FIELDNAME, Boolean.class, false) && wo.getAllowSave()) {
if (PropertyTools.getOrElse(activity, Manual.allowPause_FIELDNAME, Boolean.class, false)
&& wo.getAllowPause()) {
// 如果已经处于挂起状态,那么允许恢复 // 如果已经处于挂起状态,那么允许恢复
if (this.hasPauseTaskWithWork(business, effectivePerson, work.getId())) { if (this.hasPauseTaskWithWork(business, effectivePerson, work.getId())) {
wo.setAllowResume(true); wo.setAllowResume(true);
...@@ -200,12 +200,12 @@ class ActionGetWorkOrWorkCompleted extends BaseAction { ...@@ -200,12 +200,12 @@ class ActionGetWorkOrWorkCompleted extends BaseAction {
private boolean hasPauseTaskWithWork(Business business, EffectivePerson effectivePerson, String work) private boolean hasPauseTaskWithWork(Business business, EffectivePerson effectivePerson, String work)
throws Exception { throws Exception {
if (null == this.hasTaskWithWork) { if (null == this.hasPauseTaskWithWork) {
this.hasTaskWithWork = business.entityManagerContainer().countEqualAndEqualAndEqual(Task.class, this.hasPauseTaskWithWork = business.entityManagerContainer().countEqualAndEqualAndEqual(Task.class,
Task.person_FIELDNAME, effectivePerson.getDistinguishedName(), Task.work_FIELDNAME, work, Task.person_FIELDNAME, effectivePerson.getDistinguishedName(), Task.work_FIELDNAME, work,
Task.pause_FIELDNAME, true) > 0; Task.pause_FIELDNAME, true) > 0;
} }
return this.hasTaskWithWork; return this.hasPauseTaskWithWork;
} }
private boolean hasTaskCompletedWithJob(Business business, EffectivePerson effectivePerson, String job) private boolean hasTaskCompletedWithJob(Business business, EffectivePerson effectivePerson, String job)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册