Beispiel #1
0
        public ActionResult verify(string access_token, string comment, int info_id, int verified)
        {
            var user = UserBussiness.GetUserModel(m => m.OpenID == access_token);
            var si   = SignInRecordBussiness.GetSignInRecordModel(info_id);

            si.Status    = verified;
            si.AuditDesc = comment;
            bool flag = SignInRecordBussiness.UpdateSignInRecordModel(si);

            if (flag)
            {
                Task.Factory.StartNew(() =>
                {
                    AuditLogModel auditLogModel  = new AuditLogModel();
                    auditLogModel.CreateTime     = DateTime.Now;
                    auditLogModel.CreateUserID   = user.ID;
                    auditLogModel.remark         = comment;
                    auditLogModel.Status         = verified;
                    auditLogModel.SignInRecordID = info_id;
                    AuditLogBussiness.InsertActiveModel(auditLogModel);
                });
                return(Success("操作成功"));
            }
            else
            {
                return(Fail("请重试"));
            }
        }
Beispiel #2
0
        /// <summary>
        /// 编辑报名信息
        /// </summary>
        /// <returns></returns>
        public JsonResult UpdateSignInForm(List <VM_Feild> info, int info_id)
        {
            var m = SignInRecordBussiness.GetSignInRecordModel(info_id);
            List <CustomFieldModel> customFieldModels = CustomFieldBussiness.GetCustomFieldModels(K => K.ActiveID == m.ActiveID);

            m.Status = 0;
            List <CustomFieldValueModel> list = new List <CustomFieldValueModel>();

            foreach (var item in info)
            {
                CustomFieldValueModel valueModel = new CustomFieldValueModel();
                valueModel.ActiveID      = m.ActiveID;
                valueModel.CreateUserID  = LoginUserInfo.ID;
                valueModel.CustomFieldID = item.field_key.ToInt32();
                valueModel.SignInID      = info_id;
                valueModel.Value         = item.field_value ?? "";
                list.Add(valueModel);
            }
            bool flag = SignInRecordBussiness.UpdateSignInRecordByTran(list, info_id, m);

            if (flag)
            {
                return(Success("success"));
            }
            else
            {
                return(Fail("请重试"));
            }
        }
Beispiel #3
0
        public ActionResult comment(int info_id, string remark)
        {
            var model = SignInRecordBussiness.GetSignInRecordModel(info_id);

            model.Remark = remark;
            bool flag = SignInRecordBussiness.UpdateSignInRecordModel(model);

            if (flag)
            {
                return(Success(""));
            }
            else
            {
                return(Success("请重试"));
            }
        }
Beispiel #4
0
        public JsonResult user_detail(int eid, int info_id)
        {
            var sign = SignInRecordBussiness.GetSignInRecordModel(info_id);
            var list = CustomFieldBussiness.GetustomFieldValueBySignIn(eid, info_id);


            List <Dictionary <string, object> > req_info = new List <Dictionary <string, object> >();;

            foreach (var item in list)
            {
                Dictionary <string, object> dc = new Dictionary <string, object>();
                dc.Add("field_key", item.ID);
                dc.Add("field_desc", item.PlaceHolder);
                dc.Add("field_name", item.Name);
                dc.Add("field_type", item.Type.Value);
                dc.Add("max_length", item.MaxTextCount);
                dc.Add("min_length", item.MinTextCount);
                dc.Add("status", 1);
                dc.Add("require", item.require);
                if (item.Type == 5)
                {
                    dc.Add("field_value", item?.Value?.Split(',') ?? new string[] { });
                }
                else
                {
                    dc.Add("field_value", item?.Value?.ToString() ?? "");
                }
                dc.Add("options", !string.IsNullOrEmpty(item.Options) ? item.Options.SplitExtension(",") : new string[] { });
                req_info.Add(dc);
            }
            return(Success(new
            {
                req_info,
                info = req_info,
                comment = sign.AuditDesc,
                remark = sign.Remark,
                verified = sign.Status
            }));
        }
Beispiel #5
0
        public JsonResult CertDetail(int info_id)
        {
            var    signin   = SignInRecordBussiness.GetSignInRecordModel(info_id);
            var    active   = ActivesBussiness.GetActivesModel(signin.ActiveID.Value);
            var    user     = UserBussiness.GetUserModel(signin.CreateUserID ?? 0);
            string filePath = Server.MapPath("/Images");

            if (!Directory.Exists(filePath))
            {
                Directory.CreateDirectory(filePath);
            }
            string fileName = filePath + "/" + Guid.NewGuid().ToString();

            try
            {
                Image img = MiniprogramApiHelper.CreateShareCode(signin.ActiveID.Value.ToString() + "_" + info_id, "pages/detail/detail");
                img.Save(fileName);
            }
            catch (Exception ex)
            {
                fileName = "https://res.wx.qq.com/wxdoc/dist/assets/img/WXAQRCode.053ccc63.png";
            }

            return(Success(new
            {
                start_time = LeoUtils.ConvertDateTimeInt1(active.SigninBeginTIme),
                end_time = LeoUtils.ConvertDateTimeInt1(active.SigninEndTime),
                act_start = LeoUtils.ConvertDateTimeInt1(active.ActiveBeginTime),
                act_end = LeoUtils.ConvertDateTimeInt1(active.ActiveEndTime),
                enroll_time = LeoUtils.ConvertDateTimeInt1(signin.CreateTime),
                qrcode = fileName,
                items = new ArrayList(),
                title = active.Title,
                name = user.UserName
            }));
        }