瀏覽代碼

项目编辑删除操作同时修改上报数据状态

金隅分支
zhangli 3 年之前
父節點
當前提交
0fa43fb06e
共有 4 個檔案被更改,包括 140 行新增12 行删除
  1. +3
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/QualityReportController.cs
  2. +54
    -9
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainBLL.cs
  3. +13
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainIBLL.cs
  4. +70
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainService.cs

+ 3
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/QualityReportController.cs 查看文件

@@ -58,9 +58,9 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers
{
return View();
}
#endregion

#endregion
#region 获取数据
/// <summary>
/// 获取页面显示列表数据
@@ -74,6 +74,7 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = fualityReportMainIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,


+ 54
- 9
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainBLL.cs 查看文件

@@ -19,11 +19,11 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
#region 获取数据

/// <summary>
        /// 获取页面显示列表数据
        /// </summary>
        /// <param name="pagination">分页参数</param>
        /// <param name="queryJson">查询参数</param>
        /// <returns></returns>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<QualityReportMainEntity> GetPageList(Pagination pagination, string queryJson)
{
try
@@ -44,10 +44,10 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
}

/// <summary>
        /// 获取QualityReportMain表实体数据
        /// </summary>
        /// <param name="keyValue">主键</param>
        /// <returns></returns>
/// 获取QualityReportMain表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public QualityReportMainEntity GetQualityReportMainEntity(string keyValue)
{
try
@@ -119,6 +119,51 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
}
}

/// <summary>
/// 项目删除,将状态改为作废
/// </summary>
/// <param name="FillinFromId">项目Id</param>
public void DelProjectByFId(string FillinFromId)
{
try
{
qualityReportMainService.DelProjectByFId(FillinFromId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 项目删除,将状态改为作废
/// </summary>
/// <param name="FillinFromId">项目Id</param>
public void EditProjectByFId(string FillinFromId)
{
try
{
qualityReportMainService.EditProjectByFId(FillinFromId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

}

+ 13
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainIBLL.cs 查看文件

@@ -42,6 +42,19 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, QualityReportMainEntity entity);

/// <summary>
/// 项目删除,将状态改为作废
/// </summary>
/// <param name="FillinFromId"></param>
void DelProjectByFId(string FillinFromId);

/// <summary>
/// 项目编辑,将状态改为草稿
/// </summary>
/// <param name="FillinFromId"></param>
void EditProjectByFId(string FillinFromId);

#endregion

}

+ 70
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainService.cs 查看文件

@@ -32,7 +32,7 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
var strSql = new StringBuilder();
strSql.Append(@"select b.WorderModule,b.ProjectName,b.FillingDept,b.Id as fid,a.Id,a.ReportTime,a.Status,a.Result,a.CreateUserName from QualityReportMain a join FillinFrom b on a.FillinFromId=b.Id
");
strSql.Append("  WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
@@ -136,6 +136,75 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
}
}


/// <summary>
/// 项目删除,将状态改为作废
/// </summary>
/// <param name="FillinFromId">项目Id</param>
public void DelProjectByFId(string FillinFromId)
{
try
{
UpdateStatusByFId(FillinFromId, 99);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 项目编辑,将状态改为草稿
/// </summary>
/// <param name="FillinFromId">项目Id</param>
public void EditProjectByFId(string FillinFromId)
{
try
{
UpdateStatusByFId(FillinFromId, 0);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
/// <summary>
/// 修改上报记录为作废状态
/// </summary>
/// <param name="FillinFromId">项目Id</param>
private void UpdateStatusByFId(string FillinFromId,int Status)
{
try
{
string sql = $"update QualityReportMain set [Status]='{Status}' where FillinFromId='{FillinFromId}'";
this.BaseRepository("CollegeMIS").ExecuteBySql(sql);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

}

Loading…
取消
儲存