Преглед на файлове

app2.0 值班管理接口

娄底高职分支
ndbs преди 2 години
родител
ревизия
5dbe8cb949
променени са 4 файла, в които са добавени 84 реда и са изтрити 15 реда
  1. +22
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DutySchedule/DutyScheduleBLL.cs
  2. +16
    -6
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DutySchedule/DutyScheduleEntity.cs
  3. +6
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DutySchedule/DutyScheduleIBLL.cs
  4. +40
    -9
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DutySchedule/DutyScheduleService.cs

+ 22
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DutySchedule/DutyScheduleBLL.cs Целия файл

@@ -66,6 +66,28 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
}
}

/// <summary>
/// 获取列表
/// </summary>
/// <returns>返回列表</returns>
public IEnumerable<DutyScheduleEntity> GetList()
{
try
{
return dutyScheduleService.GetList();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

#region 提交数据


+ 16
- 6
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DutySchedule/DutyScheduleEntity.cs Целия файл

@@ -11,7 +11,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
/// 日 期:2019-11-19 15:30
/// 描 述:值班安排
/// </summary>
public class DutyScheduleEntity
public class DutyScheduleEntity
{
#region 实体成员
/// <summary>
@@ -20,11 +20,6 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
[Column("ID")]
public string ID { get; set; }
/// <summary>
/// 日期
/// </summary>
[Column("DATE")]
public DateTime? Date { get; set; }
/// <summary>
/// 值班人员
/// </summary>
[Column("PERSON")]
@@ -34,6 +29,21 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
/// </summary>
[Column("REMARK")]
public string Remark { get; set; }
/// <summary>
/// 日期
/// </summary>
[Column("STARTTIME")]
public DateTime? StartTime { get; set; }
/// <summary>
/// 日期
/// </summary>
[Column("ENDTIME")]
public DateTime? EndTime { get; set; }
/// <summary>
/// 日期
/// </summary>
[Column("CREATETIME")]
public DateTime? CreateTime { get; set; }
#endregion

#region 扩展操作


+ 6
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DutySchedule/DutyScheduleIBLL.cs Целия файл

@@ -27,6 +27,12 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
/// <summary>
/// <returns></returns>
DutyScheduleEntity GetDutyScheduleEntity(string keyValue);
/// <summary>
/// 获取所有数据
/// </summary>
/// <returns></returns>
IEnumerable<DutyScheduleEntity> GetList();

#endregion

#region 提交数据


+ 40
- 9
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/PersonnelManagement/DutySchedule/DutyScheduleService.cs Целия файл

@@ -28,20 +28,27 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
{
try
{
var adms = this.BaseRepository().getDbConnection().Database;
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.ID,
t.Date,
t.Person,
t.Remark,u.F_Account,F_RealName
");
strSql.Append(" FROM DutySchedule t left join adms7ultimate2.dbo.LR_Base_User u on t.Person=u.F_UserId ");
strSql.Append(@" t.* ,u.F_Account,u.F_RealName ");
strSql.Append($" FROM DutySchedule t left join {adms}.dbo.LR_Base_User u on t.Person=u.F_UserId ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
return this.BaseRepository("CollegeMIS").FindList<DutyScheduleEntity>(strSql.ToString(),dp, pagination);
if (!queryParam["keyword"].IsEmpty())
{
dp.Add("keyword", "%" + queryParam["keyword"].ToString() + "%", DbType.String);
strSql.Append(" AND u.F_RealName Like @keyword ");
}
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty())
{
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime);
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime);
strSql.Append(" AND ( t.StartTime >= @startTime AND t.EndTime <= @endTime ) ");
}
return this.BaseRepository("CollegeMIS").FindList<DutyScheduleEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
@@ -80,6 +87,29 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
}
}

/// <summary>
/// 获取列表
/// </summary>
/// <returns>返回列表</returns>
public IEnumerable<DutyScheduleEntity> GetList()
{
try
{
var adms = this.BaseRepository().getDbConnection().Database;
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@" t.*, u.F_Account,F_RealName ");
strSql.Append($" FROM DutySchedule t left join {adms}.dbo.LR_Base_User u on t.Person=u.F_UserId ");
return this.BaseRepository("CollegeMIS").FindList<DutyScheduleEntity>(strSql.ToString());
}
catch (Exception ex)
{
if (ex is ExceptionEx)
throw;
else
throw ExceptionEx.ThrowServiceException(ex);
}
}
#endregion

#region 提交数据
@@ -93,7 +123,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
{
try
{
this.BaseRepository("CollegeMIS").Delete<DutyScheduleEntity>(t=>t.ID == keyValue);
this.BaseRepository("CollegeMIS").Delete<DutyScheduleEntity>(t => t.ID == keyValue);
}
catch (Exception ex)
{
@@ -125,6 +155,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement
else
{
entity.Create();
entity.CreateTime = DateTime.Now;
this.BaseRepository("CollegeMIS").Insert(entity);
}
}


Зареждане…
Отказ
Запис