Commit df54ac65 authored by 黄奎's avatar 黄奎
parents 0915a9d1 e227abb5
......@@ -113,7 +113,7 @@ namespace Mall.Model.Entity.TradePavilion
/// <summary>
/// 项目类型
/// </summary>
public ProjectTypeEnum ProjectType { get; set; }
public int? ProjectType { get; set; }
/// <summary>
/// 商业体量(单位:万平方米)
......@@ -160,7 +160,7 @@ namespace Mall.Model.Entity.TradePavilion
/// <summary>
/// 首店试验场 0-否,1-是
/// </summary>
public int FirstStoreTest { get; set; }
public int? FirstStoreTest { get; set; }
/// <summary>
......@@ -176,12 +176,12 @@ namespace Mall.Model.Entity.TradePavilion
/// <summary>
/// 去年业绩(单位:W)
/// </summary>
public decimal YeJi { get; set; }
public decimal? YeJi { get; set; }
/// <summary>
/// 店铺数量
/// </summary>
public int ShopNum { get; set; }
public int? ShopNum { get; set; }
/// <summary>
/// 可租赁面积
......@@ -191,7 +191,7 @@ namespace Mall.Model.Entity.TradePavilion
/// <summary>
/// 可租赁面积
/// </summary>
public decimal EndAreaRequirement { get; set; }
public decimal? EndAreaRequirement { get; set; }
/// <summary>
......@@ -202,7 +202,7 @@ namespace Mall.Model.Entity.TradePavilion
/// <summary>
/// 经营面积
/// </summary>
public decimal EndBuiltUpArea { get; set; }
public decimal? EndBuiltUpArea { get; set; }
/// <summary>
......@@ -224,12 +224,12 @@ namespace Mall.Model.Entity.TradePavilion
/// <summary>
/// 类型(1-载体,2-楼宇)
/// </summary>
public int BuildingCarrierType { get; set; }
public int? BuildingCarrierType { get; set; }
/// <summary>
/// 是否为成都载体(1-是)
/// </summary>
public int IsChengDu { get; set; }
public int? IsChengDu { get; set; }
/// <summary>
/// 资产权属
......
......@@ -167,20 +167,20 @@ namespace Mall.Module.TradePavilion
flag = newId > 0;
}
if (flag)
{
var oldCarrierMetroList = building_CarriermetroRepository.GetBuildingCarrierMetroListRepository(new RB_Building_Carriermetro_Extend { TenantId = extModel.TenantId, MallBaseId = extModel.MallBaseId, CarrierId = extModel.ID });
building_CarriermetroRepository.DeleteBatch(oldCarrierMetroList);
foreach (var item in extModel.BuildingCarriermetroList)
{
item.ID = 0;
item.Status = 0;
item.TenantId = extModel.TenantId;
item.MallBaseId = extModel.MallBaseId;
item.CarrierId = extModel.ID;
}
building_CarriermetroRepository.InsertBatch(extModel.BuildingCarriermetroList);
}
//if (flag)
//{
// var oldCarrierMetroList = building_CarriermetroRepository.GetBuildingCarrierMetroListRepository(new RB_Building_Carriermetro_Extend { TenantId = extModel.TenantId, MallBaseId = extModel.MallBaseId, CarrierId = extModel.ID });
// building_CarriermetroRepository.DeleteBatch(oldCarrierMetroList);
// foreach (var item in extModel.BuildingCarriermetroList)
// {
// item.ID = 0;
// item.Status = 0;
// item.TenantId = extModel.TenantId;
// item.MallBaseId = extModel.MallBaseId;
// item.CarrierId = extModel.ID;
// }
// building_CarriermetroRepository.InsertBatch(extModel.BuildingCarriermetroList);
//}
return flag;
}
......
......@@ -689,31 +689,33 @@ namespace Mall.Module.TradePavilion
inserCModel.BuiltUpArea = model.BuiltUpArea ?? 0;
inserCModel.AreaRequirement = model.AreaRequirement ?? 0;
if (model.OpenTime.HasValue)
{
if (model.OpenTime.Value <= System.DateTime.Now)
{
inserCModel.OpeningStatus = 1;
}
inserCModel.OpenTime = model.OpenTime.Value;
}
if (!string.IsNullOrWhiteSpace(model.StartingInfo))
{
inserCModel.FirstStoreTest = 1;
}
int Id = building_CarrierRepository.Insert(inserCModel);
if (Id > 0)
{
var mlist = MetroList.RefMapperToList<RB_CarrierEnterpriseMetroApplyFor_Extend>();
mlist.ForEach(x =>
{
x.ID = 0;
x.CarrierId = Id;
x.Status = 0;
x.TenantId = model.TenantId;
x.MallBaseId = model.MallBaseId;
});
carrierEnterpriseMetroApplyForRepository.InsertBatch(mlist);
}
//if (Id > 0)
//{
// var mlist = MetroList.RefMapperToList<RB_CarrierEnterpriseMetroApplyFor_Extend>();
// mlist.ForEach(x =>
// {
// x.ID = 0;
// x.CarrierId = Id;
// x.Status = 0;
// x.TenantId = model.TenantId;
// x.MallBaseId = model.MallBaseId;
// });
// carrierEnterpriseMetroApplyForRepository.InsertBatch(mlist);
//}
#endregion
}
}
......@@ -839,11 +841,14 @@ namespace Mall.Module.TradePavilion
}
else if (model.FirstShopType == 2)
{
var clist = building_CarrierRepository.GetBuildingCarrierListRepository(new RB_Building_Carrier_Extend() {OpeningStatus=-1,TenantId = model.TenantId, MallBaseId = model.MallBaseId, UserId = userId });;
var clist = building_CarrierRepository.GetBuildingCarrierListRepository(new RB_Building_Carrier_Extend() { OpeningStatus = -1, TenantId = model.TenantId, MallBaseId = model.MallBaseId, UserId = userId }); ;
if (clist.Any())
{
model.CarrierModel = clist.FirstOrDefault().RefMapperTo<RB_CarrierEnterpriseApplyFor_Extend>();
// model.CarrierModel.BuiltUpArea = clist.FirstOrDefault().BuiltUpArea;
model.CarrierModel.BuiltUpArea = clist.FirstOrDefault()?.BuiltUpArea;
model.CarrierModel.AreaRequirement = clist.FirstOrDefault()?.AreaRequirement;
model.CarrierModel.OpenTime = clist.FirstOrDefault()?.OpenTime;
// model.CarrierModel.BuiltUpArea = clist.FirstOrDefault().BuiltUpArea;
//var metroList = carrierEnterpriseMetroApplyForRepository.GetCarrierMetroList(new RB_CarrierEnterpriseMetroApplyFor_Extend { TenantId = model.TenantId, MallBaseId = model.MallBaseId, CarrierId = model.CarrierModel.ID });
//model.CarrierModel.CarrierMetroList = new List<RB_CarrierEnterpriseMetroApplyFor_Extend>();
//if (metroList != null && metroList.Any())
......@@ -865,9 +870,9 @@ namespace Mall.Module.TradePavilion
//审核通过了的 直接查询资料表
var blist = enterpriseServicesRepository.GetEnterpriseServicesListRepository(new RB_EnterpriseServices_Extend() { TenantId = model.TenantId, MallBaseId = model.MallBaseId, UserId = userId });
model.EnterpriseServicesModel = blist.FirstOrDefault().RefMapperTo<RB_EnterpriseServicesApply_Extend>();
model.EnterpriseServicesModel.ID = blist.FirstOrDefault().ServiceId;
if (model.EnterpriseServicesModel != null)
{
if (!string.IsNullOrWhiteSpace(model.EnterpriseServicesModel.Banner))
{
model.EnterpriseServicesModel.BannerList = JsonConvert.DeserializeObject<List<string>>(model.EnterpriseServicesModel.Banner);
......
......@@ -2894,7 +2894,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
x.LatAndLon,
x.Developers,
x.ProjectType,
ProjectTypeName = x.ProjectType.GetEnumName(),
// ProjectTypeName = x.ProjectType.GetEnumName(),
x.CarrierSize,
x.LayersNum,
x.CategoryName,
......@@ -2983,7 +2983,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
extModel.ManagementCompany,
extModel.BrandDemand,
extModel.HonorList,
OpenTime= StringHelper.FormatDate(extModel.OpenTime),
});
}
......@@ -3343,6 +3343,15 @@ namespace Mall.WebApi.Controllers.TradePavilion
{
var userInfo = AppletUserInfo;
RB_Building_Carrier_Extend query = JsonConvert.DeserializeObject<RB_Building_Carrier_Extend>(RequestParm.msg.ToString());
query.ProjectType = query?.ProjectType ?? 0;
query.IsChengDu = query?.IsChengDu ?? 0;
query.YeJi = query?.YeJi ?? 0;
query.EndAreaRequirement = query?.EndAreaRequirement ?? 0;
query.BuildingCarrierType = query?.BuildingCarrierType ?? 0;
query.FirstStoreTest = query?.FirstStoreTest ?? 0;
query.ShopNum = query?.ShopNum ?? 0;
query.EndBuiltUpArea = query?.EndBuiltUpArea ?? 0;
query.BuildingCarriermetroList = new List<RB_Building_Carriermetro_Extend>();
if (query.ID <= 0)
{
return ApiResult.ParamIsNull("请传递载体id");
......@@ -3419,7 +3428,9 @@ namespace Mall.WebApi.Controllers.TradePavilion
{
var userInfo = AppletUserInfo;
RB_EnterpriseServices_Extend query = JsonConvert.DeserializeObject<RB_EnterpriseServices_Extend>(RequestParm.msg.ToString());
JObject parms = JObject.Parse(RequestParm.msg.ToString());
int ID = parms.GetInt("ID");
query.ServiceId = ID;
if (query.ServiceId <= 0)
{
return ApiResult.ParamIsNull("请传递企业id");
......@@ -3447,7 +3458,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
query.UpdateDate = System.DateTime.Now;
query.CreateBy = userInfo.UserId;
var oldModel = buildingCarrierModule.GetBrandEnterpriseModule(query.ServiceId);
var oldModel = buildingCarrierModule.GetEnterpriseServicesInfoModule(query.ServiceId);
if (oldModel == null) { return ApiResult.Failed("企业信息不存在"); }
if (oldModel.UserId != userInfo.UserId) { return ApiResult.Failed("无法修改此企业信息"); }
......@@ -3614,7 +3625,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
{
ID = parms.GetInt("ID"),
Name = parms.GetStringValue("Name"),
Introduction = parms.GetStringValue("FullBIntroductionrandName"),
Introduction = parms.GetStringValue("Introduction"),
DevIntention = parms.GetStringValue("DevIntention"),
Address = parms.GetStringValue("Address"),
LatAndLon = parms.GetStringValue("LatAndLon"),
......
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