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

【增加】webapi:增加宿舍物品损坏上报接口;

临城职教中职
dyy преди 2 години
родител
ревизия
109d5bf79e
променени са 3 файла, в които са добавени 111 реда и са изтрити 3 реда
  1. +1
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Acc_GoodsDemageController.cs
  2. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj
  3. +109
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/LogisticsManagement/Acc_GoodsDemageApi.cs

+ 1
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Controllers/Acc_GoodsDemageController.cs Целия файл

@@ -104,9 +104,7 @@ namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
{
Acc_GoodsDemageEntity entity = strEntity.ToObject<Acc_GoodsDemageEntity>();
var loginUserInfo = LoginUserInfo.Get();
entity.F_CreateAccount = loginUserInfo.account;
entity.F_CreateUserId = loginUserInfo.userId;
entity.F_CreateDate = DateTime.Now;
entity.F_CreateAccount = loginUserInfo.account;//上报学生学号
acc_GoodsDemageIBLL.SaveEntity(keyValue,entity);
return Success("保存成功!");
}


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj Целия файл

@@ -198,6 +198,7 @@
<Compile Include="Modules\EducationalAdministration\Sys_ReceiveComplaintApi.cs" />
<Compile Include="Modules\EducationalAdministration\Sys_SendComplaintApi.cs" />
<Compile Include="Modules\EducationalAdministration\LoginUserBindApi.cs" />
<Compile Include="Modules\LogisticsManagement\Acc_GoodsDemageApi.cs" />
<Compile Include="Modules\LogisticsManagement\Acc_StuDayRoutineApi.cs" />
<Compile Include="Modules\LogisticsManagement\Acc_PublicAreaHealthApi.cs" />
<Compile Include="Modules\LogisticsManagement\Acc_DailyAssessApi.cs" />


+ 109
- 0
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/LogisticsManagement/Acc_GoodsDemageApi.cs Целия файл

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

namespace Learun.Application.WebApi
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2022-09-16 14:43
/// 描 述:宿舍物品损坏上报
/// </summary>
public class Acc_GoodsDemageApi : BaseApi
{
private Acc_GoodsDemageIBLL acc_GoodsDemageIBLL = new Acc_GoodsDemageBLL();

/// <summary>
/// 注册接口
/// <summary>
public Acc_GoodsDemageApi()
: base("/Learun/adms/LogisticsManagement/Acc_GoodsDemage")
{
Get["/pagelist"] = GetPageList;
Get["/form"] = GetForm;
Post["/delete"] = DeleteForm;
Post["/save"] = SaveForm;
}
#region 获取数据

/// <summary>
/// 获取页面显示列表分页数据
/// <summary>
/// <param name="_"></param>
/// <returns></returns>
public Response GetPageList(dynamic _)
{
ReqPageParam parameter = this.GetReqData<ReqPageParam>();
var data = acc_GoodsDemageIBLL.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 GetForm(dynamic _)
{
string keyValue = this.GetReqData();
var Acc_GoodsDemageData = acc_GoodsDemageIBLL.GetAcc_GoodsDemageEntity(keyValue);
var jsonData = new
{
Acc_GoodsDemage = Acc_GoodsDemageData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// <param name="_"></param>
/// <summary>
/// <returns></returns>
public Response DeleteForm(dynamic _)
{
string keyValue = this.GetReqData();
acc_GoodsDemageIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="_"></param>
/// <summary>
/// <returns></returns>
public Response SaveForm(dynamic _)
{
ReqFormEntity parameter = this.GetReqData<ReqFormEntity>();
Acc_GoodsDemageEntity entity = parameter.strEntity.ToObject<Acc_GoodsDemageEntity>();
entity.F_CreateAccount = LoginUserInfo.Get().account;
acc_GoodsDemageIBLL.SaveEntity(parameter.keyValue, entity);
return Success("保存成功!");
}
#endregion

#region 私有类

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

}
}

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