Commit 0915a9d1 authored by 黄奎's avatar 黄奎

11

parent 4935a06b
......@@ -5,6 +5,7 @@ using Mall.Common.Enum;
using Mall.Common.Plugin;
using Mall.Model.Entity.TradePavilion;
using Mall.Model.Extend.TradePavilion;
using Mall.Module.TradePavilion;
using Mall.Module.User;
using Mall.Repository.TradePavilion;
using Newtonsoft.Json;
......@@ -1320,11 +1321,13 @@ namespace Mall.Module.TradePavilion
{
fileds.Add(nameof(RB_CompanyEnterprise_Extend.RejectRemark), remark);
}
List<WhereHelper> wheres = new List<WhereHelper>() {
new WhereHelper(){
List<WhereHelper> wheres = new List<WhereHelper>()
{
new WhereHelper()
{
FiledName=nameof(RB_CompanyEnterprise_Extend.CompanyId),
FiledValue=CompanyId,
OperatorEnum=OperatorEnum.Equal
FiledValue=CompanyId,
OperatorEnum=OperatorEnum.Equal
}
};
bool flag = companyEnterpriseRepository.Update(fileds, wheres, trans);
......@@ -1334,71 +1337,48 @@ namespace Mall.Module.TradePavilion
if (Status == 1)
{
var cmodel = companyEnterpriseRepository.GetEntity(CompanyId);
//消费品牌
if (cmodel.FirstShopType == 1)
{
//品牌
var brandList = brandEnterpriseApplyForRepository.GetCarrierEnterpriseApplyForRepository(new RB_BrandEnterpriseApplyFor_Extend { MallBaseId = cmodel.MallBaseId, CompanyId = cmodel.CompanyId });
if (brandList != null && brandList.Any())
{
var BrandModel = brandList.FirstOrDefault();
var brandEnterpriseModel = new RB_Brand_Enterprise_Extend()
{
};
if (BrandModel.ExistBrandId > 0)
{
//修改
#region 验证品牌是否已关联用户
//var bmodel = brand2Repository.GetEntity(BrandModel.ExistBrandId);
//if (bmodel.UserId > 0)
//{
// companyEnterpriseRepository.DBSession.Rollback();
// return "该品牌已被其他用户认证,请核实后再试";
//}
#endregion
Dictionary<string, object> filedsBrand = new Dictionary<string, object>()
{
{ nameof(RB_Brand_Enterprise_Extend.BrandName),BrandModel.BrandName},
{ nameof(RB_Brand_Enterprise_Extend.FullBrandName),BrandModel.FullBrandName},
{ nameof(RB_Brand_Enterprise_Extend.VideoUrl),BrandModel.VideoUrl},
{ nameof(RB_Brand_Enterprise_Extend.Logo),BrandModel.Logo},
{ nameof(RB_Brand_Enterprise_Extend.Banner),BrandModel.Banner},
{ nameof(RB_Brand_Enterprise_Extend.ShopNum),BrandModel.ShopNum},
{ nameof(RB_Brand_Enterprise_Extend.BuiltUpArea),BrandModel.BuiltUpArea},
{ nameof(RB_Brand_Enterprise_Extend.EndBuiltUpArea),BrandModel.EndBuiltUpArea},
{ nameof(RB_Brand_Enterprise_Extend.BrandType),BrandModel.BrandType},
{ nameof(RB_Brand_Enterprise_Extend.CustomerType),BrandModel.CustomerType},
{ nameof(RB_Brand_Enterprise_Extend.AreaRequirement),BrandModel.AreaRequirement},
{ nameof(RB_Brand_Enterprise_Extend.EndAreaRequirement),BrandModel.EndAreaRequirement},
{ nameof(RB_Brand_Enterprise_Extend.CategoryId),BrandModel.BrandClassId},
{ nameof(RB_Brand_Enterprise_Extend.BrandEnterpriseType),BrandModel.BrandEnterpriseType},
{ nameof(RB_Brand_Enterprise_Extend.Introduce),BrandModel.Introduce},
{ nameof(RB_Brand_Enterprise_Extend.DevIntention),BrandModel.DevIntention},
{ nameof(RB_Brand_Enterprise_Extend.PropertyDemand),BrandModel.PropertyDemand},
{ nameof(RB_Brand_Enterprise_Extend.Cooperation),BrandModel.Cooperation},
{ nameof(RB_Brand_Enterprise_Extend.Complementary),BrandModel.Complementary},
{
{ nameof(RB_Brand_Enterprise_Extend.FullBrandName),BrandModel.FullBrandName},
{ nameof(RB_Brand_Enterprise_Extend.BrandName),BrandModel.BrandName},
{ nameof(RB_Brand_Enterprise_Extend.VideoUrl),BrandModel.VideoUrl},
{ nameof(RB_Brand_Enterprise_Extend.Logo),BrandModel.Logo},
{ nameof(RB_Brand_Enterprise_Extend.Banner),BrandModel.Banner},
{ nameof(RB_Brand_Enterprise_Extend.CategoryId),BrandModel.BrandClassId},
{ nameof(RB_Brand_Enterprise_Extend.Introduce),BrandModel.Introduce},
{ nameof(RB_Brand_Enterprise_Extend.ShopNum),BrandModel.ShopNum},
{ nameof(RB_Brand_Enterprise_Extend.AreaRequirement),BrandModel.ShopNum},
{ nameof(RB_Brand_Enterprise_Extend.CustomerType),BrandModel.CustomerType},
{ nameof(RB_Brand_Enterprise_Extend.BrandType),BrandModel.BrandType},
{ nameof(RB_Brand_Enterprise_Extend.Cooperation),BrandModel.Cooperation},
{ nameof(RB_Brand_Enterprise_Extend.PropertyDemand),BrandModel.PropertyDemand},
{ nameof(RB_Brand_Enterprise_Extend.Complementary),BrandModel.Complementary},
{ nameof(RB_Brand_Enterprise_Extend.ContactName),BrandModel.ContactName},
{ nameof(RB_Brand_Enterprise_Extend.ContactPhone),BrandModel.ContactPhone},
{ nameof(RB_Brand_Enterprise_Extend.BrandEnterpriseType),BrandModel.BrandEnterpriseType},
};
brand_EnterpriseRepository.Update(filedsBrand, new WhereHelper(nameof(RB_Brand_Enterprise_Extend.ID), BrandModel.ExistBrandId), trans);
}
else
{
//新增
#region 再次验证品牌名称
//if (ValidateBrandName(BrandModel.BrandName, cmodel.MallBaseId))
//{
// companyEnterpriseRepository.DBSession.Rollback();
// return "该品牌名称已存在,请确认品牌名称后再次审核";
//}
//if (ValidateFullBrandName(BrandModel.FullBrandName, cmodel.MallBaseId))
//{
// companyEnterpriseRepository.DBSession.Rollback();
// return "该品牌全名已存在,请确认品牌全名后再次审核";
//}
#endregion
#region 新增品牌
var inserBModel = BrandModel.RefMapperTo<RB_Brand_Enterprise_Extend>();
inserBModel.ID = 0;
inserBModel.CategoryId = BrandModel.BrandClassId;
inserBModel.UserId = cmodel.CreateBy;
brand_EnterpriseRepository.Insert(inserBModel, trans);
#endregion
}
}
}
......@@ -1409,59 +1389,87 @@ namespace Mall.Module.TradePavilion
if (carrierList != null && carrierList.Any())
{
var CarrierModel = carrierList.FirstOrDefault();
int OpeningStatus = 0;
if (CarrierModel.OpenTime.HasValue)
{
if (CarrierModel.OpenTime.Value <= System.DateTime.Now)
{
OpeningStatus = 1;
}
}
var buildingCarrierModel = new RB_Building_Carrier_Extend()
{
CarrierName = CarrierModel.CarrierName,
Logo = CarrierModel.Logo,
Banner = CarrierModel.Banner,
Address = CarrierModel.Address,
LatAndLon = CarrierModel.LatAndLon,
VideoUrl = CarrierModel.VideoUrl,
OpeningStatus = OpeningStatus,
CarrierSize = CarrierModel.CarrierSize,
LayersNum = CarrierModel.LayersNum,
CarNum = CarrierModel.CarNum,
BuiltUpArea = CarrierModel?.BuiltUpArea ?? 0,
AreaRequirement = CarrierModel?.AreaRequirement ?? 0,
VisitorsFlowrate = CarrierModel.VisitorsFlowrate,
SupportingFacilities = CarrierModel.SupportingFacilities,
ManagementCompany = CarrierModel.ManagementCompany,
Developers = CarrierModel.Developers,
CategoryId = CarrierModel.CategoryId,
Ascription = CarrierModel.Ascription,
CarrierPlan = CarrierModel.CarrierPlan,
BrandDemand = CarrierModel.BrandDemand,
Location = CarrierModel.Location,
ContactName = CarrierModel.ContactName,
ContactPhone = CarrierModel.ContactPhone,
BuildingCarrierType = CarrierModel.BuildingCarrierType,
UpdateBy = CarrierModel.UpdateBy,
UpdateDate = CarrierModel.UpdateDate,
TenantId = CarrierModel.TenantId,
MallBaseId = CarrierModel.MallBaseId,
};
if (!string.IsNullOrEmpty(Common.ConvertHelper.FormatDate(CarrierModel?.OpenTime)))
{
buildingCarrierModel.OpenTime = Convert.ToDateTime(CarrierModel.OpenTime);
}
var MetroList = carrierEnterpriseMetroApplyForRepository.GetCarrierMetroList(new RB_CarrierEnterpriseMetroApplyFor_Extend { MallBaseId = cmodel.MallBaseId, CarrierId = CarrierModel.ID });
if (CarrierModel.ExistCarrierId > 0)
{
//修改
#region 验证品牌是否已关联用户
var carrmodel = building_CarrierRepository.GetEntity(CarrierModel.ExistCarrierId);
//if (carrmodel.UserId > 0)
//{
// companyEnterpriseRepository.DBSession.Rollback();
// return "该载体已被其他用户认证,请核实后再试";
//}
#endregion
#region 修改载体
int FirstStoreTest = 0;
if (!string.IsNullOrWhiteSpace(CarrierModel.StartingInfo))
{
FirstStoreTest = 1;
}
int OpeningStatus = 0;
if (CarrierModel.OpenTime.HasValue)
{
if (CarrierModel.OpenTime.Value <= System.DateTime.Now)
{
OpeningStatus = 1;
}
}
Dictionary<string, object> filedsCarrier = new Dictionary<string, object>()
{
{nameof(RB_Building_Carrier_Extend.CarrierName),CarrierModel.CarrierName },
{nameof(RB_Building_Carrier_Extend.Logo),CarrierModel.Logo },
{nameof(RB_Building_Carrier_Extend.Banner),CarrierModel.Banner },
{nameof(RB_Building_Carrier_Extend.Honor),CarrierModel.Honor },
{nameof(RB_Building_Carrier_Extend.Developers),CarrierModel.Developers },
{nameof(RB_Building_Carrier_Extend.OpeningStatus),OpeningStatus },
{nameof(RB_Building_Carrier_Extend.VideoUrl),CarrierModel.VideoUrl },
{nameof(RB_Building_Carrier_Extend.Address),CarrierModel.Address },
{nameof(RB_Building_Carrier_Extend.LatAndLon),CarrierModel.LatAndLon },
{nameof(RB_Building_Carrier_Extend.OpenTime),CarrierModel.OpenTime },
{nameof(RB_Building_Carrier_Extend.BuildingCarrierType),CarrierModel.BuildingCarrierType },
{nameof(RB_Building_Carrier_Extend.CategoryId),CarrierModel.CategoryId },
{nameof(RB_Building_Carrier_Extend.Ascription),CarrierModel.Ascription },
{nameof(RB_Building_Carrier_Extend.CarrierSize),CarrierModel.CarrierSize },
{nameof(RB_Building_Carrier_Extend.PropertyComposition),CarrierModel.PropertyComposition },
{nameof(RB_Building_Carrier_Extend.Location),CarrierModel.Location },
{nameof(RB_Building_Carrier_Extend.Crowd),CarrierModel.Crowd },
{nameof(RB_Building_Carrier_Extend.VisitorsFlowrate),CarrierModel.VisitorsFlowrate },
{nameof(RB_Building_Carrier_Extend.LayersNum),CarrierModel.LayersNum },
{nameof(RB_Building_Carrier_Extend.SupportingFacilities),CarrierModel.SupportingFacilities },
{nameof(RB_Building_Carrier_Extend.ManagementCompany),CarrierModel.ManagementCompany },
{nameof(RB_Building_Carrier_Extend.BrandDemand),CarrierModel.BrandDemand },
{nameof(RB_Building_Carrier_Extend.UpdateBy),CarrierModel.UpdateBy },
{nameof(RB_Building_Carrier_Extend.UpdateDate),CarrierModel.UpdateDate },
{nameof(RB_Building_Carrier_Extend.CarrierName),buildingCarrierModel.CarrierName },
{nameof(RB_Building_Carrier_Extend.Logo),buildingCarrierModel.Logo },
{nameof(RB_Building_Carrier_Extend.Banner),buildingCarrierModel.Banner },
{nameof(RB_Building_Carrier_Extend.Address),buildingCarrierModel.Address },
{nameof(RB_Building_Carrier_Extend.LatAndLon),buildingCarrierModel.LatAndLon },
{nameof(RB_Building_Carrier_Extend.VideoUrl),buildingCarrierModel.VideoUrl },
{nameof(RB_Building_Carrier_Extend.OpeningStatus),buildingCarrierModel },
{nameof(RB_Building_Carrier_Extend.CarrierSize),buildingCarrierModel.CarrierSize },
{nameof(RB_Building_Carrier_Extend.LayersNum),buildingCarrierModel.LayersNum },
{nameof(RB_Building_Carrier_Extend.CarNum),buildingCarrierModel.CarNum },
{nameof(RB_Building_Carrier_Extend.BuiltUpArea),buildingCarrierModel.BuiltUpArea},
{nameof(RB_Building_Carrier_Extend.AreaRequirement),buildingCarrierModel.AreaRequirement},
{nameof(RB_Building_Carrier_Extend.OpenTime),buildingCarrierModel.OpenTime },
{nameof(RB_Building_Carrier_Extend.VisitorsFlowrate),buildingCarrierModel.VisitorsFlowrate },
{nameof(RB_Building_Carrier_Extend.SupportingFacilities),buildingCarrierModel.SupportingFacilities },
{nameof(RB_Building_Carrier_Extend.ManagementCompany),buildingCarrierModel.ManagementCompany },
{nameof(RB_Building_Carrier_Extend.Developers),buildingCarrierModel.Developers },
{nameof(RB_Building_Carrier_Extend.CategoryId),buildingCarrierModel.CategoryId },
{nameof(RB_Building_Carrier_Extend.Ascription),buildingCarrierModel.Ascription },
{nameof(RB_Building_Carrier_Extend.CarrierPlan),buildingCarrierModel.CarrierPlan },
{nameof(RB_Building_Carrier_Extend.BrandDemand),buildingCarrierModel.BrandDemand },
{nameof(RB_Building_Carrier_Extend.Location),buildingCarrierModel.Location },
{nameof(RB_Building_Carrier_Extend.ContactName),buildingCarrierModel.ContactName },
{nameof(RB_Building_Carrier_Extend.ContactPhone),buildingCarrierModel.ContactPhone },
{nameof(RB_Building_Carrier_Extend.BuildingCarrierType),buildingCarrierModel.BuildingCarrierType },
{nameof(RB_Building_Carrier_Extend.UpdateBy),buildingCarrierModel.UpdateBy },
{nameof(RB_Building_Carrier_Extend.UpdateDate),buildingCarrierModel.UpdateDate },
};
flag = building_CarrierRepository.Update(filedsCarrier, new WhereHelper(nameof(RB_Building_Carrier_Extend.ID), carrmodel.ID), trans);
if (flag)
......@@ -1483,29 +1491,15 @@ namespace Mall.Module.TradePavilion
}
else
{
//新增
#region 再次验证载体名称
//if (ValidateCarrierName(CarrierModel.CarrierName, CarrierModel.MallBaseId))
//{
// return "该载体名称已存在,请确认载体名称后再次审核";
//}
#endregion
#region 新增载体
var inserCModel = CarrierModel.RefMapperTo<RB_Building_Carrier_Extend>();
inserCModel.ID = 0;
inserCModel.UserId = cmodel.CreateBy;
if (CarrierModel.OpenTime.HasValue)
{
if (CarrierModel.OpenTime.Value <= System.DateTime.Now)
{
inserCModel.OpeningStatus = 1;
}
}
buildingCarrierModel.ID = 0;
buildingCarrierModel.UserId = cmodel.CreateBy;
if (!string.IsNullOrWhiteSpace(CarrierModel.StartingInfo))
{
inserCModel.FirstStoreTest = 1;
buildingCarrierModel.FirstStoreTest = 1;
}
int Id = building_CarrierRepository.Insert(inserCModel, trans);
int Id = building_CarrierRepository.Insert(buildingCarrierModel, trans);
if (Id > 0)
{
var mlist = MetroList.RefMapperToList<RB_CarrierEnterpriseMetroApplyFor_Extend>();
......@@ -1523,143 +1517,93 @@ namespace Mall.Module.TradePavilion
}
}
}
//企业服务
else if (cmodel.FirstShopType == 3)
{
//企业服务
var brandList = enterpriseServicesApplyRepository.GetEnterpriseServicesApplyRepository(new RB_EnterpriseServicesApply_Extend { MallBaseId = cmodel.MallBaseId, CompanyId = cmodel.CompanyId });
if (brandList != null && brandList.Any())
var enterpriseServicesList = enterpriseServicesApplyRepository.GetEnterpriseServicesApplyRepository(new RB_EnterpriseServicesApply_Extend { MallBaseId = cmodel.MallBaseId, CompanyId = cmodel.CompanyId });
if (enterpriseServicesList != null && enterpriseServicesList.Any())
{
var BrandModel = brandList.FirstOrDefault();
if (BrandModel.ExistServiceId > 0)
var enterpriseModel = enterpriseServicesList.FirstOrDefault();
if (enterpriseModel.ExistServiceId > 0)
{
//修改
#region 验证品牌是否已关联用户
//var bmodel = brand2Repository.GetEntity(BrandModel.ExistBrandId);
//if (bmodel.UserId > 0)
//{
// companyEnterpriseRepository.DBSession.Rollback();
// return "该品牌已被其他用户认证,请核实后再试";
//}
#endregion
Dictionary<string, object> filedsBrand = new Dictionary<string, object>()
{
{ nameof(RB_EnterpriseServices_Extend.Name),BrandModel.Name},
{ nameof(RB_EnterpriseServices_Extend.Banner),BrandModel.Banner},
{ nameof(RB_EnterpriseServices_Extend.Introduction),BrandModel.Introduction},
{ nameof(RB_EnterpriseServices_Extend.DevIntention),BrandModel.DevIntention},
{ nameof(RB_EnterpriseServices_Extend.Address),BrandModel.Address},
{ nameof(RB_EnterpriseServices_Extend.LatAndLon),BrandModel.LatAndLon},
{ nameof(RB_EnterpriseServices_Extend.OperationTime),BrandModel.OperationTime},
{ nameof(RB_EnterpriseServices_Extend.CategoryId),BrandModel.CategoryId},
{ nameof(RB_EnterpriseServices_Extend.Renovation),BrandModel.Renovation},
{ nameof(RB_EnterpriseServices_Extend.Payment),BrandModel.Payment},
{ nameof(RB_EnterpriseServices_Extend.HandoverDate),BrandModel.HandoverDate},
{ nameof(RB_EnterpriseServices_Extend.IntentionalFloor),BrandModel.IntentionalFloor},
{ nameof(RB_EnterpriseServices_Extend.ElevatorNum),BrandModel.ElevatorNum},
{ nameof(RB_EnterpriseServices_Extend.PropertyFee),BrandModel.PropertyFee},
{ nameof(RB_EnterpriseServices_Extend.RentFee),BrandModel.RentFee},
{ nameof(RB_EnterpriseServices_Extend.ContactName),BrandModel.ContactName},
{ nameof(RB_EnterpriseServices_Extend.ContactPhone),BrandModel.ContactPhone},
{ nameof(RB_EnterpriseServices_Extend.UpdateBy),BrandModel.UpdateBy},
{ nameof(RB_EnterpriseServices_Extend.UpdateDate),BrandModel.UpdateDate},
{
{ nameof(RB_EnterpriseServices_Extend.Name),enterpriseModel.Name},
{ nameof(RB_EnterpriseServices_Extend.Banner),enterpriseModel.Banner},
{ nameof(RB_EnterpriseServices_Extend.Introduction),enterpriseModel.Introduction},
{ nameof(RB_EnterpriseServices_Extend.DevIntention),enterpriseModel.DevIntention},
{ nameof(RB_EnterpriseServices_Extend.Address),enterpriseModel.Address},
{ nameof(RB_EnterpriseServices_Extend.LatAndLon),enterpriseModel.LatAndLon},
{ nameof(RB_EnterpriseServices_Extend.OperationTime),enterpriseModel.OperationTime},
{ nameof(RB_EnterpriseServices_Extend.CategoryId),enterpriseModel.CategoryId},
{ nameof(RB_EnterpriseServices_Extend.Renovation),enterpriseModel.Renovation},
{ nameof(RB_EnterpriseServices_Extend.Payment),enterpriseModel.Payment},
{ nameof(RB_EnterpriseServices_Extend.HandoverDate),enterpriseModel.HandoverDate},
{ nameof(RB_EnterpriseServices_Extend.IntentionalFloor),enterpriseModel.IntentionalFloor},
{ nameof(RB_EnterpriseServices_Extend.ElevatorNum),enterpriseModel.ElevatorNum},
{ nameof(RB_EnterpriseServices_Extend.PropertyFee),enterpriseModel.PropertyFee},
{ nameof(RB_EnterpriseServices_Extend.RentFee),enterpriseModel.RentFee},
{ nameof(RB_EnterpriseServices_Extend.ContactName),enterpriseModel.ContactName},
{ nameof(RB_EnterpriseServices_Extend.ContactPhone),enterpriseModel.ContactPhone},
{ nameof(RB_EnterpriseServices_Extend.UpdateBy),enterpriseModel.UpdateBy},
{ nameof(RB_EnterpriseServices_Extend.UpdateDate),enterpriseModel.UpdateDate},
};
enterpriseServicesRepository.Update(filedsBrand, new WhereHelper(nameof(RB_EnterpriseServices_Extend.ServiceId), BrandModel.ExistServiceId), trans);
enterpriseServicesRepository.Update(filedsBrand, new WhereHelper(nameof(RB_EnterpriseServices_Extend.ServiceId), enterpriseModel.ExistServiceId), trans);
}
else
{
//新增
#region 再次验证品牌名称
//if (ValidateBrandName(BrandModel.BrandName, cmodel.MallBaseId))
//{
// companyEnterpriseRepository.DBSession.Rollback();
// return "该品牌名称已存在,请确认品牌名称后再次审核";
//}
//if (ValidateFullBrandName(BrandModel.FullBrandName, cmodel.MallBaseId))
//{
// companyEnterpriseRepository.DBSession.Rollback();
// return "该品牌全名已存在,请确认品牌全名后再次审核";
//}
#endregion
#region 新增品牌
var inserBModel = BrandModel.RefMapperTo<RB_EnterpriseServices_Extend>();
var inserBModel = enterpriseModel.RefMapperTo<RB_EnterpriseServices_Extend>();
inserBModel.ServiceId = 0;
inserBModel.UserId = cmodel.CreateBy;
enterpriseServicesRepository.Insert(inserBModel, trans);
#endregion
}
}
}
//楼宇
else if (cmodel.FirstShopType == 4)
{
//企业服务
var brandList = buildingApplyForRepository.GetBuildingRepository(new RB_BuildingApplyFor_Extend { MallBaseId = cmodel.MallBaseId, CompanyId = cmodel.CompanyId });
if (brandList != null && brandList.Any())
var buildingList = buildingApplyForRepository.GetBuildingRepository(new RB_BuildingApplyFor_Extend { MallBaseId = cmodel.MallBaseId, CompanyId = cmodel.CompanyId });
if (buildingList != null && buildingList.Any())
{
var BrandModel = brandList.FirstOrDefault();
if (BrandModel.ExistBuildId > 0)
var buildingModel = buildingList.FirstOrDefault();
if (buildingModel.ExistBuildId > 0)
{
//修改
#region 验证品牌是否已关联用户
//var bmodel = brand2Repository.GetEntity(BrandModel.ExistBrandId);
//if (bmodel.UserId > 0)
//{
// companyEnterpriseRepository.DBSession.Rollback();
// return "该品牌已被其他用户认证,请核实后再试";
//}
#endregion
Dictionary<string, object> filedsBrand = new Dictionary<string, object>()
{
{ nameof(RB_Building_Extend.Name),BrandModel.Name},
{ nameof(RB_Building_Extend.Banner),BrandModel.Banner},
{ nameof(RB_Building_Extend.Address),BrandModel.Address},
{ nameof(RB_Building_Extend.LatAndLon),BrandModel.LatAndLon},
{ nameof(RB_Building_Extend.OperationTime),BrandModel.OperationTime},
{ nameof(RB_Building_Extend.CategoryId),BrandModel.CategoryId},
{ nameof(RB_Building_Extend.Areas),BrandModel.Areas},
{ nameof(RB_Building_Extend.BuildingNum),BrandModel.BuildingNum},
{ nameof(RB_Building_Extend.FloorNum),BrandModel.FloorNum},
{ nameof(RB_Building_Extend.ElevatorNum),BrandModel.ElevatorNum},
{ nameof(RB_Building_Extend.FloorHeight),BrandModel.FloorHeight},
{ nameof(RB_Building_Extend.Developers),BrandModel.Developers},
{ nameof(RB_Building_Extend.PropertyComp),BrandModel.PropertyComp},
{ nameof(RB_Building_Extend.SaleOrSelf),BrandModel.SaleOrSelf},
{ nameof(RB_Building_Extend.IsAllOperate),BrandModel.IsAllOperate},
{ nameof(RB_Building_Extend.ConstructionTime),BrandModel.ConstructionTime},
{ nameof(RB_Building_Extend.PropertyFee),BrandModel.PropertyFee},
{ nameof(RB_Building_Extend.RentFee),BrandModel.RentFee},
{ nameof(RB_Building_Extend.IndustryDirection),BrandModel.IndustryDirection},
{ nameof(RB_Building_Extend.BrandDemand),BrandModel.BrandDemand},
{ nameof(RB_Building_Extend.Other),BrandModel.Other},
{ nameof(RB_Building_Extend.ContactName),BrandModel.ContactName},
{ nameof(RB_Building_Extend.ContactPhone),BrandModel.ContactPhone},
{ nameof(RB_Building_Extend.UpdateBy),BrandModel.UpdateBy},
{ nameof(RB_Building_Extend.UpdateDate),BrandModel.UpdateDate},
{
{ nameof(RB_Building_Extend.Name),buildingModel.Name},
{ nameof(RB_Building_Extend.Banner),buildingModel.Banner},
{ nameof(RB_Building_Extend.Address),buildingModel.Address},
{ nameof(RB_Building_Extend.LatAndLon),buildingModel.LatAndLon},
{ nameof(RB_Building_Extend.OperationTime),buildingModel.OperationTime},
{ nameof(RB_Building_Extend.CategoryId),buildingModel.CategoryId},
{ nameof(RB_Building_Extend.Areas),buildingModel.Areas},
{ nameof(RB_Building_Extend.BuildingNum),buildingModel.BuildingNum},
{ nameof(RB_Building_Extend.FloorNum),buildingModel.FloorNum},
{ nameof(RB_Building_Extend.ElevatorNum),buildingModel.ElevatorNum},
{ nameof(RB_Building_Extend.FloorHeight),buildingModel.FloorHeight},
{ nameof(RB_Building_Extend.Developers),buildingModel.Developers},
{ nameof(RB_Building_Extend.PropertyComp),buildingModel.PropertyComp},
{ nameof(RB_Building_Extend.SaleOrSelf),buildingModel.SaleOrSelf},
{ nameof(RB_Building_Extend.IsAllOperate),buildingModel.IsAllOperate},
{ nameof(RB_Building_Extend.ConstructionTime),buildingModel.ConstructionTime},
{ nameof(RB_Building_Extend.PropertyFee),buildingModel.PropertyFee},
{ nameof(RB_Building_Extend.RentFee),buildingModel.RentFee},
{ nameof(RB_Building_Extend.IndustryDirection),buildingModel.IndustryDirection},
{ nameof(RB_Building_Extend.BrandDemand),buildingModel.BrandDemand},
{ nameof(RB_Building_Extend.Other),buildingModel.Other},
{ nameof(RB_Building_Extend.ContactName),buildingModel.ContactName},
{ nameof(RB_Building_Extend.ContactPhone),buildingModel.ContactPhone},
{ nameof(RB_Building_Extend.UpdateBy),buildingModel.UpdateBy},
{ nameof(RB_Building_Extend.UpdateDate),buildingModel.UpdateDate},
};
buildingRepository.Update(filedsBrand, new WhereHelper(nameof(RB_Building_Extend.BuildId), BrandModel.ExistBuildId), trans);
buildingRepository.Update(filedsBrand, new WhereHelper(nameof(RB_Building_Extend.BuildId), buildingModel.ExistBuildId), trans);
}
else
{
//新增
#region 再次验证品牌名称
//if (ValidateBrandName(BrandModel.BrandName, cmodel.MallBaseId))
//{
// companyEnterpriseRepository.DBSession.Rollback();
// return "该品牌名称已存在,请确认品牌名称后再次审核";
//}
//if (ValidateFullBrandName(BrandModel.FullBrandName, cmodel.MallBaseId))
//{
// companyEnterpriseRepository.DBSession.Rollback();
// return "该品牌全名已存在,请确认品牌全名后再次审核";
//}
#endregion
#region 新增品牌
var inserBModel = BrandModel.RefMapperTo<RB_Building_Extend>();
var inserBModel = buildingModel.RefMapperTo<RB_Building_Extend>();
inserBModel.BuildId = 0;
inserBModel.UserId = cmodel.CreateBy;
buildingRepository.Insert(inserBModel, trans);
#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