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
6c6618d1
Commit
6c6618d1
authored
Sep 08, 2020
by
吴春
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'sdzq-ld' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
into sdzq
parents
43edf880
f12257b9
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
156 additions
and
3 deletions
+156
-3
MobileCodeTypeEnum.cs
Mall.Common/Enum/MobileCodeTypeEnum.cs
+8
-1
Mall.Module.Product.csproj
Mall.Module.Product/Mall.Module.Product.csproj
+1
-0
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+80
-1
GuideCarController.cs
Mall.WebApi/Controllers/Product/GuideCarController.cs
+10
-1
OrderController.cs
Mall.WebApi/Controllers/Product/OrderController.cs
+57
-0
No files found.
Mall.Common/Enum/MobileCodeTypeEnum.cs
View file @
6c6618d1
...
@@ -80,6 +80,13 @@ namespace Mall.Common.Enum
...
@@ -80,6 +80,13 @@ namespace Mall.Common.Enum
/// CRM营销发送发送直客生日祝福
/// CRM营销发送发送直客生日祝福
/// </summary>
/// </summary>
[
EnumField
(
"SMS_187570365"
)]
[
EnumField
(
"SMS_187570365"
)]
CRMGuestBirth
=
14
CRMGuestBirth
=
14
,
/// <summary>
/// 导游通知
/// </summary>
[
EnumField
(
"SMS_201716853"
)]
GuideMsg
=
15
}
}
}
}
Mall.Module.Product/Mall.Module.Product.csproj
View file @
6c6618d1
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
<ProjectReference Include="..\Mall.Model\Mall.Model.csproj" />
<ProjectReference Include="..\Mall.Model\Mall.Model.csproj" />
<ProjectReference Include="..\Mall.Module.User\Mall.Module.User.csproj" />
<ProjectReference Include="..\Mall.Module.User\Mall.Module.User.csproj" />
<ProjectReference Include="..\Mall.Repository\Mall.Repository.csproj" />
<ProjectReference Include="..\Mall.Repository\Mall.Repository.csproj" />
<ProjectReference Include="..\Mall.ThirdCore\Mall.ThirdCore.csproj" />
</ItemGroup>
</ItemGroup>
</Project>
</Project>
Mall.Module.Product/OrderModule.cs
View file @
6c6618d1
...
@@ -5,6 +5,7 @@ using System.Text;
...
@@ -5,6 +5,7 @@ using System.Text;
using System.Threading.Tasks;
using System.Threading.Tasks;
using Mall.Common;
using Mall.Common;
using Mall.Common.API;
using Mall.Common.API;
using Mall.Common.Enum;
using Mall.Common.Enum.Goods;
using Mall.Common.Enum.Goods;
using Mall.Common.Enum.User;
using Mall.Common.Enum.User;
using Mall.Common.Plugin;
using Mall.Common.Plugin;
...
@@ -17,9 +18,11 @@ using Mall.Module.User;
...
@@ -17,9 +18,11 @@ using Mall.Module.User;
using Mall.Repository;
using Mall.Repository;
using Mall.Repository.BaseSetUp;
using Mall.Repository.BaseSetUp;
using Mall.Repository.Finance;
using Mall.Repository.Finance;
using Mall.Repository.GuideCar;
using Mall.Repository.MarketingCenter;
using Mall.Repository.MarketingCenter;
using Mall.Repository.Product;
using Mall.Repository.Product;
using Mall.Repository.User;
using Mall.Repository.User;
using Mall.ThirdCore.Message;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Configuration.Json;
using Microsoft.Extensions.Configuration.Json;
using Newtonsoft.Json;
using Newtonsoft.Json;
...
@@ -280,6 +283,14 @@ namespace Mall.Module.Product
...
@@ -280,6 +283,14 @@ namespace Mall.Module.Product
/// 商品可预定日期
/// 商品可预定日期
/// </summary>
/// </summary>
private readonly RB_Goods_TargetDateRepository goods_TargetDateRepository = new RB_Goods_TargetDateRepository();
private readonly RB_Goods_TargetDateRepository goods_TargetDateRepository = new RB_Goods_TargetDateRepository();
/// <summary>
/// 司导-导游
/// </summary>
private readonly RB_GuideCar_GuideRepository guideCar_GuideRepository = new RB_GuideCar_GuideRepository();
/// <summary>
/// 司导-车辆
/// </summary>
private readonly RB_GuideCar_CarRepository guideCar_CarRepository = new RB_GuideCar_CarRepository();
#region 购物车
#region 购物车
...
@@ -3842,6 +3853,7 @@ namespace Mall.Module.Product
...
@@ -3842,6 +3853,7 @@ namespace Mall.Module.Product
{
{
return ApiResult.Failed("预定日期与商品使用天数不一致");
return ApiResult.Failed("预定日期与商品使用天数不一致");
}
}
item.OrderType = OrderTypeEnum.SDGoods;
item.CarType = gmodel.CarType;
item.CarType = gmodel.CarType;
item.UseDay = gmodel.UseDay;
item.UseDay = gmodel.UseDay;
item.TripSTime = demodel.TripSTime;
item.TripSTime = demodel.TripSTime;
...
@@ -4297,7 +4309,6 @@ namespace Mall.Module.Product
...
@@ -4297,7 +4309,6 @@ namespace Mall.Module.Product
demodel.PaymentWay = OrderPaymentTypeEnum.OnlinePayment;//先默认在线支付
demodel.PaymentWay = OrderPaymentTypeEnum.OnlinePayment;//先默认在线支付
demodel.Remark ??= "";
demodel.Remark ??= "";
demodel.ApplyForCancelStatus ??= 0;
demodel.ApplyForCancelStatus ??= 0;
demodel
.
OrderType
=
(
int
)
OrderTypeEnum
.
SDGoods
;
int OrderId = goods_OrderRepository.Insert(demodel, trans);
int OrderId = goods_OrderRepository.Insert(demodel, trans);
if (OrderId > 0)
if (OrderId > 0)
{
{
...
@@ -10595,6 +10606,74 @@ namespace Mall.Module.Product
...
@@ -10595,6 +10606,74 @@ namespace Mall.Module.Product
#endregion
#endregion
#region 司导订单
/// <summary>
/// 司导订单确认
/// </summary>
/// <param name="orderId"></param>
/// <param name="empId"></param>
/// <returns></returns>
public bool SetSDOrderConfirm(int orderId,int Type, int empId)
{
Dictionary<string, object> keyValues = new Dictionary<string, object>() { };
if (Type == 1)
{
keyValues.Add(nameof(RB_Goods_Order.OrderStatus), OrderStatusEnum.WaitReceiving);
keyValues.Add(nameof(RB_Goods_Order.DeliveryTime), DateTime.Now);
}
else if (Type == 2)
{
keyValues.Add(nameof(RB_Goods_Order.OrderStatus), OrderStatusEnum.Received);
keyValues.Add(nameof(RB_Goods_Order.ReceivingTime), DateTime.Now);
}
else if (Type == 3) {
keyValues.Add(nameof(RB_Goods_Order.OrderStatus), OrderStatusEnum.Completed);
keyValues.Add(nameof(RB_Goods_Order.FinishTime), DateTime.Now);
}
List<WhereHelper> wheres = new List<WhereHelper>() {
new WhereHelper(){
FiledName=nameof(RB_Goods_Order.OrderId),
FiledValue=orderId,
OperatorEnum=OperatorEnum.Equal
}
};
bool flag = goods_OrderRepository.Update(keyValues, wheres);
if (flag && Type == 1) {
//发送短信通知导游接单
var omodel = goods_OrderRepository.GetEntity(orderId);
var list = goods_OrderDetailRepository.GetOrderDetailList(new RB_Goods_OrderDetail_Extend() { OrderId = orderId });
int IsNormalServer = Convert.ToInt32(Config.IsNormalServer);//为正式才发送短信
if (IsNormalServer == 1)
{
foreach (var item in list) {
if (item.GuideId > 0) {
//查询导游信息
var guideModel = guideCar_GuideRepository.GetEntity(item.GuideId ?? 0);
var carModel = guideCar_CarRepository.GetEntity(item.CarId ?? 0);
if (guideModel!=null && carModel!=null && !string.IsNullOrEmpty(guideModel.Telephone))
{
string Telephone = guideModel.Telephone;
MobileCodeTypeEnum mobileCodeType = MobileCodeTypeEnum.GuideMsg;//导游通知
if (ValidateHepler.IsMobileNumber(Telephone))
{
object PhoneMessage = new
{
omodel.OrderNo,
StartDate = item.TripSTime.Value.ToString("yyyy-MM-dd HH:mm"),
guideModel.Name,
CarName = carModel.Name + "(" + item.CarNumber + ")"
};
SMSService.SendMsg(Telephone, PhoneMessage, EnumHelper.GetEnumName(mobileCodeType));
}
}
}
}
}
}
return flag;
}
#endregion
#region 订单评论
#region 订单评论
/// <summary>
/// <summary>
...
...
Mall.WebApi/Controllers/Product/GuideCarController.cs
View file @
6c6618d1
...
@@ -387,6 +387,9 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -387,6 +387,9 @@ namespace Mall.WebApi.Controllers.MallBase
}
}
else
else
{
{
if
(
Convert
.
ToDateTime
(
StartDate
)
<
Convert
.
ToDateTime
(
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
)))
{
return
ApiResult
.
Failed
(
"开始时间不能小于当前时间"
);
}
DateTime
endDate
=
Convert
.
ToDateTime
(
EndDate
);
DateTime
endDate
=
Convert
.
ToDateTime
(
EndDate
);
for
(
DateTime
dt
=
Convert
.
ToDateTime
(
StartDate
);
dt
<=
endDate
;)
for
(
DateTime
dt
=
Convert
.
ToDateTime
(
StartDate
);
dt
<=
endDate
;)
{
{
...
@@ -405,6 +408,9 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -405,6 +408,9 @@ namespace Mall.WebApi.Controllers.MallBase
return
ApiResult
.
ParamIsNull
(
"请选择月份"
);
return
ApiResult
.
ParamIsNull
(
"请选择月份"
);
}
}
DateTime
StartTime
=
Convert
.
ToDateTime
(
Month
+
"-01"
);
DateTime
StartTime
=
Convert
.
ToDateTime
(
Month
+
"-01"
);
if
(
StartTime
<
Convert
.
ToDateTime
(
DateTime
.
Now
.
ToString
(
"yyyy-MM"
)
+
"-01"
))
{
return
ApiResult
.
Failed
(
"月份不能小于当前月份"
);
}
DateTime
EndTime
=
StartTime
.
AddMonths
(
1
).
AddDays
(-
1
);
DateTime
EndTime
=
StartTime
.
AddMonths
(
1
).
AddDays
(-
1
);
for
(
DateTime
dt
=
StartTime
;
dt
<=
EndTime
;)
for
(
DateTime
dt
=
StartTime
;
dt
<=
EndTime
;)
{
{
...
@@ -433,7 +439,10 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -433,7 +439,10 @@ namespace Mall.WebApi.Controllers.MallBase
StartTime
=
Convert
.
ToDateTime
(
Year
+
"-01"
+
"-01"
);
StartTime
=
Convert
.
ToDateTime
(
Year
+
"-01"
+
"-01"
);
EndTime
=
StartTime
.
AddYears
(
1
).
AddDays
(-
1
);
EndTime
=
StartTime
.
AddYears
(
1
).
AddDays
(-
1
);
}
}
if
(
StartTime
<
Convert
.
ToDateTime
(
DateTime
.
Now
.
ToString
(
"yyyy-MM"
)
+
"-01"
))
{
return
ApiResult
.
Failed
(
"月份不能小于当前月份"
);
}
for
(
DateTime
dt
=
StartTime
;
dt
<=
EndTime
;)
for
(
DateTime
dt
=
StartTime
;
dt
<=
EndTime
;)
{
{
//将日期转换为周几
//将日期转换为周几
...
...
Mall.WebApi/Controllers/Product/OrderController.cs
View file @
6c6618d1
...
@@ -992,7 +992,64 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -992,7 +992,64 @@ namespace Mall.WebApi.Controllers.MallBase
}));
}));
}
}
#
region
司导订单管理
/// <summary>
/// 司导订单确认
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetSDOrderConfirm
()
{
var
req
=
RequestParm
;
JObject
parms
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
int
OrderId
=
parms
.
GetInt
(
"OrderId"
,
0
);
int
Type
=
parms
.
GetInt
(
"Type"
,
1
);
//类型 1确认 2出行 3完成
if
(
OrderId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递订单id"
);
}
var
omodel
=
orderModule
.
GetOrderInfo
(
OrderId
);
if
(
omodel
==
null
)
{
return
ApiResult
.
ParamIsNull
(
"订单信息不存在"
);
}
if
(
omodel
.
OrderClassify
!=
1
)
{
return
ApiResult
.
ParamIsNull
(
"该订单不是司导订单"
);
}
if
(
Type
==
1
)
{
if
(
omodel
.
OrderStatus
!=
OrderStatusEnum
.
WaitSendGoods
)
{
return
ApiResult
.
ParamIsNull
(
"订单状态不正确,请核实后再试"
);
}
}
else
if
(
Type
==
2
)
{
if
(
omodel
.
OrderStatus
!=
OrderStatusEnum
.
WaitReceiving
)
{
return
ApiResult
.
ParamIsNull
(
"订单状态不正确,请核实后再试"
);
}
}
else
if
(
Type
==
3
)
{
if
(
omodel
.
OrderStatus
!=
OrderStatusEnum
.
Received
)
{
return
ApiResult
.
ParamIsNull
(
"订单状态不正确,请核实后再试"
);
}
}
else
{
return
ApiResult
.
Failed
();
}
bool
flag
=
orderModule
.
SetSDOrderConfirm
(
OrderId
,
Type
,
req
.
EmpId
);
if
(
flag
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
();
}
}
#
endregion
#
region
修改运费成本以及商品成本、供应商
#
region
修改运费成本以及商品成本、供应商
/// <summary>
/// <summary>
...
...
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