..
This commit is contained in:
+10
-1
@@ -35,11 +35,20 @@ public class ProposalMasterUnitAssignmentHandler implements AssignmentHandler {
|
||||
// if (masterUnit == null) {
|
||||
// throw new BaseException("提案没有主办单位");
|
||||
// }
|
||||
|
||||
// ProposalUndertake undertake = dao.fetch(ProposalUndertake.class, masterUnit.getUnitId());
|
||||
|
||||
// 假设委员会立案那么从流程变量取值
|
||||
String masterUnitId = execution.getArgs().getStr("tf_masterUnitId");
|
||||
|
||||
// 如果没有 认为是需要重新答复 从记录表里取值
|
||||
if(StrUtil.isBlank(masterUnitId)){
|
||||
ProposalReplyUnit masterUnit = dao.fetch(ProposalReplyUnit.class, Cnd.where(ProposalReplyUnit::getProposalId, "=", proposalId).and(ProposalReplyUnit::getIsMaster, "=", 1));
|
||||
if (masterUnit == null) {
|
||||
throw new BaseException("系统异常");
|
||||
}
|
||||
masterUnitId = masterUnit.getUnitId();
|
||||
}
|
||||
|
||||
if(StrUtil.isBlank(masterUnitId)){
|
||||
throw new BaseException("提案没有主办单位");
|
||||
}
|
||||
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package com.budwk.app.zhgh.democratic.proposal.listenter;
|
||||
|
||||
|
||||
import com.budwk.app.flow.engine.event.ProcessEvent;
|
||||
import com.budwk.app.flow.engine.event.ProcessEventListener;
|
||||
import com.budwk.app.flow.entity.ProcessInstance;
|
||||
import com.budwk.app.flow.entity.ProcessTask;
|
||||
import com.budwk.app.flow.enums.ProcessEventTypeEnum;
|
||||
import com.budwk.app.zhgh.democratic.proposal.models.ProposalReplyUnit;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
|
||||
/**
|
||||
* 委员会立案撤回监听器
|
||||
*/
|
||||
@IocBean
|
||||
public class ProposalCaseTaskRevokeEventListener implements ProcessEventListener {
|
||||
|
||||
@Inject
|
||||
private Dao dao;
|
||||
|
||||
@Override
|
||||
public void onEvent(ProcessEvent event) {
|
||||
if (event.getEventType() == ProcessEventTypeEnum.PROCESS_TASK_REVOKE) {
|
||||
Long taskId = event.getSourceId();
|
||||
ProcessTask task = dao.fetch(ProcessTask.class, taskId);
|
||||
ProcessInstance instance = dao.fetch(ProcessInstance.class, task.getProcessInstanceId());
|
||||
String businessNo = instance.getBusinessNo();
|
||||
dao.clear(ProposalReplyUnit.class, Cnd.where(ProposalReplyUnit::getProposalId, "=", businessNo));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user