Commit 0cd41e26 authored by 黄奎's avatar 黄奎

页面修改

parent dfa05204
......@@ -148,6 +148,8 @@ namespace Edu.Cache.User
Group_Id = model.Group_Id,
ManagerIds = model.Id.ToString()
});
string JHTenantId = Config.JHTenantId;
string JHMallBaseId = Config.JHMallBaseId;
userInfo = new UserInfo
{
Id = model.Id,
......@@ -165,8 +167,8 @@ namespace Edu.Cache.User
UserMobile = model.Account,
ErpToken = "",
MallToken = "",
JHMallBaseId = "",
JHTenantId = "",
JHMallBaseId = JHMallBaseId,
JHTenantId = JHTenantId,
GroupLogo = model.GroupLogo,
UserIcon = model.UserIcon,
DeptName = model.DeptName,
......
......@@ -92,5 +92,10 @@ namespace Edu.Model.Entity.Mall
get;
set;
}
/// <summary>
/// 选择参与人员编号
/// </summary>
public int ActivitySurveyGuestId { get; set; }
}
}
......@@ -24,12 +24,13 @@ namespace Edu.Repository.Mall
/// <returns></returns>
public List<RB_ActivitySurvey> GetActivitySurveyListRepository(RB_ActivitySurvey where,string StuAccountId)
{
string dateStr = Common.ConvertHelper.FormatDate(DateTime.Now);
StringBuilder sb = new StringBuilder();
sb.AppendFormat($@"
SELECT A.*
sb.AppendFormat(@"
SELECT A.*,(SELECT Id FROM RB_ActivitySurvey_Guest WHERE GuestType=2 AND IsFinish=0 AND SurveyId=A.ID AND StartTime<'{0}' AND EndTime>'{0}' AND GuestId={1} LIMIT 1) AS ActivitySurveyGuestId
FROM RB_ActivitySurvey AS A
WHERE A.State=0 ");
string dateStr = Common.ConvertHelper.FormatDate(DateTime.Now);
WHERE A.State=0 ",dateStr, StuAccountId);
sb.AppendFormat(" AND A.StartDate<'{0}' AND A.EndDate>'{0}' ", dateStr);
if (!string.IsNullOrEmpty(StuAccountId))
{
......
......@@ -378,9 +378,11 @@ namespace Edu.WebApi.Controllers.Applet
MallBaseId = JHMallBaseId,
}, appletUserInfo.Id.ToString());
var ActivitySurveyId = 0;
var ActivitySurveyGuestId = 0;
if (surveyList != null && surveyList.Count > 0)
{
ActivitySurveyId = surveyList.FirstOrDefault().ID;
ActivitySurveyGuestId= surveyList.FirstOrDefault().ActivitySurveyGuestId;
}
return ApiResult.Success("", new
{
......@@ -397,7 +399,8 @@ namespace Edu.WebApi.Controllers.Applet
LearningGardenList,
Words,
BankTypeList,
ActivitySurveyId
ActivitySurveyId,
ActivitySurveyGuestId,
});
}
......
......@@ -36,13 +36,14 @@ namespace Edu.WebApi.Controllers.Goods
{
SurveyId=base.ParmJObj.GetInt("SurveyId")
};
query.TenantId = Convert.ToInt32(base.UserInfo.JHTenantId);
query.MallBaseId = Convert.ToInt32(base.UserInfo.JHMallBaseId);
Int32.TryParse(base.UserInfo.JHTenantId, out int JHTenantId);
query.TenantId = JHTenantId;
Int32.TryParse(base.UserInfo.JHMallBaseId, out int JHMallBaseId);
query.MallBaseId = JHMallBaseId;
var list = activitySurveyModule.GetActivitySurveyGuestPageModule(pageModel.PageIndex, pageModel.PageSize, out long rowsCount, query);
List<object> result = new List<object>();
foreach (var item in list)
{
result.Add(new
{
item.Id,
......@@ -79,8 +80,8 @@ namespace Edu.WebApi.Controllers.Goods
extModel.Status = 0;
extModel.CreateBy = base.UserInfo.Id;
extModel.CreateDate = DateTime.Now;
extModel.TenantId = Convert.ToInt32(base.UserInfo.JHTenantId);
extModel.MallBaseId = Convert.ToInt32(base.UserInfo.JHMallBaseId);
extModel.TenantId = Convert.ToInt32(Common.Config.JHTenantId);
extModel.MallBaseId = Convert.ToInt32(Common.Config.JHMallBaseId);
bool flag = activitySurveyModule.SetActivitySurveyGuestModule(extModel);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment