Commit a7e1c459 authored by liudong1993's avatar liudong1993

Merge branch 'master' of http://gitlab.oytour.com/Kui2/education

parents 8a4f7afc 842448a2
......@@ -63,8 +63,6 @@ namespace Edu.Common
return timeStr;
}
/// <summary>
/// 获取时间格式
/// </summary>
......@@ -223,6 +221,18 @@ namespace Edu.Common
return weekDay;
}
/// <summary>
/// 计算两个时间相差分钟数
/// </summary>
/// <param name="start"></param>
/// <param name="end"></param>
/// <returns></returns>
public static int CalcMinutes(DateTime start, DateTime end)
{
int minutes=Convert.ToInt32((end - start).TotalMinutes);
return minutes;
}
/// <summary>
/// 是否为时间型字符串
/// </summary>
......
using Edu.Common.Enum;
using Edu.Common.Enum.Duty;
using System;
using VT.FW.DB;
......@@ -32,9 +33,9 @@ namespace Edu.Model.Entity.Duty
public int DutyMan { get; set; }
/// <summary>
/// 状态(1-打卡,2-交接)
/// 状态
/// </summary>
public int Status { get; set; }
public DutyStatusEnum Status { get; set; }
/// <summary>
/// 打卡时间
......@@ -45,5 +46,15 @@ namespace Edu.Model.Entity.Duty
/// 交接时间
/// </summary>
public DateTime FinishTime { get; set; }
/// <summary>
/// 迟到分钟数
/// </summary>
public int CheckLateTime { get; set; }
/// <summary>
/// 早退分钟数
/// </summary>
public int FinishLateTime { get; set; }
}
}
......@@ -97,6 +97,38 @@ namespace Edu.Model.ViewModel.Duty
/// 交接工作总数
/// </summary>
public int HandoverCount { get; set; }
/// <summary>
/// 上班打卡时间
/// </summary>
public string CheckTimeStr
{
get
{
string str = Common.ConvertHelper.FormatTimeStr(this.CheckTime);
if (str == "")
{
str = "未打卡";
}
return str;
}
}
/// <summary>
/// 下班打卡时间
/// </summary>
public string FinishTimeStr
{
get
{
string str = Common.ConvertHelper.FormatTimeStr(this.FinishTime);
if (str == "")
{
str = "未打卡";
}
return str;
}
}
}
/// <summary>
......
......@@ -47,24 +47,6 @@ namespace Edu.Model.ViewModel.Duty
/// </summary>
public int QShift { get; set; }
/// <summary>
/// 值班状态(见枚举)
/// </summary>
public DutyStatusEnum DutyStatus { get; set; }
/// <summary>
/// 值班状态字符串
/// </summary>
public string DutyStatusStr
{
get
{
string str = Common.Plugin.EnumHelper.ToName(this.DutyStatus);
return str;
}
}
/// <summary>
/// 校区查询
/// </summary>
......
This diff is collapsed.
......@@ -39,6 +39,10 @@ WHERE 1=1
{
builder.AppendFormat(@" AND A.{0} IN({1}) ", nameof(RB_Duty_PlanDetails_ViewModel.PlanId), query.QPlanIds);
}
if (query.Shift > 0)
{
builder.AppendFormat(@" AND A.{0}={1} ", nameof(RB_Duty_PlanDetails_ViewModel.Shift), query.Shift);
}
if (!string.IsNullOrEmpty(query.QDutyMan))
{
builder.AppendFormat(@" AND A.{0} IN({1}) ", nameof(RB_Duty_PlanDetails_ViewModel.DutyMan), query.QDutyMan);
......
......@@ -77,6 +77,11 @@ namespace Edu.WebApi.Controllers.Duty
qitem.ShiftName,
qitem.DutyStatus,
qitem.DutyStatusStr,
qitem.Status,
qitem.CheckTimeStr,
qitem.FinishTimeStr,
qitem.FinishLateTime,
qitem.CheckLateTime,
})
});
}
......@@ -160,6 +165,8 @@ namespace Edu.WebApi.Controllers.Duty
currentModel.StartTime,
currentModel.EndTime,
PlanList = currentModel?.WorkContentList ?? new List<RB_Duty_PlanWork_ViewModel>(),
currentModel.CheckLateTime,
currentModel.FinishLateTime,
currentModel.BurstCount,
currentModel.HandoverCount,
ReciveMan= jieBanMan,
......
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