Commit 6e736994 authored by 吴春's avatar 吴春

提交代码

parent b6b0e740
......@@ -966,31 +966,31 @@ namespace Mall.WebApi.Controllers.Reserve
{
int startTime = Convert.ToInt32(oldLogisticsModel.StartTime.Split(':')[0]);
int endTime = Convert.ToInt32(oldLogisticsModel.EndTime.Split(':')[0]);
DateTime tempStartTime = Convert.ToDateTime(System.DateTime.Now.ToString("yyyy-MM-dd") + " " + oldLogisticsModel.StartTime);
DateTime tempEndTime = Convert.ToDateTime(System.DateTime.Now.ToString("yyyy-MM-dd") + " " + oldLogisticsModel.EndTime);
DateTime tempStartTime = Convert.ToDateTime(query.WorkDate + " " + oldLogisticsModel.StartTime);
DateTime tempEndTime = Convert.ToDateTime(query.WorkDate + " " + oldLogisticsModel.EndTime);
if (startTime > endTime)//次日营业
{
tempEndTime = Convert.ToDateTime(System.DateTime.Now.AddDays(1).ToString("yyyy-MM-dd") + " " + oldLogisticsModel.EndTime);
tempEndTime = Convert.ToDateTime(tempStartTime.AddDays(1).ToString("yyyy-MM-dd") + " " + oldLogisticsModel.EndTime);
}
DateTime nowStartTime = tempStartTime;
DateTime nowEndTime = tempEndTime;
int startMin = Convert.ToInt32(oldLogisticsModel.StartTime.Split(':')[1]);
if (startMin >= 0 && startMin < 30)
{
nowStartTime = Convert.ToDateTime(System.DateTime.Now.ToString("yyyy-MM-dd") + " " + startTime + ":00");
nowStartTime = Convert.ToDateTime(query.WorkDate + " " + startTime + ":00");
}
else
{
nowStartTime = Convert.ToDateTime(System.DateTime.Now.ToString("yyyy-MM-dd") + " " + startTime + ":30");
nowStartTime = Convert.ToDateTime(query.WorkDate + " " + startTime + ":30");
}
int endMin = Convert.ToInt32(oldLogisticsModel.EndTime.Split(':')[1]);
if (endMin >= 0 && endMin < 30)
{
nowEndTime = Convert.ToDateTime(System.DateTime.Now.ToString("yyyy-MM-dd") + " " + endTime + ":00");
nowEndTime = Convert.ToDateTime(query.WorkDate + " " + endTime + ":00");
}
else
{
nowEndTime = Convert.ToDateTime(System.DateTime.Now.ToString("yyyy-MM-dd") + " " + endTime + ":30");
nowEndTime = Convert.ToDateTime(query.WorkDate + " " + endTime + ":30");
}
bool isAddTime = true;
......
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