This commit is contained in:
gongxh
2022-05-17 09:25:44 +08:00
parent 4fe118f2e5
commit d14b2ac45f
14 changed files with 125 additions and 114 deletions

View File

@@ -15,22 +15,22 @@ namespace CleanMachine.BLL.CM
/// <summary>
/// 存在
/// </summary>
public bool Exists(DateTime Date)
public bool Exists(DateTime Date,string UserName)
{
return new DayWorkTimeDAL().Exists(Date);
return new DayWorkTimeDAL().Exists(Date, UserName);
}
public bool UpdateTime(DateTime date, int value)
public bool UpdateTime(DateTime date, int value,string UserName)
{
var _dal = new DayWorkTimeDAL();
if (!_dal.Exists(date))
if (!_dal.Exists(date,UserName))
{
return _dal.Add(new Model.CM.DayWorkTime() { Date = date, StartValue = value, StartTime = DateTime.Now, EndValue = 0 });
return _dal.Add(new Model.CM.DayWorkTime() {UserName=UserName ,Date = date, StartValue = value, StartTime = DateTime.Now, EndValue = 0 });
}
else
{
return _dal.UpdateEndValue(new Model.CM.DayWorkTime() { Date = date, StartValue = 0, EndValue = value, EndTime = DateTime.Now });
return _dal.UpdateEndValue(new Model.CM.DayWorkTime() {UserName=UserName ,Date = date, StartValue = 0, EndValue = value, EndTime = DateTime.Now });
}
}