Commit fabb9fbf authored by 黄奎's avatar 黄奎

页面修改

parent 59cd5795
...@@ -2,12 +2,15 @@ ...@@ -2,12 +2,15 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using VT.FW.DB;
namespace Edu.Model.Entity.System namespace Edu.Model.Entity.System
{ {
/// <summary> /// <summary>
/// 客户需求实体类 /// 客户需求实体类
/// </summary> /// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_Needs public class RB_Needs
{ {
/// <summary> /// <summary>
......
...@@ -206,5 +206,10 @@ namespace Edu.Model.Entity.User ...@@ -206,5 +206,10 @@ namespace Edu.Model.Entity.User
/// 客户类型 /// 客户类型
/// </summary> /// </summary>
public int StuType { get; set; } public int StuType { get; set; }
/// <summary>
/// 客户需求
/// </summary>
public int StuNeeds { get; set; }
} }
} }
...@@ -10,6 +10,9 @@ namespace Edu.Model.ViewModel.System ...@@ -10,6 +10,9 @@ namespace Edu.Model.ViewModel.System
/// </summary> /// </summary>
public class RB_Needs_Extend : RB_Needs public class RB_Needs_Extend : RB_Needs
{ {
/// <summary>
/// 需求编号
/// </summary>
public string QNeedsId { get; set; }
} }
} }
...@@ -249,5 +249,10 @@ namespace Edu.Model.ViewModel.User ...@@ -249,5 +249,10 @@ namespace Edu.Model.ViewModel.User
/// 学习目的名称 /// 学习目的名称
/// </summary> /// </summary>
public string StuPurposeName { get; set;} public string StuPurposeName { get; set;}
/// <summary>
/// 客户需求名称
/// </summary>
public string StuNeedsName { get; set; }
} }
} }
\ No newline at end of file
...@@ -96,6 +96,11 @@ namespace Edu.Module.User ...@@ -96,6 +96,11 @@ namespace Edu.Module.User
/// </summary> /// </summary>
private readonly RB_ChannelRepository channelRepository = new RB_ChannelRepository(); private readonly RB_ChannelRepository channelRepository = new RB_ChannelRepository();
/// <summary>
/// 客户需求仓储层对象
/// </summary>
private readonly RB_NeedsRepository needsRepository = new RB_NeedsRepository();
/// <summary> /// <summary>
/// 获取学生列表 /// 获取学生列表
/// </summary> /// </summary>
...@@ -230,6 +235,11 @@ namespace Edu.Module.User ...@@ -230,6 +235,11 @@ namespace Edu.Module.User
QChannelIds=channelIds QChannelIds=channelIds
}); });
var needIds = string.Join(",", list.Select(qitem => qitem.StuNeeds));
var needList = needsRepository.GetNeedsListRepository(new Model.ViewModel.System.RB_Needs_Extend()
{
QNeedsId = needIds
});
foreach (var item in list) foreach (var item in list)
{ {
var tempOrderList = stuOrderList?.Where(qitem => qitem.Student_Id == item.StuId)?.ToList(); var tempOrderList = stuOrderList?.Where(qitem => qitem.Student_Id == item.StuId)?.ToList();
...@@ -268,7 +278,7 @@ namespace Edu.Module.User ...@@ -268,7 +278,7 @@ namespace Edu.Module.User
item.StuTypeName = stuTypeList?.FirstOrDefault(qitem => qitem.Id == item.StuType)?.Name ?? ""; item.StuTypeName = stuTypeList?.FirstOrDefault(qitem => qitem.Id == item.StuType)?.Name ?? "";
item.StuChannelName = channelList?.FirstOrDefault(qitem => qitem.Id == item.StuChannel)?.Name ?? ""; item.StuChannelName = channelList?.FirstOrDefault(qitem => qitem.Id == item.StuChannel)?.Name ?? "";
item.StuPurposeName = goalList?.FirstOrDefault(qitem => qitem.Id == item.StuPurpose)?.Name ?? ""; item.StuPurposeName = goalList?.FirstOrDefault(qitem => qitem.Id == item.StuPurpose)?.Name ?? "";
item.StuNeedsName = needList?.FirstOrDefault(qitem => qitem.Id == item.StuNeeds)?.Name ?? "";
} }
} }
return list; return list;
...@@ -410,6 +420,7 @@ namespace Edu.Module.User ...@@ -410,6 +420,7 @@ namespace Edu.Module.User
extModel.StuTypeName = student_TypeRepository.GetEntity(extModel.StuType)?.Name ?? ""; extModel.StuTypeName = student_TypeRepository.GetEntity(extModel.StuType)?.Name ?? "";
extModel.StuPurposeName = learningGoalsRepository.GetLearningGoalsExtEntityRepository(extModel.StuPurpose)?.Name ?? ""; extModel.StuPurposeName = learningGoalsRepository.GetLearningGoalsExtEntityRepository(extModel.StuPurpose)?.Name ?? "";
extModel.StuChannelName = channelRepository.GetChannelExtEntityRepository(extModel.StuChannel)?.Name ?? ""; extModel.StuChannelName = channelRepository.GetChannelExtEntityRepository(extModel.StuChannel)?.Name ?? "";
extModel.StuNeedsName = needsRepository.GetNeedsExtEntityRepository(extModel.StuNeeds)?.Name ?? "";
} }
return extModel; return extModel;
} }
......
...@@ -74,9 +74,9 @@ WHERE 1=1 ...@@ -74,9 +74,9 @@ WHERE 1=1
builder.AppendFormat(" AND A.{0} LIKE @Name ", nameof(RB_Needs_Extend.Name)); builder.AppendFormat(" AND A.{0} LIKE @Name ", nameof(RB_Needs_Extend.Name));
parameters.Add("Name", "%" + query.Name.Trim() + "%"); parameters.Add("Name", "%" + query.Name.Trim() + "%");
} }
if (!string.IsNullOrEmpty(query.QChannelIds)) if (!string.IsNullOrEmpty(query.QNeedsId))
{ {
builder.AppendFormat(@" AND A.{0} IN({1}) ", nameof(RB_Needs_Extend.Id), query.QChannelIds); builder.AppendFormat(@" AND A.{0} IN({1}) ", nameof(RB_Needs_Extend.Id), query.QNeedsId);
} }
} }
return Get<RB_Needs_Extend>(builder.ToString(), parameters).ToList(); return Get<RB_Needs_Extend>(builder.ToString(), parameters).ToList();
......
...@@ -58,6 +58,11 @@ namespace Edu.Repository.User ...@@ -58,6 +58,11 @@ namespace Edu.Repository.User
/// </summary> /// </summary>
private readonly RB_LearningGoalsRepository learningGoalsRepository = new RB_LearningGoalsRepository(); private readonly RB_LearningGoalsRepository learningGoalsRepository = new RB_LearningGoalsRepository();
/// <summary>
/// 客户需求仓储层对象
/// </summary>
private readonly RB_NeedsRepository needsRepository = new RB_NeedsRepository();
/// <summary> /// <summary>
/// 获取学生列表 /// 获取学生列表
/// </summary> /// </summary>
...@@ -430,6 +435,12 @@ WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState=1 an ...@@ -430,6 +435,12 @@ WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState=1 an
string newName = student_TypeRepository.GetEntity(model.StuType)?.Name; string newName = student_TypeRepository.GetEntity(model.StuType)?.Name;
logContent += string.Format("客户类型:由【{0}】=>【{1}】,", oldName, newName); logContent += string.Format("客户类型:由【{0}】=>【{1}】,", oldName, newName);
} }
if (oldModel.StuNeeds != model.StuNeeds)
{
string oldName = needsRepository.GetNeedsExtEntityRepository(oldModel.StuNeeds)?.Name;
string newName = needsRepository.GetNeedsExtEntityRepository(model.StuNeeds)?.Name;
logContent += string.Format("客户需求:由【{0}】=>【{1}】,", oldName, newName);
}
Dictionary<string, object> fileds = new Dictionary<string, object>() Dictionary<string, object> fileds = new Dictionary<string, object>()
{ {
{nameof(RB_Student_ViewModel.StuName),model.StuName.Trim() }, {nameof(RB_Student_ViewModel.StuName),model.StuName.Trim() },
...@@ -457,6 +468,7 @@ WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState=1 an ...@@ -457,6 +468,7 @@ WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState=1 an
fileds.Add(nameof(RB_Student_ViewModel.StuStage), model.StuStage); fileds.Add(nameof(RB_Student_ViewModel.StuStage), model.StuStage);
fileds.Add(nameof(RB_Student_ViewModel.StuChannel), model.StuChannel); fileds.Add(nameof(RB_Student_ViewModel.StuChannel), model.StuChannel);
fileds.Add(nameof(RB_Student_ViewModel.PlatformName), model.PlatformName); fileds.Add(nameof(RB_Student_ViewModel.PlatformName), model.PlatformName);
fileds.Add(nameof(RB_Student_ViewModel.StuNeeds), model.StuNeeds);
} }
//App小程序操作 //App小程序操作
else else
......
...@@ -103,10 +103,12 @@ namespace Edu.WebApi.Controllers.Customer ...@@ -103,10 +103,12 @@ namespace Edu.WebApi.Controllers.Customer
{ {
return ApiResult.ParamIsNull(message: "请填写客户名称!"); return ApiResult.ParamIsNull(message: "请填写客户名称!");
} }
if (string.IsNullOrEmpty(model.ContactNumber))
if (string.IsNullOrEmpty(model.ContactNumber) && string.IsNullOrEmpty(model.QQ) && string.IsNullOrEmpty(model.WeChatNo))
{ {
return ApiResult.ParamIsNull(message: "请填写客户联系电话!"); return ApiResult.Failed("手机号码、QQ号码、微信号码至少填写一项!");
} }
model.Status = Common.Enum.DateStateEnum.Normal; model.Status = Common.Enum.DateStateEnum.Normal;
model.CreateBy = base.UserInfo.Id; model.CreateBy = base.UserInfo.Id;
model.CreateTime = DateTime.Now; model.CreateTime = DateTime.Now;
......
...@@ -752,6 +752,8 @@ namespace Edu.WebApi.Controllers.User ...@@ -752,6 +752,8 @@ namespace Edu.WebApi.Controllers.User
item.WeChatNo, item.WeChatNo,
item.StuType, item.StuType,
item.StuTypeName, item.StuTypeName,
item.StuNeeds,
item.StuNeedsName,
}); });
} }
pageModel.Count = rowsCount; pageModel.Count = rowsCount;
...@@ -826,6 +828,7 @@ namespace Edu.WebApi.Controllers.User ...@@ -826,6 +828,7 @@ namespace Edu.WebApi.Controllers.User
WeChatNo = base.ParmJObj.GetStringValue("WeChatNo"), WeChatNo = base.ParmJObj.GetStringValue("WeChatNo"),
QQ = base.ParmJObj.GetStringValue("QQ"), QQ = base.ParmJObj.GetStringValue("QQ"),
StuType = base.ParmJObj.GetInt("StuType"), StuType = base.ParmJObj.GetInt("StuType"),
StuNeeds=base.ParmJObj.GetInt("StuNeeds"),
}; };
if (string.IsNullOrEmpty(extModel.StuTel) && string.IsNullOrEmpty(extModel.QQ) && string.IsNullOrEmpty(extModel.WeChatNo)) if (string.IsNullOrEmpty(extModel.StuTel) && string.IsNullOrEmpty(extModel.QQ) && string.IsNullOrEmpty(extModel.WeChatNo))
{ {
...@@ -1201,6 +1204,8 @@ namespace Edu.WebApi.Controllers.User ...@@ -1201,6 +1204,8 @@ namespace Edu.WebApi.Controllers.User
extModel.WeChatNo, extModel.WeChatNo,
extModel.StuType, extModel.StuType,
extModel.StuTypeName, extModel.StuTypeName,
extModel.StuNeeds,
extModel.StuNeedsName,
}; };
return ApiResult.Success(data: obj); return ApiResult.Success(data: obj);
} }
......
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