Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mall.oytour.com
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
mall.oytour.com
Commits
f3af23ef
Commit
f3af23ef
authored
Dec 11, 2024
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
4b801e40
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
1552 additions
and
6 deletions
+1552
-6
RB_Building.cs
Mall.Model/Entity/TradePavilion/RB_Building.cs
+5
-0
RB_BuildingApplyFor.cs
Mall.Model/Entity/TradePavilion/RB_BuildingApplyFor.cs
+180
-0
RB_EnterpriseServices.cs
Mall.Model/Entity/TradePavilion/RB_EnterpriseServices.cs
+5
-0
RB_EnterpriseServicesApply.cs
....Model/Entity/TradePavilion/RB_EnterpriseServicesApply.cs
+149
-0
RB_BuildingApplyFor_Extend.cs
....Model/Extend/TradePavilion/RB_BuildingApplyFor_Extend.cs
+34
-0
RB_CompanyEnterprise_Extend.cs
...Model/Extend/TradePavilion/RB_CompanyEnterprise_Extend.cs
+11
-0
RB_EnterpriseServicesApply_Extend.cs
...Extend/TradePavilion/RB_EnterpriseServicesApply_Extend.cs
+37
-0
BuildingCarrierModule_V2.cs
Mall.Module.TradePavilion/BuildingCarrierModule_V2.cs
+490
-5
RB_BrandEnterpriseApplyForRepository.cs
...ory/TradePavilion/RB_BrandEnterpriseApplyForRepository.cs
+4
-0
RB_BuildingApplyForRepository.cs
...Repository/TradePavilion/RB_BuildingApplyForRepository.cs
+119
-0
RB_BuildingRepository.cs
Mall.Repository/TradePavilion/RB_BuildingRepository.cs
+52
-0
RB_Building_CarrierRepository.cs
...Repository/TradePavilion/RB_Building_CarrierRepository.cs
+5
-0
RB_EnterpriseServicesApplyRepository.cs
...ory/TradePavilion/RB_EnterpriseServicesApplyRepository.cs
+129
-0
RB_EnterpriseServicesRepository.cs
...pository/TradePavilion/RB_EnterpriseServicesRepository.cs
+45
-0
AppletTradeController.cs
...WebApi/Controllers/TradePavilion/AppletTradeController.cs
+287
-1
No files found.
Mall.Model/Entity/TradePavilion/RB_Building.cs
View file @
f3af23ef
...
@@ -165,5 +165,10 @@ namespace Mall.Model.Entity.TradePavilion
...
@@ -165,5 +165,10 @@ namespace Mall.Model.Entity.TradePavilion
/// 删除状态
/// 删除状态
/// </summary>
/// </summary>
public
DateStateEnum
Status
{
get
;
set
;
}
public
DateStateEnum
Status
{
get
;
set
;
}
/// <summary>
/// 小程序对应的员工id
/// </summary>
public
int
UserId
{
get
;
set
;
}
}
}
}
}
Mall.Model/Entity/TradePavilion/RB_BuildingApplyFor.cs
0 → 100644
View file @
f3af23ef
using
Mall.Common.Enum
;
using
System
;
using
VT.FW.DB
;
namespace
Mall.Model.Entity.TradePavilion
{
/// <summary>
/// 活力楼宇入住实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_BuildingApplyFor
{
/// <summary>
/// 楼宇主键Id
/// </summary>
public
int
ID
{
get
;
set
;
}
/// <summary>
/// 楼宇名称
/// </summary>
public
string
Name
{
get
;
set
;
}
/// <summary>
/// 楼宇图片
/// </summary>
public
string
Banner
{
get
;
set
;
}
/// <summary>
/// 楼宇位置
/// </summary>
public
string
Address
{
get
;
set
;
}
/// <summary>
/// 经纬度
/// </summary>
public
string
LatAndLon
{
get
;
set
;
}
/// <summary>
/// 投运时间
/// </summary>
public
string
OperationTime
{
get
;
set
;
}
/// <summary>
/// 楼宇等级
/// </summary>
public
int
CategoryId
{
get
;
set
;
}
/// <summary>
/// 面积
/// </summary>
public
string
Areas
{
get
;
set
;
}
/// <summary>
/// 楼栋数
/// </summary>
public
string
BuildingNum
{
get
;
set
;
}
/// <summary>
/// 楼层数
/// </summary>
public
int
FloorNum
{
get
;
set
;
}
/// <summary>
/// 电梯数
/// </summary>
public
int
ElevatorNum
{
get
;
set
;
}
/// <summary>
/// 层高
/// </summary>
public
decimal
FloorHeight
{
get
;
set
;
}
/// <summary>
/// 开发商
/// </summary>
public
string
Developers
{
get
;
set
;
}
/// <summary>
/// 物业公司
/// </summary>
public
string
PropertyComp
{
get
;
set
;
}
/// <summary>
/// 销售自持比例
/// </summary>
public
string
SaleOrSelf
{
get
;
set
;
}
/// <summary>
/// 是否统一运营(1-是,0-否)
/// </summary>
public
int
IsAllOperate
{
get
;
set
;
}
/// <summary>
/// 建设时间
/// </summary>
public
string
ConstructionTime
{
get
;
set
;
}
/// <summary>
/// 物业费(元/㎡)
/// </summary>
public
decimal
PropertyFee
{
get
;
set
;
}
/// <summary>
/// 月租金(元/㎡)
/// </summary>
public
decimal
RentFee
{
get
;
set
;
}
/// <summary>
/// 产业方向
/// </summary>
public
string
IndustryDirection
{
get
;
set
;
}
/// <summary>
/// 目标企业招引需求
/// </summary>
public
string
BrandDemand
{
get
;
set
;
}
/// <summary>
/// 其他需求
/// </summary>
public
string
Other
{
get
;
set
;
}
/// <summary>
/// 联系人
/// </summary>
public
string
ContactName
{
get
;
set
;
}
/// <summary>
/// 联系电话
/// </summary>
public
string
ContactPhone
{
get
;
set
;
}
/// <summary>
/// 商户号id
/// </summary>
public
int
TenantId
{
get
;
set
;
}
/// <summary>
/// 小程序id
/// </summary>
public
int
MallBaseId
{
get
;
set
;
}
/// <summary>
/// 创建人
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
CreateDate
{
get
;
set
;
}
/// <summary>
/// 修改人
/// </summary>
public
int
UpdateBy
{
get
;
set
;
}
/// <summary>
/// 修改时间
/// </summary>
public
DateTime
UpdateDate
{
get
;
set
;
}
/// <summary>
/// 删除状态
/// </summary>
public
DateStateEnum
Status
{
get
;
set
;
}
/// <summary>
/// 认证id
/// </summary>
public
int
CompanyId
{
get
;
set
;
}
/// <summary>
/// 现有楼宇id
/// </summary>
public
int
ExistBuildId
{
get
;
set
;
}
}
}
Mall.Model/Entity/TradePavilion/RB_EnterpriseServices.cs
View file @
f3af23ef
...
@@ -126,6 +126,11 @@ namespace Mall.Model.Entity.TradePavilion
...
@@ -126,6 +126,11 @@ namespace Mall.Model.Entity.TradePavilion
/// </summary>
/// </summary>
public
int
UpdateBy
{
get
;
set
;
}
public
int
UpdateBy
{
get
;
set
;
}
/// <summary>
/// 小程序用户id
/// </summary>
public
int
UserId
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 修改时间
/// 修改时间
/// </summary>
/// </summary>
...
...
Mall.Model/Entity/TradePavilion/RB_EnterpriseServicesApply.cs
0 → 100644
View file @
f3af23ef
using
Mall.Common.Enum
;
using
System
;
using
VT.FW.DB
;
namespace
Mall.Model.Entity.TradePavilion
{
/// <summary>
/// 【商载通】企业服务入住实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_EnterpriseServicesApply
{
/// <summary>
/// 企业服务主键Id
/// </summary>
public
int
ID
{
get
;
set
;
}
/// <summary>
/// 企业名称
/// </summary>
public
string
Name
{
get
;
set
;
}
/// <summary>
/// 企业图片
/// </summary>
public
string
Banner
{
get
;
set
;
}
/// <summary>
/// 企业简介
/// </summary>
public
string
Introduction
{
get
;
set
;
}
/// <summary>
/// 企业发展意向
/// </summary>
public
string
DevIntention
{
get
;
set
;
}
/// <summary>
/// 楼宇位置
/// </summary>
public
string
Address
{
get
;
set
;
}
/// <summary>
/// 经纬度
/// </summary>
public
string
LatAndLon
{
get
;
set
;
}
/// <summary>
/// 投运时间
/// </summary>
public
string
OperationTime
{
get
;
set
;
}
/// <summary>
/// 楼宇等级
/// </summary>
public
int
CategoryId
{
get
;
set
;
}
/// <summary>
/// 楼宇装修
/// </summary>
public
string
Renovation
{
get
;
set
;
}
/// <summary>
/// 支付方式
/// </summary>
public
string
Payment
{
get
;
set
;
}
/// <summary>
/// 交房日期
/// </summary>
public
string
HandoverDate
{
get
;
set
;
}
/// <summary>
/// 意向楼层
/// </summary>
public
int
IntentionalFloor
{
get
;
set
;
}
/// <summary>
/// 电梯数
/// </summary>
public
int
ElevatorNum
{
get
;
set
;
}
/// <summary>
/// 物业费(元/㎡)
/// </summary>
public
decimal
PropertyFee
{
get
;
set
;
}
/// <summary>
/// 月租金(元/㎡)
/// </summary>
public
decimal
RentFee
{
get
;
set
;
}
/// <summary>
/// 联系人
/// </summary>
public
string
ContactName
{
get
;
set
;
}
/// <summary>
/// 联系电话
/// </summary>
public
string
ContactPhone
{
get
;
set
;
}
/// <summary>
/// 商户号id
/// </summary>
public
int
TenantId
{
get
;
set
;
}
/// <summary>
/// 小程序id
/// </summary>
public
int
MallBaseId
{
get
;
set
;
}
/// <summary>
/// 创建人
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
CreateDate
{
get
;
set
;
}
/// <summary>
/// 修改人
/// </summary>
public
int
UpdateBy
{
get
;
set
;
}
/// <summary>
/// 修改时间
/// </summary>
public
DateTime
UpdateDate
{
get
;
set
;
}
/// <summary>
/// 删除状态
/// </summary>
public
DateStateEnum
Status
{
get
;
set
;
}
/// <summary>
/// 认证id
/// </summary>
public
int
CompanyId
{
get
;
set
;
}
/// <summary>
/// 现有企业服务id
/// </summary>
public
int
ExistServiceId
{
get
;
set
;
}
}
}
Mall.Model/Extend/TradePavilion/RB_BuildingApplyFor_Extend.cs
0 → 100644
View file @
f3af23ef
using
Mall.Model.Entity.TradePavilion
;
using
System
;
using
System.Collections.Generic
;
using
VT.FW.DB
;
namespace
Mall.Model.Extend.TradePavilion
{
/// <summary>
/// 活力楼宇入住扩展实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_BuildingApplyFor_Extend
:
RB_BuildingApplyFor
{
/// <summary>
/// 分类名称
/// </summary>
public
string
CategoryName
{
get
;
set
;
}
/// <summary>
/// 时间
/// </summary>
public
string
StartTime
{
get
;
set
;
}
/// <summary>
/// 轮播图
/// </summary>
public
List
<
string
>
BannerList
{
get
;
set
;
}
/// <summary>
/// 时间
/// </summary>
public
string
EndTime
{
get
;
set
;
}
}
}
Mall.Model/Extend/TradePavilion/RB_CompanyEnterprise_Extend.cs
View file @
f3af23ef
...
@@ -20,6 +20,17 @@ namespace Mall.Model.Extend.TradePavilion
...
@@ -20,6 +20,17 @@ namespace Mall.Model.Extend.TradePavilion
/// </summary>
/// </summary>
public
RB_CarrierEnterpriseApplyFor_Extend
CarrierModel
{
get
;
set
;
}
public
RB_CarrierEnterpriseApplyFor_Extend
CarrierModel
{
get
;
set
;
}
/// <summary>
/// 企业服务
/// </summary>
public
RB_EnterpriseServicesApply_Extend
EnterpriseServicesModel
{
get
;
set
;
}
/// <summary>
/// 楼宇
/// </summary>
public
RB_BuildingApplyFor_Extend
buildingApplyForModel
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 用户名称
/// 用户名称
/// </summary>
/// </summary>
...
...
Mall.Model/Extend/TradePavilion/RB_EnterpriseServicesApply_Extend.cs
0 → 100644
View file @
f3af23ef
using
Mall.Model.Entity.TradePavilion
;
using
NPOI.OpenXmlFormats.Spreadsheet
;
using
NPOI.SS.Formula.Functions
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
VT.FW.DB
;
namespace
Mall.Model.Extend.TradePavilion
{
/// <summary>
/// 【商载通】企业服务入住扩展类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_EnterpriseServicesApply_Extend
:
RB_EnterpriseServicesApply
{
/// <summary>
/// 分类名称
/// </summary>
public
string
CategoryName
{
get
;
set
;
}
/// <summary>
/// 时间
/// </summary>
public
string
StartTime
{
get
;
set
;
}
/// <summary>
/// 轮播图
/// </summary>
public
List
<
string
>
BannerList
{
get
;
set
;
}
/// <summary>
/// 时间
/// </summary>
public
string
EndTime
{
get
;
set
;
}
}
}
Mall.Module.TradePavilion/BuildingCarrierModule_V2.cs
View file @
f3af23ef
...
@@ -3,6 +3,7 @@ using Mall.CacheManager.DataStatistic;
...
@@ -3,6 +3,7 @@ using Mall.CacheManager.DataStatistic;
using
Mall.Common
;
using
Mall.Common
;
using
Mall.Common.Enum
;
using
Mall.Common.Enum
;
using
Mall.Common.Plugin
;
using
Mall.Common.Plugin
;
using
Mall.Model.Entity.TradePavilion
;
using
Mall.Model.Extend.TradePavilion
;
using
Mall.Model.Extend.TradePavilion
;
using
Mall.Module.User
;
using
Mall.Module.User
;
using
Mall.Repository.TradePavilion
;
using
Mall.Repository.TradePavilion
;
...
@@ -46,6 +47,16 @@ namespace Mall.Module.TradePavilion
...
@@ -46,6 +47,16 @@ namespace Mall.Module.TradePavilion
/// 用户
/// 用户
/// </summary>
/// </summary>
private
readonly
Repository
.
User
.
RB_Member_UserRepository
member_UserRepository
=
new
Repository
.
User
.
RB_Member_UserRepository
();
private
readonly
Repository
.
User
.
RB_Member_UserRepository
member_UserRepository
=
new
Repository
.
User
.
RB_Member_UserRepository
();
/// <summary>
/// 企业服务
/// </summary>
private
readonly
RB_EnterpriseServicesApplyRepository
enterpriseServicesApplyRepository
=
new
RB_EnterpriseServicesApplyRepository
();
/// <summary>
/// 楼宇入驻仓储层
/// </summary>
private
readonly
RB_BuildingApplyForRepository
buildingApplyForRepository
=
new
RB_BuildingApplyForRepository
();
#
region
品牌
/
企业
#
region
品牌
/
企业
/// <summary>
/// <summary>
...
@@ -111,6 +122,7 @@ namespace Mall.Module.TradePavilion
...
@@ -111,6 +122,7 @@ namespace Mall.Module.TradePavilion
bool
flag
=
false
;
bool
flag
=
false
;
var
cmodel
=
companyEnterpriseRepository
.
GetEntity
(
model
.
CompanyId
);
var
cmodel
=
companyEnterpriseRepository
.
GetEntity
(
model
.
CompanyId
);
if
(
cmodel
==
null
)
{
return
false
;
}
if
(
cmodel
==
null
)
{
return
false
;
}
if
(
cmodel
.
FirstShopType
!=
1
)
{
return
false
;
}
//更新认证表 资料状态为完成
//更新认证表 资料状态为完成
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
...
@@ -238,7 +250,254 @@ namespace Mall.Module.TradePavilion
...
@@ -238,7 +250,254 @@ namespace Mall.Module.TradePavilion
return
flag
;
return
flag
;
}
}
/// <summary>
/// 新增/修改企业申请信息
/// </summary>
/// <returns></returns>
public
bool
SetEnterpriseServicesApply
(
RB_EnterpriseServicesApply_Extend
model
)
{
bool
flag
=
false
;
var
cmodel
=
companyEnterpriseRepository
.
GetEntity
(
model
.
CompanyId
);
if
(
cmodel
==
null
)
{
return
false
;
}
if
(
cmodel
.
FirstShopType
!=
3
)
{
return
false
;
}
//更新认证表 资料状态为完成
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_CompanyEnterprise_Extend
.
IsComplete
),
1
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_CompanyEnterprise_Extend
.
CompanyId
),
FiledValue
=
model
.
CompanyId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
if
(
model
.
ID
>
0
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_EnterpriseServicesApply_Extend
.
Name
),
model
.
Name
},
{
nameof
(
RB_EnterpriseServicesApply_Extend
.
Banner
),
model
.
Banner
},
{
nameof
(
RB_EnterpriseServicesApply_Extend
.
Introduction
),
model
.
Introduction
},
{
nameof
(
RB_EnterpriseServicesApply_Extend
.
DevIntention
),
model
.
DevIntention
},
{
nameof
(
RB_EnterpriseServicesApply_Extend
.
Address
),
model
.
Address
},
{
nameof
(
RB_EnterpriseServicesApply_Extend
.
LatAndLon
),
model
.
LatAndLon
},
{
nameof
(
RB_EnterpriseServicesApply_Extend
.
OperationTime
),
model
.
OperationTime
},
{
nameof
(
RB_EnterpriseServicesApply_Extend
.
CategoryId
),
model
.
CategoryId
},
{
nameof
(
RB_EnterpriseServicesApply_Extend
.
Renovation
),
model
.
Renovation
},
{
nameof
(
RB_EnterpriseServicesApply_Extend
.
Payment
),
model
.
Payment
},
{
nameof
(
RB_EnterpriseServicesApply_Extend
.
HandoverDate
),
model
.
HandoverDate
},
{
nameof
(
RB_EnterpriseServicesApply_Extend
.
IntentionalFloor
),
model
.
IntentionalFloor
},
{
nameof
(
RB_EnterpriseServicesApply_Extend
.
ElevatorNum
),
model
.
ElevatorNum
},
{
nameof
(
RB_EnterpriseServicesApply_Extend
.
PropertyFee
),
model
.
PropertyFee
},
{
nameof
(
RB_EnterpriseServicesApply_Extend
.
RentFee
),
model
.
RentFee
},
{
nameof
(
RB_EnterpriseServicesApply_Extend
.
ContactName
),
model
.
ContactName
},
{
nameof
(
RB_EnterpriseServicesApply_Extend
.
ContactPhone
),
model
.
ContactPhone
},
{
nameof
(
RB_EnterpriseServicesApply_Extend
.
UpdateBy
),
model
.
UpdateBy
},
{
nameof
(
RB_EnterpriseServicesApply_Extend
.
UpdateDate
),
model
.
UpdateDate
},
};
flag
=
enterpriseServicesApplyRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_EnterpriseServicesApply_Extend
.
ID
),
model
.
ID
));
}
else
{
#
region
验证企业数据是否已存在
var
oldList
=
enterpriseServicesApplyRepository
.
GetEnterpriseServicesApplyRepository
(
new
RB_EnterpriseServicesApply_Extend
()
{
MallBaseId
=
model
.
MallBaseId
,
CompanyId
=
model
.
CompanyId
});
if
(
oldList
!=
null
&&
oldList
.
Any
())
{
return
false
;
}
#
endregion
flag
=
enterpriseServicesApplyRepository
.
Insert
(
model
)
>
0
;
if
(
flag
)
{
if
(
Config
.
IsCPSWJAutoExamine
==
"1"
)
//自动审核
{
keyValues
.
Add
(
nameof
(
RB_CompanyEnterprise_Extend
.
CompanyStatus
),
1
);
try
{
var
BrandModel
=
oldList
?.
FirstOrDefault
();
if
((
BrandModel
?.
ExistServiceId
??
0
)
>
0
)
{
Dictionary
<
string
,
object
>
filedsBrand
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_EnterpriseServices
.
Name
),
model
.
Name
},
{
nameof
(
RB_EnterpriseServices
.
Banner
),
model
.
Banner
},
{
nameof
(
RB_EnterpriseServices
.
Introduction
),
model
.
Introduction
},
{
nameof
(
RB_EnterpriseServices
.
DevIntention
),
model
.
DevIntention
},
{
nameof
(
RB_EnterpriseServices
.
Address
),
model
.
Address
},
{
nameof
(
RB_EnterpriseServices
.
LatAndLon
),
model
.
LatAndLon
},
{
nameof
(
RB_EnterpriseServices
.
OperationTime
),
model
.
OperationTime
},
{
nameof
(
RB_EnterpriseServices
.
CategoryId
),
model
.
CategoryId
},
{
nameof
(
RB_EnterpriseServices
.
Renovation
),
model
.
Renovation
},
{
nameof
(
RB_EnterpriseServices
.
Payment
),
model
.
Payment
},
{
nameof
(
RB_EnterpriseServices
.
HandoverDate
),
model
.
HandoverDate
},
{
nameof
(
RB_EnterpriseServices
.
IntentionalFloor
),
model
.
IntentionalFloor
},
{
nameof
(
RB_EnterpriseServices
.
ElevatorNum
),
model
.
ElevatorNum
},
{
nameof
(
RB_EnterpriseServices
.
PropertyFee
),
model
.
PropertyFee
},
{
nameof
(
RB_EnterpriseServices
.
RentFee
),
model
.
RentFee
},
{
nameof
(
RB_EnterpriseServices
.
ContactName
),
model
.
ContactName
},
{
nameof
(
RB_EnterpriseServices
.
ContactPhone
),
model
.
ContactPhone
},
{
nameof
(
RB_EnterpriseServices
.
UpdateBy
),
model
.
UpdateBy
},
{
nameof
(
RB_EnterpriseServices
.
UpdateDate
),
model
.
UpdateDate
},
};
enterpriseServicesRepository
.
Update
(
filedsBrand
,
new
WhereHelper
(
nameof
(
RB_EnterpriseServices
.
ServiceId
),
BrandModel
.
ExistServiceId
));
}
else
{
#
region
新增品牌
var
inserBModel
=
BrandModel
.
RefMapperTo
<
RB_EnterpriseServices
>();
inserBModel
.
ServiceId
=
0
;
inserBModel
.
UserId
=
cmodel
.
CreateBy
;
enterpriseServicesRepository
.
Insert
(
inserBModel
);
#
endregion
}
}
catch
{
}
}
}
}
if
(
flag
)
{
//更新认证表 资料状态为完成
companyEnterpriseRepository
.
Update
(
keyValues
,
wheres
);
}
return
flag
;
}
/// <summary>
/// 新增/修改楼宇申请信息
/// </summary>
/// <returns></returns>
public
bool
SetBuildingApplyFor
(
RB_BuildingApplyFor_Extend
model
)
{
bool
flag
=
false
;
var
cmodel
=
companyEnterpriseRepository
.
GetEntity
(
model
.
CompanyId
);
if
(
cmodel
==
null
)
{
return
false
;
}
if
(
cmodel
.
FirstShopType
!=
4
)
{
return
false
;
}
//更新认证表 资料状态为完成
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_CompanyEnterprise_Extend
.
IsComplete
),
1
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_CompanyEnterprise_Extend
.
CompanyId
),
FiledValue
=
model
.
CompanyId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
if
(
model
.
ID
>
0
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_BuildingApplyFor_Extend
.
Name
),
model
.
Name
},
{
nameof
(
RB_BuildingApplyFor_Extend
.
Name
),
model
.
Name
},
{
nameof
(
RB_BuildingApplyFor_Extend
.
Banner
),
model
.
Banner
},
{
nameof
(
RB_BuildingApplyFor_Extend
.
Address
),
model
.
Address
},
{
nameof
(
RB_BuildingApplyFor_Extend
.
LatAndLon
),
model
.
LatAndLon
},
{
nameof
(
RB_BuildingApplyFor_Extend
.
OperationTime
),
model
.
OperationTime
},
{
nameof
(
RB_BuildingApplyFor_Extend
.
CategoryId
),
model
.
CategoryId
},
{
nameof
(
RB_BuildingApplyFor_Extend
.
Areas
),
model
.
Areas
},
{
nameof
(
RB_BuildingApplyFor_Extend
.
BuildingNum
),
model
.
BuildingNum
},
{
nameof
(
RB_BuildingApplyFor_Extend
.
FloorNum
),
model
.
FloorNum
},
{
nameof
(
RB_BuildingApplyFor_Extend
.
ElevatorNum
),
model
.
ElevatorNum
},
{
nameof
(
RB_BuildingApplyFor_Extend
.
FloorHeight
),
model
.
FloorHeight
},
{
nameof
(
RB_BuildingApplyFor_Extend
.
Developers
),
model
.
Developers
},
{
nameof
(
RB_BuildingApplyFor_Extend
.
PropertyComp
),
model
.
PropertyComp
},
{
nameof
(
RB_BuildingApplyFor_Extend
.
SaleOrSelf
),
model
.
SaleOrSelf
},
{
nameof
(
RB_BuildingApplyFor_Extend
.
IsAllOperate
),
model
.
IsAllOperate
},
{
nameof
(
RB_BuildingApplyFor_Extend
.
ConstructionTime
),
model
.
ConstructionTime
},
{
nameof
(
RB_BuildingApplyFor_Extend
.
PropertyFee
),
model
.
PropertyFee
},
{
nameof
(
RB_BuildingApplyFor_Extend
.
RentFee
),
model
.
RentFee
},
{
nameof
(
RB_BuildingApplyFor_Extend
.
IndustryDirection
),
model
.
IndustryDirection
},
{
nameof
(
RB_BuildingApplyFor_Extend
.
BrandDemand
),
model
.
BrandDemand
},
{
nameof
(
RB_BuildingApplyFor_Extend
.
Other
),
model
.
Other
},
{
nameof
(
RB_BuildingApplyFor_Extend
.
ContactName
),
model
.
ContactName
},
{
nameof
(
RB_BuildingApplyFor_Extend
.
ContactPhone
),
model
.
ContactPhone
},
{
nameof
(
RB_BuildingApplyFor_Extend
.
UpdateBy
),
model
.
UpdateBy
},
{
nameof
(
RB_BuildingApplyFor_Extend
.
UpdateDate
),
model
.
UpdateDate
},
};
flag
=
buildingApplyForRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_BuildingApplyFor_Extend
.
ID
),
model
.
ID
));
}
else
{
#
region
验证企业数据是否已存在
var
oldList
=
buildingApplyForRepository
.
GetBuildingRepository
(
new
RB_BuildingApplyFor_Extend
()
{
MallBaseId
=
model
.
MallBaseId
,
CompanyId
=
model
.
CompanyId
});
if
(
oldList
!=
null
&&
oldList
.
Any
())
{
return
false
;
}
#
endregion
flag
=
buildingApplyForRepository
.
Insert
(
model
)
>
0
;
if
(
flag
)
{
if
(
Config
.
IsCPSWJAutoExamine
==
"1"
)
//自动审核
{
keyValues
.
Add
(
nameof
(
RB_CompanyEnterprise_Extend
.
CompanyStatus
),
1
);
try
{
var
BrandModel
=
oldList
?.
FirstOrDefault
();
if
((
BrandModel
?.
ExistBuildId
??
0
)
>
0
)
{
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
},
};
buildingRepository
.
Update
(
filedsBrand
,
new
WhereHelper
(
nameof
(
RB_Building_Extend
.
BuildId
),
BrandModel
.
ExistBuildId
));
}
else
{
#
region
新增楼宇
var
inserBModel
=
BrandModel
.
RefMapperTo
<
RB_Building_Extend
>();
inserBModel
.
BuildId
=
0
;
inserBModel
.
UserId
=
cmodel
.
CreateBy
;
buildingRepository
.
Insert
(
inserBModel
);
#
endregion
}
}
catch
{
}
}
}
}
if
(
flag
)
{
//更新认证表 资料状态为完成
companyEnterpriseRepository
.
Update
(
keyValues
,
wheres
);
}
return
flag
;
}
#
endregion
#
endregion
...
@@ -507,6 +766,8 @@ namespace Mall.Module.TradePavilion
...
@@ -507,6 +766,8 @@ namespace Mall.Module.TradePavilion
{
{
model
.
BrandModel
=
new
RB_BrandEnterpriseApplyFor_Extend
();
model
.
BrandModel
=
new
RB_BrandEnterpriseApplyFor_Extend
();
model
.
CarrierModel
=
new
RB_CarrierEnterpriseApplyFor_Extend
();
model
.
CarrierModel
=
new
RB_CarrierEnterpriseApplyFor_Extend
();
model
.
EnterpriseServicesModel
=
new
RB_EnterpriseServicesApply_Extend
();
model
.
buildingApplyForModel
=
new
RB_BuildingApplyFor_Extend
();
if
(
model
.
CompanyStatus
==
1
)
if
(
model
.
CompanyStatus
==
1
)
{
{
if
(
model
.
FirstShopType
==
1
)
if
(
model
.
FirstShopType
==
1
)
...
@@ -545,7 +806,7 @@ namespace Mall.Module.TradePavilion
...
@@ -545,7 +806,7 @@ namespace Mall.Module.TradePavilion
};
};
}
}
}
}
else
else
if
(
model
.
FirstShopType
==
2
)
{
{
var
clist
=
building_CarrierRepository
.
GetBuildingCarrierListRepository
(
new
RB_Building_Carrier_Extend
()
{
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
,
UserId
=
userId
});
var
clist
=
building_CarrierRepository
.
GetBuildingCarrierListRepository
(
new
RB_Building_Carrier_Extend
()
{
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
,
UserId
=
userId
});
if
(
clist
.
Any
())
if
(
clist
.
Any
())
...
@@ -567,6 +828,56 @@ namespace Mall.Module.TradePavilion
...
@@ -567,6 +828,56 @@ namespace Mall.Module.TradePavilion
}
}
}
}
}
}
else
if
(
model
.
FirstShopType
==
3
)
{
//审核通过了的 直接查询资料表
var
blist
=
enterpriseServicesRepository
.
GetEnterpriseServicesListRepository
(
new
RB_EnterpriseServices_Extend
()
{
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
,
UserId
=
userId
});
model
.
EnterpriseServicesModel
=
blist
.
FirstOrDefault
().
RefMapperTo
<
RB_EnterpriseServicesApply_Extend
>();
if
(
model
.
EnterpriseServicesModel
!=
null
)
{
if
(!
string
.
IsNullOrWhiteSpace
(
model
.
EnterpriseServicesModel
.
Banner
))
{
model
.
EnterpriseServicesModel
.
BannerList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
model
.
EnterpriseServicesModel
.
Banner
);
}
else
{
model
.
EnterpriseServicesModel
.
BannerList
=
new
List
<
string
>();
}
}
else
{
model
.
EnterpriseServicesModel
=
new
RB_EnterpriseServicesApply_Extend
{
BannerList
=
new
List
<
string
>(),
};
}
}
else
if
(
model
.
FirstShopType
==
4
)
{
//审核通过了的 直接查询资料表
var
blist
=
buildingRepository
.
GetBuildingRepository
(
new
RB_Building_Extend
()
{
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
,
UserId
=
userId
});
model
.
buildingApplyForModel
=
blist
.
FirstOrDefault
().
RefMapperTo
<
RB_BuildingApplyFor_Extend
>();
if
(
model
.
EnterpriseServicesModel
!=
null
)
{
if
(!
string
.
IsNullOrWhiteSpace
(
model
.
EnterpriseServicesModel
.
Banner
))
{
model
.
EnterpriseServicesModel
.
BannerList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
model
.
EnterpriseServicesModel
.
Banner
);
}
else
{
model
.
EnterpriseServicesModel
.
BannerList
=
new
List
<
string
>();
}
}
else
{
model
.
EnterpriseServicesModel
=
new
RB_EnterpriseServicesApply_Extend
{
BannerList
=
new
List
<
string
>(),
};
}
}
}
}
else
else
{
{
...
@@ -605,7 +916,7 @@ namespace Mall.Module.TradePavilion
...
@@ -605,7 +916,7 @@ namespace Mall.Module.TradePavilion
}
}
}
}
}
}
else
else
if
(
model
.
FirstShopType
==
2
)
{
{
var
carrierList
=
carrierEnterpriseApplyForRepository
.
GetCarrierEnterpriseList
(
new
RB_CarrierEnterpriseApplyFor_Extend
()
{
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
,
CompanyId
=
model
.
CompanyId
});
var
carrierList
=
carrierEnterpriseApplyForRepository
.
GetCarrierEnterpriseList
(
new
RB_CarrierEnterpriseApplyFor_Extend
()
{
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
,
CompanyId
=
model
.
CompanyId
});
if
(
carrierList
.
Any
())
if
(
carrierList
.
Any
())
...
@@ -645,6 +956,76 @@ namespace Mall.Module.TradePavilion
...
@@ -645,6 +956,76 @@ namespace Mall.Module.TradePavilion
}
}
}
}
else
if
(
model
.
FirstShopType
==
3
)
{
var
brandList
=
enterpriseServicesApplyRepository
.
GetEnterpriseServicesApplyRepository
(
new
RB_EnterpriseServicesApply_Extend
{
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
,
CompanyId
=
model
.
CompanyId
});
if
(
brandList
!=
null
&&
brandList
.
Any
())
{
model
.
EnterpriseServicesModel
=
brandList
.
FirstOrDefault
();
if
(
model
.
BrandModel
!=
null
)
{
if
(!
string
.
IsNullOrWhiteSpace
(
model
.
BrandModel
.
CustomerType
))
{
model
.
BrandModel
.
CustomerTypeInfo
=
new
List
<
string
>();
foreach
(
var
itemCustomerType
in
model
.
BrandModel
.
CustomerType
.
Split
(
","
))
{
model
.
BrandModel
.
CustomerTypeInfo
.
Add
(
Common
.
Plugin
.
EnumHelper
.
GetEnumName
(
itemCustomerType
));
}
}
if
(!
string
.
IsNullOrWhiteSpace
(
model
.
BrandModel
.
Banner
))
{
model
.
BrandModel
.
BannerList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
model
.
BrandModel
.
Banner
);
}
else
{
model
.
BrandModel
.
BannerList
=
new
List
<
string
>();
}
}
else
{
model
.
BrandModel
=
new
RB_BrandEnterpriseApplyFor_Extend
{
BannerList
=
new
List
<
string
>(),
CustomerTypeInfo
=
new
List
<
string
>()
};
}
}
}
else
if
(
model
.
FirstShopType
==
4
)
{
var
brandList
=
buildingApplyForRepository
.
GetBuildingRepository
(
new
RB_BuildingApplyFor_Extend
{
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
,
CompanyId
=
model
.
CompanyId
});
if
(
brandList
!=
null
&&
brandList
.
Any
())
{
model
.
buildingApplyForModel
=
brandList
.
FirstOrDefault
();
if
(
model
.
BrandModel
!=
null
)
{
if
(!
string
.
IsNullOrWhiteSpace
(
model
.
BrandModel
.
CustomerType
))
{
model
.
BrandModel
.
CustomerTypeInfo
=
new
List
<
string
>();
foreach
(
var
itemCustomerType
in
model
.
BrandModel
.
CustomerType
.
Split
(
","
))
{
model
.
BrandModel
.
CustomerTypeInfo
.
Add
(
Common
.
Plugin
.
EnumHelper
.
GetEnumName
(
itemCustomerType
));
}
}
if
(!
string
.
IsNullOrWhiteSpace
(
model
.
BrandModel
.
Banner
))
{
model
.
BrandModel
.
BannerList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
model
.
BrandModel
.
Banner
);
}
else
{
model
.
BrandModel
.
BannerList
=
new
List
<
string
>();
}
}
else
{
model
.
BrandModel
=
new
RB_BrandEnterpriseApplyFor_Extend
{
BannerList
=
new
List
<
string
>(),
CustomerTypeInfo
=
new
List
<
string
>()
};
}
}
}
}
}
}
}
return
model
;
return
model
;
...
@@ -750,7 +1131,8 @@ namespace Mall.Module.TradePavilion
...
@@ -750,7 +1131,8 @@ namespace Mall.Module.TradePavilion
{
{
model
.
BrandModel
=
new
RB_BrandEnterpriseApplyFor_Extend
();
model
.
BrandModel
=
new
RB_BrandEnterpriseApplyFor_Extend
();
model
.
CarrierModel
=
new
RB_CarrierEnterpriseApplyFor_Extend
();
model
.
CarrierModel
=
new
RB_CarrierEnterpriseApplyFor_Extend
();
model
.
EnterpriseServicesModel
=
new
RB_EnterpriseServicesApply_Extend
();
model
.
buildingApplyForModel
=
new
RB_BuildingApplyFor_Extend
();
if
(
model
.
FirstShopType
==
1
)
if
(
model
.
FirstShopType
==
1
)
{
{
var
brandList
=
brandEnterpriseApplyForRepository
.
GetCarrierEnterpriseApplyForRepository
(
new
RB_BrandEnterpriseApplyFor_Extend
{
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
,
CompanyId
=
model
.
CompanyId
});
var
brandList
=
brandEnterpriseApplyForRepository
.
GetCarrierEnterpriseApplyForRepository
(
new
RB_BrandEnterpriseApplyFor_Extend
{
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
,
CompanyId
=
model
.
CompanyId
});
...
@@ -778,7 +1160,7 @@ namespace Mall.Module.TradePavilion
...
@@ -778,7 +1160,7 @@ namespace Mall.Module.TradePavilion
model
.
BrandModel
.
ProjectName
=
model
.
BrandModel
.
ProjectType
.
GetEnumName
();
model
.
BrandModel
.
ProjectName
=
model
.
BrandModel
.
ProjectType
.
GetEnumName
();
}
}
}
}
else
else
if
(
model
.
FirstShopType
==
2
)
{
{
var
carrierList
=
carrierEnterpriseApplyForRepository
.
GetCarrierEnterpriseList
(
new
RB_CarrierEnterpriseApplyFor_Extend
()
{
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
,
CompanyId
=
model
.
CompanyId
});
var
carrierList
=
carrierEnterpriseApplyForRepository
.
GetCarrierEnterpriseList
(
new
RB_CarrierEnterpriseApplyFor_Extend
()
{
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
,
CompanyId
=
model
.
CompanyId
});
if
(
carrierList
.
Any
())
if
(
carrierList
.
Any
())
...
@@ -802,6 +1184,42 @@ namespace Mall.Module.TradePavilion
...
@@ -802,6 +1184,42 @@ namespace Mall.Module.TradePavilion
model
.
CarrierModel
.
ProjectName
=
model
.
CarrierModel
.
ProjectType
.
GetEnumName
();
model
.
CarrierModel
.
ProjectName
=
model
.
CarrierModel
.
ProjectType
.
GetEnumName
();
}
}
}
}
else
if
(
model
.
FirstShopType
==
3
)
{
var
brandList
=
enterpriseServicesApplyRepository
.
GetEnterpriseServicesApplyRepository
(
new
RB_EnterpriseServicesApply_Extend
{
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
,
CompanyId
=
model
.
CompanyId
});
if
(
brandList
!=
null
&&
brandList
.
Any
())
{
model
.
EnterpriseServicesModel
=
brandList
.
FirstOrDefault
();
if
(!
string
.
IsNullOrWhiteSpace
(
model
.
EnterpriseServicesModel
.
Banner
))
{
model
.
EnterpriseServicesModel
.
BannerList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
model
.
EnterpriseServicesModel
.
Banner
);
}
else
{
model
.
EnterpriseServicesModel
.
BannerList
=
new
List
<
string
>();
}
}
}
else
if
(
model
.
FirstShopType
==
4
)
{
var
brandList
=
buildingApplyForRepository
.
GetBuildingRepository
(
new
RB_BuildingApplyFor_Extend
{
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
,
CompanyId
=
model
.
CompanyId
});
if
(
brandList
!=
null
&&
brandList
.
Any
())
{
model
.
buildingApplyForModel
=
brandList
.
FirstOrDefault
();
if
(!
string
.
IsNullOrWhiteSpace
(
model
.
EnterpriseServicesModel
.
Banner
))
{
model
.
EnterpriseServicesModel
.
BannerList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
model
.
EnterpriseServicesModel
.
Banner
);
}
else
{
model
.
EnterpriseServicesModel
.
BannerList
=
new
List
<
string
>();
}
}
}
}
}
return
model
;
return
model
;
}
}
...
@@ -937,7 +1355,7 @@ namespace Mall.Module.TradePavilion
...
@@ -937,7 +1355,7 @@ namespace Mall.Module.TradePavilion
}
}
}
}
}
}
else
else
if
(
cmodel
.
FirstShopType
==
2
)
{
{
//载体
//载体
var
carrierList
=
carrierEnterpriseApplyForRepository
.
GetCarrierEnterpriseList
(
new
RB_CarrierEnterpriseApplyFor_Extend
()
{
MallBaseId
=
cmodel
.
MallBaseId
,
CompanyId
=
cmodel
.
CompanyId
});
var
carrierList
=
carrierEnterpriseApplyForRepository
.
GetCarrierEnterpriseList
(
new
RB_CarrierEnterpriseApplyFor_Extend
()
{
MallBaseId
=
cmodel
.
MallBaseId
,
CompanyId
=
cmodel
.
CompanyId
});
...
@@ -1058,6 +1476,73 @@ namespace Mall.Module.TradePavilion
...
@@ -1058,6 +1476,73 @@ 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
BrandModel
=
brandList
.
FirstOrDefault
();
if
(
BrandModel
.
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
},
};
enterpriseServicesRepository
.
Update
(
filedsBrand
,
new
WhereHelper
(
nameof
(
RB_EnterpriseServices_Extend
.
ServiceId
),
BrandModel
.
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
>();
inserBModel
.
ServiceId
=
0
;
inserBModel
.
UserId
=
cmodel
.
CreateBy
;
enterpriseServicesRepository
.
Insert
(
inserBModel
,
trans
);
#
endregion
}
}
}
}
}
}
}
companyEnterpriseRepository
.
DBSession
.
Commit
();
companyEnterpriseRepository
.
DBSession
.
Commit
();
...
...
Mall.Repository/TradePavilion/RB_BrandEnterpriseApplyForRepository.cs
View file @
f3af23ef
...
@@ -108,6 +108,10 @@ namespace Mall.Repository.TradePavilion
...
@@ -108,6 +108,10 @@ namespace Mall.Repository.TradePavilion
{
{
builder
.
Append
(
$" AND A.
{
nameof
(
RB_BrandEnterpriseApplyFor_Extend
.
ID
)}
=
{
query
.
ID
}
"
);
builder
.
Append
(
$" AND A.
{
nameof
(
RB_BrandEnterpriseApplyFor_Extend
.
ID
)}
=
{
query
.
ID
}
"
);
}
}
if
(
query
.
CompanyId
>
0
)
{
builder
.
Append
(
$" AND A.
{
nameof
(
RB_BrandEnterpriseApplyFor_Extend
.
CompanyId
)}
=
{
query
.
CompanyId
}
"
);
}
if
(
query
.
BrandEnterpriseType
>
0
)
if
(
query
.
BrandEnterpriseType
>
0
)
{
{
builder
.
Append
(
$" AND A.
{
nameof
(
RB_BrandEnterpriseApplyFor_Extend
.
BrandEnterpriseType
)}
=
{
query
.
BrandEnterpriseType
}
"
);
builder
.
Append
(
$" AND A.
{
nameof
(
RB_BrandEnterpriseApplyFor_Extend
.
BrandEnterpriseType
)}
=
{
query
.
BrandEnterpriseType
}
"
);
...
...
Mall.Repository/TradePavilion/RB_BuildingApplyForRepository.cs
0 → 100644
View file @
f3af23ef
using
Mall.Common.Enum
;
using
Mall.Model.Entity.TradePavilion
;
using
Mall.Model.Extend.TradePavilion
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
VT.FW.DB.Dapper
;
namespace
Mall.Repository.TradePavilion
{
/// <summary>
/// 活力楼宇仓储层
/// </summary>
public
class
RB_BuildingApplyForRepository
:
BaseRepository
<
RB_BuildingApplyFor
>
{
/// <summary>
/// 获取活力楼宇分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_BuildingApplyFor_Extend
>
GetBuildingPageRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_BuildingApplyFor_Extend
query
)
{
DynamicParameters
parameters
=
new
DynamicParameters
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*,IFNULL(B.ClassName,'') AS CategoryName
FROM RB_BuildingApplyFor AS A LEFT JOIN rb_brandclass AS B ON A.CategoryId=B.ID
WHERE 1=1
"
);
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_BuildingApplyFor_Extend
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
if
(
query
!=
null
)
{
if
(
query
.
TenantId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_BuildingApplyFor_Extend
.
TenantId
),
query
.
TenantId
);
}
if
(
query
.
MallBaseId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_BuildingApplyFor_Extend
.
MallBaseId
),
query
.
MallBaseId
);
}
if
(
query
.
CategoryId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_BuildingApplyFor_Extend
.
CategoryId
),
query
.
CategoryId
);
}
if
(
query
.
CompanyId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_BuildingApplyFor_Extend
.
CompanyId
),
query
.
CompanyId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
Name
))
{
builder
.
AppendFormat
(
" AND A.{0} LIKE @Name "
,
nameof
(
RB_BuildingApplyFor_Extend
.
Name
));
parameters
.
Add
(
"@Name"
,
"%"
+
query
.
Name
.
Trim
()
+
"%"
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
Address
))
{
builder
.
AppendFormat
(
" AND A.{0} LIKE @Address "
,
nameof
(
RB_BuildingApplyFor_Extend
.
Address
));
parameters
.
Add
(
"@Address"
,
"%"
+
query
.
Address
.
Trim
()
+
"%"
);
}
}
builder
.
AppendFormat
(
" ORDER BY A.{0} DESC "
,
nameof
(
RB_BuildingApplyFor_Extend
.
ID
));
return
GetPage
<
RB_BuildingApplyFor_Extend
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
/// <summary>
/// 获取活力楼宇分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_BuildingApplyFor_Extend
>
GetBuildingRepository
(
RB_BuildingApplyFor_Extend
query
)
{
DynamicParameters
parameters
=
new
DynamicParameters
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*,IFNULL(B.ClassName,'') AS CategoryName
FROM RB_BuildingApplyFor AS A LEFT JOIN rb_brandclass AS B ON A.CategoryId=B.ID
WHERE 1=1
"
);
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_BuildingApplyFor_Extend
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
if
(
query
!=
null
)
{
if
(
query
.
TenantId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_BuildingApplyFor_Extend
.
TenantId
),
query
.
TenantId
);
}
if
(
query
.
MallBaseId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_BuildingApplyFor_Extend
.
MallBaseId
),
query
.
MallBaseId
);
}
if
(
query
.
CategoryId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_BuildingApplyFor_Extend
.
CategoryId
),
query
.
CategoryId
);
}
if
(
query
.
CompanyId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_BuildingApplyFor_Extend
.
CompanyId
),
query
.
CompanyId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
Name
))
{
builder
.
AppendFormat
(
" AND A.{0} LIKE @Name "
,
nameof
(
RB_BuildingApplyFor_Extend
.
Name
));
parameters
.
Add
(
"@Name"
,
"%"
+
query
.
Name
.
Trim
()
+
"%"
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
Address
))
{
builder
.
AppendFormat
(
" AND A.{0} LIKE @Address "
,
nameof
(
RB_BuildingApplyFor_Extend
.
Address
));
parameters
.
Add
(
"@Address"
,
"%"
+
query
.
Address
.
Trim
()
+
"%"
);
}
}
builder
.
AppendFormat
(
" ORDER BY A.{0} DESC "
,
nameof
(
RB_BuildingApplyFor_Extend
.
ID
));
return
Get
<
RB_BuildingApplyFor_Extend
>(
builder
.
ToString
(),
parameters
).
ToList
();
}
}
}
Mall.Repository/TradePavilion/RB_BuildingRepository.cs
View file @
f3af23ef
...
@@ -59,5 +59,57 @@ WHERE 1=1
...
@@ -59,5 +59,57 @@ WHERE 1=1
builder
.
AppendFormat
(
" ORDER BY A.{0} DESC "
,
nameof
(
RB_Building_Extend
.
BuildId
));
builder
.
AppendFormat
(
" ORDER BY A.{0} DESC "
,
nameof
(
RB_Building_Extend
.
BuildId
));
return
GetPage
<
RB_Building_Extend
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
return
GetPage
<
RB_Building_Extend
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
}
/// <summary>
/// 获取活力楼宇分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Building_Extend
>
GetBuildingRepository
(
RB_Building_Extend
query
)
{
DynamicParameters
parameters
=
new
DynamicParameters
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*,IFNULL(B.ClassName,'') AS CategoryName
FROM RB_Building AS A LEFT JOIN rb_brandclass AS B ON A.CategoryId=B.ID
WHERE 1=1
"
);
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Building_Extend
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
if
(
query
!=
null
)
{
if
(
query
.
TenantId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Building_Extend
.
TenantId
),
query
.
TenantId
);
}
if
(
query
.
MallBaseId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Building_Extend
.
MallBaseId
),
query
.
MallBaseId
);
}
if
(
query
.
CategoryId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Building_Extend
.
CategoryId
),
query
.
CategoryId
);
}
if
(
query
.
UserId
>
0
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Building_Extend
.
UserId
),
query
.
UserId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
Name
))
{
builder
.
AppendFormat
(
" AND A.{0} LIKE @Name "
,
nameof
(
RB_Building_Extend
.
Name
));
parameters
.
Add
(
"@Name"
,
"%"
+
query
.
Name
.
Trim
()
+
"%"
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
Address
))
{
builder
.
AppendFormat
(
" AND A.{0} LIKE @Address "
,
nameof
(
RB_Building_Extend
.
Address
));
parameters
.
Add
(
"@Address"
,
"%"
+
query
.
Address
.
Trim
()
+
"%"
);
}
}
builder
.
AppendFormat
(
" ORDER BY A.{0} DESC "
,
nameof
(
RB_Building_Extend
.
BuildId
));
return
Get
<
RB_Building_Extend
>(
builder
.
ToString
(),
parameters
).
ToList
();
}
}
}
}
}
Mall.Repository/TradePavilion/RB_Building_CarrierRepository.cs
View file @
f3af23ef
...
@@ -59,6 +59,11 @@ WHERE 1=1
...
@@ -59,6 +59,11 @@ WHERE 1=1
{
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Building_Carrier_Extend
.
OpeningStatus
),
query
.
OpeningStatus
);
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Building_Carrier_Extend
.
OpeningStatus
),
query
.
OpeningStatus
);
}
}
if
(
query
.
IsChengDu
>
-
1
)
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Building_Carrier_Extend
.
IsChengDu
),
query
.
IsChengDu
);
}
if
(
query
.
CategoryId
>
0
)
if
(
query
.
CategoryId
>
0
)
{
{
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Building_Carrier_Extend
.
CategoryId
),
query
.
CategoryId
);
builder
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Building_Carrier_Extend
.
CategoryId
),
query
.
CategoryId
);
...
...
Mall.Repository/TradePavilion/RB_EnterpriseServicesApplyRepository.cs
0 → 100644
View file @
f3af23ef
using
Mall.Common.Enum
;
using
Mall.Model.Entity.TradePavilion
;
using
Mall.Model.Extend.TradePavilion
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
VT.FW.DB.Dapper
;
namespace
Mall.Repository.TradePavilion
{
/// <summary>
/// 商载通企业服务入驻申请仓储类
/// </summary>
public
class
RB_EnterpriseServicesApplyRepository
:
BaseRepository
<
RB_EnterpriseServicesApply
>
{
/// <summary>
/// 表名称
/// </summary>
public
string
TableName
{
get
{
return
nameof
(
RB_EnterpriseServicesApply
);
}
}
/// <summary>
/// 企业服务申请信息列表
/// </summary>
/// <param name="pageIndex">页码</param>
/// <param name="pageSize">每页显示条数</param>
/// <param name="rowCount">总条数</param>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_EnterpriseServicesApply_Extend
>
GetEnterpriseServicesApplyPageList
(
int
pageIndex
,
int
pageSize
,
out
long
rowCount
,
RB_EnterpriseServicesApply_Extend
query
)
{
DynamicParameters
parameters
=
new
DynamicParameters
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
Append
(
$" SELECT a.*,b.ClassName from
{
TableName
}
as a LEFT JOIN rb_brandclass as b on a.CategoryId=b.ID WHERE 1=1 "
);
builder
.
AppendFormat
(
" AND a.{0}={1} "
,
nameof
(
RB_EnterpriseServicesApply_Extend
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
builder
.
AppendFormat
(
" AND b.{0}={1} "
,
nameof
(
RB_EnterpriseServicesApply_Extend
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
if
(
query
!=
null
)
{
if
(
query
.
TenantId
>
0
)
{
builder
.
Append
(
$" AND A.
{
nameof
(
RB_EnterpriseServicesApply_Extend
.
TenantId
)}
=
{
query
.
TenantId
}
"
);
}
if
(
query
.
MallBaseId
>
0
)
{
builder
.
Append
(
$" AND A.
{
nameof
(
RB_EnterpriseServicesApply_Extend
.
MallBaseId
)}
=
{
query
.
MallBaseId
}
"
);
}
if
(
query
.
ID
>
0
)
{
builder
.
Append
(
$" AND A.
{
nameof
(
RB_EnterpriseServicesApply_Extend
.
ID
)}
=
{
query
.
ID
}
"
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
Name
))
{
builder
.
AppendFormat
(
" AND a.{0} LIKE @Name "
,
nameof
(
RB_EnterpriseServicesApply_Extend
.
Name
));
parameters
.
Add
(
"Name"
,
"%"
+
query
.
Name
.
Trim
()
+
"%"
);
}
if
(
query
.
CategoryId
>
0
)
{
builder
.
AppendFormat
(
" AND a.{0}={1} "
,
nameof
(
RB_EnterpriseServicesApply_Extend
.
CategoryId
),
query
.
CategoryId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
StartTime
))
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_EnterpriseServicesApply_Extend
.
CreateDate
)}
>= '
{
query
.
StartTime
}
'"
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
EndTime
))
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_EnterpriseServicesApply_Extend
.
CreateDate
)}
<= '
{
query
.
EndTime
}
23:59:59'"
);
}
}
return
GetPage
<
RB_EnterpriseServicesApply_Extend
>(
pageIndex
,
pageSize
,
out
rowCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
/// <summary>
/// 企业服务申请信息列表
/// </summary>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_EnterpriseServicesApply_Extend
>
GetEnterpriseServicesApplyRepository
(
RB_EnterpriseServicesApply_Extend
query
)
{
DynamicParameters
parameters
=
new
DynamicParameters
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
Append
(
$" SELECT a.*,b.ClassName from
{
TableName
}
as a LEFT JOIN rb_brandclass as b on a.CategoryId=b.ID WHERE 1=1 "
);
builder
.
AppendFormat
(
" AND a.{0}={1} "
,
nameof
(
RB_EnterpriseServicesApply_Extend
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
builder
.
AppendFormat
(
" AND b.{0}={1} "
,
nameof
(
RB_EnterpriseServicesApply_Extend
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
if
(
query
!=
null
)
{
if
(
query
.
TenantId
>
0
)
{
builder
.
Append
(
$" AND A.
{
nameof
(
RB_EnterpriseServicesApply_Extend
.
TenantId
)}
=
{
query
.
TenantId
}
"
);
}
if
(
query
.
MallBaseId
>
0
)
{
builder
.
Append
(
$" AND A.
{
nameof
(
RB_EnterpriseServicesApply_Extend
.
MallBaseId
)}
=
{
query
.
MallBaseId
}
"
);
}
if
(
query
.
ID
>
0
)
{
builder
.
Append
(
$" AND A.
{
nameof
(
RB_EnterpriseServicesApply_Extend
.
ID
)}
=
{
query
.
ID
}
"
);
}
if
(
query
.
CompanyId
>
0
)
{
builder
.
Append
(
$" AND A.
{
nameof
(
RB_EnterpriseServicesApply_Extend
.
CompanyId
)}
=
{
query
.
CompanyId
}
"
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
Name
))
{
builder
.
AppendFormat
(
" AND a.{0} LIKE @Name "
,
nameof
(
RB_EnterpriseServicesApply_Extend
.
Name
));
parameters
.
Add
(
"Name"
,
"%"
+
query
.
Name
.
Trim
()
+
"%"
);
}
if
(
query
.
CategoryId
>
0
)
{
builder
.
AppendFormat
(
" AND a.{0}={1} "
,
nameof
(
RB_EnterpriseServicesApply_Extend
.
CategoryId
),
query
.
CategoryId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
StartTime
))
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_EnterpriseServicesApply_Extend
.
CreateDate
)}
>= '
{
query
.
StartTime
}
'"
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
EndTime
))
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_EnterpriseServicesApply_Extend
.
CreateDate
)}
<= '
{
query
.
EndTime
}
23:59:59'"
);
}
}
return
Get
<
RB_EnterpriseServicesApply_Extend
>(
builder
.
ToString
(),
parameters
).
ToList
();
}
}
}
Mall.Repository/TradePavilion/RB_EnterpriseServicesRepository.cs
View file @
f3af23ef
...
@@ -55,5 +55,50 @@ WHERE 1=1
...
@@ -55,5 +55,50 @@ WHERE 1=1
builder
.
AppendFormat
(
" ORDER BY A.{0} DESC "
,
nameof
(
RB_EnterpriseServices_Extend
.
ServiceId
));
builder
.
AppendFormat
(
" ORDER BY A.{0} DESC "
,
nameof
(
RB_EnterpriseServices_Extend
.
ServiceId
));
return
GetPage
<
RB_EnterpriseServices_Extend
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
return
GetPage
<
RB_EnterpriseServices_Extend
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
}
/// <summary>
/// 【商载通】获取楼宇、载体列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_EnterpriseServices_Extend
>
GetEnterpriseServicesListRepository
(
RB_EnterpriseServices_Extend
query
)
{
DynamicParameters
parameters
=
new
DynamicParameters
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@"
SELECT A.*,IFNULL(B.ClassName,'') AS CategoryName
FROM rb_enterpriseservices AS A LEFT JOIN rb_brandclass AS B ON A.CategoryId=B.ID
WHERE 1=1
"
);
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_EnterpriseServices_Extend
.
Status
),
(
int
)
DateStateEnum
.
Normal
);
if
(
query
!=
null
)
{
if
(
query
.
TenantId
>
0
)
{
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_EnterpriseServices_Extend
.
TenantId
),
query
.
TenantId
);
}
if
(
query
.
MallBaseId
>
0
)
{
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_EnterpriseServices_Extend
.
MallBaseId
),
query
.
MallBaseId
);
}
if
(
query
.
CategoryId
>
0
)
{
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_EnterpriseServices_Extend
.
CategoryId
),
query
.
CategoryId
);
}
if
(
query
.
UserId
>
0
)
{
builder
.
AppendFormat
(
@" AND A.{0}={1} "
,
nameof
(
RB_EnterpriseServices_Extend
.
UserId
),
query
.
UserId
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
Name
))
{
builder
.
AppendFormat
(
@" AND A.{0} LIKE @Name "
,
nameof
(
RB_EnterpriseServices_Extend
.
Name
));
parameters
.
Add
(
"@Name"
,
"%"
+
query
.
Name
+
"%"
);
}
}
builder
.
AppendFormat
(
" ORDER BY A.{0} DESC "
,
nameof
(
RB_EnterpriseServices_Extend
.
ServiceId
));
return
Get
<
RB_EnterpriseServices_Extend
>(
builder
.
ToString
(),
parameters
).
ToList
();
}
}
}
}
}
Mall.WebApi/Controllers/TradePavilion/AppletTradeController.cs
View file @
f3af23ef
...
@@ -15,8 +15,11 @@ using Microsoft.AspNetCore.Cors;
...
@@ -15,8 +15,11 @@ using Microsoft.AspNetCore.Cors;
using
Microsoft.AspNetCore.Mvc
;
using
Microsoft.AspNetCore.Mvc
;
using
Newtonsoft.Json
;
using
Newtonsoft.Json
;
using
Newtonsoft.Json.Linq
;
using
Newtonsoft.Json.Linq
;
using
RabbitMQ.Client.Framing.Impl
;
using
System
;
using
System
;
using
System.Collections
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.ComponentModel.Design
;
using
System.Drawing
;
using
System.Drawing
;
using
System.Linq
;
using
System.Linq
;
using
System.Reflection
;
using
System.Reflection
;
...
@@ -2851,6 +2854,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
...
@@ -2851,6 +2854,7 @@ namespace Mall.WebApi.Controllers.TradePavilion
OpeningStatus
=
parms
.
GetInt
(
"OpeningStatus"
,
-
1
),
OpeningStatus
=
parms
.
GetInt
(
"OpeningStatus"
,
-
1
),
FirstStoreTest
=
parms
.
GetInt
(
"FirstStoreTest"
,
-
1
),
FirstStoreTest
=
parms
.
GetInt
(
"FirstStoreTest"
,
-
1
),
BuildingCarrierType
=
parms
.
GetInt
(
"BuildingCarrierType"
,
1
),
BuildingCarrierType
=
parms
.
GetInt
(
"BuildingCarrierType"
,
1
),
IsChengDu
=
parms
.
GetInt
(
"IsChengDu"
,
-
1
),
};
};
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
query
.
TenantId
=
RequestParm
.
TenantId
;
...
@@ -3037,11 +3041,142 @@ namespace Mall.WebApi.Controllers.TradePavilion
...
@@ -3037,11 +3041,142 @@ namespace Mall.WebApi.Controllers.TradePavilion
#
endregion
#
endregion
/// <summary>
/// 修改品牌
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetBrandEnterpriseUpdate
()
{
var
userInfo
=
AppletUserInfo
;
RB_Brand_Enterprise_Extend
query
=
JsonConvert
.
DeserializeObject
<
RB_Brand_Enterprise_Extend
>(
RequestParm
.
msg
.
ToString
());
if
(
query
.
ID
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递品牌id"
);
}
if
(
string
.
IsNullOrWhiteSpace
(
query
.
BrandName
))
{
return
ApiResult
.
Failed
(
"请输入品牌名称"
);
}
if
(
string
.
IsNullOrWhiteSpace
(
query
.
Logo
))
{
return
ApiResult
.
Failed
(
"请上传Logo"
);
}
if
(
query
.
BrandClassId
==
0
)
{
return
ApiResult
.
Failed
(
"请选择品牌分类"
);
}
if
(
query
.
BannerList
!=
null
&&
query
.
BannerList
.
Any
())
{
query
.
Banner
=
JsonConvert
.
SerializeObject
(
query
.
BannerList
);
}
else
{
query
.
Banner
=
""
;
}
query
.
CreateDate
=
System
.
DateTime
.
Now
;
query
.
MallBaseId
=
userInfo
.
MallBaseId
;
query
.
TenantId
=
userInfo
.
TenantId
;
query
.
Status
=
0
;
query
.
UpdateDate
=
System
.
DateTime
.
Now
;
query
.
CreateBy
=
userInfo
.
UserId
;
var
oldModel
=
buildingCarrierModule
.
GetBrandEnterpriseModule
(
query
.
ID
);
if
(
oldModel
==
null
)
{
return
ApiResult
.
Failed
(
"品牌不存在"
);
}
if
(
oldModel
.
UserId
!=
userInfo
.
UserId
)
{
return
ApiResult
.
Failed
(
"无法修改此品牌"
);
}
bool
flag
=
buildingCarrierModule
.
SetBrandEnterpriseModule
(
query
);
if
(
flag
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
();
}
}
/// <summary>
/// 修改载体
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetBuildingCarrierUpdate
()
{
var
userInfo
=
AppletUserInfo
;
RB_Building_Carrier_Extend
query
=
JsonConvert
.
DeserializeObject
<
RB_Building_Carrier_Extend
>(
RequestParm
.
msg
.
ToString
());
if
(
query
.
ID
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递载体id"
);
}
if
(
string
.
IsNullOrWhiteSpace
(
query
.
CarrierName
))
{
return
ApiResult
.
Failed
(
"请输入载体名称"
);
}
if
(
string
.
IsNullOrWhiteSpace
(
query
.
Developers
))
{
return
ApiResult
.
Failed
(
"请输入开发商"
);
}
if
(
string
.
IsNullOrWhiteSpace
(
query
.
Address
))
{
return
ApiResult
.
Failed
(
"请输入项目地址"
);
}
if
(
string
.
IsNullOrWhiteSpace
(
query
.
Logo
))
{
return
ApiResult
.
Failed
(
"请上传Logo"
);
}
if
(
query
.
BannerList
==
null
||
!
query
.
BannerList
.
Any
())
{
return
ApiResult
.
Failed
(
"请上传介绍图"
);
}
if
(
query
.
CategoryId
==
0
)
{
return
ApiResult
.
Failed
(
"请选择项目类型"
);
}
if
(
query
.
BannerList
!=
null
&&
query
.
BannerList
.
Any
())
{
query
.
Banner
=
JsonConvert
.
SerializeObject
(
query
.
BannerList
);
}
else
{
query
.
Banner
=
""
;
}
query
.
CreateDate
=
DateTime
.
Now
;
query
.
MallBaseId
=
userInfo
.
MallBaseId
;
query
.
TenantId
=
userInfo
.
TenantId
;
query
.
UpdateDate
=
DateTime
.
Now
;
var
oldModel
=
buildingCarrierModule
.
GetBuildingCarrierModule
(
query
.
ID
);
if
(
oldModel
==
null
)
{
return
ApiResult
.
Failed
(
"载体不存在"
);
}
if
(
oldModel
.
UserId
!=
userInfo
.
UserId
)
{
return
ApiResult
.
Failed
(
"无法修改此载体"
);
}
if
(!
string
.
IsNullOrWhiteSpace
(
query
.
StartingInfo
))
{
query
.
FirstStoreTest
=
1
;
}
else
{
query
.
FirstStoreTest
=
0
;
}
if
(
query
.
OpenTime
<=
System
.
DateTime
.
Now
)
{
query
.
OpeningStatus
=
1
;
}
else
{
query
.
OpeningStatus
=
0
;
}
bool
flag
=
buildingCarrierModule
.
SetBuildingCarrierModule
(
query
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
#
region
入驻
#
region
入驻
/// <summary>
/// <summary>
/// 【商载通】新增/修改品牌
、企业
申请信息
/// 【商载通】新增/修改品牌申请信息
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
[
HttpPost
]
[
HttpPost
]
...
@@ -3115,6 +3250,79 @@ namespace Mall.WebApi.Controllers.TradePavilion
...
@@ -3115,6 +3250,79 @@ namespace Mall.WebApi.Controllers.TradePavilion
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
}
/// <summary>
/// 【商载通】新增/修改企业申请信息
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetEnterpriseServicesApply
()
{
var
userInfo
=
AppletUserInfo
;
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
RB_EnterpriseServicesApply_Extend
model
=
new
RB_EnterpriseServicesApply_Extend
()
{
ID
=
parms
.
GetInt
(
"ID"
),
Name
=
parms
.
GetStringValue
(
"Name"
),
Introduction
=
parms
.
GetStringValue
(
"FullBIntroductionrandName"
),
DevIntention
=
parms
.
GetStringValue
(
"DevIntention"
),
Address
=
parms
.
GetStringValue
(
"Address"
),
LatAndLon
=
parms
.
GetStringValue
(
"LatAndLon"
),
OperationTime
=
parms
.
GetStringValue
(
"OperationTime"
),
CategoryId
=
parms
.
GetInt
(
"CategoryId"
),
Renovation
=
parms
.
GetStringValue
(
"Renovation"
),
Payment
=
parms
.
GetStringValue
(
"Payment"
),
HandoverDate
=
parms
.
GetStringValue
(
"HandoverDate"
),
IntentionalFloor
=
parms
.
GetInt
(
"IntentionalFloor"
),
ElevatorNum
=
parms
.
GetInt
(
"ElevatorNum"
),
PropertyFee
=
parms
.
GetDecimal
(
"PropertyFee"
),
RentFee
=
parms
.
GetDecimal
(
"RentFee"
),
ContactName
=
parms
.
GetStringValue
(
"ContactName"
),
ContactPhone
=
parms
.
GetStringValue
(
"ContactPhone"
),
CompanyId
=
parms
.
GetInt
(
"CompanyId"
),
};
if
(
model
.
CompanyId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递认证id"
);
}
if
(
string
.
IsNullOrWhiteSpace
(
model
.
Name
))
{
return
ApiResult
.
Failed
(
"请输入名称"
);
}
if
(
model
.
CategoryId
==
0
)
{
return
ApiResult
.
Failed
(
"请选择楼宇等级"
);
}
List
<
string
>
BannerList
=
new
List
<
string
>();
string
bannerListStr
=
parms
.
GetStringValue
(
"BannerList"
);
if
(!
string
.
IsNullOrEmpty
(
bannerListStr
))
{
try
{
BannerList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
string
>>(
bannerListStr
);
}
catch
{
}
}
model
.
Banner
=
Common
.
Plugin
.
JsonHelper
.
Serialize
(
BannerList
);
if
(
model
.
ID
==
0
)
{
model
.
CreateDate
=
System
.
DateTime
.
Now
;
model
.
CreateBy
=
userInfo
.
UserId
;
}
model
.
MallBaseId
=
userInfo
.
MallBaseId
;
model
.
TenantId
=
userInfo
.
TenantId
;
model
.
Status
=
0
;
model
.
UpdateDate
=
System
.
DateTime
.
Now
;
model
.
UpdateBy
=
userInfo
.
UserId
;
bool
flag
=
buildingCarrierModule
.
SetEnterpriseServicesApply
(
model
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// <summary>
/// 新增/修改载体申请信息
/// 新增/修改载体申请信息
/// </summary>
/// </summary>
...
@@ -3293,6 +3501,84 @@ namespace Mall.WebApi.Controllers.TradePavilion
...
@@ -3293,6 +3501,84 @@ namespace Mall.WebApi.Controllers.TradePavilion
bool
flag
=
buildingCarrierModule
.
SetCarrierEnterpriseApplyFor
(
query
);
bool
flag
=
buildingCarrierModule
.
SetCarrierEnterpriseApplyFor
(
query
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
}
/// <summary>
/// 【商载通】新增/修改楼宇申请信息
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetBuildingApplyFor
()
{
var
userInfo
=
AppletUserInfo
;
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
RB_BuildingApplyFor_Extend
model
=
new
RB_BuildingApplyFor_Extend
()
{
ID
=
parms
.
GetInt
(
"ID"
),
Name
=
parms
.
GetStringValue
(
"Name"
),
Address
=
parms
.
GetStringValue
(
"Address"
),
LatAndLon
=
parms
.
GetStringValue
(
"LatAndLon"
),
OperationTime
=
parms
.
GetStringValue
(
"OperationTime"
),
CategoryId
=
parms
.
GetInt
(
"CategoryId"
),
Areas
=
parms
.
GetStringValue
(
"Areas"
),
BuildingNum
=
parms
.
GetStringValue
(
"BuildingNum"
),
FloorNum
=
parms
.
GetInt
(
"FloorNum"
),
ElevatorNum
=
parms
.
GetInt
(
"ElevatorNum"
),
FloorHeight
=
parms
.
GetDecimal
(
"FloorHeight"
),
Developers
=
parms
.
GetStringValue
(
"Developers"
),
PropertyComp
=
parms
.
GetStringValue
(
"PropertyComp"
),
SaleOrSelf
=
parms
.
GetStringValue
(
"SaleOrSelf"
),
IsAllOperate
=
parms
.
GetInt
(
"IsAllOperate"
),
ConstructionTime
=
parms
.
GetStringValue
(
"ConstructionTime"
),
PropertyFee
=
parms
.
GetDecimal
(
"PropertyFee"
),
RentFee
=
parms
.
GetDecimal
(
"RentFee"
),
IndustryDirection
=
parms
.
GetStringValue
(
"IndustryDirection"
),
BrandDemand
=
parms
.
GetStringValue
(
"BrandDemand"
),
Other
=
parms
.
GetStringValue
(
"Other"
),
ContactName
=
parms
.
GetStringValue
(
"ContactName"
),
ContactPhone
=
parms
.
GetStringValue
(
"ContactPhone"
),
CompanyId
=
parms
.
GetInt
(
"CompanyId"
),
};
if
(
model
.
CompanyId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递认证id"
);
}
if
(
string
.
IsNullOrWhiteSpace
(
model
.
Name
))
{
return
ApiResult
.
Failed
(
"请输入名称"
);
}
if
(
model
.
CategoryId
==
0
)
{
return
ApiResult
.
Failed
(
"请选择楼宇等级"
);
}
List
<
string
>
BannerList
=
new
List
<
string
>();
string
bannerListStr
=
parms
.
GetStringValue
(
"BannerList"
);
if
(!
string
.
IsNullOrEmpty
(
bannerListStr
))
{
try
{
BannerList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
string
>>(
bannerListStr
);
}
catch
{
}
}
model
.
Banner
=
Common
.
Plugin
.
JsonHelper
.
Serialize
(
BannerList
);
if
(
model
.
ID
==
0
)
{
model
.
CreateDate
=
System
.
DateTime
.
Now
;
model
.
CreateBy
=
userInfo
.
UserId
;
}
model
.
MallBaseId
=
userInfo
.
MallBaseId
;
model
.
TenantId
=
userInfo
.
TenantId
;
model
.
Status
=
0
;
model
.
UpdateDate
=
System
.
DateTime
.
Now
;
model
.
UpdateBy
=
userInfo
.
UserId
;
bool
flag
=
buildingCarrierModule
.
SetBuildingApplyFor
(
model
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
#
endregion
#
endregion
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment