This commit is contained in:
那些花儿
2025-10-17 15:11:20 +08:00
parent 501e64022b
commit e8c050b685
@@ -1,6 +1,7 @@
package com.budwk.app.zhgh.democratic.proposal.handler;
import cn.hutool.core.lang.Dict;
import cn.hutool.core.util.StrUtil;
import com.budwk.app.base.constant.RoleConstant;
import com.budwk.app.base.exception.BaseException;
import com.budwk.app.flow.engine.AssignmentHandler;
@@ -28,14 +29,22 @@ public class ProposalMasterUnitAssignmentHandler implements AssignmentHandler {
// 提案ID
String proposalId = execution.getProcessInstance().getBusinessNo();
// 主办单位
ProposalReplyUnit masterUnit = dao.fetch(ProposalReplyUnit.class, Cnd.where(ProposalReplyUnit::getProposalId, "=", proposalId).and(ProposalReplyUnit::getIsMaster, "=", 1));
if (masterUnit == null) {
// ProposalReplyUnit masterUnit = dao.fetch(ProposalReplyUnit.class, Cnd.where(ProposalReplyUnit::getProposalId, "=", proposalId).and(ProposalReplyUnit::getIsMaster, "=", 1));
// 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)){
throw new BaseException("提案没有主办单位");
}
ProposalUndertake undertake = dao.fetch(ProposalUndertake.class, masterUnit.getUnitId());
ProposalUndertake undertake = dao.fetch(ProposalUndertake.class, masterUnitId);
if (undertake == null) {
throw new BaseException("主办单位不存在");