public virtual async Task SubmitAsync(ContractCheckInfoRequest checkinfo, ExamineStatusEnum ext, CancellationToken cancellationToken = default(CancellationToken))
 {
     if (checkinfo == null)
     {
         throw new ArgumentNullException(nameof(checkinfo));
     }
     await Store.UpdateExamineStatus(checkinfo.ModifyID, ext, cancellationToken);
 }
        public async Task <ResponseMessage <bool> > CheckSimpleContract(UserInfo User, [FromBody] ContractCheckInfoRequest request)
        {
            Logger.Trace($"用户{User?.UserName ?? ""}({User?.Id ?? ""})审核合同基础信息(PutBuildingBaseInfo):\r\n请求参数为:\r\n" + (request != null ? JsonHelper.ToJson(request) : ""));

            if (User.Id == null)
            {
                {
                    User.Id             = "66df64cb-67c5-4645-904f-704ff92b3e81";
                    User.UserName       = "******";
                    User.KeyWord        = "";
                    User.OrganizationId = "270";
                    User.PhoneNumber    = "18122132334";
                };
            }

            var response = new ResponseMessage <bool>();

            if (!ModelState.IsValid)
            {
                response.Code    = ResponseCodeDefines.ModelStateInvalid;
                response.Message = ModelState.GetAllErrors();
                return(response);
            }

            try
            {
                GatewayInterface.Dto.ExamineSubmitRequest exarequest = new GatewayInterface.Dto.ExamineSubmitRequest();
                exarequest.ContentId      = request.ContractID;
                exarequest.ContentType    = "ContractCommit";
                exarequest.ContentName    = request.CheckName;
                exarequest.SubmitDefineId = request.ModifyID;
                exarequest.Source         = "";
                exarequest.CallbackUrl    = "";
                exarequest.Action         = request.Action /*"TEST" exarequest.ContentType*/;
                exarequest.TaskName       = $"{User.UserName}提交合同{exarequest.ContentName}的动态{exarequest.ContentType}";

                GatewayInterface.Dto.UserInfo userinfo = new GatewayInterface.Dto.UserInfo()
                {
                    Id               = User.Id,
                    KeyWord          = User.KeyWord,
                    OrganizationId   = User.OrganizationId,
                    OrganizationName = User.OrganizationName,
                    UserName         = User.UserName
                };

                var examineInterface = ApplicationContext.Current.Provider.GetRequiredService <IExamineInterface>();
                var reponse          = await examineInterface.Submit(userinfo, exarequest);

                if (reponse.Code != ResponseCodeDefines.SuccessCode)
                {
                    response.Code    = ResponseCodeDefines.ServiceError;
                    response.Message = "向审核中心发起审核请求失败:" + reponse.Message;
                    return(response);
                }

                //写发送成功后的表
                await _contractInfoManager.SubmitAsync(request, ExamineStatusEnum.Auditing, HttpContext.RequestAborted);

                response.Message = $"check {request.CheckName} sucess";
            }
            catch (Exception e)
            {
                response.Code    = ResponseCodeDefines.ServiceError;
                response.Message = e.ToString();
                Logger.Error($"用户{User?.UserName ?? ""}({User?.Id ?? ""})合同动态提交审核(UpdateRecordSubmit)报错:\r\n{e.ToString()},\r\n请求参数为:\r\n" + (request != null ? JsonHelper.ToJson(request) : ""));
            }

            return(response);
        }