Commit 0f424d07 authored by 吴春's avatar 吴春
parents e7a6cdc3 d4c907b4
......@@ -10,5 +10,7 @@ namespace Mall.Model.Extend.TradePavilion
/// </summary>
public class RB_Commerce_Consult_Extend: RB_Commerce_Consult
{
}
}
......@@ -40,6 +40,11 @@ namespace Mall.WebApi.Controllers.TradePavilion
/// </summary>
private readonly CommerceActivityModule activityModule = new CommerceActivityModule();
/// <summary>
/// 商会活动报名处理类对象
/// </summary>
private readonly CommerceConsultModule consultModule = new CommerceConsultModule();
#region 联系人管理
/// <summary>
......@@ -52,7 +57,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
JObject parms = JObject.Parse(RequestParm.msg.ToString());
var query = new RB_Contract_Extend()
{
Name=parms.GetStringValue("Name")
Name = parms.GetStringValue("Name")
};
query.MallBaseId = RequestParm.MallBaseId;
query.TenantId = RequestParm.TenantId;
......@@ -81,13 +86,13 @@ namespace Mall.WebApi.Controllers.TradePavilion
JObject parms = JObject.Parse(RequestParm.msg.ToString());
var extModel = new RB_Contract_Extend()
{
Id=parms.GetInt("Id"),
Name=parms.GetStringValue("Name"),
Tel=parms.GetStringValue("Tel"),
HeadIcon=parms.GetStringValue("HeadIcon"),
BgImg=parms.GetStringValue("BgImg"),
Position=parms.GetStringValue("Position"),
Intro=parms.GetStringValue("Intro")
Id = parms.GetInt("Id"),
Name = parms.GetStringValue("Name"),
Tel = parms.GetStringValue("Tel"),
HeadIcon = parms.GetStringValue("HeadIcon"),
BgImg = parms.GetStringValue("BgImg"),
Position = parms.GetStringValue("Position"),
Intro = parms.GetStringValue("Intro")
};
extModel.Status = Common.Enum.DateStateEnum.Normal;
extModel.MallBaseId = RequestParm.MallBaseId;
......@@ -158,31 +163,31 @@ namespace Mall.WebApi.Controllers.TradePavilion
var extModel = new RB_InvestmentProcurement_Extend()
{
Id = parms.GetInt("Id"),
Type=parms.GetInt("Type"),
GoodsCategory=parms.GetStringValue("GoodsCategory"),
Investment=parms.GetStringValue("Investment"),
ImportNum=parms.GetInt("ImportNum"),
Describe=parms.GetStringValue("Describe"),
CompanyName=parms.GetStringValue("CompanyName"),
CompanyEnName=parms.GetStringValue("CompanyEnName"),
Mobile=parms.GetStringValue("Mobile"),
EMail=parms.GetStringValue("EMail"),
LegalPerson=parms.GetStringValue("LegalPerson"),
Principal=parms.GetStringValue("Principal"),
WechatNo=parms.GetStringValue("WechatNo"),
DomainUrl=parms.GetStringValue("DomainUrl"),
Industry=parms.GetStringValue("Industry"),
FoundingTime=parms.GetDateTime("FoundingTime"),
EmployeeNum=parms.GetInt("EmployeeNum"),
AnnualSales=parms.GetDecimal("AnnualSales"),
Address=parms.GetStringValue("Address"),
EnAddress=parms.GetStringValue("EnAddress"),
AnnualImport=parms.GetDecimal("AnnualImport"),
ImportCategory=parms.GetStringValue("ImportCategory"),
ImportCountry=parms.GetStringValue("ImportCountry"),
ExportCountry=parms.GetStringValue("ExportCountry"),
CompanyIntro=parms.GetStringValue("CompanyIntro"),
OtherInfo=parms.GetStringValue("OtherInfo"),
Type = parms.GetInt("Type"),
GoodsCategory = parms.GetStringValue("GoodsCategory"),
Investment = parms.GetStringValue("Investment"),
ImportNum = parms.GetInt("ImportNum"),
Describe = parms.GetStringValue("Describe"),
CompanyName = parms.GetStringValue("CompanyName"),
CompanyEnName = parms.GetStringValue("CompanyEnName"),
Mobile = parms.GetStringValue("Mobile"),
EMail = parms.GetStringValue("EMail"),
LegalPerson = parms.GetStringValue("LegalPerson"),
Principal = parms.GetStringValue("Principal"),
WechatNo = parms.GetStringValue("WechatNo"),
DomainUrl = parms.GetStringValue("DomainUrl"),
Industry = parms.GetStringValue("Industry"),
FoundingTime = parms.GetDateTime("FoundingTime"),
EmployeeNum = parms.GetInt("EmployeeNum"),
AnnualSales = parms.GetDecimal("AnnualSales"),
Address = parms.GetStringValue("Address"),
EnAddress = parms.GetStringValue("EnAddress"),
AnnualImport = parms.GetDecimal("AnnualImport"),
ImportCategory = parms.GetStringValue("ImportCategory"),
ImportCountry = parms.GetStringValue("ImportCountry"),
ExportCountry = parms.GetStringValue("ExportCountry"),
CompanyIntro = parms.GetStringValue("CompanyIntro"),
OtherInfo = parms.GetStringValue("OtherInfo"),
};
extModel.Status = Common.Enum.DateStateEnum.Normal;
extModel.MallBaseId = RequestParm.MallBaseId;
......@@ -466,5 +471,78 @@ namespace Mall.WebApi.Controllers.TradePavilion
return flag ? ApiResult.Success() : ApiResult.Failed();
}
#endregion
#region 商会活动报名管理
/// <summary>
/// 获取商会活动报名分页列表
/// </summary>
/// <returns></returns>
public ApiResult GetCommerceConsultPage()
{
ResultPageModel pageModel = JsonConvert.DeserializeObject<ResultPageModel>(RequestParm.msg.ToString());
JObject jObj = JObject.Parse(RequestParm.msg.ToString());
var query = new RB_Commerce_Consult_Extend()
{
LinkMan = jObj.GetStringValue("LinkMan")
};
query.MallBaseId = RequestParm.MallBaseId;
query.TenantId = RequestParm.TenantId;
var list = consultModule.GetCommerceConsultPageListModule(pageModel.pageIndex, pageModel.pageSize, out long rowsCount, query);
pageModel.count = Convert.ToInt32(rowsCount);
pageModel.pageData = list;
return ApiResult.Success(data: pageModel);
}
/// <summary>
/// 新增修改商会活动报名
/// </summary>
/// <returns></returns>
public ApiResult SetCommerceConsult()
{
JObject jObj = JObject.Parse(RequestParm.msg.ToString());
var extModel = new RB_Commerce_Consult_Extend()
{
Id = jObj.GetInt("Id"),
ActivityId=jObj.GetInt ("ActivityId"),
UserId=jObj.GetInt("UserId"),
LinkMan=jObj.GetStringValue("LinkMan"),
LinkTel=jObj.GetStringValue("LinkTel"),
};
extModel.Status = Common.Enum.DateStateEnum.Normal;
extModel.MallBaseId = RequestParm.MallBaseId;
extModel.TenantId = RequestParm.TenantId;
Int32.TryParse(RequestParm.uid, out int Uid);
extModel.UserId = Uid;
extModel.CreateTime = DateTime.Now;
var flag = consultModule.SetCommerceConsultModule(extModel);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
/// <summary>
/// 根据编号获取商会活动报名实体
/// </summary>
/// <returns></returns>
public ApiResult GetCommerceConsult()
{
JObject parms = JObject.Parse(RequestParm.msg.ToString());
var Id = parms.GetInt("Id", 0);
var extModel = consultModule.GetCommerceConsultModule(Id);
return ApiResult.Success(data: extModel);
}
/// <summary>
/// 更新商会活动报名状态
/// </summary>
/// <returns></returns>
public ApiResult RemoveCommerceConsult()
{
JObject parms = JObject.Parse(RequestParm.msg.ToString());
var Id = parms.GetInt("Id", 0);
var Status = parms.GetInt("Status", 0);
var flag = consultModule.RemoveCommerceConsultModule(Id, Status);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
#endregion
}
}
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