Explorar el Código

安全排查流程接口

长阳分支中职
ndbs hace 1 mes
padre
commit
2a3fd3460d
Se han modificado 3 ficheros con 179 adiciones y 1 borrados
  1. +3
    -1
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj
  2. +158
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/EducationalAdministration/SafetyCheckApi.cs
  3. +18
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SafetyCheck/SafetyCheckService.cs

+ 3
- 1
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj Ver fichero

@@ -22,7 +22,8 @@
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
<UseGlobalApplicationHostFile />
<Use64BitIISExpress>false</Use64BitIISExpress>
<Use64BitIISExpress>
</Use64BitIISExpress>
<SccProjectName>
</SccProjectName>
<SccLocalPath>
@@ -194,6 +195,7 @@
<Compile Include="Modules\Echarts\StudentEchartsApi.cs" />
<Compile Include="Modules\EducationalAdministration\ArrangeExamTermApi.cs" />
<Compile Include="Modules\EducationalAdministration\ArrangeExamTermNewApi.cs" />
<Compile Include="Modules\EducationalAdministration\SafetyCheckApi.cs" />
<Compile Include="Modules\SSOApi.cs" />
<Compile Include="Modules\StampPersonalApi.cs" />
<Compile Include="Modules\FundsApplyApi.cs" />


+ 158
- 0
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/EducationalAdministration/SafetyCheckApi.cs Ver fichero

@@ -0,0 +1,158 @@
using Nancy;
using Learun.Util;
using System.Collections.Generic;
using System;
using Learun.Application.TwoDevelopment.EducationalAdministration;

namespace Learun.Application.WebApi
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2019-12-25 14:53
/// 描 述:日程安排
/// </summary>
public class SafetyCheckApi : BaseApi
{
private SafetyCheckIBLL SafetyCheckIBLL = new SafetyCheckBLL();

/// <summary>
/// 注册接口
/// <summary>
public SafetyCheckApi()
: base("/Learun/adms/EducationalAdministration/SafetyCheck")
{
Get["/pagelist"] = GetPageList;
Get["/form"] = GetForm;
Post["/delete"] = DeleteForm;
Post["/save"] = SaveForm;
Post["/submit"] = SubmitForm;
Post["/department"] = DepartmentForm;
}
#region 获取数据

/// <summary>
/// 获取页面显示列表分页数据
/// <summary>
/// <param name="_"></param>
/// <returns></returns>
public Response GetPageList(dynamic _)
{
ReqPageParam parameter = this.GetReqData<ReqPageParam>();
var data = SafetyCheckIBLL.GetPageList(parameter.pagination, parameter.queryJson);
var jsonData = new
{
rows = data,
total = parameter.pagination.total,
page = parameter.pagination.page,
records = parameter.pagination.records
};
return Success(jsonData);
}
///// <summary>
///// 获取页面显示列表数据
///// <summary>
///// <param name="_"></param>
///// <returns></returns>
//public Response GetList(dynamic _)
//{
// string queryJson = this.GetReqData();
// var data = SafetyCheckIBLL.GetList();
// return Success(data);
//}
/// <summary>
/// 获取表单数据
/// <summary>
/// <param name="_"></param>
/// <returns></returns>
public Response GetForm(dynamic _)
{
string keyValue = this.GetReqData();
var SafetyCheckData = SafetyCheckIBLL.GetSafetyCheckEntity(keyValue);

var jsonData = new
{
SafetyCheck = SafetyCheckData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// <param name="_"></param>
/// <summary>
/// <returns></returns>
public Response DeleteForm(dynamic _)
{
string keyValue = this.GetReqData();
SafetyCheckIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="_"></param>
/// <summary>
/// <returns></returns>
public Response SaveForm(dynamic _)
{
ReqFormEntity parameter = this.GetReqData<ReqFormEntity>();
SafetyCheckEntity entity = parameter.strEntity.ToObject<SafetyCheckEntity>();
SafetyCheckIBLL.SaveEntity(parameter.keyValue, entity);
return Success("保存成功!");
}
/// <summary>
/// 提交
/// </summary>
/// <param name="keyValue"></param>
/// <returns></returns>
public Response SubmitForm(dynamic _)
{
string keyValue = this.GetReqData();
SafetyCheckIBLL.SubmitEnity(keyValue);
return Success("提交成功!");
}
/// <summary>
/// 部门/分管-安全办
/// </summary>
/// <param name="_"></param>
/// <returns></returns>
public Response DepartmentForm(dynamic _)
{
ReqFormEntity parameter = this.GetReqData<ReqFormEntity>();
SafetyCheckEntity entity = parameter.strEntity.ToObject<SafetyCheckEntity>();
if (entity.Status == 1)
{
entity.Status = 2;
}
else if (entity.Status == 2)
{
entity.Status = 3;
}
else
{
entity.Status = 0;
}
SafetyCheckIBLL.SaveEntity(parameter.keyValue, entity);
return Success("操作成功!");
}

#endregion

#region 私有类

/// <summary>
/// 表单实体类
/// <summary>
private class ReqFormEntity
{
public string keyValue { get; set; }
public string strEntity { get; set; }
}
#endregion

}
}

+ 18
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SafetyCheck/SafetyCheckService.cs Ver fichero

@@ -90,6 +90,24 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

/// <summary>
/// 获取列表
/// </summary>
/// <returns>返回列表</returns>
public IEnumerable<SafetyCheckEntity> GetList()
{
try
{
return this.BaseRepository().FindList<SafetyCheckEntity>();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
throw;
else
throw ExceptionEx.ThrowServiceException(ex);
}
}
/// <summary>
/// 获取SafetyCheck表实体数据
/// </summary>


Cargando…
Cancelar
Guardar