beforeDoOperation方法获取操作状态(保存、提交)原创
金蝶云社区-何旭东
何旭东
7人赞赏了该文章 464次浏览 未经作者许可,禁止转载编辑于2023年06月07日 16:48:10
beforeDoOperation方法获取操作状态(保存、提交)
@Override
    public void beforeDoOperation(BeforeDoOperationEventArgs args) {
        super.beforeDoOperation(args);
        Object source = args.getSource();
        if (source instanceof FormOperate) {
            FormOperate button = (FormOperate) source;
            String operateKey = button.getOperateKey();
            if (HRStringUtils.equals(operateKey, HRBaseConstants.SAVE)) {
                // todo 为了测试, 之后再审核完后调用
                ApplyHelper.setCerInfo(this.getModel().getDataEntity());
                this.getModel().getDataEntity().set(ApplyConstants.FIELD_CERSTATUS, CerStatusEnum.SUBMIT_NO.getNumber());
                // 构造活动处理人
                constructHandler();
            }
            if (HRStringUtils.equals(operateKey, HRBaseConstants.SUBMIT)) {
                // 构造活动处理人
                constructHandler();
                this.getModel().getDataEntity().set(ApplyConstants.FIELD_CERSTATUS, CerStatusEnum.CER_IN.getNumber());
            }
        }

    }
Object source = args.getSource();
        if (!FormOperate.class.isInstance(source)) {
            return;
        }
        FormOperate button = (FormOperate) source;
        String operateKey = button.getOperateKey();

        if (HRStringUtils.equals(operateKey, HRBaseConstants.SAVE)) {
            ......
        }


图标赞 7
7人点赞
还没有人点赞,快来当第一个点赞的人吧!
图标打赏
0人打赏
还没有人打赏,快来当第一个打赏的人吧!

您的鼓励与嘉奖将成为创作者们前进的动力,如果觉得本文还不错,可以给予作者创作打赏哦!

请选择打赏金币数 *

10金币20金币30金币40金币50金币60金币
可用金币: 0