Ejemplo n.º 1
0
        private void DoSubitFlowAction(Saas.Tools.FlowWFService.SubmitData submitData)
        {
            CheckStates checkStates = CheckStates.Approving;

            if (submitData.SubmitFlag == Saas.Tools.FlowWFService.SubmitFlag.Approval)
            {
                if (submitData.ApprovalResult == Saas.Tools.FlowWFService.ApprovalResult.NoPass)
                {
                    checkStates = CheckStates.UnApproved;
                }
                else
                {
                    checkStates = CheckStates.Approved;
                }
            }

            VirtualAudit va = InitVirtualAudit(submitData);

            this.OrderEntity.SetObjValue(EntityFieldName.UpdateUserID, OrderEntity.LoginUser.Value);

            FBEntity entityOrder = this.SaveFBEntity;

            FBEntity FBEntityAudit = va.ToFBEntity();

            FBEntityAudit.AddReferenceFBEntity <EntityObject>(entityOrder);

            if (checkStates == CheckStates.Approving)
            {
                entityOrder.SetObjValue(EntityFieldName.UpdateUserID, this.OrderEntity.LoginUser.Value);
                entityOrder.SetObjValue(EntityFieldName.UpdateDate, DateTime.Now);
            }
            // 重新提交
            if (this.OrderEntity.IsReSubmit)
            {
                checkStates = CheckStates.ReSubmit;
            }
            AuditServiceLocal.AuditFBEntity(FBEntityAudit, checkStates);
        }