@@ -0,0 +1,161 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_EduController : MvcControllerBase | |||
{ | |||
private Purchase_EduIBLL purchase_EduIBLL = new Purchase_EduBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单查看页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormView() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = purchase_EduIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var Purchase_EduData = purchase_EduIBLL.GetPurchase_EduEntity( keyValue ); | |||
var Purchase_Edu_DetailsData = purchase_EduIBLL.GetPurchase_Edu_DetailsList( Purchase_EduData.Id ); | |||
var jsonData = new { | |||
Purchase_Edu = Purchase_EduData, | |||
Purchase_Edu_Details = Purchase_Edu_DetailsData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormDataByProcessId(string processId) | |||
{ | |||
var ArrangeLessonTermAttemperData = purchase_EduIBLL.GetEntityByProcessId(processId); | |||
var Purchase_Edu_DetailsData = purchase_EduIBLL.GetPurchase_Edu_DetailsList(ArrangeLessonTermAttemperData.Id); | |||
var jsonData = new | |||
{ | |||
Purchase_Edu = ArrangeLessonTermAttemperData, | |||
Purchase_Edu_Details = Purchase_Edu_DetailsData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
purchase_EduIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity, string strpurchase_Edu_DetailsList) | |||
{ | |||
Purchase_EduEntity entity = strEntity.ToObject<Purchase_EduEntity>(); | |||
List<Purchase_Edu_DetailsEntity> purchase_Edu_DetailsList = strpurchase_Edu_DetailsList.ToObject<List<Purchase_Edu_DetailsEntity>>(); | |||
purchase_EduIBLL.SaveEntity(keyValue,entity,purchase_Edu_DetailsList); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 提交课程异动记录 | |||
/// </summary> | |||
/// <param name="keyValue">课程异动主键</param> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
/// <returns></returns> | |||
public ActionResult ModifyStatus(string keyValue, int status, string processId) | |||
{ | |||
purchase_EduIBLL.ModifyStatus(keyValue, status, processId); | |||
return Success("提交成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,161 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_InfoController : MvcControllerBase | |||
{ | |||
private Purchase_InfoIBLL purchase_InfoIBLL = new Purchase_InfoBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单查看页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormView() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = purchase_InfoIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var Purchase_InfoData = purchase_InfoIBLL.GetPurchase_InfoEntity( keyValue ); | |||
var Purchase_Info_DetailsData = purchase_InfoIBLL.GetPurchase_Info_DetailsList( Purchase_InfoData.Id ); | |||
var jsonData = new { | |||
Purchase_Info = Purchase_InfoData, | |||
Purchase_Info_Details = Purchase_Info_DetailsData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormDataByProcessId(string processId) | |||
{ | |||
var ArrangeLessonTermAttemperData = purchase_InfoIBLL.GetEntityByProcessId(processId); | |||
var Purchase_Info_DetailsData = purchase_InfoIBLL.GetPurchase_Info_DetailsList(ArrangeLessonTermAttemperData.Id); | |||
var jsonData = new | |||
{ | |||
Purchase_Info = ArrangeLessonTermAttemperData, | |||
Purchase_Info_Details = Purchase_Info_DetailsData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
purchase_InfoIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity, string strpurchase_Info_DetailsList) | |||
{ | |||
Purchase_InfoEntity entity = strEntity.ToObject<Purchase_InfoEntity>(); | |||
List<Purchase_Info_DetailsEntity> purchase_Info_DetailsList = strpurchase_Info_DetailsList.ToObject<List<Purchase_Info_DetailsEntity>>(); | |||
purchase_InfoIBLL.SaveEntity(keyValue,entity,purchase_Info_DetailsList); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 提交课程异动记录 | |||
/// </summary> | |||
/// <param name="keyValue">课程异动主键</param> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
/// <returns></returns> | |||
public ActionResult ModifyStatus(string keyValue, int status, string processId) | |||
{ | |||
purchase_InfoIBLL.ModifyStatus(keyValue, status, processId); | |||
return Success("提交成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,161 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_LogisticController : MvcControllerBase | |||
{ | |||
private Purchase_LogisticIBLL purchase_LogisticIBLL = new Purchase_LogisticBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单查看页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormView() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = purchase_LogisticIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var Purchase_LogisticData = purchase_LogisticIBLL.GetPurchase_LogisticEntity( keyValue ); | |||
var Purchase_Logistic_DetailsData = purchase_LogisticIBLL.GetPurchase_Logistic_DetailsList( Purchase_LogisticData.Id ); | |||
var jsonData = new { | |||
Purchase_Logistic = Purchase_LogisticData, | |||
Purchase_Logistic_Details = Purchase_Logistic_DetailsData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormDataByProcessId(string processId) | |||
{ | |||
var ArrangeLessonTermAttemperData = purchase_LogisticIBLL.GetEntityByProcessId(processId); | |||
var Purchase_Logistic_DetailsData = purchase_LogisticIBLL.GetPurchase_Logistic_DetailsList(ArrangeLessonTermAttemperData.Id); | |||
var jsonData = new | |||
{ | |||
Purchase_Logistic = ArrangeLessonTermAttemperData, | |||
Purchase_Logistic_Details = Purchase_Logistic_DetailsData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
purchase_LogisticIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity, string strpurchase_Logistic_DetailsList) | |||
{ | |||
Purchase_LogisticEntity entity = strEntity.ToObject<Purchase_LogisticEntity>(); | |||
List<Purchase_Logistic_DetailsEntity> purchase_Logistic_DetailsList = strpurchase_Logistic_DetailsList.ToObject<List<Purchase_Logistic_DetailsEntity>>(); | |||
purchase_LogisticIBLL.SaveEntity(keyValue,entity,purchase_Logistic_DetailsList); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 提交课程异动记录 | |||
/// </summary> | |||
/// <param name="keyValue">课程异动主键</param> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
/// <returns></returns> | |||
public ActionResult ModifyStatus(string keyValue, int status, string processId) | |||
{ | |||
purchase_LogisticIBLL.ModifyStatus(keyValue, status, processId); | |||
return Success("提交成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,161 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_OtherController : MvcControllerBase | |||
{ | |||
private Purchase_OtherIBLL purchase_OtherIBLL = new Purchase_OtherBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单查看页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormView() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = purchase_OtherIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var Purchase_OtherData = purchase_OtherIBLL.GetPurchase_OtherEntity( keyValue ); | |||
var Purchase_Other_DetailsData = purchase_OtherIBLL.GetPurchase_Other_DetailsList( Purchase_OtherData.Id ); | |||
var jsonData = new { | |||
Purchase_Other = Purchase_OtherData, | |||
Purchase_Other_Details = Purchase_Other_DetailsData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormDataByProcessId(string processId) | |||
{ | |||
var ArrangeLessonTermAttemperData = purchase_OtherIBLL.GetEntityByProcessId(processId); | |||
var Purchase_Other_DetailsData = purchase_OtherIBLL.GetPurchase_Other_DetailsList(ArrangeLessonTermAttemperData.Id); | |||
var jsonData = new | |||
{ | |||
Purchase_Other = ArrangeLessonTermAttemperData, | |||
Purchase_Other_Details = Purchase_Other_DetailsData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
purchase_OtherIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity, string strpurchase_Other_DetailsList) | |||
{ | |||
Purchase_OtherEntity entity = strEntity.ToObject<Purchase_OtherEntity>(); | |||
List<Purchase_Other_DetailsEntity> purchase_Other_DetailsList = strpurchase_Other_DetailsList.ToObject<List<Purchase_Other_DetailsEntity>>(); | |||
purchase_OtherIBLL.SaveEntity(keyValue,entity,purchase_Other_DetailsList); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 提交课程异动记录 | |||
/// </summary> | |||
/// <param name="keyValue">课程异动主键</param> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
/// <returns></returns> | |||
public ActionResult ModifyStatus(string keyValue, int status, string processId) | |||
{ | |||
purchase_OtherIBLL.ModifyStatus(keyValue, status, processId); | |||
return Success("提交成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,161 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_PrintController : MvcControllerBase | |||
{ | |||
private Purchase_PrintIBLL purchase_PrintIBLL = new Purchase_PrintBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单查看页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormView() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = purchase_PrintIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var Purchase_PrintData = purchase_PrintIBLL.GetPurchase_PrintEntity( keyValue ); | |||
var Purchase_Print_DetailsData = purchase_PrintIBLL.GetPurchase_Print_DetailsList( Purchase_PrintData.Id ); | |||
var jsonData = new { | |||
Purchase_Print = Purchase_PrintData, | |||
Purchase_Print_Details = Purchase_Print_DetailsData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormDataByProcessId(string processId) | |||
{ | |||
var ArrangeLessonTermAttemperData = purchase_PrintIBLL.GetEntityByProcessId(processId); | |||
var Purchase_Print_DetailsData = purchase_PrintIBLL.GetPurchase_Print_DetailsList(ArrangeLessonTermAttemperData.Id); | |||
var jsonData = new | |||
{ | |||
Purchase_Print = ArrangeLessonTermAttemperData, | |||
Purchase_Print_Details = Purchase_Print_DetailsData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
purchase_PrintIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity, string strpurchase_Print_DetailsList) | |||
{ | |||
Purchase_PrintEntity entity = strEntity.ToObject<Purchase_PrintEntity>(); | |||
List<Purchase_Print_DetailsEntity> purchase_Print_DetailsList = strpurchase_Print_DetailsList.ToObject<List<Purchase_Print_DetailsEntity>>(); | |||
purchase_PrintIBLL.SaveEntity(keyValue,entity,purchase_Print_DetailsList); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 提交课程异动记录 | |||
/// </summary> | |||
/// <param name="keyValue">课程异动主键</param> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
/// <returns></returns> | |||
public ActionResult ModifyStatus(string keyValue, int status, string processId) | |||
{ | |||
purchase_PrintIBLL.ModifyStatus(keyValue, status, processId); | |||
return Success("提交成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,161 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_StudentController : MvcControllerBase | |||
{ | |||
private Purchase_StudentIBLL purchase_StudentIBLL = new Purchase_StudentBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单查看页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormView() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = purchase_StudentIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var Purchase_StudentData = purchase_StudentIBLL.GetPurchase_StudentEntity( keyValue ); | |||
var Purchase_Student_DetailsData = purchase_StudentIBLL.GetPurchase_Student_DetailsList( Purchase_StudentData.Id ); | |||
var jsonData = new { | |||
Purchase_Student = Purchase_StudentData, | |||
Purchase_Student_Details = Purchase_Student_DetailsData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormDataByProcessId(string processId) | |||
{ | |||
var ArrangeLessonTermAttemperData = purchase_StudentIBLL.GetEntityByProcessId(processId); | |||
var Purchase_Student_DetailsData = purchase_StudentIBLL.GetPurchase_Student_DetailsList(ArrangeLessonTermAttemperData.Id); | |||
var jsonData = new | |||
{ | |||
Purchase_Student = ArrangeLessonTermAttemperData, | |||
Purchase_Student_Details = Purchase_Student_DetailsData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
purchase_StudentIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity, string strpurchase_Student_DetailsList) | |||
{ | |||
Purchase_StudentEntity entity = strEntity.ToObject<Purchase_StudentEntity>(); | |||
List<Purchase_Student_DetailsEntity> purchase_Student_DetailsList = strpurchase_Student_DetailsList.ToObject<List<Purchase_Student_DetailsEntity>>(); | |||
purchase_StudentIBLL.SaveEntity(keyValue,entity,purchase_Student_DetailsList); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 提交课程异动记录 | |||
/// </summary> | |||
/// <param name="keyValue">课程异动主键</param> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
/// <returns></returns> | |||
public ActionResult ModifyStatus(string keyValue, int status, string processId) | |||
{ | |||
purchase_StudentIBLL.ModifyStatus(keyValue, status, processId); | |||
return Success("提交成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,161 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_WorkController : MvcControllerBase | |||
{ | |||
private Purchase_WorkIBLL purchase_WorkIBLL = new Purchase_WorkBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单查看页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormView() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = purchase_WorkIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var Purchase_WorkData = purchase_WorkIBLL.GetPurchase_WorkEntity( keyValue ); | |||
var Purchase_Work_DetailsData = purchase_WorkIBLL.GetPurchase_Work_DetailsList( Purchase_WorkData.Id ); | |||
var jsonData = new { | |||
Purchase_Work = Purchase_WorkData, | |||
Purchase_Work_Details = Purchase_Work_DetailsData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormDataByProcessId(string processId) | |||
{ | |||
var ArrangeLessonTermAttemperData = purchase_WorkIBLL.GetEntityByProcessId(processId); | |||
var Purchase_Work_DetailsData = purchase_WorkIBLL.GetPurchase_Work_DetailsList(ArrangeLessonTermAttemperData.Id); | |||
var jsonData = new | |||
{ | |||
Purchase_Work = ArrangeLessonTermAttemperData, | |||
Purchase_Work_Details = Purchase_Work_DetailsData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
purchase_WorkIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity, string strpurchase_Work_DetailsList) | |||
{ | |||
Purchase_WorkEntity entity = strEntity.ToObject<Purchase_WorkEntity>(); | |||
List<Purchase_Work_DetailsEntity> purchase_Work_DetailsList = strpurchase_Work_DetailsList.ToObject<List<Purchase_Work_DetailsEntity>>(); | |||
purchase_WorkIBLL.SaveEntity(keyValue,entity,purchase_Work_DetailsList); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 提交课程异动记录 | |||
/// </summary> | |||
/// <param name="keyValue">课程异动主键</param> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
/// <returns></returns> | |||
public ActionResult ModifyStatus(string keyValue, int status, string processId) | |||
{ | |||
purchase_WorkIBLL.ModifyStatus(keyValue, status, processId); | |||
return Success("提交成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,32 @@ | |||
@{ | |||
ViewBag.Title = "申请类"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Edu"> | |||
<div class="lr-form-item-title">部门<font face="宋体">*</font></div> | |||
<input id="DepartmentId" type="text" class="form-control currentInfo lr-currentInfo-department" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="DepartmentName" type="text" class="form-control currentInfo lr-currentInfo-department" isvalid="yes" checkexpession="NotNull" style="display:none"/> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Edu"> | |||
<div class="lr-form-item-title">申请人<font face="宋体">*</font></div> | |||
<input id="CreatorId" type="text" readonly class="form-control currentInfo lr-currentInfo-user" /> | |||
<input id="CreatorName" type="text" readonly class="form-control currentInfo lr-currentInfo-user" style="display:none"/> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Edu" > | |||
<div class="lr-form-item-title">总价格<font face="宋体">*</font></div> | |||
<input id="TotalAmount" type="number" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Edu" > | |||
<div class="lr-form-item-title">备注</div> | |||
<input id="Remark" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Edu" > | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="FilePath" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item lr-form-item-grid" > | |||
<div id="Purchase_Edu_Details"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Edu/Form.js") |
@@ -0,0 +1,144 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2023-06-25 18:33 | |||
* 描 述:申请类 | |||
*/ | |||
var acceptClick; | |||
var computeamount; | |||
var userinfo; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
userinfo = learun.clientdata.get(['userinfo']);//用户数据 | |||
console.log(userinfo) | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
//加载部门、用户 | |||
$('#DepartmentId')[0].lrvalue = userinfo.departmentId; | |||
learun.clientdata.getAsync('department', { | |||
key: userinfo.departmentId, | |||
callback: function (_data) { | |||
$('#DepartmentId').val(_data.name); | |||
$('#DepartmentName')[0].lrvalue = _data.name; | |||
} | |||
}); | |||
//加载用户 | |||
$('#CreatorId')[0].lrvalue = userinfo.userId; | |||
$('#CreatorName')[0].lrvalue = userinfo.realName; | |||
$('#CreatorId').val(userinfo.realName); | |||
$('#FilePath').lrUploader(); | |||
$('#Purchase_Edu_Details').jfGrid({ | |||
headData: [ | |||
{ | |||
label: '采购物品名称', name: 'Name', width: 100, align: 'left', | |||
edit: { | |||
type:'input' | |||
} | |||
}, | |||
{ | |||
label: '价格', name: 'Price', width:100, align: 'left', | |||
edit: { | |||
type: 'input', | |||
init: function (data, $edit) {// 在点击单元格的时候触发,可以用来初始化输入控件,行数据和控件对象 | |||
}, | |||
change: function (data, num) {// 行数据和行号 | |||
if (!isNaN(data.Price)) { | |||
computeamount(); | |||
} else { | |||
learun.alert.warning("只能是数字"); | |||
data.Price=0 | |||
} | |||
} | |||
} | |||
}, | |||
{ | |||
label: '采购数量', name: 'Quantity', width: 100, align: 'left', | |||
edit: { | |||
type: 'input', | |||
init: function (data, $edit) {// 在点击单元格的时候触发,可以用来初始化输入控件,行数据和控件对象 | |||
}, | |||
change: function (data, num) {// 行数据和行号 | |||
if (!isNaN(data.Quantity)) { | |||
computeamount(); | |||
} else { | |||
learun.alert.warning("只能是数字"); | |||
data.Quantity = 0 | |||
} | |||
} | |||
} | |||
}, | |||
{ | |||
label: '单位', name: 'Unit', width: 100, align: 'left', | |||
edit: { | |||
type:'input' | |||
} | |||
}, | |||
{ | |||
label: '用途', name: 'UseTo', width: 100, align: 'left', | |||
edit: { | |||
type:'input' | |||
} | |||
}, | |||
{ | |||
label: 'Id', name: 'Id', width: 100, align: 'left', ishide: true | |||
}, | |||
], | |||
isEdit: true, | |||
height: 400, | |||
onMinusRow: function (row, rows) {//行数据和所有行数据 | |||
computeamount(); | |||
}, | |||
}); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Edu/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
}, | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = {}; | |||
postData.strEntity = JSON.stringify($('[data-table="Purchase_Edu"]').lrGetFormData()); | |||
postData.strpurchase_Edu_DetailsList = JSON.stringify($('#Purchase_Edu_Details').jfGridGet('rowdatas')); | |||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Edu/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
computeamount= function () { | |||
var rowdatas = $('#Purchase_Edu_Details').jfGridGet('rowdatas'); | |||
var totalamount = 0; | |||
for (var i = 0; i < rowdatas.length; i++) { | |||
if (rowdatas[i].Price && rowdatas[i].Quantity) { | |||
totalamount += rowdatas[i].Price * rowdatas[i].Quantity; | |||
} | |||
} | |||
$('#TotalAmount').val(totalamount); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,56 @@ | |||
@{ | |||
ViewBag.Title = "教学调度"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<style> | |||
.searchRow { | |||
margin-bottom: 20px; | |||
} | |||
.text-center { | |||
padding: 10px 0; | |||
} | |||
.btnRow > div { | |||
color: #0094ff; | |||
cursor: pointer; | |||
width: 100px; | |||
} | |||
.AttemperType { | |||
display: none; | |||
} | |||
</style> | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Edu" style="display:none"> | |||
<input id="Status" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="CreateTime" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="SubmitTime" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Edu"> | |||
<div class="lr-form-item-title">部门<font face="宋体">*</font></div> | |||
<input id="DepartmentId" type="text" class="form-control currentInfo lr-currentInfo-department" readonly isvalid="yes" checkexpession="NotNull" /> | |||
<input id="DepartmentName" type="text" class="form-control currentInfo lr-currentInfo-department" readonly isvalid="yes" checkexpession="NotNull" style="display:none" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Edu"> | |||
<div class="lr-form-item-title">申请人<font face="宋体">*</font></div> | |||
<input id="CreatorId" type="text" readonly class="form-control currentInfo lr-currentInfo-user" readonly /> | |||
<input id="CreatorName" type="text" readonly class="form-control currentInfo lr-currentInfo-user" readonly style="display:none" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Edu"> | |||
<div class="lr-form-item-title">总价格<font face="宋体">*</font></div> | |||
<input id="TotalAmount" type="number" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Edu"> | |||
<div class="lr-form-item-title">备注</div> | |||
<input id="Remark" type="text" readonly class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Edu"> | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="FilePath"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item lr-form-item-grid"> | |||
<div id="Purchase_Edu_Details"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Edu/FormView.js") |
@@ -0,0 +1,131 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-09-26 10:47 | |||
* 描 述:办公采购申请 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
// 设置权限 | |||
var setAuthorize; | |||
// 设置表单数据 | |||
var setFormData; | |||
// 验证数据是否填写完整 | |||
var validForm; | |||
// 保存数据 | |||
var save; | |||
//绑定原课程安排 | |||
var bindData; | |||
//绑定新课程安排 | |||
var bindDataNew; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
// 设置权限 | |||
setAuthorize = function (data) { | |||
}; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
////加载部门、用户 | |||
//$('#DepartmentId')[0].lrvalue = userinfo.departmentId; | |||
//learun.clientdata.getAsync('department', { | |||
// key: userinfo.departmentId, | |||
// callback: function (_data) { | |||
// $('#DepartmentId').val(_data.name); | |||
// $('#DepartmentName')[0].lrvalue = _data.name; | |||
// } | |||
//}); | |||
////加载用户 | |||
//$('#CreatorId')[0].lrvalue = userinfo.userId; | |||
//$('#CreatorName')[0].lrvalue = userinfo.realName; | |||
//$('#CreatorId').val(userinfo.realName); | |||
$('#FilePath').lrUploader({ isUpload: false }); | |||
$('#Purchase_Edu_Details').jfGrid({ | |||
headData: [ | |||
{ label: '采购物品名称', name: 'Name', width: 100, align: 'left' }, | |||
{ label: '价格', name: 'Price', width: 100, align: 'left' }, | |||
{ label: '采购数量', name: 'Quantity', width: 100, align: 'left' }, | |||
{ label: '单位', name: 'Unit', width: 100, align: 'left' }, | |||
{ label: '用途', name: 'UseTo', width: 100, align: 'left' }, | |||
{ label: 'Id', name: 'Id', width: 100, align: 'left', ishide: true }, | |||
], | |||
isEdit: false, | |||
height: 400, | |||
onMinusRow: function (row, rows) {//行数据和所有行数据 | |||
computeamount(); | |||
}, | |||
}); | |||
}, | |||
initData: function () { | |||
console.log(keyValue) | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Edu/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
}, | |||
}; | |||
// 设置表单数据 | |||
setFormData = function (processId, param, callback) { | |||
if (!!processId) { | |||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Edu/GetFormDataByProcessId?processId=' + processId, function (data) { | |||
for (var id in data) { | |||
if (!!data[id] && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
//if (id == 'ArrangeLessonTermAttemper') { | |||
keyValue = data[id].Id; | |||
//} | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
callback && callback(); | |||
} | |||
// 验证数据是否填写完整 | |||
validForm = function () { | |||
if (!$('#form').lrValidform()) { | |||
return false; | |||
} | |||
return true; | |||
}; | |||
// 保存数据 | |||
save = function (processId, callBack, i) { | |||
var formData = $('body').lrGetFormData(); | |||
if (!!processId) { | |||
formData.ProcessId = processId; | |||
} | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = {}; | |||
postData.strEntity = JSON.stringify($('[data-table="Purchase_Edu"]').lrGetFormData()); | |||
postData.strpurchase_Edu_DetailsList = JSON.stringify($('#Purchase_Edu_Details').jfGridGet('rowdatas')); | |||
//var postData = { | |||
// strEntity: JSON.stringify(formData) | |||
//}; | |||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Edu/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(res, i); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,28 @@ | |||
@{ | |||
ViewBag.Title = "申请类"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看</a> | |||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Edu/Index.js") |
@@ -0,0 +1,204 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2023-06-25 18:33 | |||
* 描 述:申请类 | |||
*/ | |||
var refreshGirdData; | |||
var selectedRow; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var processId = ''; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Edu/Form', | |||
width: 1000, | |||
height: 800, | |||
callBack: function (id) { | |||
//res = top[id].save('', function () { | |||
// page.search(); | |||
//}); | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status == 1) {//提交 | |||
learun.alert.warning("当前课程异动记录已提交!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Edu/Form?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 800, | |||
callBack: function (id) { | |||
var res = false; | |||
// 验证数据 | |||
//res = top[id].validForm(); | |||
// 保存数据 | |||
//if (res) { | |||
//res = top[id].save('', function () { | |||
// page.search(); | |||
//}); | |||
return top[id].acceptClick(refreshGirdData); | |||
//} | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status !== 0) { | |||
learun.alert.warning("当前课程异动记录已提交,无法删除!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Edu/DeleteForm', { keyValue: keyValue}, function () { | |||
//refreshGirdData(); | |||
page.search(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 提交 | |||
$('#lr_submit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status !== 0) { | |||
learun.alert.warning("当前课程异动记录已提交!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认提交该项!', function (res) { | |||
if (res) { | |||
processId = learun.newGuid(); | |||
learun.postForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Edu/ModifyStatus', { keyValue: keyValue, status: 1, processId: processId }, function (res) { | |||
//selectedRow.ProcessId = processId; | |||
refreshGirdData(res, {}); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 查看 | |||
$('#lr_view').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status == 0) { | |||
learun.alert.warning("当前课程异动记录未提交,请提交后再查看!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'formview', | |||
title: '查看', | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Edu/FormView?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 600, | |||
btn: null | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Edu/GetPageList', | |||
headData: [ | |||
{ label: "部门", name: "DepartmentId", width: 150, align: "left", | |||
formatter: function (cellvalue, row) { | |||
return row.DepartmentName; | |||
} | |||
}, | |||
{ | |||
label: "申请人", name: "CreatorId", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
return row.CreatorName; | |||
} | |||
}, | |||
{ label: "总价格", name: "TotalAmount", width: 100, align: "left"}, | |||
{ label: "备注", name: "Remark", width: 100, align: "left"}, | |||
{ label: "提交时间", name: "SubmitTime", width: 130, align: "left" }, | |||
{ | |||
label: "状态", name: "Status", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue == 1) { | |||
return '<span class=\"label label-success\" >已提交</span>'; | |||
} else { | |||
return '<span class=\"label label-default\" >未提交</span>'; | |||
} | |||
} | |||
}, | |||
//{ | |||
// label: "审核用户", name: "CheckUserId", width: 100, align: "left", | |||
// formatter: function (cellvalue, row) { | |||
// return row.CheckUserName; | |||
// } | |||
//}, | |||
{ label: "审核时间", name: "CheckTime", width: 130, align: "left" }, | |||
{ | |||
label: "审核状态", name: "CheckStatus", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue == 1) { | |||
return '<span class=\"label label-warning\" >审核中</span>'; | |||
} else if (cellvalue == 2) { | |||
return '<span class=\"label label-success\" >审核通过</span>'; | |||
} else { | |||
return '<span class=\"label label-default\" >草稿</span>'; | |||
} | |||
} | |||
}, | |||
], | |||
mainId:'Id', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function (res, postData) { | |||
if (res && res.code && res.code == 200) { | |||
// 发起流程 | |||
var postData = { | |||
schemeCode: '2-1',// 填写流程对应模板编号 | |||
processId: processId, | |||
level: '1', | |||
}; | |||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||
learun.loading(false); | |||
}); | |||
} | |||
page.search(); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,32 @@ | |||
@{ | |||
ViewBag.Title = "申请类"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Info"> | |||
<div class="lr-form-item-title">部门<font face="宋体">*</font></div> | |||
<input id="DepartmentId" type="text" class="form-control currentInfo lr-currentInfo-department" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="DepartmentName" type="text" class="form-control currentInfo lr-currentInfo-department" isvalid="yes" checkexpession="NotNull" style="display:none"/> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Info"> | |||
<div class="lr-form-item-title">申请人<font face="宋体">*</font></div> | |||
<input id="CreatorId" type="text" readonly class="form-control currentInfo lr-currentInfo-user" /> | |||
<input id="CreatorName" type="text" readonly class="form-control currentInfo lr-currentInfo-user" style="display:none"/> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Info" > | |||
<div class="lr-form-item-title">总价格<font face="宋体">*</font></div> | |||
<input id="TotalAmount" type="number" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Info" > | |||
<div class="lr-form-item-title">备注</div> | |||
<input id="Remark" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Info" > | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="FilePath" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item lr-form-item-grid" > | |||
<div id="Purchase_Info_Details"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Info/Form.js") |
@@ -0,0 +1,144 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2023-06-25 18:33 | |||
* 描 述:申请类 | |||
*/ | |||
var acceptClick; | |||
var computeamount; | |||
var userinfo; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
userinfo = learun.clientdata.get(['userinfo']);//用户数据 | |||
console.log(userinfo) | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
//加载部门、用户 | |||
$('#DepartmentId')[0].lrvalue = userinfo.departmentId; | |||
learun.clientdata.getAsync('department', { | |||
key: userinfo.departmentId, | |||
callback: function (_data) { | |||
$('#DepartmentId').val(_data.name); | |||
$('#DepartmentName')[0].lrvalue = _data.name; | |||
} | |||
}); | |||
//加载用户 | |||
$('#CreatorId')[0].lrvalue = userinfo.userId; | |||
$('#CreatorName')[0].lrvalue = userinfo.realName; | |||
$('#CreatorId').val(userinfo.realName); | |||
$('#FilePath').lrUploader(); | |||
$('#Purchase_Info_Details').jfGrid({ | |||
headData: [ | |||
{ | |||
label: '采购物品名称', name: 'Name', width: 100, align: 'left', | |||
edit: { | |||
type:'input' | |||
} | |||
}, | |||
{ | |||
label: '价格', name: 'Price', width:100, align: 'left', | |||
edit: { | |||
type: 'input', | |||
init: function (data, $edit) {// 在点击单元格的时候触发,可以用来初始化输入控件,行数据和控件对象 | |||
}, | |||
change: function (data, num) {// 行数据和行号 | |||
if (!isNaN(data.Price)) { | |||
computeamount(); | |||
} else { | |||
learun.alert.warning("只能是数字"); | |||
data.Price=0 | |||
} | |||
} | |||
} | |||
}, | |||
{ | |||
label: '采购数量', name: 'Quantity', width: 100, align: 'left', | |||
edit: { | |||
type: 'input', | |||
init: function (data, $edit) {// 在点击单元格的时候触发,可以用来初始化输入控件,行数据和控件对象 | |||
}, | |||
change: function (data, num) {// 行数据和行号 | |||
if (!isNaN(data.Quantity)) { | |||
computeamount(); | |||
} else { | |||
learun.alert.warning("只能是数字"); | |||
data.Quantity = 0 | |||
} | |||
} | |||
} | |||
}, | |||
{ | |||
label: '单位', name: 'Unit', width: 100, align: 'left', | |||
edit: { | |||
type:'input' | |||
} | |||
}, | |||
{ | |||
label: '用途', name: 'UseTo', width: 100, align: 'left', | |||
edit: { | |||
type:'input' | |||
} | |||
}, | |||
{ | |||
label: 'Id', name: 'Id', width: 100, align: 'left', ishide: true | |||
}, | |||
], | |||
isEdit: true, | |||
height: 400, | |||
onMinusRow: function (row, rows) {//行数据和所有行数据 | |||
computeamount(); | |||
}, | |||
}); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Info/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
}, | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = {}; | |||
postData.strEntity = JSON.stringify($('[data-table="Purchase_Info"]').lrGetFormData()); | |||
postData.strPurchase_Info_DetailsList = JSON.stringify($('#Purchase_Info_Details').jfGridGet('rowdatas')); | |||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Info/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
computeamount= function () { | |||
var rowdatas = $('#Purchase_Info_Details').jfGridGet('rowdatas'); | |||
var totalamount = 0; | |||
for (var i = 0; i < rowdatas.length; i++) { | |||
if (rowdatas[i].Price && rowdatas[i].Quantity) { | |||
totalamount += rowdatas[i].Price * rowdatas[i].Quantity; | |||
} | |||
} | |||
$('#TotalAmount').val(totalamount); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,56 @@ | |||
@{ | |||
ViewBag.Title = "教学调度"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<style> | |||
.searchRow { | |||
margin-bottom: 20px; | |||
} | |||
.text-center { | |||
padding: 10px 0; | |||
} | |||
.btnRow > div { | |||
color: #0094ff; | |||
cursor: pointer; | |||
width: 100px; | |||
} | |||
.AttemperType { | |||
display: none; | |||
} | |||
</style> | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Info" style="display:none"> | |||
<input id="Status" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="CreateTime" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="SubmitTime" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Info"> | |||
<div class="lr-form-item-title">部门<font face="宋体">*</font></div> | |||
<input id="DepartmentId" type="text" class="form-control currentInfo lr-currentInfo-department" readonly isvalid="yes" checkexpession="NotNull" /> | |||
<input id="DepartmentName" type="text" class="form-control currentInfo lr-currentInfo-department" readonly isvalid="yes" checkexpession="NotNull" style="display:none" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Info"> | |||
<div class="lr-form-item-title">申请人<font face="宋体">*</font></div> | |||
<input id="CreatorId" type="text" readonly class="form-control currentInfo lr-currentInfo-user" readonly /> | |||
<input id="CreatorName" type="text" readonly class="form-control currentInfo lr-currentInfo-user" readonly style="display:none" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Info"> | |||
<div class="lr-form-item-title">总价格<font face="宋体">*</font></div> | |||
<input id="TotalAmount" type="number" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Info"> | |||
<div class="lr-form-item-title">备注</div> | |||
<input id="Remark" type="text" readonly class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Info"> | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="FilePath"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item lr-form-item-grid"> | |||
<div id="Purchase_Info_Details"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Info/FormView.js") |
@@ -0,0 +1,131 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-09-26 10:47 | |||
* 描 述:办公采购申请 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
// 设置权限 | |||
var setAuthorize; | |||
// 设置表单数据 | |||
var setFormData; | |||
// 验证数据是否填写完整 | |||
var validForm; | |||
// 保存数据 | |||
var save; | |||
//绑定原课程安排 | |||
var bindData; | |||
//绑定新课程安排 | |||
var bindDataNew; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
// 设置权限 | |||
setAuthorize = function (data) { | |||
}; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
////加载部门、用户 | |||
//$('#DepartmentId')[0].lrvalue = userinfo.departmentId; | |||
//learun.clientdata.getAsync('department', { | |||
// key: userinfo.departmentId, | |||
// callback: function (_data) { | |||
// $('#DepartmentId').val(_data.name); | |||
// $('#DepartmentName')[0].lrvalue = _data.name; | |||
// } | |||
//}); | |||
////加载用户 | |||
//$('#CreatorId')[0].lrvalue = userinfo.userId; | |||
//$('#CreatorName')[0].lrvalue = userinfo.realName; | |||
//$('#CreatorId').val(userinfo.realName); | |||
$('#FilePath').lrUploader({ isUpload: false }); | |||
$('#Purchase_Info_Details').jfGrid({ | |||
headData: [ | |||
{ label: '采购物品名称', name: 'Name', width: 100, align: 'left' }, | |||
{ label: '价格', name: 'Price', width: 100, align: 'left' }, | |||
{ label: '采购数量', name: 'Quantity', width: 100, align: 'left' }, | |||
{ label: '单位', name: 'Unit', width: 100, align: 'left' }, | |||
{ label: '用途', name: 'UseTo', width: 100, align: 'left' }, | |||
{ label: 'Id', name: 'Id', width: 100, align: 'left', ishide: true }, | |||
], | |||
isEdit: false, | |||
height: 400, | |||
onMinusRow: function (row, rows) {//行数据和所有行数据 | |||
computeamount(); | |||
}, | |||
}); | |||
}, | |||
initData: function () { | |||
console.log(keyValue) | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Info/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
}, | |||
}; | |||
// 设置表单数据 | |||
setFormData = function (processId, param, callback) { | |||
if (!!processId) { | |||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Info/GetFormDataByProcessId?processId=' + processId, function (data) { | |||
for (var id in data) { | |||
if (!!data[id] && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
//if (id == 'ArrangeLessonTermAttemper') { | |||
keyValue = data[id].Id; | |||
//} | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
callback && callback(); | |||
} | |||
// 验证数据是否填写完整 | |||
validForm = function () { | |||
if (!$('#form').lrValidform()) { | |||
return false; | |||
} | |||
return true; | |||
}; | |||
// 保存数据 | |||
save = function (processId, callBack, i) { | |||
var formData = $('body').lrGetFormData(); | |||
if (!!processId) { | |||
formData.ProcessId = processId; | |||
} | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = {}; | |||
postData.strEntity = JSON.stringify($('[data-table="Purchase_Info"]').lrGetFormData()); | |||
postData.strPurchase_Info_DetailsList = JSON.stringify($('#Purchase_Info_Details').jfGridGet('rowdatas')); | |||
//var postData = { | |||
// strEntity: JSON.stringify(formData) | |||
//}; | |||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Info/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(res, i); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,28 @@ | |||
@{ | |||
ViewBag.Title = "申请类"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看</a> | |||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Info/Index.js") |
@@ -0,0 +1,204 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2023-06-25 18:33 | |||
* 描 述:申请类 | |||
*/ | |||
var refreshGirdData; | |||
var selectedRow; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var processId = ''; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Info/Form', | |||
width: 1000, | |||
height: 800, | |||
callBack: function (id) { | |||
//res = top[id].save('', function () { | |||
// page.search(); | |||
//}); | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status == 1) {//提交 | |||
learun.alert.warning("当前课程异动记录已提交!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Info/Form?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 800, | |||
callBack: function (id) { | |||
var res = false; | |||
// 验证数据 | |||
//res = top[id].validForm(); | |||
// 保存数据 | |||
//if (res) { | |||
//res = top[id].save('', function () { | |||
// page.search(); | |||
//}); | |||
return top[id].acceptClick(refreshGirdData); | |||
//} | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status !== 0) { | |||
learun.alert.warning("当前课程异动记录已提交,无法删除!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Info/DeleteForm', { keyValue: keyValue}, function () { | |||
//refreshGirdData(); | |||
page.search(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 提交 | |||
$('#lr_submit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status !== 0) { | |||
learun.alert.warning("当前课程异动记录已提交!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认提交该项!', function (res) { | |||
if (res) { | |||
processId = learun.newGuid(); | |||
learun.postForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Info/ModifyStatus', { keyValue: keyValue, status: 1, processId: processId }, function (res) { | |||
//selectedRow.ProcessId = processId; | |||
refreshGirdData(res, {}); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 查看 | |||
$('#lr_view').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status == 0) { | |||
learun.alert.warning("当前课程异动记录未提交,请提交后再查看!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'formview', | |||
title: '查看', | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Info/FormView?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 600, | |||
btn: null | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Info/GetPageList', | |||
headData: [ | |||
{ label: "部门", name: "DepartmentId", width: 150, align: "left", | |||
formatter: function (cellvalue, row) { | |||
return row.DepartmentName; | |||
} | |||
}, | |||
{ | |||
label: "申请人", name: "CreatorId", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
return row.CreatorName; | |||
} | |||
}, | |||
{ label: "总价格", name: "TotalAmount", width: 100, align: "left"}, | |||
{ label: "备注", name: "Remark", width: 100, align: "left"}, | |||
{ label: "提交时间", name: "SubmitTime", width: 130, align: "left" }, | |||
{ | |||
label: "状态", name: "Status", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue == 1) { | |||
return '<span class=\"label label-success\" >已提交</span>'; | |||
} else { | |||
return '<span class=\"label label-default\" >未提交</span>'; | |||
} | |||
} | |||
}, | |||
//{ | |||
// label: "审核用户", name: "CheckUserId", width: 100, align: "left", | |||
// formatter: function (cellvalue, row) { | |||
// return row.CheckUserName; | |||
// } | |||
//}, | |||
{ label: "审核时间", name: "CheckTime", width: 130, align: "left" }, | |||
{ | |||
label: "审核状态", name: "CheckStatus", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue == 1) { | |||
return '<span class=\"label label-warning\" >审核中</span>'; | |||
} else if (cellvalue == 2) { | |||
return '<span class=\"label label-success\" >审核通过</span>'; | |||
} else { | |||
return '<span class=\"label label-default\" >草稿</span>'; | |||
} | |||
} | |||
}, | |||
], | |||
mainId:'Id', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function (res, postData) { | |||
if (res && res.code && res.code == 200) { | |||
// 发起流程 | |||
var postData = { | |||
schemeCode: '2-1',// 填写流程对应模板编号 | |||
processId: processId, | |||
level: '1', | |||
}; | |||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||
learun.loading(false); | |||
}); | |||
} | |||
page.search(); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,32 @@ | |||
@{ | |||
ViewBag.Title = "申请类"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Logistic"> | |||
<div class="lr-form-item-title">部门<font face="宋体">*</font></div> | |||
<input id="DepartmentId" type="text" class="form-control currentInfo lr-currentInfo-department" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="DepartmentName" type="text" class="form-control currentInfo lr-currentInfo-department" isvalid="yes" checkexpession="NotNull" style="display:none"/> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Logistic"> | |||
<div class="lr-form-item-title">申请人<font face="宋体">*</font></div> | |||
<input id="CreatorId" type="text" readonly class="form-control currentInfo lr-currentInfo-user" /> | |||
<input id="CreatorName" type="text" readonly class="form-control currentInfo lr-currentInfo-user" style="display:none"/> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Logistic" > | |||
<div class="lr-form-item-title">总价格<font face="宋体">*</font></div> | |||
<input id="TotalAmount" type="number" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Logistic" > | |||
<div class="lr-form-item-title">备注</div> | |||
<input id="Remark" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Logistic" > | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="FilePath" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item lr-form-item-grid" > | |||
<div id="Purchase_Logistic_Details"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Logistic/Form.js") |
@@ -0,0 +1,144 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2023-06-25 18:33 | |||
* 描 述:申请类 | |||
*/ | |||
var acceptClick; | |||
var computeamount; | |||
var userinfo; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
userinfo = learun.clientdata.get(['userinfo']);//用户数据 | |||
console.log(userinfo) | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
//加载部门、用户 | |||
$('#DepartmentId')[0].lrvalue = userinfo.departmentId; | |||
learun.clientdata.getAsync('department', { | |||
key: userinfo.departmentId, | |||
callback: function (_data) { | |||
$('#DepartmentId').val(_data.name); | |||
$('#DepartmentName')[0].lrvalue = _data.name; | |||
} | |||
}); | |||
//加载用户 | |||
$('#CreatorId')[0].lrvalue = userinfo.userId; | |||
$('#CreatorName')[0].lrvalue = userinfo.realName; | |||
$('#CreatorId').val(userinfo.realName); | |||
$('#FilePath').lrUploader(); | |||
$('#Purchase_Logistic_Details').jfGrid({ | |||
headData: [ | |||
{ | |||
label: '采购物品名称', name: 'Name', width: 100, align: 'left', | |||
edit: { | |||
type:'input' | |||
} | |||
}, | |||
{ | |||
label: '价格', name: 'Price', width:100, align: 'left', | |||
edit: { | |||
type: 'input', | |||
init: function (data, $edit) {// 在点击单元格的时候触发,可以用来初始化输入控件,行数据和控件对象 | |||
}, | |||
change: function (data, num) {// 行数据和行号 | |||
if (!isNaN(data.Price)) { | |||
computeamount(); | |||
} else { | |||
learun.alert.warning("只能是数字"); | |||
data.Price=0 | |||
} | |||
} | |||
} | |||
}, | |||
{ | |||
label: '采购数量', name: 'Quantity', width: 100, align: 'left', | |||
edit: { | |||
type: 'input', | |||
init: function (data, $edit) {// 在点击单元格的时候触发,可以用来初始化输入控件,行数据和控件对象 | |||
}, | |||
change: function (data, num) {// 行数据和行号 | |||
if (!isNaN(data.Quantity)) { | |||
computeamount(); | |||
} else { | |||
learun.alert.warning("只能是数字"); | |||
data.Quantity = 0 | |||
} | |||
} | |||
} | |||
}, | |||
{ | |||
label: '单位', name: 'Unit', width: 100, align: 'left', | |||
edit: { | |||
type:'input' | |||
} | |||
}, | |||
{ | |||
label: '用途', name: 'UseTo', width: 100, align: 'left', | |||
edit: { | |||
type:'input' | |||
} | |||
}, | |||
{ | |||
label: 'Id', name: 'Id', width: 100, align: 'left', ishide: true | |||
}, | |||
], | |||
isEdit: true, | |||
height: 400, | |||
onMinusRow: function (row, rows) {//行数据和所有行数据 | |||
computeamount(); | |||
}, | |||
}); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Logistic/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
}, | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = {}; | |||
postData.strEntity = JSON.stringify($('[data-table="Purchase_Logistic"]').lrGetFormData()); | |||
postData.strPurchase_Logistic_DetailsList = JSON.stringify($('#Purchase_Logistic_Details').jfGridGet('rowdatas')); | |||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Logistic/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
computeamount= function () { | |||
var rowdatas = $('#Purchase_Logistic_Details').jfGridGet('rowdatas'); | |||
var totalamount = 0; | |||
for (var i = 0; i < rowdatas.length; i++) { | |||
if (rowdatas[i].Price && rowdatas[i].Quantity) { | |||
totalamount += rowdatas[i].Price * rowdatas[i].Quantity; | |||
} | |||
} | |||
$('#TotalAmount').val(totalamount); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,56 @@ | |||
@{ | |||
ViewBag.Title = "教学调度"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<style> | |||
.searchRow { | |||
margin-bottom: 20px; | |||
} | |||
.text-center { | |||
padding: 10px 0; | |||
} | |||
.btnRow > div { | |||
color: #0094ff; | |||
cursor: pointer; | |||
width: 100px; | |||
} | |||
.AttemperType { | |||
display: none; | |||
} | |||
</style> | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Logistic" style="display:none"> | |||
<input id="Status" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="CreateTime" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="SubmitTime" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Logistic"> | |||
<div class="lr-form-item-title">部门<font face="宋体">*</font></div> | |||
<input id="DepartmentId" type="text" class="form-control currentInfo lr-currentInfo-department" readonly isvalid="yes" checkexpession="NotNull" /> | |||
<input id="DepartmentName" type="text" class="form-control currentInfo lr-currentInfo-department" readonly isvalid="yes" checkexpession="NotNull" style="display:none" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Logistic"> | |||
<div class="lr-form-item-title">申请人<font face="宋体">*</font></div> | |||
<input id="CreatorId" type="text" readonly class="form-control currentInfo lr-currentInfo-user" readonly /> | |||
<input id="CreatorName" type="text" readonly class="form-control currentInfo lr-currentInfo-user" readonly style="display:none" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Logistic"> | |||
<div class="lr-form-item-title">总价格<font face="宋体">*</font></div> | |||
<input id="TotalAmount" type="number" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Logistic"> | |||
<div class="lr-form-item-title">备注</div> | |||
<input id="Remark" type="text" readonly class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Logistic"> | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="FilePath"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item lr-form-item-grid"> | |||
<div id="Purchase_Logistic_Details"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Logistic/FormView.js") |
@@ -0,0 +1,131 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-09-26 10:47 | |||
* 描 述:办公采购申请 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
// 设置权限 | |||
var setAuthorize; | |||
// 设置表单数据 | |||
var setFormData; | |||
// 验证数据是否填写完整 | |||
var validForm; | |||
// 保存数据 | |||
var save; | |||
//绑定原课程安排 | |||
var bindData; | |||
//绑定新课程安排 | |||
var bindDataNew; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
// 设置权限 | |||
setAuthorize = function (data) { | |||
}; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
////加载部门、用户 | |||
//$('#DepartmentId')[0].lrvalue = userinfo.departmentId; | |||
//learun.clientdata.getAsync('department', { | |||
// key: userinfo.departmentId, | |||
// callback: function (_data) { | |||
// $('#DepartmentId').val(_data.name); | |||
// $('#DepartmentName')[0].lrvalue = _data.name; | |||
// } | |||
//}); | |||
////加载用户 | |||
//$('#CreatorId')[0].lrvalue = userinfo.userId; | |||
//$('#CreatorName')[0].lrvalue = userinfo.realName; | |||
//$('#CreatorId').val(userinfo.realName); | |||
$('#FilePath').lrUploader({ isUpload: false }); | |||
$('#Purchase_Logistic_Details').jfGrid({ | |||
headData: [ | |||
{ label: '采购物品名称', name: 'Name', width: 100, align: 'left' }, | |||
{ label: '价格', name: 'Price', width: 100, align: 'left' }, | |||
{ label: '采购数量', name: 'Quantity', width: 100, align: 'left' }, | |||
{ label: '单位', name: 'Unit', width: 100, align: 'left' }, | |||
{ label: '用途', name: 'UseTo', width: 100, align: 'left' }, | |||
{ label: 'Id', name: 'Id', width: 100, align: 'left', ishide: true }, | |||
], | |||
isEdit: false, | |||
height: 400, | |||
onMinusRow: function (row, rows) {//行数据和所有行数据 | |||
computeamount(); | |||
}, | |||
}); | |||
}, | |||
initData: function () { | |||
console.log(keyValue) | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Logistic/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
}, | |||
}; | |||
// 设置表单数据 | |||
setFormData = function (processId, param, callback) { | |||
if (!!processId) { | |||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Logistic/GetFormDataByProcessId?processId=' + processId, function (data) { | |||
for (var id in data) { | |||
if (!!data[id] && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
//if (id == 'ArrangeLessonTermAttemper') { | |||
keyValue = data[id].Id; | |||
//} | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
callback && callback(); | |||
} | |||
// 验证数据是否填写完整 | |||
validForm = function () { | |||
if (!$('#form').lrValidform()) { | |||
return false; | |||
} | |||
return true; | |||
}; | |||
// 保存数据 | |||
save = function (processId, callBack, i) { | |||
var formData = $('body').lrGetFormData(); | |||
if (!!processId) { | |||
formData.ProcessId = processId; | |||
} | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = {}; | |||
postData.strEntity = JSON.stringify($('[data-table="Purchase_Logistic"]').lrGetFormData()); | |||
postData.strPurchase_Logistic_DetailsList = JSON.stringify($('#Purchase_Logistic_Details').jfGridGet('rowdatas')); | |||
//var postData = { | |||
// strEntity: JSON.stringify(formData) | |||
//}; | |||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Logistic/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(res, i); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,28 @@ | |||
@{ | |||
ViewBag.Title = "申请类"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看</a> | |||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Logistic/Index.js") |
@@ -0,0 +1,204 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2023-06-25 18:33 | |||
* 描 述:申请类 | |||
*/ | |||
var refreshGirdData; | |||
var selectedRow; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var processId = ''; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Logistic/Form', | |||
width: 1000, | |||
height: 800, | |||
callBack: function (id) { | |||
//res = top[id].save('', function () { | |||
// page.search(); | |||
//}); | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status == 1) {//提交 | |||
learun.alert.warning("当前课程异动记录已提交!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Logistic/Form?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 800, | |||
callBack: function (id) { | |||
var res = false; | |||
// 验证数据 | |||
//res = top[id].validForm(); | |||
// 保存数据 | |||
//if (res) { | |||
//res = top[id].save('', function () { | |||
// page.search(); | |||
//}); | |||
return top[id].acceptClick(refreshGirdData); | |||
//} | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status !== 0) { | |||
learun.alert.warning("当前课程异动记录已提交,无法删除!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Logistic/DeleteForm', { keyValue: keyValue}, function () { | |||
//refreshGirdData(); | |||
page.search(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 提交 | |||
$('#lr_submit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status !== 0) { | |||
learun.alert.warning("当前课程异动记录已提交!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认提交该项!', function (res) { | |||
if (res) { | |||
processId = learun.newGuid(); | |||
learun.postForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Logistic/ModifyStatus', { keyValue: keyValue, status: 1, processId: processId }, function (res) { | |||
//selectedRow.ProcessId = processId; | |||
refreshGirdData(res, {}); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 查看 | |||
$('#lr_view').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status == 0) { | |||
learun.alert.warning("当前课程异动记录未提交,请提交后再查看!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'formview', | |||
title: '查看', | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Logistic/FormView?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 600, | |||
btn: null | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Logistic/GetPageList', | |||
headData: [ | |||
{ label: "部门", name: "DepartmentId", width: 150, align: "left", | |||
formatter: function (cellvalue, row) { | |||
return row.DepartmentName; | |||
} | |||
}, | |||
{ | |||
label: "申请人", name: "CreatorId", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
return row.CreatorName; | |||
} | |||
}, | |||
{ label: "总价格", name: "TotalAmount", width: 100, align: "left"}, | |||
{ label: "备注", name: "Remark", width: 100, align: "left"}, | |||
{ label: "提交时间", name: "SubmitTime", width: 130, align: "left" }, | |||
{ | |||
label: "状态", name: "Status", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue == 1) { | |||
return '<span class=\"label label-success\" >已提交</span>'; | |||
} else { | |||
return '<span class=\"label label-default\" >未提交</span>'; | |||
} | |||
} | |||
}, | |||
//{ | |||
// label: "审核用户", name: "CheckUserId", width: 100, align: "left", | |||
// formatter: function (cellvalue, row) { | |||
// return row.CheckUserName; | |||
// } | |||
//}, | |||
{ label: "审核时间", name: "CheckTime", width: 130, align: "left" }, | |||
{ | |||
label: "审核状态", name: "CheckStatus", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue == 1) { | |||
return '<span class=\"label label-warning\" >审核中</span>'; | |||
} else if (cellvalue == 2) { | |||
return '<span class=\"label label-success\" >审核通过</span>'; | |||
} else { | |||
return '<span class=\"label label-default\" >草稿</span>'; | |||
} | |||
} | |||
}, | |||
], | |||
mainId:'Id', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function (res, postData) { | |||
if (res && res.code && res.code == 200) { | |||
// 发起流程 | |||
var postData = { | |||
schemeCode: '2-1',// 填写流程对应模板编号 | |||
processId: processId, | |||
level: '1', | |||
}; | |||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||
learun.loading(false); | |||
}); | |||
} | |||
page.search(); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,32 @@ | |||
@{ | |||
ViewBag.Title = "申请类"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Other"> | |||
<div class="lr-form-item-title">部门<font face="宋体">*</font></div> | |||
<input id="DepartmentId" type="text" class="form-control currentInfo lr-currentInfo-department" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="DepartmentName" type="text" class="form-control currentInfo lr-currentInfo-department" isvalid="yes" checkexpession="NotNull" style="display:none"/> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Other"> | |||
<div class="lr-form-item-title">申请人<font face="宋体">*</font></div> | |||
<input id="CreatorId" type="text" readonly class="form-control currentInfo lr-currentInfo-user" /> | |||
<input id="CreatorName" type="text" readonly class="form-control currentInfo lr-currentInfo-user" style="display:none"/> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Other" > | |||
<div class="lr-form-item-title">总价格<font face="宋体">*</font></div> | |||
<input id="TotalAmount" type="number" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Other" > | |||
<div class="lr-form-item-title">备注</div> | |||
<input id="Remark" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Other" > | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="FilePath" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item lr-form-item-grid" > | |||
<div id="Purchase_Other_Details"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Other/Form.js") |
@@ -0,0 +1,144 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2023-06-25 18:33 | |||
* 描 述:申请类 | |||
*/ | |||
var acceptClick; | |||
var computeamount; | |||
var userinfo; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
userinfo = learun.clientdata.get(['userinfo']);//用户数据 | |||
console.log(userinfo) | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
//加载部门、用户 | |||
$('#DepartmentId')[0].lrvalue = userinfo.departmentId; | |||
learun.clientdata.getAsync('department', { | |||
key: userinfo.departmentId, | |||
callback: function (_data) { | |||
$('#DepartmentId').val(_data.name); | |||
$('#DepartmentName')[0].lrvalue = _data.name; | |||
} | |||
}); | |||
//加载用户 | |||
$('#CreatorId')[0].lrvalue = userinfo.userId; | |||
$('#CreatorName')[0].lrvalue = userinfo.realName; | |||
$('#CreatorId').val(userinfo.realName); | |||
$('#FilePath').lrUploader(); | |||
$('#Purchase_Other_Details').jfGrid({ | |||
headData: [ | |||
{ | |||
label: '采购物品名称', name: 'Name', width: 100, align: 'left', | |||
edit: { | |||
type:'input' | |||
} | |||
}, | |||
{ | |||
label: '价格', name: 'Price', width:100, align: 'left', | |||
edit: { | |||
type: 'input', | |||
init: function (data, $edit) {// 在点击单元格的时候触发,可以用来初始化输入控件,行数据和控件对象 | |||
}, | |||
change: function (data, num) {// 行数据和行号 | |||
if (!isNaN(data.Price)) { | |||
computeamount(); | |||
} else { | |||
learun.alert.warning("只能是数字"); | |||
data.Price=0 | |||
} | |||
} | |||
} | |||
}, | |||
{ | |||
label: '采购数量', name: 'Quantity', width: 100, align: 'left', | |||
edit: { | |||
type: 'input', | |||
init: function (data, $edit) {// 在点击单元格的时候触发,可以用来初始化输入控件,行数据和控件对象 | |||
}, | |||
change: function (data, num) {// 行数据和行号 | |||
if (!isNaN(data.Quantity)) { | |||
computeamount(); | |||
} else { | |||
learun.alert.warning("只能是数字"); | |||
data.Quantity = 0 | |||
} | |||
} | |||
} | |||
}, | |||
{ | |||
label: '单位', name: 'Unit', width: 100, align: 'left', | |||
edit: { | |||
type:'input' | |||
} | |||
}, | |||
{ | |||
label: '用途', name: 'UseTo', width: 100, align: 'left', | |||
edit: { | |||
type:'input' | |||
} | |||
}, | |||
{ | |||
label: 'Id', name: 'Id', width: 100, align: 'left', ishide: true | |||
}, | |||
], | |||
isEdit: true, | |||
height: 400, | |||
onMinusRow: function (row, rows) {//行数据和所有行数据 | |||
computeamount(); | |||
}, | |||
}); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Other/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
}, | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = {}; | |||
postData.strEntity = JSON.stringify($('[data-table="Purchase_Other"]').lrGetFormData()); | |||
postData.strPurchase_Other_DetailsList = JSON.stringify($('#Purchase_Other_Details').jfGridGet('rowdatas')); | |||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Other/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
computeamount= function () { | |||
var rowdatas = $('#Purchase_Other_Details').jfGridGet('rowdatas'); | |||
var totalamount = 0; | |||
for (var i = 0; i < rowdatas.length; i++) { | |||
if (rowdatas[i].Price && rowdatas[i].Quantity) { | |||
totalamount += rowdatas[i].Price * rowdatas[i].Quantity; | |||
} | |||
} | |||
$('#TotalAmount').val(totalamount); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,56 @@ | |||
@{ | |||
ViewBag.Title = "教学调度"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<style> | |||
.searchRow { | |||
margin-bottom: 20px; | |||
} | |||
.text-center { | |||
padding: 10px 0; | |||
} | |||
.btnRow > div { | |||
color: #0094ff; | |||
cursor: pointer; | |||
width: 100px; | |||
} | |||
.AttemperType { | |||
display: none; | |||
} | |||
</style> | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Other" style="display:none"> | |||
<input id="Status" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="CreateTime" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="SubmitTime" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Other"> | |||
<div class="lr-form-item-title">部门<font face="宋体">*</font></div> | |||
<input id="DepartmentId" type="text" class="form-control currentInfo lr-currentInfo-department" readonly isvalid="yes" checkexpession="NotNull" /> | |||
<input id="DepartmentName" type="text" class="form-control currentInfo lr-currentInfo-department" readonly isvalid="yes" checkexpession="NotNull" style="display:none" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Other"> | |||
<div class="lr-form-item-title">申请人<font face="宋体">*</font></div> | |||
<input id="CreatorId" type="text" readonly class="form-control currentInfo lr-currentInfo-user" readonly /> | |||
<input id="CreatorName" type="text" readonly class="form-control currentInfo lr-currentInfo-user" readonly style="display:none" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Other"> | |||
<div class="lr-form-item-title">总价格<font face="宋体">*</font></div> | |||
<input id="TotalAmount" type="number" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Other"> | |||
<div class="lr-form-item-title">备注</div> | |||
<input id="Remark" type="text" readonly class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Other"> | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="FilePath"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item lr-form-item-grid"> | |||
<div id="Purchase_Other_Details"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Other/FormView.js") |
@@ -0,0 +1,131 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-09-26 10:47 | |||
* 描 述:办公采购申请 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
// 设置权限 | |||
var setAuthorize; | |||
// 设置表单数据 | |||
var setFormData; | |||
// 验证数据是否填写完整 | |||
var validForm; | |||
// 保存数据 | |||
var save; | |||
//绑定原课程安排 | |||
var bindData; | |||
//绑定新课程安排 | |||
var bindDataNew; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
// 设置权限 | |||
setAuthorize = function (data) { | |||
}; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
////加载部门、用户 | |||
//$('#DepartmentId')[0].lrvalue = userinfo.departmentId; | |||
//learun.clientdata.getAsync('department', { | |||
// key: userinfo.departmentId, | |||
// callback: function (_data) { | |||
// $('#DepartmentId').val(_data.name); | |||
// $('#DepartmentName')[0].lrvalue = _data.name; | |||
// } | |||
//}); | |||
////加载用户 | |||
//$('#CreatorId')[0].lrvalue = userinfo.userId; | |||
//$('#CreatorName')[0].lrvalue = userinfo.realName; | |||
//$('#CreatorId').val(userinfo.realName); | |||
$('#FilePath').lrUploader({ isUpload: false }); | |||
$('#Purchase_Other_Details').jfGrid({ | |||
headData: [ | |||
{ label: '采购物品名称', name: 'Name', width: 100, align: 'left' }, | |||
{ label: '价格', name: 'Price', width: 100, align: 'left' }, | |||
{ label: '采购数量', name: 'Quantity', width: 100, align: 'left' }, | |||
{ label: '单位', name: 'Unit', width: 100, align: 'left' }, | |||
{ label: '用途', name: 'UseTo', width: 100, align: 'left' }, | |||
{ label: 'Id', name: 'Id', width: 100, align: 'left', ishide: true }, | |||
], | |||
isEdit: false, | |||
height: 400, | |||
onMinusRow: function (row, rows) {//行数据和所有行数据 | |||
computeamount(); | |||
}, | |||
}); | |||
}, | |||
initData: function () { | |||
console.log(keyValue) | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Other/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
}, | |||
}; | |||
// 设置表单数据 | |||
setFormData = function (processId, param, callback) { | |||
if (!!processId) { | |||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Other/GetFormDataByProcessId?processId=' + processId, function (data) { | |||
for (var id in data) { | |||
if (!!data[id] && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
//if (id == 'ArrangeLessonTermAttemper') { | |||
keyValue = data[id].Id; | |||
//} | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
callback && callback(); | |||
} | |||
// 验证数据是否填写完整 | |||
validForm = function () { | |||
if (!$('#form').lrValidform()) { | |||
return false; | |||
} | |||
return true; | |||
}; | |||
// 保存数据 | |||
save = function (processId, callBack, i) { | |||
var formData = $('body').lrGetFormData(); | |||
if (!!processId) { | |||
formData.ProcessId = processId; | |||
} | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = {}; | |||
postData.strEntity = JSON.stringify($('[data-table="Purchase_Other"]').lrGetFormData()); | |||
postData.strPurchase_Other_DetailsList = JSON.stringify($('#Purchase_Other_Details').jfGridGet('rowdatas')); | |||
//var postData = { | |||
// strEntity: JSON.stringify(formData) | |||
//}; | |||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Other/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(res, i); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,28 @@ | |||
@{ | |||
ViewBag.Title = "申请类"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看</a> | |||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Other/Index.js") |
@@ -0,0 +1,204 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2023-06-25 18:33 | |||
* 描 述:申请类 | |||
*/ | |||
var refreshGirdData; | |||
var selectedRow; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var processId = ''; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Other/Form', | |||
width: 1000, | |||
height: 800, | |||
callBack: function (id) { | |||
//res = top[id].save('', function () { | |||
// page.search(); | |||
//}); | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status == 1) {//提交 | |||
learun.alert.warning("当前课程异动记录已提交!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Other/Form?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 800, | |||
callBack: function (id) { | |||
var res = false; | |||
// 验证数据 | |||
//res = top[id].validForm(); | |||
// 保存数据 | |||
//if (res) { | |||
//res = top[id].save('', function () { | |||
// page.search(); | |||
//}); | |||
return top[id].acceptClick(refreshGirdData); | |||
//} | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status !== 0) { | |||
learun.alert.warning("当前课程异动记录已提交,无法删除!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Other/DeleteForm', { keyValue: keyValue}, function () { | |||
//refreshGirdData(); | |||
page.search(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 提交 | |||
$('#lr_submit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status !== 0) { | |||
learun.alert.warning("当前课程异动记录已提交!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认提交该项!', function (res) { | |||
if (res) { | |||
processId = learun.newGuid(); | |||
learun.postForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Other/ModifyStatus', { keyValue: keyValue, status: 1, processId: processId }, function (res) { | |||
//selectedRow.ProcessId = processId; | |||
refreshGirdData(res, {}); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 查看 | |||
$('#lr_view').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status == 0) { | |||
learun.alert.warning("当前课程异动记录未提交,请提交后再查看!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'formview', | |||
title: '查看', | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Other/FormView?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 600, | |||
btn: null | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Other/GetPageList', | |||
headData: [ | |||
{ label: "部门", name: "DepartmentId", width: 150, align: "left", | |||
formatter: function (cellvalue, row) { | |||
return row.DepartmentName; | |||
} | |||
}, | |||
{ | |||
label: "申请人", name: "CreatorId", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
return row.CreatorName; | |||
} | |||
}, | |||
{ label: "总价格", name: "TotalAmount", width: 100, align: "left"}, | |||
{ label: "备注", name: "Remark", width: 100, align: "left"}, | |||
{ label: "提交时间", name: "SubmitTime", width: 130, align: "left" }, | |||
{ | |||
label: "状态", name: "Status", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue == 1) { | |||
return '<span class=\"label label-success\" >已提交</span>'; | |||
} else { | |||
return '<span class=\"label label-default\" >未提交</span>'; | |||
} | |||
} | |||
}, | |||
//{ | |||
// label: "审核用户", name: "CheckUserId", width: 100, align: "left", | |||
// formatter: function (cellvalue, row) { | |||
// return row.CheckUserName; | |||
// } | |||
//}, | |||
{ label: "审核时间", name: "CheckTime", width: 130, align: "left" }, | |||
{ | |||
label: "审核状态", name: "CheckStatus", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue == 1) { | |||
return '<span class=\"label label-warning\" >审核中</span>'; | |||
} else if (cellvalue == 2) { | |||
return '<span class=\"label label-success\" >审核通过</span>'; | |||
} else { | |||
return '<span class=\"label label-default\" >草稿</span>'; | |||
} | |||
} | |||
}, | |||
], | |||
mainId:'Id', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function (res, postData) { | |||
if (res && res.code && res.code == 200) { | |||
// 发起流程 | |||
var postData = { | |||
schemeCode: '2-1',// 填写流程对应模板编号 | |||
processId: processId, | |||
level: '1', | |||
}; | |||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||
learun.loading(false); | |||
}); | |||
} | |||
page.search(); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,32 @@ | |||
@{ | |||
ViewBag.Title = "申请类"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Print"> | |||
<div class="lr-form-item-title">部门<font face="宋体">*</font></div> | |||
<input id="DepartmentId" type="text" class="form-control currentInfo lr-currentInfo-department" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="DepartmentName" type="text" class="form-control currentInfo lr-currentInfo-department" isvalid="yes" checkexpession="NotNull" style="display:none"/> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Print"> | |||
<div class="lr-form-item-title">申请人<font face="宋体">*</font></div> | |||
<input id="CreatorId" type="text" readonly class="form-control currentInfo lr-currentInfo-user" /> | |||
<input id="CreatorName" type="text" readonly class="form-control currentInfo lr-currentInfo-user" style="display:none"/> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Print" > | |||
<div class="lr-form-item-title">总价格<font face="宋体">*</font></div> | |||
<input id="TotalAmount" type="number" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Print" > | |||
<div class="lr-form-item-title">备注</div> | |||
<input id="Remark" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Print" > | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="FilePath" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item lr-form-item-grid" > | |||
<div id="Purchase_Print_Details"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Print/Form.js") |
@@ -0,0 +1,144 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2023-06-25 18:33 | |||
* 描 述:申请类 | |||
*/ | |||
var acceptClick; | |||
var computeamount; | |||
var userinfo; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
userinfo = learun.clientdata.get(['userinfo']);//用户数据 | |||
console.log(userinfo) | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
//加载部门、用户 | |||
$('#DepartmentId')[0].lrvalue = userinfo.departmentId; | |||
learun.clientdata.getAsync('department', { | |||
key: userinfo.departmentId, | |||
callback: function (_data) { | |||
$('#DepartmentId').val(_data.name); | |||
$('#DepartmentName')[0].lrvalue = _data.name; | |||
} | |||
}); | |||
//加载用户 | |||
$('#CreatorId')[0].lrvalue = userinfo.userId; | |||
$('#CreatorName')[0].lrvalue = userinfo.realName; | |||
$('#CreatorId').val(userinfo.realName); | |||
$('#FilePath').lrUploader(); | |||
$('#Purchase_Print_Details').jfGrid({ | |||
headData: [ | |||
{ | |||
label: '采购物品名称', name: 'Name', width: 100, align: 'left', | |||
edit: { | |||
type:'input' | |||
} | |||
}, | |||
{ | |||
label: '价格', name: 'Price', width:100, align: 'left', | |||
edit: { | |||
type: 'input', | |||
init: function (data, $edit) {// 在点击单元格的时候触发,可以用来初始化输入控件,行数据和控件对象 | |||
}, | |||
change: function (data, num) {// 行数据和行号 | |||
if (!isNaN(data.Price)) { | |||
computeamount(); | |||
} else { | |||
learun.alert.warning("只能是数字"); | |||
data.Price=0 | |||
} | |||
} | |||
} | |||
}, | |||
{ | |||
label: '采购数量', name: 'Quantity', width: 100, align: 'left', | |||
edit: { | |||
type: 'input', | |||
init: function (data, $edit) {// 在点击单元格的时候触发,可以用来初始化输入控件,行数据和控件对象 | |||
}, | |||
change: function (data, num) {// 行数据和行号 | |||
if (!isNaN(data.Quantity)) { | |||
computeamount(); | |||
} else { | |||
learun.alert.warning("只能是数字"); | |||
data.Quantity = 0 | |||
} | |||
} | |||
} | |||
}, | |||
{ | |||
label: '单位', name: 'Unit', width: 100, align: 'left', | |||
edit: { | |||
type:'input' | |||
} | |||
}, | |||
{ | |||
label: '用途', name: 'UseTo', width: 100, align: 'left', | |||
edit: { | |||
type:'input' | |||
} | |||
}, | |||
{ | |||
label: 'Id', name: 'Id', width: 100, align: 'left', ishide: true | |||
}, | |||
], | |||
isEdit: true, | |||
height: 400, | |||
onMinusRow: function (row, rows) {//行数据和所有行数据 | |||
computeamount(); | |||
}, | |||
}); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Print/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
}, | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = {}; | |||
postData.strEntity = JSON.stringify($('[data-table="Purchase_Print"]').lrGetFormData()); | |||
postData.strPurchase_Print_DetailsList = JSON.stringify($('#Purchase_Print_Details').jfGridGet('rowdatas')); | |||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Print/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
computeamount= function () { | |||
var rowdatas = $('#Purchase_Print_Details').jfGridGet('rowdatas'); | |||
var totalamount = 0; | |||
for (var i = 0; i < rowdatas.length; i++) { | |||
if (rowdatas[i].Price && rowdatas[i].Quantity) { | |||
totalamount += rowdatas[i].Price * rowdatas[i].Quantity; | |||
} | |||
} | |||
$('#TotalAmount').val(totalamount); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,56 @@ | |||
@{ | |||
ViewBag.Title = "教学调度"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<style> | |||
.searchRow { | |||
margin-bottom: 20px; | |||
} | |||
.text-center { | |||
padding: 10px 0; | |||
} | |||
.btnRow > div { | |||
color: #0094ff; | |||
cursor: pointer; | |||
width: 100px; | |||
} | |||
.AttemperType { | |||
display: none; | |||
} | |||
</style> | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Print" style="display:none"> | |||
<input id="Status" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="CreateTime" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="SubmitTime" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Print"> | |||
<div class="lr-form-item-title">部门<font face="宋体">*</font></div> | |||
<input id="DepartmentId" type="text" class="form-control currentInfo lr-currentInfo-department" readonly isvalid="yes" checkexpession="NotNull" /> | |||
<input id="DepartmentName" type="text" class="form-control currentInfo lr-currentInfo-department" readonly isvalid="yes" checkexpession="NotNull" style="display:none" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Print"> | |||
<div class="lr-form-item-title">申请人<font face="宋体">*</font></div> | |||
<input id="CreatorId" type="text" readonly class="form-control currentInfo lr-currentInfo-user" readonly /> | |||
<input id="CreatorName" type="text" readonly class="form-control currentInfo lr-currentInfo-user" readonly style="display:none" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Print"> | |||
<div class="lr-form-item-title">总价格<font face="宋体">*</font></div> | |||
<input id="TotalAmount" type="number" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Print"> | |||
<div class="lr-form-item-title">备注</div> | |||
<input id="Remark" type="text" readonly class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Print"> | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="FilePath"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item lr-form-item-grid"> | |||
<div id="Purchase_Print_Details"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Print/FormView.js") |
@@ -0,0 +1,131 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-09-26 10:47 | |||
* 描 述:办公采购申请 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
// 设置权限 | |||
var setAuthorize; | |||
// 设置表单数据 | |||
var setFormData; | |||
// 验证数据是否填写完整 | |||
var validForm; | |||
// 保存数据 | |||
var save; | |||
//绑定原课程安排 | |||
var bindData; | |||
//绑定新课程安排 | |||
var bindDataNew; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
// 设置权限 | |||
setAuthorize = function (data) { | |||
}; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
////加载部门、用户 | |||
//$('#DepartmentId')[0].lrvalue = userinfo.departmentId; | |||
//learun.clientdata.getAsync('department', { | |||
// key: userinfo.departmentId, | |||
// callback: function (_data) { | |||
// $('#DepartmentId').val(_data.name); | |||
// $('#DepartmentName')[0].lrvalue = _data.name; | |||
// } | |||
//}); | |||
////加载用户 | |||
//$('#CreatorId')[0].lrvalue = userinfo.userId; | |||
//$('#CreatorName')[0].lrvalue = userinfo.realName; | |||
//$('#CreatorId').val(userinfo.realName); | |||
$('#FilePath').lrUploader({ isUpload: false }); | |||
$('#Purchase_Print_Details').jfGrid({ | |||
headData: [ | |||
{ label: '采购物品名称', name: 'Name', width: 100, align: 'left' }, | |||
{ label: '价格', name: 'Price', width: 100, align: 'left' }, | |||
{ label: '采购数量', name: 'Quantity', width: 100, align: 'left' }, | |||
{ label: '单位', name: 'Unit', width: 100, align: 'left' }, | |||
{ label: '用途', name: 'UseTo', width: 100, align: 'left' }, | |||
{ label: 'Id', name: 'Id', width: 100, align: 'left', ishide: true }, | |||
], | |||
isEdit: false, | |||
height: 400, | |||
onMinusRow: function (row, rows) {//行数据和所有行数据 | |||
computeamount(); | |||
}, | |||
}); | |||
}, | |||
initData: function () { | |||
console.log(keyValue) | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Print/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
}, | |||
}; | |||
// 设置表单数据 | |||
setFormData = function (processId, param, callback) { | |||
if (!!processId) { | |||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Print/GetFormDataByProcessId?processId=' + processId, function (data) { | |||
for (var id in data) { | |||
if (!!data[id] && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
//if (id == 'ArrangeLessonTermAttemper') { | |||
keyValue = data[id].Id; | |||
//} | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
callback && callback(); | |||
} | |||
// 验证数据是否填写完整 | |||
validForm = function () { | |||
if (!$('#form').lrValidform()) { | |||
return false; | |||
} | |||
return true; | |||
}; | |||
// 保存数据 | |||
save = function (processId, callBack, i) { | |||
var formData = $('body').lrGetFormData(); | |||
if (!!processId) { | |||
formData.ProcessId = processId; | |||
} | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = {}; | |||
postData.strEntity = JSON.stringify($('[data-table="Purchase_Print"]').lrGetFormData()); | |||
postData.strPurchase_Print_DetailsList = JSON.stringify($('#Purchase_Print_Details').jfGridGet('rowdatas')); | |||
//var postData = { | |||
// strEntity: JSON.stringify(formData) | |||
//}; | |||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Print/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(res, i); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,28 @@ | |||
@{ | |||
ViewBag.Title = "申请类"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看</a> | |||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Print/Index.js") |
@@ -0,0 +1,204 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2023-06-25 18:33 | |||
* 描 述:申请类 | |||
*/ | |||
var refreshGirdData; | |||
var selectedRow; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var processId = ''; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Print/Form', | |||
width: 1000, | |||
height: 800, | |||
callBack: function (id) { | |||
//res = top[id].save('', function () { | |||
// page.search(); | |||
//}); | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status == 1) {//提交 | |||
learun.alert.warning("当前课程异动记录已提交!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Print/Form?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 800, | |||
callBack: function (id) { | |||
var res = false; | |||
// 验证数据 | |||
//res = top[id].validForm(); | |||
// 保存数据 | |||
//if (res) { | |||
//res = top[id].save('', function () { | |||
// page.search(); | |||
//}); | |||
return top[id].acceptClick(refreshGirdData); | |||
//} | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status !== 0) { | |||
learun.alert.warning("当前课程异动记录已提交,无法删除!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Print/DeleteForm', { keyValue: keyValue}, function () { | |||
//refreshGirdData(); | |||
page.search(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 提交 | |||
$('#lr_submit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status !== 0) { | |||
learun.alert.warning("当前课程异动记录已提交!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认提交该项!', function (res) { | |||
if (res) { | |||
processId = learun.newGuid(); | |||
learun.postForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Print/ModifyStatus', { keyValue: keyValue, status: 1, processId: processId }, function (res) { | |||
//selectedRow.ProcessId = processId; | |||
refreshGirdData(res, {}); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 查看 | |||
$('#lr_view').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status == 0) { | |||
learun.alert.warning("当前课程异动记录未提交,请提交后再查看!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'formview', | |||
title: '查看', | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Print/FormView?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 600, | |||
btn: null | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Print/GetPageList', | |||
headData: [ | |||
{ label: "部门", name: "DepartmentId", width: 150, align: "left", | |||
formatter: function (cellvalue, row) { | |||
return row.DepartmentName; | |||
} | |||
}, | |||
{ | |||
label: "申请人", name: "CreatorId", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
return row.CreatorName; | |||
} | |||
}, | |||
{ label: "总价格", name: "TotalAmount", width: 100, align: "left"}, | |||
{ label: "备注", name: "Remark", width: 100, align: "left"}, | |||
{ label: "提交时间", name: "SubmitTime", width: 130, align: "left" }, | |||
{ | |||
label: "状态", name: "Status", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue == 1) { | |||
return '<span class=\"label label-success\" >已提交</span>'; | |||
} else { | |||
return '<span class=\"label label-default\" >未提交</span>'; | |||
} | |||
} | |||
}, | |||
//{ | |||
// label: "审核用户", name: "CheckUserId", width: 100, align: "left", | |||
// formatter: function (cellvalue, row) { | |||
// return row.CheckUserName; | |||
// } | |||
//}, | |||
{ label: "审核时间", name: "CheckTime", width: 130, align: "left" }, | |||
{ | |||
label: "审核状态", name: "CheckStatus", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue == 1) { | |||
return '<span class=\"label label-warning\" >审核中</span>'; | |||
} else if (cellvalue == 2) { | |||
return '<span class=\"label label-success\" >审核通过</span>'; | |||
} else { | |||
return '<span class=\"label label-default\" >草稿</span>'; | |||
} | |||
} | |||
}, | |||
], | |||
mainId:'Id', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function (res, postData) { | |||
if (res && res.code && res.code == 200) { | |||
// 发起流程 | |||
var postData = { | |||
schemeCode: '2-1',// 填写流程对应模板编号 | |||
processId: processId, | |||
level: '1', | |||
}; | |||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||
learun.loading(false); | |||
}); | |||
} | |||
page.search(); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,32 @@ | |||
@{ | |||
ViewBag.Title = "申请类"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Student"> | |||
<div class="lr-form-item-title">部门<font face="宋体">*</font></div> | |||
<input id="DepartmentId" type="text" class="form-control currentInfo lr-currentInfo-department" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="DepartmentName" type="text" class="form-control currentInfo lr-currentInfo-department" isvalid="yes" checkexpession="NotNull" style="display:none"/> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Student"> | |||
<div class="lr-form-item-title">申请人<font face="宋体">*</font></div> | |||
<input id="CreatorId" type="text" readonly class="form-control currentInfo lr-currentInfo-user" /> | |||
<input id="CreatorName" type="text" readonly class="form-control currentInfo lr-currentInfo-user" style="display:none"/> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Student" > | |||
<div class="lr-form-item-title">总价格<font face="宋体">*</font></div> | |||
<input id="TotalAmount" type="number" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Student" > | |||
<div class="lr-form-item-title">备注</div> | |||
<input id="Remark" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Student" > | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="FilePath" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item lr-form-item-grid" > | |||
<div id="Purchase_Student_Details"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Student/Form.js") |
@@ -0,0 +1,144 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2023-06-25 18:33 | |||
* 描 述:申请类 | |||
*/ | |||
var acceptClick; | |||
var computeamount; | |||
var userinfo; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
userinfo = learun.clientdata.get(['userinfo']);//用户数据 | |||
console.log(userinfo) | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
//加载部门、用户 | |||
$('#DepartmentId')[0].lrvalue = userinfo.departmentId; | |||
learun.clientdata.getAsync('department', { | |||
key: userinfo.departmentId, | |||
callback: function (_data) { | |||
$('#DepartmentId').val(_data.name); | |||
$('#DepartmentName')[0].lrvalue = _data.name; | |||
} | |||
}); | |||
//加载用户 | |||
$('#CreatorId')[0].lrvalue = userinfo.userId; | |||
$('#CreatorName')[0].lrvalue = userinfo.realName; | |||
$('#CreatorId').val(userinfo.realName); | |||
$('#FilePath').lrUploader(); | |||
$('#Purchase_Student_Details').jfGrid({ | |||
headData: [ | |||
{ | |||
label: '采购物品名称', name: 'Name', width: 100, align: 'left', | |||
edit: { | |||
type:'input' | |||
} | |||
}, | |||
{ | |||
label: '价格', name: 'Price', width:100, align: 'left', | |||
edit: { | |||
type: 'input', | |||
init: function (data, $edit) {// 在点击单元格的时候触发,可以用来初始化输入控件,行数据和控件对象 | |||
}, | |||
change: function (data, num) {// 行数据和行号 | |||
if (!isNaN(data.Price)) { | |||
computeamount(); | |||
} else { | |||
learun.alert.warning("只能是数字"); | |||
data.Price=0 | |||
} | |||
} | |||
} | |||
}, | |||
{ | |||
label: '采购数量', name: 'Quantity', width: 100, align: 'left', | |||
edit: { | |||
type: 'input', | |||
init: function (data, $edit) {// 在点击单元格的时候触发,可以用来初始化输入控件,行数据和控件对象 | |||
}, | |||
change: function (data, num) {// 行数据和行号 | |||
if (!isNaN(data.Quantity)) { | |||
computeamount(); | |||
} else { | |||
learun.alert.warning("只能是数字"); | |||
data.Quantity = 0 | |||
} | |||
} | |||
} | |||
}, | |||
{ | |||
label: '单位', name: 'Unit', width: 100, align: 'left', | |||
edit: { | |||
type:'input' | |||
} | |||
}, | |||
{ | |||
label: '用途', name: 'UseTo', width: 100, align: 'left', | |||
edit: { | |||
type:'input' | |||
} | |||
}, | |||
{ | |||
label: 'Id', name: 'Id', width: 100, align: 'left', ishide: true | |||
}, | |||
], | |||
isEdit: true, | |||
height: 400, | |||
onMinusRow: function (row, rows) {//行数据和所有行数据 | |||
computeamount(); | |||
}, | |||
}); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Student/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
}, | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = {}; | |||
postData.strEntity = JSON.stringify($('[data-table="Purchase_Student"]').lrGetFormData()); | |||
postData.strPurchase_Student_DetailsList = JSON.stringify($('#Purchase_Student_Details').jfGridGet('rowdatas')); | |||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Student/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
computeamount= function () { | |||
var rowdatas = $('#Purchase_Student_Details').jfGridGet('rowdatas'); | |||
var totalamount = 0; | |||
for (var i = 0; i < rowdatas.length; i++) { | |||
if (rowdatas[i].Price && rowdatas[i].Quantity) { | |||
totalamount += rowdatas[i].Price * rowdatas[i].Quantity; | |||
} | |||
} | |||
$('#TotalAmount').val(totalamount); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,56 @@ | |||
@{ | |||
ViewBag.Title = "教学调度"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<style> | |||
.searchRow { | |||
margin-bottom: 20px; | |||
} | |||
.text-center { | |||
padding: 10px 0; | |||
} | |||
.btnRow > div { | |||
color: #0094ff; | |||
cursor: pointer; | |||
width: 100px; | |||
} | |||
.AttemperType { | |||
display: none; | |||
} | |||
</style> | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Student" style="display:none"> | |||
<input id="Status" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="CreateTime" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="SubmitTime" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Student"> | |||
<div class="lr-form-item-title">部门<font face="宋体">*</font></div> | |||
<input id="DepartmentId" type="text" class="form-control currentInfo lr-currentInfo-department" readonly isvalid="yes" checkexpession="NotNull" /> | |||
<input id="DepartmentName" type="text" class="form-control currentInfo lr-currentInfo-department" readonly isvalid="yes" checkexpession="NotNull" style="display:none" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Student"> | |||
<div class="lr-form-item-title">申请人<font face="宋体">*</font></div> | |||
<input id="CreatorId" type="text" readonly class="form-control currentInfo lr-currentInfo-user" readonly /> | |||
<input id="CreatorName" type="text" readonly class="form-control currentInfo lr-currentInfo-user" readonly style="display:none" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Student"> | |||
<div class="lr-form-item-title">总价格<font face="宋体">*</font></div> | |||
<input id="TotalAmount" type="number" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Student"> | |||
<div class="lr-form-item-title">备注</div> | |||
<input id="Remark" type="text" readonly class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Student"> | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="FilePath"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item lr-form-item-grid"> | |||
<div id="Purchase_Student_Details"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Student/FormView.js") |
@@ -0,0 +1,131 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-09-26 10:47 | |||
* 描 述:办公采购申请 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
// 设置权限 | |||
var setAuthorize; | |||
// 设置表单数据 | |||
var setFormData; | |||
// 验证数据是否填写完整 | |||
var validForm; | |||
// 保存数据 | |||
var save; | |||
//绑定原课程安排 | |||
var bindData; | |||
//绑定新课程安排 | |||
var bindDataNew; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
// 设置权限 | |||
setAuthorize = function (data) { | |||
}; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
////加载部门、用户 | |||
//$('#DepartmentId')[0].lrvalue = userinfo.departmentId; | |||
//learun.clientdata.getAsync('department', { | |||
// key: userinfo.departmentId, | |||
// callback: function (_data) { | |||
// $('#DepartmentId').val(_data.name); | |||
// $('#DepartmentName')[0].lrvalue = _data.name; | |||
// } | |||
//}); | |||
////加载用户 | |||
//$('#CreatorId')[0].lrvalue = userinfo.userId; | |||
//$('#CreatorName')[0].lrvalue = userinfo.realName; | |||
//$('#CreatorId').val(userinfo.realName); | |||
$('#FilePath').lrUploader({ isUpload: false }); | |||
$('#Purchase_Student_Details').jfGrid({ | |||
headData: [ | |||
{ label: '采购物品名称', name: 'Name', width: 100, align: 'left' }, | |||
{ label: '价格', name: 'Price', width: 100, align: 'left' }, | |||
{ label: '采购数量', name: 'Quantity', width: 100, align: 'left' }, | |||
{ label: '单位', name: 'Unit', width: 100, align: 'left' }, | |||
{ label: '用途', name: 'UseTo', width: 100, align: 'left' }, | |||
{ label: 'Id', name: 'Id', width: 100, align: 'left', ishide: true }, | |||
], | |||
isEdit: false, | |||
height: 400, | |||
onMinusRow: function (row, rows) {//行数据和所有行数据 | |||
computeamount(); | |||
}, | |||
}); | |||
}, | |||
initData: function () { | |||
console.log(keyValue) | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Student/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
}, | |||
}; | |||
// 设置表单数据 | |||
setFormData = function (processId, param, callback) { | |||
if (!!processId) { | |||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Student/GetFormDataByProcessId?processId=' + processId, function (data) { | |||
for (var id in data) { | |||
if (!!data[id] && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
//if (id == 'ArrangeLessonTermAttemper') { | |||
keyValue = data[id].Id; | |||
//} | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
callback && callback(); | |||
} | |||
// 验证数据是否填写完整 | |||
validForm = function () { | |||
if (!$('#form').lrValidform()) { | |||
return false; | |||
} | |||
return true; | |||
}; | |||
// 保存数据 | |||
save = function (processId, callBack, i) { | |||
var formData = $('body').lrGetFormData(); | |||
if (!!processId) { | |||
formData.ProcessId = processId; | |||
} | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = {}; | |||
postData.strEntity = JSON.stringify($('[data-table="Purchase_Student"]').lrGetFormData()); | |||
postData.strPurchase_Student_DetailsList = JSON.stringify($('#Purchase_Student_Details').jfGridGet('rowdatas')); | |||
//var postData = { | |||
// strEntity: JSON.stringify(formData) | |||
//}; | |||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Student/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(res, i); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,28 @@ | |||
@{ | |||
ViewBag.Title = "申请类"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看</a> | |||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Student/Index.js") |
@@ -0,0 +1,204 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2023-06-25 18:33 | |||
* 描 述:申请类 | |||
*/ | |||
var refreshGirdData; | |||
var selectedRow; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var processId = ''; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Student/Form', | |||
width: 1000, | |||
height: 800, | |||
callBack: function (id) { | |||
//res = top[id].save('', function () { | |||
// page.search(); | |||
//}); | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status == 1) {//提交 | |||
learun.alert.warning("当前课程异动记录已提交!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Student/Form?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 800, | |||
callBack: function (id) { | |||
var res = false; | |||
// 验证数据 | |||
//res = top[id].validForm(); | |||
// 保存数据 | |||
//if (res) { | |||
//res = top[id].save('', function () { | |||
// page.search(); | |||
//}); | |||
return top[id].acceptClick(refreshGirdData); | |||
//} | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status !== 0) { | |||
learun.alert.warning("当前课程异动记录已提交,无法删除!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Student/DeleteForm', { keyValue: keyValue}, function () { | |||
//refreshGirdData(); | |||
page.search(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 提交 | |||
$('#lr_submit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status !== 0) { | |||
learun.alert.warning("当前课程异动记录已提交!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认提交该项!', function (res) { | |||
if (res) { | |||
processId = learun.newGuid(); | |||
learun.postForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Student/ModifyStatus', { keyValue: keyValue, status: 1, processId: processId }, function (res) { | |||
//selectedRow.ProcessId = processId; | |||
refreshGirdData(res, {}); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 查看 | |||
$('#lr_view').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status == 0) { | |||
learun.alert.warning("当前课程异动记录未提交,请提交后再查看!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'formview', | |||
title: '查看', | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Student/FormView?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 600, | |||
btn: null | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Student/GetPageList', | |||
headData: [ | |||
{ label: "部门", name: "DepartmentId", width: 150, align: "left", | |||
formatter: function (cellvalue, row) { | |||
return row.DepartmentName; | |||
} | |||
}, | |||
{ | |||
label: "申请人", name: "CreatorId", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
return row.CreatorName; | |||
} | |||
}, | |||
{ label: "总价格", name: "TotalAmount", width: 100, align: "left"}, | |||
{ label: "备注", name: "Remark", width: 100, align: "left"}, | |||
{ label: "提交时间", name: "SubmitTime", width: 130, align: "left" }, | |||
{ | |||
label: "状态", name: "Status", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue == 1) { | |||
return '<span class=\"label label-success\" >已提交</span>'; | |||
} else { | |||
return '<span class=\"label label-default\" >未提交</span>'; | |||
} | |||
} | |||
}, | |||
//{ | |||
// label: "审核用户", name: "CheckUserId", width: 100, align: "left", | |||
// formatter: function (cellvalue, row) { | |||
// return row.CheckUserName; | |||
// } | |||
//}, | |||
{ label: "审核时间", name: "CheckTime", width: 130, align: "left" }, | |||
{ | |||
label: "审核状态", name: "CheckStatus", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue == 1) { | |||
return '<span class=\"label label-warning\" >审核中</span>'; | |||
} else if (cellvalue == 2) { | |||
return '<span class=\"label label-success\" >审核通过</span>'; | |||
} else { | |||
return '<span class=\"label label-default\" >草稿</span>'; | |||
} | |||
} | |||
}, | |||
], | |||
mainId:'Id', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function (res, postData) { | |||
if (res && res.code && res.code == 200) { | |||
// 发起流程 | |||
var postData = { | |||
schemeCode: '2-1',// 填写流程对应模板编号 | |||
processId: processId, | |||
level: '1', | |||
}; | |||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||
learun.loading(false); | |||
}); | |||
} | |||
page.search(); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,32 @@ | |||
@{ | |||
ViewBag.Title = "申请类"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Work"> | |||
<div class="lr-form-item-title">部门<font face="宋体">*</font></div> | |||
<input id="DepartmentId" type="text" class="form-control currentInfo lr-currentInfo-department" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="DepartmentName" type="text" class="form-control currentInfo lr-currentInfo-department" isvalid="yes" checkexpession="NotNull" style="display:none"/> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Work"> | |||
<div class="lr-form-item-title">申请人<font face="宋体">*</font></div> | |||
<input id="CreatorId" type="text" readonly class="form-control currentInfo lr-currentInfo-user" /> | |||
<input id="CreatorName" type="text" readonly class="form-control currentInfo lr-currentInfo-user" style="display:none"/> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Work" > | |||
<div class="lr-form-item-title">总价格<font face="宋体">*</font></div> | |||
<input id="TotalAmount" type="number" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Work" > | |||
<div class="lr-form-item-title">备注</div> | |||
<input id="Remark" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Work" > | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="FilePath" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item lr-form-item-grid" > | |||
<div id="Purchase_Work_Details"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Work/Form.js") |
@@ -0,0 +1,144 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2023-06-25 18:33 | |||
* 描 述:申请类 | |||
*/ | |||
var acceptClick; | |||
var computeamount; | |||
var userinfo; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
userinfo = learun.clientdata.get(['userinfo']);//用户数据 | |||
console.log(userinfo) | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
//加载部门、用户 | |||
$('#DepartmentId')[0].lrvalue = userinfo.departmentId; | |||
learun.clientdata.getAsync('department', { | |||
key: userinfo.departmentId, | |||
callback: function (_data) { | |||
$('#DepartmentId').val(_data.name); | |||
$('#DepartmentName')[0].lrvalue = _data.name; | |||
} | |||
}); | |||
//加载用户 | |||
$('#CreatorId')[0].lrvalue = userinfo.userId; | |||
$('#CreatorName')[0].lrvalue = userinfo.realName; | |||
$('#CreatorId').val(userinfo.realName); | |||
$('#FilePath').lrUploader(); | |||
$('#Purchase_Work_Details').jfGrid({ | |||
headData: [ | |||
{ | |||
label: '采购物品名称', name: 'Name', width: 100, align: 'left', | |||
edit: { | |||
type:'input' | |||
} | |||
}, | |||
{ | |||
label: '价格', name: 'Price', width:100, align: 'left', | |||
edit: { | |||
type: 'input', | |||
init: function (data, $edit) {// 在点击单元格的时候触发,可以用来初始化输入控件,行数据和控件对象 | |||
}, | |||
change: function (data, num) {// 行数据和行号 | |||
if (!isNaN(data.Price)) { | |||
computeamount(); | |||
} else { | |||
learun.alert.warning("只能是数字"); | |||
data.Price=0 | |||
} | |||
} | |||
} | |||
}, | |||
{ | |||
label: '采购数量', name: 'Quantity', width: 100, align: 'left', | |||
edit: { | |||
type: 'input', | |||
init: function (data, $edit) {// 在点击单元格的时候触发,可以用来初始化输入控件,行数据和控件对象 | |||
}, | |||
change: function (data, num) {// 行数据和行号 | |||
if (!isNaN(data.Quantity)) { | |||
computeamount(); | |||
} else { | |||
learun.alert.warning("只能是数字"); | |||
data.Quantity = 0 | |||
} | |||
} | |||
} | |||
}, | |||
{ | |||
label: '单位', name: 'Unit', width: 100, align: 'left', | |||
edit: { | |||
type:'input' | |||
} | |||
}, | |||
{ | |||
label: '用途', name: 'UseTo', width: 100, align: 'left', | |||
edit: { | |||
type:'input' | |||
} | |||
}, | |||
{ | |||
label: 'Id', name: 'Id', width: 100, align: 'left', ishide: true | |||
}, | |||
], | |||
isEdit: true, | |||
height: 400, | |||
onMinusRow: function (row, rows) {//行数据和所有行数据 | |||
computeamount(); | |||
}, | |||
}); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Work/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
}, | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = {}; | |||
postData.strEntity = JSON.stringify($('[data-table="Purchase_Work"]').lrGetFormData()); | |||
postData.strpurchase_Work_DetailsList = JSON.stringify($('#Purchase_Work_Details').jfGridGet('rowdatas')); | |||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Work/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
computeamount= function () { | |||
var rowdatas = $('#Purchase_Work_Details').jfGridGet('rowdatas'); | |||
var totalamount = 0; | |||
for (var i = 0; i < rowdatas.length; i++) { | |||
if (rowdatas[i].Price && rowdatas[i].Quantity) { | |||
totalamount += rowdatas[i].Price * rowdatas[i].Quantity; | |||
} | |||
} | |||
$('#TotalAmount').val(totalamount); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,56 @@ | |||
@{ | |||
ViewBag.Title = "教学调度"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<style> | |||
.searchRow { | |||
margin-bottom: 20px; | |||
} | |||
.text-center { | |||
padding: 10px 0; | |||
} | |||
.btnRow > div { | |||
color: #0094ff; | |||
cursor: pointer; | |||
width: 100px; | |||
} | |||
.AttemperType { | |||
display: none; | |||
} | |||
</style> | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Work" style="display:none"> | |||
<input id="Status" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="CreateTime" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
<input id="SubmitTime" type="text" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Work"> | |||
<div class="lr-form-item-title">部门<font face="宋体">*</font></div> | |||
<input id="DepartmentId" type="text" class="form-control currentInfo lr-currentInfo-department" readonly isvalid="yes" checkexpession="NotNull" /> | |||
<input id="DepartmentName" type="text" class="form-control currentInfo lr-currentInfo-department" readonly isvalid="yes" checkexpession="NotNull" style="display:none" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Work"> | |||
<div class="lr-form-item-title">申请人<font face="宋体">*</font></div> | |||
<input id="CreatorId" type="text" readonly class="form-control currentInfo lr-currentInfo-user" readonly /> | |||
<input id="CreatorName" type="text" readonly class="form-control currentInfo lr-currentInfo-user" readonly style="display:none" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Work"> | |||
<div class="lr-form-item-title">总价格<font face="宋体">*</font></div> | |||
<input id="TotalAmount" type="number" readonly class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Work"> | |||
<div class="lr-form-item-title">备注</div> | |||
<input id="Remark" type="text" readonly class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Purchase_Work"> | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="FilePath"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item lr-form-item-grid"> | |||
<div id="Purchase_Work_Details"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Work/FormView.js") |
@@ -0,0 +1,131 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-09-26 10:47 | |||
* 描 述:办公采购申请 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
// 设置权限 | |||
var setAuthorize; | |||
// 设置表单数据 | |||
var setFormData; | |||
// 验证数据是否填写完整 | |||
var validForm; | |||
// 保存数据 | |||
var save; | |||
//绑定原课程安排 | |||
var bindData; | |||
//绑定新课程安排 | |||
var bindDataNew; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
// 设置权限 | |||
setAuthorize = function (data) { | |||
}; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
////加载部门、用户 | |||
//$('#DepartmentId')[0].lrvalue = userinfo.departmentId; | |||
//learun.clientdata.getAsync('department', { | |||
// key: userinfo.departmentId, | |||
// callback: function (_data) { | |||
// $('#DepartmentId').val(_data.name); | |||
// $('#DepartmentName')[0].lrvalue = _data.name; | |||
// } | |||
//}); | |||
////加载用户 | |||
//$('#CreatorId')[0].lrvalue = userinfo.userId; | |||
//$('#CreatorName')[0].lrvalue = userinfo.realName; | |||
//$('#CreatorId').val(userinfo.realName); | |||
$('#FilePath').lrUploader({ isUpload: false }); | |||
$('#Purchase_Work_Details').jfGrid({ | |||
headData: [ | |||
{ label: '采购物品名称', name: 'Name', width: 100, align: 'left' }, | |||
{ label: '价格', name: 'Price', width: 100, align: 'left' }, | |||
{ label: '采购数量', name: 'Quantity', width: 100, align: 'left' }, | |||
{ label: '单位', name: 'Unit', width: 100, align: 'left' }, | |||
{ label: '用途', name: 'UseTo', width: 100, align: 'left' }, | |||
{ label: 'Id', name: 'Id', width: 100, align: 'left', ishide: true }, | |||
], | |||
isEdit: false, | |||
height: 400, | |||
onMinusRow: function (row, rows) {//行数据和所有行数据 | |||
computeamount(); | |||
}, | |||
}); | |||
}, | |||
initData: function () { | |||
console.log(keyValue) | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Work/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
}, | |||
}; | |||
// 设置表单数据 | |||
setFormData = function (processId, param, callback) { | |||
if (!!processId) { | |||
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Work/GetFormDataByProcessId?processId=' + processId, function (data) { | |||
for (var id in data) { | |||
if (!!data[id] && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
//if (id == 'ArrangeLessonTermAttemper') { | |||
keyValue = data[id].Id; | |||
//} | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
callback && callback(); | |||
} | |||
// 验证数据是否填写完整 | |||
validForm = function () { | |||
if (!$('#form').lrValidform()) { | |||
return false; | |||
} | |||
return true; | |||
}; | |||
// 保存数据 | |||
save = function (processId, callBack, i) { | |||
var formData = $('body').lrGetFormData(); | |||
if (!!processId) { | |||
formData.ProcessId = processId; | |||
} | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = {}; | |||
postData.strEntity = JSON.stringify($('[data-table="Purchase_Work"]').lrGetFormData()); | |||
postData.strpurchase_Work_DetailsList = JSON.stringify($('#Purchase_Work_Details').jfGridGet('rowdatas')); | |||
//var postData = { | |||
// strEntity: JSON.stringify(formData) | |||
//}; | |||
$.lrSaveForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Work/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(res, i); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,28 @@ | |||
@{ | |||
ViewBag.Title = "申请类"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看</a> | |||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i> 提交</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/LogisticsManagement/Views/Purchase_Work/Index.js") |
@@ -0,0 +1,204 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2023-06-25 18:33 | |||
* 描 述:申请类 | |||
*/ | |||
var refreshGirdData; | |||
var selectedRow; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var processId = ''; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Work/Form', | |||
width: 1000, | |||
height: 800, | |||
callBack: function (id) { | |||
//res = top[id].save('', function () { | |||
// page.search(); | |||
//}); | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status == 1) {//提交 | |||
learun.alert.warning("当前课程异动记录已提交!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Work/Form?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 800, | |||
callBack: function (id) { | |||
var res = false; | |||
// 验证数据 | |||
//res = top[id].validForm(); | |||
// 保存数据 | |||
//if (res) { | |||
//res = top[id].save('', function () { | |||
// page.search(); | |||
//}); | |||
return top[id].acceptClick(refreshGirdData); | |||
//} | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status !== 0) { | |||
learun.alert.warning("当前课程异动记录已提交,无法删除!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Work/DeleteForm', { keyValue: keyValue}, function () { | |||
//refreshGirdData(); | |||
page.search(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 提交 | |||
$('#lr_submit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status !== 0) { | |||
learun.alert.warning("当前课程异动记录已提交!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认提交该项!', function (res) { | |||
if (res) { | |||
processId = learun.newGuid(); | |||
learun.postForm(top.$.rootUrl + '/LogisticsManagement/Purchase_Work/ModifyStatus', { keyValue: keyValue, status: 1, processId: processId }, function (res) { | |||
//selectedRow.ProcessId = processId; | |||
refreshGirdData(res, {}); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 查看 | |||
$('#lr_view').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow.Status == 0) { | |||
learun.alert.warning("当前课程异动记录未提交,请提交后再查看!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'formview', | |||
title: '查看', | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Work/FormView?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 600, | |||
btn: null | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/LogisticsManagement/Purchase_Work/GetPageList', | |||
headData: [ | |||
{ label: "部门", name: "DepartmentId", width: 150, align: "left", | |||
formatter: function (cellvalue, row) { | |||
return row.DepartmentName; | |||
} | |||
}, | |||
{ | |||
label: "申请人", name: "CreatorId", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
return row.CreatorName; | |||
} | |||
}, | |||
{ label: "总价格", name: "TotalAmount", width: 100, align: "left"}, | |||
{ label: "备注", name: "Remark", width: 100, align: "left"}, | |||
{ label: "提交时间", name: "SubmitTime", width: 130, align: "left" }, | |||
{ | |||
label: "状态", name: "Status", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue == 1) { | |||
return '<span class=\"label label-success\" >已提交</span>'; | |||
} else { | |||
return '<span class=\"label label-default\" >未提交</span>'; | |||
} | |||
} | |||
}, | |||
//{ | |||
// label: "审核用户", name: "CheckUserId", width: 100, align: "left", | |||
// formatter: function (cellvalue, row) { | |||
// return row.CheckUserName; | |||
// } | |||
//}, | |||
{ label: "审核时间", name: "CheckTime", width: 130, align: "left" }, | |||
{ | |||
label: "审核状态", name: "CheckStatus", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue == 1) { | |||
return '<span class=\"label label-warning\" >审核中</span>'; | |||
} else if (cellvalue == 2) { | |||
return '<span class=\"label label-success\" >审核通过</span>'; | |||
} else { | |||
return '<span class=\"label label-default\" >草稿</span>'; | |||
} | |||
} | |||
}, | |||
], | |||
mainId:'Id', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function (res, postData) { | |||
if (res && res.code && res.code == 200) { | |||
// 发起流程 | |||
var postData = { | |||
schemeCode: '2-1',// 填写流程对应模板编号 | |||
processId: processId, | |||
level: '1', | |||
}; | |||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) { | |||
learun.loading(false); | |||
}); | |||
} | |||
page.search(); | |||
}; | |||
page.init(); | |||
} |
@@ -409,6 +409,12 @@ | |||
<Compile Include="Areas\LogisticsManagement\Controllers\APAppointmentPsychologistController.cs" /> | |||
<Compile Include="Areas\LogisticsManagement\Controllers\CompanyNewsController.cs" /> | |||
<Compile Include="Areas\LogisticsManagement\Controllers\DormitoryReturnController.cs" /> | |||
<Compile Include="Areas\LogisticsManagement\Controllers\Purchase_EduController.cs" /> | |||
<Compile Include="Areas\LogisticsManagement\Controllers\Purchase_InfoController.cs" /> | |||
<Compile Include="Areas\LogisticsManagement\Controllers\Purchase_LogisticController.cs" /> | |||
<Compile Include="Areas\LogisticsManagement\Controllers\Purchase_OtherController.cs" /> | |||
<Compile Include="Areas\LogisticsManagement\Controllers\Purchase_PrintController.cs" /> | |||
<Compile Include="Areas\LogisticsManagement\Controllers\Purchase_StudentController.cs" /> | |||
<Compile Include="Areas\LogisticsManagement\LogisticsManagementAreaRegistration.cs" /> | |||
<Compile Include="Areas\LR_AuthorizeModule\Controllers\AuthorizeController.cs" /> | |||
<Compile Include="Areas\LR_AuthorizeModule\Controllers\FilterIPController.cs" /> | |||
@@ -879,6 +885,7 @@ | |||
<Compile Include="Areas\PersonnelManagement\Controllers\LeagueMemberAppraiseController.cs" /> | |||
<Compile Include="Areas\PersonnelManagement\Controllers\WP_OfficeConfigController.cs" /> | |||
<Compile Include="Areas\PersonnelManagement\Controllers\VoteManagementController.cs" /> | |||
<Compile Include="Areas\LogisticsManagement\Controllers\Purchase_WorkController.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | |||
@@ -1373,6 +1380,25 @@ | |||
<Content Include="Areas\LogisticsManagement\Views\DormitoryReturn\FormReturn.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\DormitoryReturn\Index.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\DormitoryReturn\IndexReport.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Edu\Form.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Edu\FormView.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Edu\Index.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Info\Form.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Info\FormView.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Info\Index.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Logistic\Form.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Logistic\FormView.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Logistic\Index.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Other\Form.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Other\FormView.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Other\Index.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Print\Form.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Print\FormView.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Print\Index.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Student\Form.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Student\FormView.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Student\Index.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Work\FormView.js" /> | |||
<Content Include="Areas\LR_AuthorizeModule\Views\Authorize\AppForm.js" /> | |||
<Content Include="Areas\LR_AuthorizeModule\Views\Authorize\Form.css" /> | |||
<Content Include="Areas\LR_AuthorizeModule\Views\Authorize\Form.js" /> | |||
@@ -6479,6 +6505,10 @@ | |||
<Content Include="Areas\PersonnelManagement\Views\VoteManagement\Index.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\VoteManagement\Form.cshtml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\VoteManagement\Form.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Work\Index.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Work\Index.js" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Work\Form.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Work\Form.js" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Folder Include="Areas\EducationalAdministration\Views\HomeStatistics\" /> | |||
@@ -7789,6 +7819,25 @@ | |||
<Content Include="Areas\LogisticsManagement\Views\Acc_StuDayRoutine\Form.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Acc_StuDayRoutine\Index.cshtml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\CommunityInfo\IndexOfApply.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Work\FormView.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Edu\Form.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Edu\FormView.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Edu\Index.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Info\Form.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Info\FormView.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Info\Index.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Logistic\Form.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Logistic\FormView.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Logistic\Index.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Other\Form.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Other\FormView.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Other\Index.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Print\Form.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Print\FormView.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Print\Index.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Student\Form.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Student\FormView.cshtml" /> | |||
<Content Include="Areas\LogisticsManagement\Views\Purchase_Student\Index.cshtml" /> | |||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<Content Include="Views\Login\Default-beifen.cshtml" /> | |||
@@ -12,4 +12,5 @@ | |||
<!--塔里木中间库一卡通--> | |||
<!--<add name="TLMYKTDBString" connectionString="Data Source=orcl;Persist Security Info=True;User ID=bjqj;Password=bjqj;" providerName="System.Data.OracleClient" />--> | |||
<add name="TLMZYMIDDLEString" connectionString="Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=39.98.73.155)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=TLMZYMIDDLE)));Persist Security Info=True;User ID=digitalschool;Password=digitalschool;" providerName="Oracle.ManagedDataAccess.Client" /> | |||
<add name="CollegeMISFor30" connectionString="Server=123.57.209.16;Initial Catalog=CollegeMIS_娄底;User ID=sa;Password=bjqjkj@2014~2015!" providerName="System.Data.SqlClient" /> | |||
</connectionStrings> |
@@ -1,101 +1,115 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<unity> | |||
<typeAliases> | |||
<typeAlias alias="IDatabase" type="Learun.DataBase.IDatabase,Learun.DataBase" /> | |||
<typeAlias alias="SqlServer" type="Learun.DataBase.SqlServer.Database,Learun.DataBase.SqlServer" /> | |||
<typeAlias alias="MySql" type="Learun.DataBase.MySqlEx.Database,Learun.DataBase.MySqlEx" /> | |||
<typeAlias alias="Oracle" type="Learun.DataBase.Oracle.Database,Learun.DataBase.Oracle" /> | |||
<typeAliases> | |||
<typeAlias alias="IDatabase" type="Learun.DataBase.IDatabase,Learun.DataBase" /> | |||
<typeAlias alias="SqlServer" type="Learun.DataBase.SqlServer.Database,Learun.DataBase.SqlServer" /> | |||
<typeAlias alias="MySql" type="Learun.DataBase.MySqlEx.Database,Learun.DataBase.MySqlEx" /> | |||
<typeAlias alias="Oracle" type="Learun.DataBase.Oracle.Database,Learun.DataBase.Oracle" /> | |||
<!--工作流接口--> | |||
<typeAlias alias="INodeMethod" type="Learun.Application.WorkFlow.INodeMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="NodeMethod" type="Learun.Application.WorkFlow.NodeMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="Ass_AssetsInfoApplyMethod" type="Learun.Application.WorkFlow.Ass_AssetsInfoApplyMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="Ass_PurchaseApplyMethod" type="Learun.Application.WorkFlow.Ass_PurchaseApplyMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="Ass_AssetsOutApplyMethod" type="Learun.Application.WorkFlow.Ass_AssetsOutApplyMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="Ass_AllocationMethod" type="Learun.Application.WorkFlow.Ass_AllocationMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="Ass_InventoryMethod" type="Learun.Application.WorkFlow.Ass_InventoryMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="CorporateMaterialApplyMethod" type="Learun.Application.WorkFlow.CorporateMaterialApplyMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="StampApplyMethod" type="Learun.Application.WorkFlow.StampApplyMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="Ass_ScrapMethod" type="Learun.Application.WorkFlow.Ass_ScrapMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="Sys_SendFileMethod" type="Learun.Application.WorkFlow.Sys_SendFileMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="Sys_ReceiveDocumentMethod" type="Learun.Application.WorkFlow.Sys_ReceiveDocumentMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="LC_hetongMethod" type="Learun.Application.WorkFlow.LC_hetongMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="SW_Ask_TypeMethod" type="Learun.Application.WorkFlow.SW_Ask_TypeMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="SW_Ask_StudentMainMethod" type="Learun.Application.WorkFlow.SW_Ask_StudentMainMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="Sys_SendFilePartyMethod" type="Learun.Application.WorkFlow.Sys_SendFilePartyMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="Ass_ReceiveMethod" type="Learun.Application.WorkFlow.Ass_ReceiveMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="ADR_AddApplyMethod" type="Learun.Application.WorkFlow.ADR_AddApplyMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="OA_NewsMethod" type="Learun.Application.WorkFlow.OA_NewsMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="Ass_AcceptanceMethod" type="Learun.Application.WorkFlow.Ass_AcceptanceMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="TeacherLeaveManagementMethod" type="Learun.Application.WorkFlow.TeacherLeaveManagementMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="TeacherCancelLeaveManageMethod" type="Learun.Application.WorkFlow.TeacherCancelLeaveManageMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="TeacherOvertimeManageMethod" type="Learun.Application.WorkFlow.TeacherOvertimeManageMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="StuDisciplineManageMethod" type="Learun.Application.WorkFlow.StuDisciplineManageMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="StuCancelDisciplineManageMethod" type="Learun.Application.WorkFlow.StuCancelDisciplineManageMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="MeetingManagementApplyMethod" type="Learun.Application.WorkFlow.MeetingManagementApplyMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="DispatchMethod" type="Learun.Application.WorkFlow.DispatchMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="ArrangeLessonTermAttemperMethod" type="Learun.Application.WorkFlow.ArrangeLessonTermAttemperMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="StuLeaveManagementMethod" type="Learun.Application.WorkFlow.StuLeaveManagementMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="StuCancelLeaveManageMethod" type="Learun.Application.WorkFlow.StuCancelLeaveManageMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="Acc_DormitoryChangeMethod" type="Learun.Application.WorkFlow.Acc_DormitoryChangeMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="MeetingManagementApplyMethod" type="Learun.Application.WorkFlow.MeetingManagementApplyMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="StuCancelDisciplineManagementMethod" type="Learun.Application.WorkFlow.StuCancelDisciplineManagementMethod,Learun.Application.WorkFlow" /> | |||
<!--工作流接口--> | |||
<typeAlias alias="INodeMethod" type="Learun.Application.WorkFlow.INodeMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="NodeMethod" type="Learun.Application.WorkFlow.NodeMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="Ass_AssetsInfoApplyMethod" type="Learun.Application.WorkFlow.Ass_AssetsInfoApplyMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="Ass_PurchaseApplyMethod" type="Learun.Application.WorkFlow.Ass_PurchaseApplyMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="Ass_AssetsOutApplyMethod" type="Learun.Application.WorkFlow.Ass_AssetsOutApplyMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="Ass_AllocationMethod" type="Learun.Application.WorkFlow.Ass_AllocationMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="Ass_InventoryMethod" type="Learun.Application.WorkFlow.Ass_InventoryMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="CorporateMaterialApplyMethod" type="Learun.Application.WorkFlow.CorporateMaterialApplyMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="StampApplyMethod" type="Learun.Application.WorkFlow.StampApplyMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="Ass_ScrapMethod" type="Learun.Application.WorkFlow.Ass_ScrapMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="Sys_SendFileMethod" type="Learun.Application.WorkFlow.Sys_SendFileMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="Sys_ReceiveDocumentMethod" type="Learun.Application.WorkFlow.Sys_ReceiveDocumentMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="LC_hetongMethod" type="Learun.Application.WorkFlow.LC_hetongMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="SW_Ask_TypeMethod" type="Learun.Application.WorkFlow.SW_Ask_TypeMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="SW_Ask_StudentMainMethod" type="Learun.Application.WorkFlow.SW_Ask_StudentMainMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="Sys_SendFilePartyMethod" type="Learun.Application.WorkFlow.Sys_SendFilePartyMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="Ass_ReceiveMethod" type="Learun.Application.WorkFlow.Ass_ReceiveMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="ADR_AddApplyMethod" type="Learun.Application.WorkFlow.ADR_AddApplyMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="OA_NewsMethod" type="Learun.Application.WorkFlow.OA_NewsMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="Ass_AcceptanceMethod" type="Learun.Application.WorkFlow.Ass_AcceptanceMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="TeacherLeaveManagementMethod" type="Learun.Application.WorkFlow.TeacherLeaveManagementMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="TeacherCancelLeaveManageMethod" type="Learun.Application.WorkFlow.TeacherCancelLeaveManageMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="TeacherOvertimeManageMethod" type="Learun.Application.WorkFlow.TeacherOvertimeManageMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="StuDisciplineManageMethod" type="Learun.Application.WorkFlow.StuDisciplineManageMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="StuCancelDisciplineManageMethod" type="Learun.Application.WorkFlow.StuCancelDisciplineManageMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="MeetingManagementApplyMethod" type="Learun.Application.WorkFlow.MeetingManagementApplyMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="DispatchMethod" type="Learun.Application.WorkFlow.DispatchMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="ArrangeLessonTermAttemperMethod" type="Learun.Application.WorkFlow.ArrangeLessonTermAttemperMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="PurchaseWorkMethod" type="Learun.Application.WorkFlow.PurchaseWorkMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="PurchaseLogisticMethod" type="Learun.Application.WorkFlow.PurchaseLogisticMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="PurchaseInfoMethod" type="Learun.Application.WorkFlow.PurchaseInfoMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="PurchaseStudentMethod" type="Learun.Application.WorkFlow.PurchaseStudentMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="PurchaseOtherMethod" type="Learun.Application.WorkFlow.PurchaseOtherMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="PurchaseEduMethod" type="Learun.Application.WorkFlow.PurchaseEduMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="PurchasePrintMethod" type="Learun.Application.WorkFlow.PurchasePrintMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="StuLeaveManagementMethod" type="Learun.Application.WorkFlow.StuLeaveManagementMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="StuCancelLeaveManageMethod" type="Learun.Application.WorkFlow.StuCancelLeaveManageMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="Acc_DormitoryChangeMethod" type="Learun.Application.WorkFlow.Acc_DormitoryChangeMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="MeetingManagementApplyMethod" type="Learun.Application.WorkFlow.MeetingManagementApplyMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="StuCancelDisciplineManagementMethod" type="Learun.Application.WorkFlow.StuCancelDisciplineManagementMethod,Learun.Application.WorkFlow" /> | |||
<!--任务调度器--> | |||
<typeAlias alias="ITSMethod" type="Learun.Application.Extention.TaskScheduling.ITsMethod,Learun.Application.Extention" /> | |||
<!--<typeAlias alias="TestTask" type="Learun.Plugin.TestTask,Learun.Plugin" />--> | |||
<!--任务调度器--> | |||
<typeAlias alias="ITSMethod" type="Learun.Application.Extention.TaskScheduling.ITsMethod,Learun.Application.Extention" /> | |||
<!--<typeAlias alias="TestTask" type="Learun.Plugin.TestTask,Learun.Plugin" />--> | |||
<!--工作流接口:新的流程接口(新版流程使用)--> | |||
<typeAlias alias="IWorkFlowMethod" type=" Learun.Application.WorkFlow.IWorkFlowMethod, Learun.Application.WorkFlow" /> | |||
<typeAlias alias="WFFileRelease" type=" Learun.Application.WorkFlow.WFFileRelease, Learun.Application.WorkFlow" /> | |||
<!--工作流接口:新的流程接口(新版流程使用)--> | |||
<typeAlias alias="IWorkFlowMethod" type=" Learun.Application.WorkFlow.IWorkFlowMethod, Learun.Application.WorkFlow" /> | |||
<typeAlias alias="WFFileRelease" type=" Learun.Application.WorkFlow.WFFileRelease, Learun.Application.WorkFlow" /> | |||
</typeAliases> | |||
<containers> | |||
<container name="IOCcontainer"> | |||
<type type="IDatabase" mapTo="SqlServer" name="SqlServer"></type > | |||
<type type="IDatabase" mapTo="MySql" name="MySql"></type > | |||
<type type="IDatabase" mapTo="Oracle" name="Oracle"></type > | |||
</container> | |||
<container name="WfIOCcontainer"> | |||
<type type="INodeMethod" mapTo="NodeMethod" name="NodeMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="Ass_AssetsInfoApplyMethod" name="Ass_AssetsInfoApplyMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="Ass_PurchaseApplyMethod" name="Ass_PurchaseApplyMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="Ass_AssetsOutApplyMethod" name="Ass_AssetsOutApplyMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="Sys_SendFileMethod" name="Sys_SendFileMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="Sys_ReceiveDocumentMethod" name="Sys_ReceiveDocumentMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="Ass_InventoryMethod" name="Ass_InventoryMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="StampApplyMethod" name="StampApplyMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="CorporateMaterialApplyMethod" name="CorporateMaterialApplyMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="Ass_AllocationMethod" name="Ass_AllocationMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="Ass_ScrapMethod" name="Ass_ScrapMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="LC_hetongMethod" name="LC_hetongMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="SW_Ask_TypeMethod" name="SW_Ask_TypeMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="SW_Ask_StudentMainMethod" name="SW_Ask_StudentMainMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="Sys_SendFilePartyMethod" name="Sys_SendFilePartyMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="Ass_ReceiveMethod" name="Ass_ReceiveMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="ADR_AddApplyMethod" name="ADR_AddApplyMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="WFFileRelease" name="wfFileRelease"></type> | |||
<type type="IWorkFlowMethod" mapTo="OA_NewsMethod" name="OA_NewsMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="Ass_AcceptanceMethod" name="Ass_AcceptanceMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="TeacherLeaveManagementMethod" name="TeacherLeaveManagementMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="TeacherCancelLeaveManageMethod" name="TeacherCancelLeaveManageMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="TeacherOvertimeManageMethod" name="TeacherOvertimeManageMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="StuDisciplineManageMethod" name="StuDisciplineManageMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="StuCancelDisciplineManageMethod" name="StuCancelDisciplineManageMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="MeetingManagementApplyMethod" name="MeetingManagementApplyMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="DispatchMethod" name="DispatchMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="ArrangeLessonTermAttemperMethod" name="ArrangeLessonTermAttemperMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="StuLeaveManagementMethod" name="StuLeaveManagementMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="StuCancelLeaveManageMethod" name="StuCancelLeaveManageMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="Acc_DormitoryChangeMethod" name="Acc_DormitoryChangeMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="MeetingManagementApplyMethod" name="MeetingManagementApplyMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="StuCancelDisciplineManagementMethod" name="StuCancelDisciplineManagementMethod"></type> | |||
</typeAliases> | |||
<containers> | |||
<container name="IOCcontainer"> | |||
<type type="IDatabase" mapTo="SqlServer" name="SqlServer"></type > | |||
<type type="IDatabase" mapTo="MySql" name="MySql"></type > | |||
<type type="IDatabase" mapTo="Oracle" name="Oracle"></type > | |||
</container> | |||
<container name="WfIOCcontainer"> | |||
<type type="INodeMethod" mapTo="NodeMethod" name="NodeMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="Ass_AssetsInfoApplyMethod" name="Ass_AssetsInfoApplyMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="Ass_PurchaseApplyMethod" name="Ass_PurchaseApplyMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="Ass_AssetsOutApplyMethod" name="Ass_AssetsOutApplyMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="Sys_SendFileMethod" name="Sys_SendFileMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="Sys_ReceiveDocumentMethod" name="Sys_ReceiveDocumentMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="Ass_InventoryMethod" name="Ass_InventoryMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="StampApplyMethod" name="StampApplyMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="CorporateMaterialApplyMethod" name="CorporateMaterialApplyMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="Ass_AllocationMethod" name="Ass_AllocationMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="Ass_ScrapMethod" name="Ass_ScrapMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="LC_hetongMethod" name="LC_hetongMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="SW_Ask_TypeMethod" name="SW_Ask_TypeMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="SW_Ask_StudentMainMethod" name="SW_Ask_StudentMainMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="Sys_SendFilePartyMethod" name="Sys_SendFilePartyMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="Ass_ReceiveMethod" name="Ass_ReceiveMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="ADR_AddApplyMethod" name="ADR_AddApplyMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="WFFileRelease" name="wfFileRelease"></type> | |||
<type type="IWorkFlowMethod" mapTo="OA_NewsMethod" name="OA_NewsMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="Ass_AcceptanceMethod" name="Ass_AcceptanceMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="TeacherLeaveManagementMethod" name="TeacherLeaveManagementMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="TeacherCancelLeaveManageMethod" name="TeacherCancelLeaveManageMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="TeacherOvertimeManageMethod" name="TeacherOvertimeManageMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="StuDisciplineManageMethod" name="StuDisciplineManageMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="StuCancelDisciplineManageMethod" name="StuCancelDisciplineManageMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="MeetingManagementApplyMethod" name="MeetingManagementApplyMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="DispatchMethod" name="DispatchMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="ArrangeLessonTermAttemperMethod" name="ArrangeLessonTermAttemperMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="PurchaseWorkMethod" name="PurchaseWorkMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="PurchaseLogisticMethod" name="PurchaseLogisticMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="PurchaseInfoMethod" name="PurchaseInfoMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="PurchaseStudentMethod" name="PurchaseStudentMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="PurchaseOtherMethod" name="PurchaseOtherMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="PurchaseEduMethod" name="PurchaseEduMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="PurchasePrintMethod" name="PurchasPrintMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="StuLeaveManagementMethod" name="StuLeaveManagementMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="StuCancelLeaveManageMethod" name="StuCancelLeaveManageMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="Acc_DormitoryChangeMethod" name="Acc_DormitoryChangeMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="MeetingManagementApplyMethod" name="MeetingManagementApplyMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="StuCancelDisciplineManagementMethod" name="StuCancelDisciplineManagementMethod"></type> | |||
</container> | |||
</container> | |||
<container name="TsIOCcontainer"> | |||
<!--<type type="ITSMethod" mapTo="TestTask" name="taskioc"></type>--> | |||
</container> | |||
</containers> | |||
<container name="TsIOCcontainer"> | |||
<!--<type type="ITSMethod" mapTo="TestTask" name="taskioc"></type>--> | |||
</container> | |||
</containers> | |||
</unity> |
@@ -126,6 +126,18 @@ | |||
<Compile Include="LogisticsManagement\Acc_DormitoryReturnMap.cs" /> | |||
<Compile Include="LogisticsManagement\Acc_DormitoryRuleMap.cs" /> | |||
<Compile Include="LogisticsManagement\Acc_StuDayRoutineMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_EduMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Edu_DetailsMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_InfoMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Info_DetailsMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_LogisticMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Logistic_DetailsMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_OtherMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Other_DetailsMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_PrintMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Print_DetailsMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_StudentMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Student_DetailsMap.cs" /> | |||
<Compile Include="LR_App\DTImgMap.cs" /> | |||
<Compile Include="LR_App\FunctionMap.cs" /> | |||
<Compile Include="LR_App\FunctionSchemeMap.cs" /> | |||
@@ -613,6 +625,8 @@ | |||
<Compile Include="PersonnelManagement\LeagueMemberAppraiseMap.cs" /> | |||
<Compile Include="PersonnelManagement\WP_OfficeConfigMap.cs" /> | |||
<Compile Include="PersonnelManagement\VoteManagementMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_WorkMap.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Work_DetailsMap.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | |||
@@ -0,0 +1,29 @@ | |||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||
using System.Data.Entity.ModelConfiguration; | |||
namespace Learun.Application.Mapping | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_EduMap : EntityTypeConfiguration<Purchase_EduEntity> | |||
{ | |||
public Purchase_EduMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("PURCHASE_EDU"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -0,0 +1,29 @@ | |||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||
using System.Data.Entity.ModelConfiguration; | |||
namespace Learun.Application.Mapping | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_Edu_DetailsMap : EntityTypeConfiguration<Purchase_Edu_DetailsEntity> | |||
{ | |||
public Purchase_Edu_DetailsMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("PURCHASE_EDU_DETAILS"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -0,0 +1,29 @@ | |||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||
using System.Data.Entity.ModelConfiguration; | |||
namespace Learun.Application.Mapping | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_InfoMap : EntityTypeConfiguration<Purchase_InfoEntity> | |||
{ | |||
public Purchase_InfoMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("PURCHASE_INFO"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -0,0 +1,29 @@ | |||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||
using System.Data.Entity.ModelConfiguration; | |||
namespace Learun.Application.Mapping | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_Info_DetailsMap : EntityTypeConfiguration<Purchase_Info_DetailsEntity> | |||
{ | |||
public Purchase_Info_DetailsMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("PURCHASE_INFO_DETAILS"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -0,0 +1,29 @@ | |||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||
using System.Data.Entity.ModelConfiguration; | |||
namespace Learun.Application.Mapping | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_LogisticMap : EntityTypeConfiguration<Purchase_LogisticEntity> | |||
{ | |||
public Purchase_LogisticMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("PURCHASE_LOGISTIC"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -0,0 +1,29 @@ | |||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||
using System.Data.Entity.ModelConfiguration; | |||
namespace Learun.Application.Mapping | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_Logistic_DetailsMap : EntityTypeConfiguration<Purchase_Logistic_DetailsEntity> | |||
{ | |||
public Purchase_Logistic_DetailsMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("PURCHASE_LOGISTIC_DETAILS"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -0,0 +1,29 @@ | |||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||
using System.Data.Entity.ModelConfiguration; | |||
namespace Learun.Application.Mapping | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_OtherMap : EntityTypeConfiguration<Purchase_OtherEntity> | |||
{ | |||
public Purchase_OtherMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("PURCHASE_OTHER"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -0,0 +1,29 @@ | |||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||
using System.Data.Entity.ModelConfiguration; | |||
namespace Learun.Application.Mapping | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_Other_DetailsMap : EntityTypeConfiguration<Purchase_Other_DetailsEntity> | |||
{ | |||
public Purchase_Other_DetailsMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("PURCHASE_OTHER_DETAILS"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -0,0 +1,29 @@ | |||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||
using System.Data.Entity.ModelConfiguration; | |||
namespace Learun.Application.Mapping | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_PrintMap : EntityTypeConfiguration<Purchase_PrintEntity> | |||
{ | |||
public Purchase_PrintMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("PURCHASE_PRINT"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -0,0 +1,29 @@ | |||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||
using System.Data.Entity.ModelConfiguration; | |||
namespace Learun.Application.Mapping | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_Print_DetailsMap : EntityTypeConfiguration<Purchase_Print_DetailsEntity> | |||
{ | |||
public Purchase_Print_DetailsMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("PURCHASE_PRINT_DETAILS"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -0,0 +1,29 @@ | |||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||
using System.Data.Entity.ModelConfiguration; | |||
namespace Learun.Application.Mapping | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_StudentMap : EntityTypeConfiguration<Purchase_StudentEntity> | |||
{ | |||
public Purchase_StudentMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("PURCHASE_STUDENT"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -0,0 +1,29 @@ | |||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||
using System.Data.Entity.ModelConfiguration; | |||
namespace Learun.Application.Mapping | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_Student_DetailsMap : EntityTypeConfiguration<Purchase_Student_DetailsEntity> | |||
{ | |||
public Purchase_Student_DetailsMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("PURCHASE_STUDENT_DETAILS"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -0,0 +1,29 @@ | |||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||
using System.Data.Entity.ModelConfiguration; | |||
namespace Learun.Application.Mapping | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_WorkMap : EntityTypeConfiguration<Purchase_WorkEntity> | |||
{ | |||
public Purchase_WorkMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("PURCHASE_WORK"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -0,0 +1,29 @@ | |||
using Learun.Application.TwoDevelopment.LogisticsManagement; | |||
using System.Data.Entity.ModelConfiguration; | |||
namespace Learun.Application.Mapping | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_Work_DetailsMap : EntityTypeConfiguration<Purchase_Work_DetailsEntity> | |||
{ | |||
public Purchase_Work_DetailsMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("PURCHASE_WORK_DETAILS"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -378,6 +378,36 @@ | |||
<Compile Include="LogisticsManagement\DormitoryReturn\DormitoryReturnBLL.cs" /> | |||
<Compile Include="LogisticsManagement\DormitoryReturn\DormitoryReturnIBLL.cs" /> | |||
<Compile Include="LogisticsManagement\DormitoryReturn\DormitoryReturnService.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Edu\Purchase_EduBLL.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Edu\Purchase_EduEntity.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Edu\Purchase_EduIBLL.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Edu\Purchase_EduService.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Edu\Purchase_Edu_DetailsEntity.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Info\Purchase_InfoBLL.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Info\Purchase_InfoEntity.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Info\Purchase_InfoIBLL.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Info\Purchase_InfoService.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Info\Purchase_Info_DetailsEntity.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Logistic\Purchase_LogisticBLL.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Logistic\Purchase_LogisticEntity.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Logistic\Purchase_LogisticIBLL.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Logistic\Purchase_LogisticService.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Logistic\Purchase_Logistic_DetailsEntity.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Other\Purchase_OtherBLL.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Other\Purchase_OtherEntity.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Other\Purchase_OtherIBLL.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Other\Purchase_OtherService.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Other\Purchase_Other_DetailsEntity.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Print\Purchase_PrintBLL.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Print\Purchase_PrintEntity.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Print\Purchase_PrintIBLL.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Print\Purchase_PrintService.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Print\Purchase_Print_DetailsEntity.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Student\Purchase_StudentBLL.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Student\Purchase_StudentEntity.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Student\Purchase_StudentIBLL.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Student\Purchase_StudentService.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Student\Purchase_Student_DetailsEntity.cs" /> | |||
<Compile Include="LR_CodeDemo\GantProject\GantProjectBLL.cs" /> | |||
<Compile Include="LR_CodeDemo\GantProject\GantProjectIBLL.cs" /> | |||
<Compile Include="LR_CodeDemo\GantProject\GantProjectService.cs" /> | |||
@@ -1881,6 +1911,11 @@ | |||
<Compile Include="PersonnelManagement\VoteManagement\VoteManagementService.cs" /> | |||
<Compile Include="PersonnelManagement\VoteManagement\VoteManagementBLL.cs" /> | |||
<Compile Include="PersonnelManagement\VoteManagement\VoteManagementIBLL.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Work\Purchase_WorkEntity.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Work\Purchase_Work_DetailsEntity.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Work\Purchase_WorkService.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Work\Purchase_WorkBLL.cs" /> | |||
<Compile Include="LogisticsManagement\Purchase_Work\Purchase_WorkIBLL.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | |||
@@ -0,0 +1,248 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_EduBLL : Purchase_EduIBLL | |||
{ | |||
private Purchase_EduService purchase_EduService = new Purchase_EduService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Purchase_EduEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return purchase_EduService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Edu_Details表数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public IEnumerable<Purchase_Edu_DetailsEntity> GetPurchase_Edu_DetailsList(string keyValue) | |||
{ | |||
try | |||
{ | |||
return purchase_EduService.GetPurchase_Edu_DetailsList(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Edu表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Purchase_EduEntity GetPurchase_EduEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return purchase_EduService.GetPurchase_EduEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Edu_Details表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Purchase_Edu_DetailsEntity GetPurchase_Edu_DetailsEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return purchase_EduService.GetPurchase_Edu_DetailsEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取主表实体数据 | |||
/// <param name="processId">流程实例ID</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public Purchase_EduEntity GetEntityByProcessId(string processId) | |||
{ | |||
try | |||
{ | |||
return purchase_EduService.GetEntityByProcessId(processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
purchase_EduService.DeleteEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
/// <returns></returns> | |||
public void SaveEntity(string keyValue, Purchase_EduEntity entity,List<Purchase_Edu_DetailsEntity> purchase_Edu_DetailsList) | |||
{ | |||
try | |||
{ | |||
purchase_EduService.SaveEntity(keyValue, entity,purchase_Edu_DetailsList); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 提交课程异动记录 | |||
/// </summary> | |||
/// <param name="keyValue">课程异动表主键</param> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
public void ModifyStatus(string keyValue, int status, string processId) | |||
{ | |||
try | |||
{ | |||
purchase_EduService.ModifyStatus(keyValue, status, processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 修改课程异动表的审核状态 | |||
/// </summary> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
public void ModifyStatusByProcessId(int status, string processId) | |||
{ | |||
try | |||
{ | |||
purchase_EduService.ModifyStatusByProcessId(status, processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,122 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_EduEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// Id | |||
/// </summary> | |||
[Column("ID")] | |||
public string Id { get; set; } | |||
/// <summary> | |||
/// 申请部门name | |||
/// </summary> | |||
[Column("DEPARTMENTNAME")] | |||
public string DepartmentName { get; set; } | |||
/// <summary> | |||
/// 申请部门 | |||
/// </summary> | |||
[Column("DEPARTMENTID")] | |||
public string DepartmentId { get; set; } | |||
/// <summary> | |||
/// 申请人 | |||
/// </summary> | |||
[Column("CREATORID")] | |||
public string CreatorId { get; set; } | |||
/// <summary> | |||
/// 申请人 | |||
/// </summary> | |||
[Column("CREATORNAME")] | |||
public string CreatorName { get; set; } | |||
/// <summary> | |||
/// 申请时间 | |||
/// </summary> | |||
[Column("CREATETIME")] | |||
public DateTime? CreateTime { get; set; } | |||
/// <summary> | |||
/// 采购总价 | |||
/// </summary> | |||
[Column("TOTALAMOUNT")] | |||
public decimal? TotalAmount { get; set; } | |||
/// <summary> | |||
/// 备注 | |||
/// </summary> | |||
[Column("REMARK")] | |||
public string Remark { get; set; } | |||
/// <summary> | |||
/// 附件 | |||
/// </summary> | |||
[Column("FILEPATH")] | |||
public string FilePath { get; set; } | |||
/// <summary> | |||
/// 是否草稿箱 | |||
/// </summary> | |||
[Column("STATUS")] | |||
public int Status { get; set; } | |||
/// <summary> | |||
/// 提交时间 | |||
/// </summary> | |||
[Column("SUBMITTIME")] | |||
public DateTime? SubmitTime { get; set; } | |||
/// <summary> | |||
/// 审核时间 | |||
/// </summary> | |||
[Column("CheckTime")] | |||
public DateTime? CheckTime { get; set; } | |||
/// <summary> | |||
/// 审核人id | |||
/// </summary> | |||
[Column("CHECKUSERID")] | |||
public string CheckUserId { get; set; } | |||
/// <summary> | |||
/// 审核人 | |||
/// </summary> | |||
[Column("CHECKUSERNAME")] | |||
public string CheckUserName { get; set; } | |||
/// <summary> | |||
/// 审核状态 | |||
/// </summary> | |||
[Column("CHECKSTATUS")] | |||
public int CheckStatus { get; set; } | |||
/// <summary> | |||
/// 工作流Id | |||
/// </summary> | |||
[Column("ProcessId")] | |||
public string ProcessId { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.Id = Guid.NewGuid().ToString(); | |||
this.CreateTime = DateTime.Now; | |||
this.Status = 0; | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.Id = keyValue; | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,83 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public interface Purchase_EduIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<Purchase_EduEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取Purchase_Edu_Details表数据 | |||
/// </summary> | |||
/// <returns></returns> | |||
IEnumerable<Purchase_Edu_DetailsEntity> GetPurchase_Edu_DetailsList(string keyValue); | |||
/// <summary> | |||
/// 获取Purchase_Edu表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
Purchase_EduEntity GetPurchase_EduEntity(string keyValue); | |||
/// <summary> | |||
/// 获取Purchase_Edu_Details表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
Purchase_Edu_DetailsEntity GetPurchase_Edu_DetailsEntity(string keyValue); | |||
/// <summary> | |||
/// 获取主表实体数据 | |||
/// <param name="processId">流程实例ID</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
Purchase_EduEntity GetEntityByProcessId(string processId); | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
void DeleteEntity(string keyValue); | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
void SaveEntity(string keyValue, Purchase_EduEntity entity,List<Purchase_Edu_DetailsEntity> purchase_Work_DetailsList); | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 提交课程异动记录 | |||
/// </summary> | |||
/// <param name="keyValue">课程异动表主键</param> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
void ModifyStatus(string keyValue, int status, string processId); | |||
/// <summary> | |||
/// 修改异动表的审核状态 | |||
/// </summary> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
void ModifyStatusByProcessId(int status, string processId); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,327 @@ | |||
using Dapper; | |||
using Learun.DataBase.Repository; | |||
using Learun.Util; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Data; | |||
using System.Text; | |||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_EduService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Purchase_EduEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
t.Id, | |||
t.DepartmentId, | |||
t.DepartmentName, | |||
t.CreatorId, | |||
t.CreatorName, | |||
t.TotalAmount, | |||
t.Remark, | |||
t.FilePath,t.Status,t.SubmitTime,t.CheckTime,t.CheckUserId,t.CheckStatus,t.ProcessId | |||
"); | |||
strSql.Append(" FROM Purchase_Edu t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
return this.BaseRepository("CollegeMISFor30").FindList<Purchase_EduEntity>(strSql.ToString(),dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Edu_Details表数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public IEnumerable<Purchase_Edu_DetailsEntity> GetPurchase_Edu_DetailsList(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMISFor30").FindList<Purchase_Edu_DetailsEntity>(t=>t.Fid == keyValue ); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Edu表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Purchase_EduEntity GetPurchase_EduEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMISFor30").FindEntity<Purchase_EduEntity>(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Edu_Details表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Purchase_Edu_DetailsEntity GetPurchase_Edu_DetailsEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMISFor30").FindEntity<Purchase_Edu_DetailsEntity>(t=>t.Fid == keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取主表实体数据 | |||
/// <param name="processId">流程实例ID</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public Purchase_EduEntity GetEntityByProcessId(string processId) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<Purchase_EduEntity>(t => t.ProcessId == processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
var db = this.BaseRepository("CollegeMISFor30").BeginTrans(); | |||
try | |||
{ | |||
var purchase_EduEntity = GetPurchase_EduEntity(keyValue); | |||
db.Delete<Purchase_EduEntity>(t=>t.Id == keyValue); | |||
db.Delete<Purchase_Edu_DetailsEntity>(t=>t.Fid == purchase_EduEntity.Id); | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
public void SaveEntity(string keyValue, Purchase_EduEntity entity,List<Purchase_Edu_DetailsEntity> purchase_Edu_DetailsList) | |||
{ | |||
var db = this.BaseRepository("CollegeMISFor30").BeginTrans(); | |||
try | |||
{ | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
var purchase_EduEntityTmp = GetPurchase_EduEntity(keyValue); | |||
entity.Modify(keyValue); | |||
db.Update(entity); | |||
db.Delete<Purchase_Edu_DetailsEntity>(t=>t.Fid == purchase_EduEntityTmp.Id); | |||
foreach (Purchase_Edu_DetailsEntity item in purchase_Edu_DetailsList) | |||
{ | |||
item.Create(); | |||
item.Fid = purchase_EduEntityTmp.Id; | |||
db.Insert(item); | |||
} | |||
} | |||
else | |||
{ | |||
entity.Create(); | |||
db.Insert(entity); | |||
foreach (Purchase_Edu_DetailsEntity item in purchase_Edu_DetailsList) | |||
{ | |||
item.Create(); | |||
item.Fid = entity.Id; | |||
db.Insert(item); | |||
} | |||
} | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 提交异动记录 | |||
/// </summary> | |||
/// <param name="keyValue">课程异动表主键</param> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
public void ModifyStatus(string keyValue, int status, string processId) | |||
{ | |||
try | |||
{ | |||
var now = DateTime.Now; | |||
var entity = this.BaseRepository("CollegeMIS").FindEntity<Purchase_EduEntity>(x => x.Id == keyValue); | |||
if (entity != null) | |||
{ | |||
entity.Status = status; | |||
entity.ProcessId = processId; | |||
entity.SubmitTime = now; | |||
entity.CheckStatus = 1; | |||
this.BaseRepository("CollegeMIS").Update(entity); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 修改异动表的审核状态 | |||
/// </summary> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
public void ModifyStatusByProcessId(int status, string processId) | |||
{ | |||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||
var now = DateTime.Now; | |||
var loginUserInfo = LoginUserInfo.Get(); | |||
try | |||
{ | |||
var entity = db.FindEntity<Purchase_EduEntity>(x => x.ProcessId == processId); | |||
if (entity != null) | |||
{ | |||
//审核通过 | |||
if (status == 2) | |||
{ | |||
} | |||
//更新课程异动表的审核状态 | |||
entity.Status = 1; | |||
entity.CheckStatus = status; | |||
entity.CheckUserId = loginUserInfo.userId; | |||
entity.CheckUserName = loginUserInfo.realName; | |||
entity.CheckTime = now; | |||
db.Update(entity); | |||
} | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,79 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_Edu_DetailsEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// Id | |||
/// </summary> | |||
[Column("ID")] | |||
public string Id { get; set; } | |||
/// <summary> | |||
/// 所属主表ID | |||
/// </summary> | |||
[Column("FID")] | |||
public string Fid { get; set; } | |||
/// <summary> | |||
/// 采购物品名称 | |||
/// </summary> | |||
[Column("NAME")] | |||
public string Name { get; set; } | |||
/// <summary> | |||
/// Price | |||
/// </summary> | |||
[Column("PRICE")] | |||
public decimal? Price { get; set; } | |||
/// <summary> | |||
/// 采购数量 | |||
/// </summary> | |||
[Column("QUANTITY")] | |||
public decimal? Quantity { get; set; } | |||
/// <summary> | |||
/// 单位 | |||
/// </summary> | |||
[Column("UNIT")] | |||
public string Unit { get; set; } | |||
/// <summary> | |||
/// 用途 | |||
/// </summary> | |||
[Column("USETO")] | |||
public string UseTo { get; set; } | |||
/// <summary> | |||
/// CreateTime | |||
/// </summary> | |||
[Column("CREATETIME")] | |||
public DateTime? CreateTime { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.Id = Guid.NewGuid().ToString(); | |||
this.CreateTime = DateTime.Now; | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.Id = keyValue; | |||
} | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,248 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_InfoBLL : Purchase_InfoIBLL | |||
{ | |||
private Purchase_InfoService purchase_InfoService = new Purchase_InfoService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Purchase_InfoEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return purchase_InfoService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Info_Details表数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public IEnumerable<Purchase_Info_DetailsEntity> GetPurchase_Info_DetailsList(string keyValue) | |||
{ | |||
try | |||
{ | |||
return purchase_InfoService.GetPurchase_Info_DetailsList(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Info表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Purchase_InfoEntity GetPurchase_InfoEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return purchase_InfoService.GetPurchase_InfoEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Info_Details表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Purchase_Info_DetailsEntity GetPurchase_Info_DetailsEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return purchase_InfoService.GetPurchase_Info_DetailsEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取主表实体数据 | |||
/// <param name="processId">流程实例ID</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public Purchase_InfoEntity GetEntityByProcessId(string processId) | |||
{ | |||
try | |||
{ | |||
return purchase_InfoService.GetEntityByProcessId(processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
purchase_InfoService.DeleteEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
/// <returns></returns> | |||
public void SaveEntity(string keyValue, Purchase_InfoEntity entity,List<Purchase_Info_DetailsEntity> purchase_Info_DetailsList) | |||
{ | |||
try | |||
{ | |||
purchase_InfoService.SaveEntity(keyValue, entity,purchase_Info_DetailsList); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 提交课程异动记录 | |||
/// </summary> | |||
/// <param name="keyValue">课程异动表主键</param> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
public void ModifyStatus(string keyValue, int status, string processId) | |||
{ | |||
try | |||
{ | |||
purchase_InfoService.ModifyStatus(keyValue, status, processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 修改课程异动表的审核状态 | |||
/// </summary> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
public void ModifyStatusByProcessId(int status, string processId) | |||
{ | |||
try | |||
{ | |||
purchase_InfoService.ModifyStatusByProcessId(status, processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,122 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_InfoEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// Id | |||
/// </summary> | |||
[Column("ID")] | |||
public string Id { get; set; } | |||
/// <summary> | |||
/// 申请部门name | |||
/// </summary> | |||
[Column("DEPARTMENTNAME")] | |||
public string DepartmentName { get; set; } | |||
/// <summary> | |||
/// 申请部门 | |||
/// </summary> | |||
[Column("DEPARTMENTID")] | |||
public string DepartmentId { get; set; } | |||
/// <summary> | |||
/// 申请人 | |||
/// </summary> | |||
[Column("CREATORID")] | |||
public string CreatorId { get; set; } | |||
/// <summary> | |||
/// 申请人 | |||
/// </summary> | |||
[Column("CREATORNAME")] | |||
public string CreatorName { get; set; } | |||
/// <summary> | |||
/// 申请时间 | |||
/// </summary> | |||
[Column("CREATETIME")] | |||
public DateTime? CreateTime { get; set; } | |||
/// <summary> | |||
/// 采购总价 | |||
/// </summary> | |||
[Column("TOTALAMOUNT")] | |||
public decimal? TotalAmount { get; set; } | |||
/// <summary> | |||
/// 备注 | |||
/// </summary> | |||
[Column("REMARK")] | |||
public string Remark { get; set; } | |||
/// <summary> | |||
/// 附件 | |||
/// </summary> | |||
[Column("FILEPATH")] | |||
public string FilePath { get; set; } | |||
/// <summary> | |||
/// 是否草稿箱 | |||
/// </summary> | |||
[Column("STATUS")] | |||
public int Status { get; set; } | |||
/// <summary> | |||
/// 提交时间 | |||
/// </summary> | |||
[Column("SUBMITTIME")] | |||
public DateTime? SubmitTime { get; set; } | |||
/// <summary> | |||
/// 审核时间 | |||
/// </summary> | |||
[Column("CheckTime")] | |||
public DateTime? CheckTime { get; set; } | |||
/// <summary> | |||
/// 审核人id | |||
/// </summary> | |||
[Column("CHECKUSERID")] | |||
public string CheckUserId { get; set; } | |||
/// <summary> | |||
/// 审核人 | |||
/// </summary> | |||
[Column("CHECKUSERNAME")] | |||
public string CheckUserName { get; set; } | |||
/// <summary> | |||
/// 审核状态 | |||
/// </summary> | |||
[Column("CHECKSTATUS")] | |||
public int CheckStatus { get; set; } | |||
/// <summary> | |||
/// 工作流Id | |||
/// </summary> | |||
[Column("ProcessId")] | |||
public string ProcessId { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.Id = Guid.NewGuid().ToString(); | |||
this.CreateTime = DateTime.Now; | |||
this.Status = 0; | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.Id = keyValue; | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,83 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public interface Purchase_InfoIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<Purchase_InfoEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取Purchase_Info_Details表数据 | |||
/// </summary> | |||
/// <returns></returns> | |||
IEnumerable<Purchase_Info_DetailsEntity> GetPurchase_Info_DetailsList(string keyValue); | |||
/// <summary> | |||
/// 获取Purchase_Info表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
Purchase_InfoEntity GetPurchase_InfoEntity(string keyValue); | |||
/// <summary> | |||
/// 获取Purchase_Info_Details表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
Purchase_Info_DetailsEntity GetPurchase_Info_DetailsEntity(string keyValue); | |||
/// <summary> | |||
/// 获取主表实体数据 | |||
/// <param name="processId">流程实例ID</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
Purchase_InfoEntity GetEntityByProcessId(string processId); | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
void DeleteEntity(string keyValue); | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
void SaveEntity(string keyValue, Purchase_InfoEntity entity,List<Purchase_Info_DetailsEntity> purchase_Work_DetailsList); | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 提交课程异动记录 | |||
/// </summary> | |||
/// <param name="keyValue">课程异动表主键</param> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
void ModifyStatus(string keyValue, int status, string processId); | |||
/// <summary> | |||
/// 修改异动表的审核状态 | |||
/// </summary> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
void ModifyStatusByProcessId(int status, string processId); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,327 @@ | |||
using Dapper; | |||
using Learun.DataBase.Repository; | |||
using Learun.Util; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Data; | |||
using System.Text; | |||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_InfoService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Purchase_InfoEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
t.Id, | |||
t.DepartmentId, | |||
t.DepartmentName, | |||
t.CreatorId, | |||
t.CreatorName, | |||
t.TotalAmount, | |||
t.Remark, | |||
t.FilePath,t.Status,t.SubmitTime,t.CheckTime,t.CheckUserId,t.CheckStatus,t.ProcessId | |||
"); | |||
strSql.Append(" FROM Purchase_Info t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
return this.BaseRepository("CollegeMISFor30").FindList<Purchase_InfoEntity>(strSql.ToString(),dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Info_Details表数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public IEnumerable<Purchase_Info_DetailsEntity> GetPurchase_Info_DetailsList(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMISFor30").FindList<Purchase_Info_DetailsEntity>(t=>t.Fid == keyValue ); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Info表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Purchase_InfoEntity GetPurchase_InfoEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMISFor30").FindEntity<Purchase_InfoEntity>(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Info_Details表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Purchase_Info_DetailsEntity GetPurchase_Info_DetailsEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMISFor30").FindEntity<Purchase_Info_DetailsEntity>(t=>t.Fid == keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取主表实体数据 | |||
/// <param name="processId">流程实例ID</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public Purchase_InfoEntity GetEntityByProcessId(string processId) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<Purchase_InfoEntity>(t => t.ProcessId == processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
var db = this.BaseRepository("CollegeMISFor30").BeginTrans(); | |||
try | |||
{ | |||
var purchase_WorkEntity = GetPurchase_InfoEntity(keyValue); | |||
db.Delete<Purchase_InfoEntity>(t=>t.Id == keyValue); | |||
db.Delete<Purchase_Info_DetailsEntity>(t=>t.Fid == purchase_WorkEntity.Id); | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
public void SaveEntity(string keyValue, Purchase_InfoEntity entity,List<Purchase_Info_DetailsEntity> purchase_Work_DetailsList) | |||
{ | |||
var db = this.BaseRepository("CollegeMISFor30").BeginTrans(); | |||
try | |||
{ | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
var purchase_WorkEntityTmp = GetPurchase_InfoEntity(keyValue); | |||
entity.Modify(keyValue); | |||
db.Update(entity); | |||
db.Delete<Purchase_Info_DetailsEntity>(t=>t.Fid == purchase_WorkEntityTmp.Id); | |||
foreach (Purchase_Info_DetailsEntity item in purchase_Work_DetailsList) | |||
{ | |||
item.Create(); | |||
item.Fid = purchase_WorkEntityTmp.Id; | |||
db.Insert(item); | |||
} | |||
} | |||
else | |||
{ | |||
entity.Create(); | |||
db.Insert(entity); | |||
foreach (Purchase_Info_DetailsEntity item in purchase_Work_DetailsList) | |||
{ | |||
item.Create(); | |||
item.Fid = entity.Id; | |||
db.Insert(item); | |||
} | |||
} | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 提交异动记录 | |||
/// </summary> | |||
/// <param name="keyValue">课程异动表主键</param> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
public void ModifyStatus(string keyValue, int status, string processId) | |||
{ | |||
try | |||
{ | |||
var now = DateTime.Now; | |||
var entity = this.BaseRepository("CollegeMIS").FindEntity<Purchase_InfoEntity>(x => x.Id == keyValue); | |||
if (entity != null) | |||
{ | |||
entity.Status = status; | |||
entity.ProcessId = processId; | |||
entity.SubmitTime = now; | |||
entity.CheckStatus = 1; | |||
this.BaseRepository("CollegeMIS").Update(entity); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 修改异动表的审核状态 | |||
/// </summary> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
public void ModifyStatusByProcessId(int status, string processId) | |||
{ | |||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||
var now = DateTime.Now; | |||
var loginUserInfo = LoginUserInfo.Get(); | |||
try | |||
{ | |||
var entity = db.FindEntity<Purchase_InfoEntity>(x => x.ProcessId == processId); | |||
if (entity != null) | |||
{ | |||
//审核通过 | |||
if (status == 2) | |||
{ | |||
} | |||
//更新课程异动表的审核状态 | |||
entity.Status = 1; | |||
entity.CheckStatus = status; | |||
entity.CheckUserId = loginUserInfo.userId; | |||
entity.CheckUserName = loginUserInfo.realName; | |||
entity.CheckTime = now; | |||
db.Update(entity); | |||
} | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,79 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_Info_DetailsEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// Id | |||
/// </summary> | |||
[Column("ID")] | |||
public string Id { get; set; } | |||
/// <summary> | |||
/// 所属主表ID | |||
/// </summary> | |||
[Column("FID")] | |||
public string Fid { get; set; } | |||
/// <summary> | |||
/// 采购物品名称 | |||
/// </summary> | |||
[Column("NAME")] | |||
public string Name { get; set; } | |||
/// <summary> | |||
/// Price | |||
/// </summary> | |||
[Column("PRICE")] | |||
public decimal? Price { get; set; } | |||
/// <summary> | |||
/// 采购数量 | |||
/// </summary> | |||
[Column("QUANTITY")] | |||
public decimal? Quantity { get; set; } | |||
/// <summary> | |||
/// 单位 | |||
/// </summary> | |||
[Column("UNIT")] | |||
public string Unit { get; set; } | |||
/// <summary> | |||
/// 用途 | |||
/// </summary> | |||
[Column("USETO")] | |||
public string UseTo { get; set; } | |||
/// <summary> | |||
/// CreateTime | |||
/// </summary> | |||
[Column("CREATETIME")] | |||
public DateTime? CreateTime { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.Id = Guid.NewGuid().ToString(); | |||
this.CreateTime = DateTime.Now; | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.Id = keyValue; | |||
} | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,248 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_LogisticBLL : Purchase_LogisticIBLL | |||
{ | |||
private Purchase_LogisticService purchase_LogisticService = new Purchase_LogisticService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Purchase_LogisticEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return purchase_LogisticService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Logistic_Details表数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public IEnumerable<Purchase_Logistic_DetailsEntity> GetPurchase_Logistic_DetailsList(string keyValue) | |||
{ | |||
try | |||
{ | |||
return purchase_LogisticService.GetPurchase_Logistic_DetailsList(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Logistic表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Purchase_LogisticEntity GetPurchase_LogisticEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return purchase_LogisticService.GetPurchase_LogisticEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Logistic_Details表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Purchase_Logistic_DetailsEntity GetPurchase_Logistic_DetailsEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return purchase_LogisticService.GetPurchase_Logistic_DetailsEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取主表实体数据 | |||
/// <param name="processId">流程实例ID</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public Purchase_LogisticEntity GetEntityByProcessId(string processId) | |||
{ | |||
try | |||
{ | |||
return purchase_LogisticService.GetEntityByProcessId(processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
purchase_LogisticService.DeleteEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
/// <returns></returns> | |||
public void SaveEntity(string keyValue, Purchase_LogisticEntity entity,List<Purchase_Logistic_DetailsEntity> purchase_Logistic_DetailsList) | |||
{ | |||
try | |||
{ | |||
purchase_LogisticService.SaveEntity(keyValue, entity,purchase_Logistic_DetailsList); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 提交课程异动记录 | |||
/// </summary> | |||
/// <param name="keyValue">课程异动表主键</param> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
public void ModifyStatus(string keyValue, int status, string processId) | |||
{ | |||
try | |||
{ | |||
purchase_LogisticService.ModifyStatus(keyValue, status, processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 修改课程异动表的审核状态 | |||
/// </summary> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
public void ModifyStatusByProcessId(int status, string processId) | |||
{ | |||
try | |||
{ | |||
purchase_LogisticService.ModifyStatusByProcessId(status, processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,122 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_LogisticEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// Id | |||
/// </summary> | |||
[Column("ID")] | |||
public string Id { get; set; } | |||
/// <summary> | |||
/// 申请部门name | |||
/// </summary> | |||
[Column("DEPARTMENTNAME")] | |||
public string DepartmentName { get; set; } | |||
/// <summary> | |||
/// 申请部门 | |||
/// </summary> | |||
[Column("DEPARTMENTID")] | |||
public string DepartmentId { get; set; } | |||
/// <summary> | |||
/// 申请人 | |||
/// </summary> | |||
[Column("CREATORID")] | |||
public string CreatorId { get; set; } | |||
/// <summary> | |||
/// 申请人 | |||
/// </summary> | |||
[Column("CREATORNAME")] | |||
public string CreatorName { get; set; } | |||
/// <summary> | |||
/// 申请时间 | |||
/// </summary> | |||
[Column("CREATETIME")] | |||
public DateTime? CreateTime { get; set; } | |||
/// <summary> | |||
/// 采购总价 | |||
/// </summary> | |||
[Column("TOTALAMOUNT")] | |||
public decimal? TotalAmount { get; set; } | |||
/// <summary> | |||
/// 备注 | |||
/// </summary> | |||
[Column("REMARK")] | |||
public string Remark { get; set; } | |||
/// <summary> | |||
/// 附件 | |||
/// </summary> | |||
[Column("FILEPATH")] | |||
public string FilePath { get; set; } | |||
/// <summary> | |||
/// 是否草稿箱 | |||
/// </summary> | |||
[Column("STATUS")] | |||
public int Status { get; set; } | |||
/// <summary> | |||
/// 提交时间 | |||
/// </summary> | |||
[Column("SUBMITTIME")] | |||
public DateTime? SubmitTime { get; set; } | |||
/// <summary> | |||
/// 审核时间 | |||
/// </summary> | |||
[Column("CheckTime")] | |||
public DateTime? CheckTime { get; set; } | |||
/// <summary> | |||
/// 审核人id | |||
/// </summary> | |||
[Column("CHECKUSERID")] | |||
public string CheckUserId { get; set; } | |||
/// <summary> | |||
/// 审核人 | |||
/// </summary> | |||
[Column("CHECKUSERNAME")] | |||
public string CheckUserName { get; set; } | |||
/// <summary> | |||
/// 审核状态 | |||
/// </summary> | |||
[Column("CHECKSTATUS")] | |||
public int CheckStatus { get; set; } | |||
/// <summary> | |||
/// 工作流Id | |||
/// </summary> | |||
[Column("ProcessId")] | |||
public string ProcessId { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.Id = Guid.NewGuid().ToString(); | |||
this.CreateTime = DateTime.Now; | |||
this.Status = 0; | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.Id = keyValue; | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,83 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public interface Purchase_LogisticIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<Purchase_LogisticEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取Purchase_Logistic_Details表数据 | |||
/// </summary> | |||
/// <returns></returns> | |||
IEnumerable<Purchase_Logistic_DetailsEntity> GetPurchase_Logistic_DetailsList(string keyValue); | |||
/// <summary> | |||
/// 获取Purchase_Logistic表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
Purchase_LogisticEntity GetPurchase_LogisticEntity(string keyValue); | |||
/// <summary> | |||
/// 获取Purchase_Logistic_Details表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
Purchase_Logistic_DetailsEntity GetPurchase_Logistic_DetailsEntity(string keyValue); | |||
/// <summary> | |||
/// 获取主表实体数据 | |||
/// <param name="processId">流程实例ID</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
Purchase_LogisticEntity GetEntityByProcessId(string processId); | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
void DeleteEntity(string keyValue); | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
void SaveEntity(string keyValue, Purchase_LogisticEntity entity,List<Purchase_Logistic_DetailsEntity> purchase_Work_DetailsList); | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 提交课程异动记录 | |||
/// </summary> | |||
/// <param name="keyValue">课程异动表主键</param> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
void ModifyStatus(string keyValue, int status, string processId); | |||
/// <summary> | |||
/// 修改异动表的审核状态 | |||
/// </summary> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
void ModifyStatusByProcessId(int status, string processId); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,327 @@ | |||
using Dapper; | |||
using Learun.DataBase.Repository; | |||
using Learun.Util; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Data; | |||
using System.Text; | |||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_LogisticService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Purchase_LogisticEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
t.Id, | |||
t.DepartmentId, | |||
t.DepartmentName, | |||
t.CreatorId, | |||
t.CreatorName, | |||
t.TotalAmount, | |||
t.Remark, | |||
t.FilePath,t.Status,t.SubmitTime,t.CheckTime,t.CheckUserId,t.CheckStatus,t.ProcessId | |||
"); | |||
strSql.Append(" FROM Purchase_Logistic t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
return this.BaseRepository("CollegeMISFor30").FindList<Purchase_LogisticEntity>(strSql.ToString(),dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Logistic_Details表数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public IEnumerable<Purchase_Logistic_DetailsEntity> GetPurchase_Logistic_DetailsList(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMISFor30").FindList<Purchase_Logistic_DetailsEntity>(t=>t.Fid == keyValue ); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Logistic表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Purchase_LogisticEntity GetPurchase_LogisticEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMISFor30").FindEntity<Purchase_LogisticEntity>(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Logistic_Details表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Purchase_Logistic_DetailsEntity GetPurchase_Logistic_DetailsEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMISFor30").FindEntity<Purchase_Logistic_DetailsEntity>(t=>t.Fid == keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取主表实体数据 | |||
/// <param name="processId">流程实例ID</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public Purchase_LogisticEntity GetEntityByProcessId(string processId) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<Purchase_LogisticEntity>(t => t.ProcessId == processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
var db = this.BaseRepository("CollegeMISFor30").BeginTrans(); | |||
try | |||
{ | |||
var purchase_WorkEntity = GetPurchase_LogisticEntity(keyValue); | |||
db.Delete<Purchase_LogisticEntity>(t=>t.Id == keyValue); | |||
db.Delete<Purchase_Logistic_DetailsEntity>(t=>t.Fid == purchase_WorkEntity.Id); | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
public void SaveEntity(string keyValue, Purchase_LogisticEntity entity,List<Purchase_Logistic_DetailsEntity> purchase_Work_DetailsList) | |||
{ | |||
var db = this.BaseRepository("CollegeMISFor30").BeginTrans(); | |||
try | |||
{ | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
var purchase_WorkEntityTmp = GetPurchase_LogisticEntity(keyValue); | |||
entity.Modify(keyValue); | |||
db.Update(entity); | |||
db.Delete<Purchase_Logistic_DetailsEntity>(t=>t.Fid == purchase_WorkEntityTmp.Id); | |||
foreach (Purchase_Logistic_DetailsEntity item in purchase_Work_DetailsList) | |||
{ | |||
item.Create(); | |||
item.Fid = purchase_WorkEntityTmp.Id; | |||
db.Insert(item); | |||
} | |||
} | |||
else | |||
{ | |||
entity.Create(); | |||
db.Insert(entity); | |||
foreach (Purchase_Logistic_DetailsEntity item in purchase_Work_DetailsList) | |||
{ | |||
item.Create(); | |||
item.Fid = entity.Id; | |||
db.Insert(item); | |||
} | |||
} | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 提交异动记录 | |||
/// </summary> | |||
/// <param name="keyValue">课程异动表主键</param> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
public void ModifyStatus(string keyValue, int status, string processId) | |||
{ | |||
try | |||
{ | |||
var now = DateTime.Now; | |||
var entity = this.BaseRepository("CollegeMIS").FindEntity<Purchase_LogisticEntity>(x => x.Id == keyValue); | |||
if (entity != null) | |||
{ | |||
entity.Status = status; | |||
entity.ProcessId = processId; | |||
entity.SubmitTime = now; | |||
entity.CheckStatus = 1; | |||
this.BaseRepository("CollegeMIS").Update(entity); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 修改异动表的审核状态 | |||
/// </summary> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
public void ModifyStatusByProcessId(int status, string processId) | |||
{ | |||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||
var now = DateTime.Now; | |||
var loginUserInfo = LoginUserInfo.Get(); | |||
try | |||
{ | |||
var entity = db.FindEntity<Purchase_LogisticEntity>(x => x.ProcessId == processId); | |||
if (entity != null) | |||
{ | |||
//审核通过 | |||
if (status == 2) | |||
{ | |||
} | |||
//更新课程异动表的审核状态 | |||
entity.Status = 1; | |||
entity.CheckStatus = status; | |||
entity.CheckUserId = loginUserInfo.userId; | |||
entity.CheckUserName = loginUserInfo.realName; | |||
entity.CheckTime = now; | |||
db.Update(entity); | |||
} | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,79 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_Logistic_DetailsEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// Id | |||
/// </summary> | |||
[Column("ID")] | |||
public string Id { get; set; } | |||
/// <summary> | |||
/// 所属主表ID | |||
/// </summary> | |||
[Column("FID")] | |||
public string Fid { get; set; } | |||
/// <summary> | |||
/// 采购物品名称 | |||
/// </summary> | |||
[Column("NAME")] | |||
public string Name { get; set; } | |||
/// <summary> | |||
/// Price | |||
/// </summary> | |||
[Column("PRICE")] | |||
public decimal? Price { get; set; } | |||
/// <summary> | |||
/// 采购数量 | |||
/// </summary> | |||
[Column("QUANTITY")] | |||
public decimal? Quantity { get; set; } | |||
/// <summary> | |||
/// 单位 | |||
/// </summary> | |||
[Column("UNIT")] | |||
public string Unit { get; set; } | |||
/// <summary> | |||
/// 用途 | |||
/// </summary> | |||
[Column("USETO")] | |||
public string UseTo { get; set; } | |||
/// <summary> | |||
/// CreateTime | |||
/// </summary> | |||
[Column("CREATETIME")] | |||
public DateTime? CreateTime { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.Id = Guid.NewGuid().ToString(); | |||
this.CreateTime = DateTime.Now; | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.Id = keyValue; | |||
} | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,248 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_OtherBLL : Purchase_OtherIBLL | |||
{ | |||
private Purchase_OtherService purchase_OtherService = new Purchase_OtherService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Purchase_OtherEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return purchase_OtherService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Other_Details表数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public IEnumerable<Purchase_Other_DetailsEntity> GetPurchase_Other_DetailsList(string keyValue) | |||
{ | |||
try | |||
{ | |||
return purchase_OtherService.GetPurchase_Other_DetailsList(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Other表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Purchase_OtherEntity GetPurchase_OtherEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return purchase_OtherService.GetPurchase_OtherEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Other_Details表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Purchase_Other_DetailsEntity GetPurchase_Other_DetailsEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return purchase_OtherService.GetPurchase_Other_DetailsEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取主表实体数据 | |||
/// <param name="processId">流程实例ID</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public Purchase_OtherEntity GetEntityByProcessId(string processId) | |||
{ | |||
try | |||
{ | |||
return purchase_OtherService.GetEntityByProcessId(processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
purchase_OtherService.DeleteEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
/// <returns></returns> | |||
public void SaveEntity(string keyValue, Purchase_OtherEntity entity,List<Purchase_Other_DetailsEntity> purchase_Other_DetailsList) | |||
{ | |||
try | |||
{ | |||
purchase_OtherService.SaveEntity(keyValue, entity,purchase_Other_DetailsList); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 提交课程异动记录 | |||
/// </summary> | |||
/// <param name="keyValue">课程异动表主键</param> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
public void ModifyStatus(string keyValue, int status, string processId) | |||
{ | |||
try | |||
{ | |||
purchase_OtherService.ModifyStatus(keyValue, status, processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 修改课程异动表的审核状态 | |||
/// </summary> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
public void ModifyStatusByProcessId(int status, string processId) | |||
{ | |||
try | |||
{ | |||
purchase_OtherService.ModifyStatusByProcessId(status, processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,122 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_OtherEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// Id | |||
/// </summary> | |||
[Column("ID")] | |||
public string Id { get; set; } | |||
/// <summary> | |||
/// 申请部门name | |||
/// </summary> | |||
[Column("DEPARTMENTNAME")] | |||
public string DepartmentName { get; set; } | |||
/// <summary> | |||
/// 申请部门 | |||
/// </summary> | |||
[Column("DEPARTMENTID")] | |||
public string DepartmentId { get; set; } | |||
/// <summary> | |||
/// 申请人 | |||
/// </summary> | |||
[Column("CREATORID")] | |||
public string CreatorId { get; set; } | |||
/// <summary> | |||
/// 申请人 | |||
/// </summary> | |||
[Column("CREATORNAME")] | |||
public string CreatorName { get; set; } | |||
/// <summary> | |||
/// 申请时间 | |||
/// </summary> | |||
[Column("CREATETIME")] | |||
public DateTime? CreateTime { get; set; } | |||
/// <summary> | |||
/// 采购总价 | |||
/// </summary> | |||
[Column("TOTALAMOUNT")] | |||
public decimal? TotalAmount { get; set; } | |||
/// <summary> | |||
/// 备注 | |||
/// </summary> | |||
[Column("REMARK")] | |||
public string Remark { get; set; } | |||
/// <summary> | |||
/// 附件 | |||
/// </summary> | |||
[Column("FILEPATH")] | |||
public string FilePath { get; set; } | |||
/// <summary> | |||
/// 是否草稿箱 | |||
/// </summary> | |||
[Column("STATUS")] | |||
public int Status { get; set; } | |||
/// <summary> | |||
/// 提交时间 | |||
/// </summary> | |||
[Column("SUBMITTIME")] | |||
public DateTime? SubmitTime { get; set; } | |||
/// <summary> | |||
/// 审核时间 | |||
/// </summary> | |||
[Column("CheckTime")] | |||
public DateTime? CheckTime { get; set; } | |||
/// <summary> | |||
/// 审核人id | |||
/// </summary> | |||
[Column("CHECKUSERID")] | |||
public string CheckUserId { get; set; } | |||
/// <summary> | |||
/// 审核人 | |||
/// </summary> | |||
[Column("CHECKUSERNAME")] | |||
public string CheckUserName { get; set; } | |||
/// <summary> | |||
/// 审核状态 | |||
/// </summary> | |||
[Column("CHECKSTATUS")] | |||
public int CheckStatus { get; set; } | |||
/// <summary> | |||
/// 工作流Id | |||
/// </summary> | |||
[Column("ProcessId")] | |||
public string ProcessId { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.Id = Guid.NewGuid().ToString(); | |||
this.CreateTime = DateTime.Now; | |||
this.Status = 0; | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.Id = keyValue; | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,83 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public interface Purchase_OtherIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<Purchase_OtherEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取Purchase_Other_Details表数据 | |||
/// </summary> | |||
/// <returns></returns> | |||
IEnumerable<Purchase_Other_DetailsEntity> GetPurchase_Other_DetailsList(string keyValue); | |||
/// <summary> | |||
/// 获取Purchase_Other表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
Purchase_OtherEntity GetPurchase_OtherEntity(string keyValue); | |||
/// <summary> | |||
/// 获取Purchase_Other_Details表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
Purchase_Other_DetailsEntity GetPurchase_Other_DetailsEntity(string keyValue); | |||
/// <summary> | |||
/// 获取主表实体数据 | |||
/// <param name="processId">流程实例ID</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
Purchase_OtherEntity GetEntityByProcessId(string processId); | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
void DeleteEntity(string keyValue); | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
void SaveEntity(string keyValue, Purchase_OtherEntity entity,List<Purchase_Other_DetailsEntity> purchase_Work_DetailsList); | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 提交课程异动记录 | |||
/// </summary> | |||
/// <param name="keyValue">课程异动表主键</param> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
void ModifyStatus(string keyValue, int status, string processId); | |||
/// <summary> | |||
/// 修改异动表的审核状态 | |||
/// </summary> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
void ModifyStatusByProcessId(int status, string processId); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,327 @@ | |||
using Dapper; | |||
using Learun.DataBase.Repository; | |||
using Learun.Util; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Data; | |||
using System.Text; | |||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_OtherService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Purchase_OtherEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
t.Id, | |||
t.DepartmentId, | |||
t.DepartmentName, | |||
t.CreatorId, | |||
t.CreatorName, | |||
t.TotalAmount, | |||
t.Remark, | |||
t.FilePath,t.Status,t.SubmitTime,t.CheckTime,t.CheckUserId,t.CheckStatus,t.ProcessId | |||
"); | |||
strSql.Append(" FROM Purchase_Other t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
return this.BaseRepository("CollegeMISFor30").FindList<Purchase_OtherEntity>(strSql.ToString(),dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Other_Details表数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public IEnumerable<Purchase_Other_DetailsEntity> GetPurchase_Other_DetailsList(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMISFor30").FindList<Purchase_Other_DetailsEntity>(t=>t.Fid == keyValue ); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Other表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Purchase_OtherEntity GetPurchase_OtherEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMISFor30").FindEntity<Purchase_OtherEntity>(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Other_Details表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Purchase_Other_DetailsEntity GetPurchase_Other_DetailsEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMISFor30").FindEntity<Purchase_Other_DetailsEntity>(t=>t.Fid == keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取主表实体数据 | |||
/// <param name="processId">流程实例ID</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public Purchase_OtherEntity GetEntityByProcessId(string processId) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<Purchase_OtherEntity>(t => t.ProcessId == processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
var db = this.BaseRepository("CollegeMISFor30").BeginTrans(); | |||
try | |||
{ | |||
var purchase_WorkEntity = GetPurchase_OtherEntity(keyValue); | |||
db.Delete<Purchase_OtherEntity>(t=>t.Id == keyValue); | |||
db.Delete<Purchase_Other_DetailsEntity>(t=>t.Fid == purchase_WorkEntity.Id); | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
public void SaveEntity(string keyValue, Purchase_OtherEntity entity,List<Purchase_Other_DetailsEntity> purchase_Work_DetailsList) | |||
{ | |||
var db = this.BaseRepository("CollegeMISFor30").BeginTrans(); | |||
try | |||
{ | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
var purchase_WorkEntityTmp = GetPurchase_OtherEntity(keyValue); | |||
entity.Modify(keyValue); | |||
db.Update(entity); | |||
db.Delete<Purchase_Other_DetailsEntity>(t=>t.Fid == purchase_WorkEntityTmp.Id); | |||
foreach (Purchase_Other_DetailsEntity item in purchase_Work_DetailsList) | |||
{ | |||
item.Create(); | |||
item.Fid = purchase_WorkEntityTmp.Id; | |||
db.Insert(item); | |||
} | |||
} | |||
else | |||
{ | |||
entity.Create(); | |||
db.Insert(entity); | |||
foreach (Purchase_Other_DetailsEntity item in purchase_Work_DetailsList) | |||
{ | |||
item.Create(); | |||
item.Fid = entity.Id; | |||
db.Insert(item); | |||
} | |||
} | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 提交异动记录 | |||
/// </summary> | |||
/// <param name="keyValue">课程异动表主键</param> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
public void ModifyStatus(string keyValue, int status, string processId) | |||
{ | |||
try | |||
{ | |||
var now = DateTime.Now; | |||
var entity = this.BaseRepository("CollegeMIS").FindEntity<Purchase_OtherEntity>(x => x.Id == keyValue); | |||
if (entity != null) | |||
{ | |||
entity.Status = status; | |||
entity.ProcessId = processId; | |||
entity.SubmitTime = now; | |||
entity.CheckStatus = 1; | |||
this.BaseRepository("CollegeMIS").Update(entity); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 修改异动表的审核状态 | |||
/// </summary> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
public void ModifyStatusByProcessId(int status, string processId) | |||
{ | |||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||
var now = DateTime.Now; | |||
var loginUserInfo = LoginUserInfo.Get(); | |||
try | |||
{ | |||
var entity = db.FindEntity<Purchase_OtherEntity>(x => x.ProcessId == processId); | |||
if (entity != null) | |||
{ | |||
//审核通过 | |||
if (status == 2) | |||
{ | |||
} | |||
//更新课程异动表的审核状态 | |||
entity.Status = 1; | |||
entity.CheckStatus = status; | |||
entity.CheckUserId = loginUserInfo.userId; | |||
entity.CheckUserName = loginUserInfo.realName; | |||
entity.CheckTime = now; | |||
db.Update(entity); | |||
} | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,79 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_Other_DetailsEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// Id | |||
/// </summary> | |||
[Column("ID")] | |||
public string Id { get; set; } | |||
/// <summary> | |||
/// 所属主表ID | |||
/// </summary> | |||
[Column("FID")] | |||
public string Fid { get; set; } | |||
/// <summary> | |||
/// 采购物品名称 | |||
/// </summary> | |||
[Column("NAME")] | |||
public string Name { get; set; } | |||
/// <summary> | |||
/// Price | |||
/// </summary> | |||
[Column("PRICE")] | |||
public decimal? Price { get; set; } | |||
/// <summary> | |||
/// 采购数量 | |||
/// </summary> | |||
[Column("QUANTITY")] | |||
public decimal? Quantity { get; set; } | |||
/// <summary> | |||
/// 单位 | |||
/// </summary> | |||
[Column("UNIT")] | |||
public string Unit { get; set; } | |||
/// <summary> | |||
/// 用途 | |||
/// </summary> | |||
[Column("USETO")] | |||
public string UseTo { get; set; } | |||
/// <summary> | |||
/// CreateTime | |||
/// </summary> | |||
[Column("CREATETIME")] | |||
public DateTime? CreateTime { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.Id = Guid.NewGuid().ToString(); | |||
this.CreateTime = DateTime.Now; | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.Id = keyValue; | |||
} | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,248 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_PrintBLL : Purchase_PrintIBLL | |||
{ | |||
private Purchase_PrintService purchase_PrintService = new Purchase_PrintService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Purchase_PrintEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return purchase_PrintService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Print_Details表数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public IEnumerable<Purchase_Print_DetailsEntity> GetPurchase_Print_DetailsList(string keyValue) | |||
{ | |||
try | |||
{ | |||
return purchase_PrintService.GetPurchase_Print_DetailsList(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Print表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Purchase_PrintEntity GetPurchase_PrintEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return purchase_PrintService.GetPurchase_PrintEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Print_Details表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Purchase_Print_DetailsEntity GetPurchase_Print_DetailsEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return purchase_PrintService.GetPurchase_Print_DetailsEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取主表实体数据 | |||
/// <param name="processId">流程实例ID</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public Purchase_PrintEntity GetEntityByProcessId(string processId) | |||
{ | |||
try | |||
{ | |||
return purchase_PrintService.GetEntityByProcessId(processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
purchase_PrintService.DeleteEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
/// <returns></returns> | |||
public void SaveEntity(string keyValue, Purchase_PrintEntity entity,List<Purchase_Print_DetailsEntity> purchase_Print_DetailsList) | |||
{ | |||
try | |||
{ | |||
purchase_PrintService.SaveEntity(keyValue, entity,purchase_Print_DetailsList); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 提交课程异动记录 | |||
/// </summary> | |||
/// <param name="keyValue">课程异动表主键</param> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
public void ModifyStatus(string keyValue, int status, string processId) | |||
{ | |||
try | |||
{ | |||
purchase_PrintService.ModifyStatus(keyValue, status, processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 修改课程异动表的审核状态 | |||
/// </summary> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
public void ModifyStatusByProcessId(int status, string processId) | |||
{ | |||
try | |||
{ | |||
purchase_PrintService.ModifyStatusByProcessId(status, processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,122 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_PrintEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// Id | |||
/// </summary> | |||
[Column("ID")] | |||
public string Id { get; set; } | |||
/// <summary> | |||
/// 申请部门name | |||
/// </summary> | |||
[Column("DEPARTMENTNAME")] | |||
public string DepartmentName { get; set; } | |||
/// <summary> | |||
/// 申请部门 | |||
/// </summary> | |||
[Column("DEPARTMENTID")] | |||
public string DepartmentId { get; set; } | |||
/// <summary> | |||
/// 申请人 | |||
/// </summary> | |||
[Column("CREATORID")] | |||
public string CreatorId { get; set; } | |||
/// <summary> | |||
/// 申请人 | |||
/// </summary> | |||
[Column("CREATORNAME")] | |||
public string CreatorName { get; set; } | |||
/// <summary> | |||
/// 申请时间 | |||
/// </summary> | |||
[Column("CREATETIME")] | |||
public DateTime? CreateTime { get; set; } | |||
/// <summary> | |||
/// 采购总价 | |||
/// </summary> | |||
[Column("TOTALAMOUNT")] | |||
public decimal? TotalAmount { get; set; } | |||
/// <summary> | |||
/// 备注 | |||
/// </summary> | |||
[Column("REMARK")] | |||
public string Remark { get; set; } | |||
/// <summary> | |||
/// 附件 | |||
/// </summary> | |||
[Column("FILEPATH")] | |||
public string FilePath { get; set; } | |||
/// <summary> | |||
/// 是否草稿箱 | |||
/// </summary> | |||
[Column("STATUS")] | |||
public int Status { get; set; } | |||
/// <summary> | |||
/// 提交时间 | |||
/// </summary> | |||
[Column("SUBMITTIME")] | |||
public DateTime? SubmitTime { get; set; } | |||
/// <summary> | |||
/// 审核时间 | |||
/// </summary> | |||
[Column("CheckTime")] | |||
public DateTime? CheckTime { get; set; } | |||
/// <summary> | |||
/// 审核人id | |||
/// </summary> | |||
[Column("CHECKUSERID")] | |||
public string CheckUserId { get; set; } | |||
/// <summary> | |||
/// 审核人 | |||
/// </summary> | |||
[Column("CHECKUSERNAME")] | |||
public string CheckUserName { get; set; } | |||
/// <summary> | |||
/// 审核状态 | |||
/// </summary> | |||
[Column("CHECKSTATUS")] | |||
public int CheckStatus { get; set; } | |||
/// <summary> | |||
/// 工作流Id | |||
/// </summary> | |||
[Column("ProcessId")] | |||
public string ProcessId { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.Id = Guid.NewGuid().ToString(); | |||
this.CreateTime = DateTime.Now; | |||
this.Status = 0; | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.Id = keyValue; | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,83 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public interface Purchase_PrintIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<Purchase_PrintEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取Purchase_Print_Details表数据 | |||
/// </summary> | |||
/// <returns></returns> | |||
IEnumerable<Purchase_Print_DetailsEntity> GetPurchase_Print_DetailsList(string keyValue); | |||
/// <summary> | |||
/// 获取Purchase_Print表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
Purchase_PrintEntity GetPurchase_PrintEntity(string keyValue); | |||
/// <summary> | |||
/// 获取Purchase_Print_Details表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
Purchase_Print_DetailsEntity GetPurchase_Print_DetailsEntity(string keyValue); | |||
/// <summary> | |||
/// 获取主表实体数据 | |||
/// <param name="processId">流程实例ID</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
Purchase_PrintEntity GetEntityByProcessId(string processId); | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
void DeleteEntity(string keyValue); | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
void SaveEntity(string keyValue, Purchase_PrintEntity entity,List<Purchase_Print_DetailsEntity> purchase_Work_DetailsList); | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 提交课程异动记录 | |||
/// </summary> | |||
/// <param name="keyValue">课程异动表主键</param> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
void ModifyStatus(string keyValue, int status, string processId); | |||
/// <summary> | |||
/// 修改异动表的审核状态 | |||
/// </summary> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
void ModifyStatusByProcessId(int status, string processId); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,327 @@ | |||
using Dapper; | |||
using Learun.DataBase.Repository; | |||
using Learun.Util; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Data; | |||
using System.Text; | |||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_PrintService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Purchase_PrintEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
t.Id, | |||
t.DepartmentId, | |||
t.DepartmentName, | |||
t.CreatorId, | |||
t.CreatorName, | |||
t.TotalAmount, | |||
t.Remark, | |||
t.FilePath,t.Status,t.SubmitTime,t.CheckTime,t.CheckUserId,t.CheckStatus,t.ProcessId | |||
"); | |||
strSql.Append(" FROM Purchase_Print t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
return this.BaseRepository("CollegeMISFor30").FindList<Purchase_PrintEntity>(strSql.ToString(),dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Print_Details表数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public IEnumerable<Purchase_Print_DetailsEntity> GetPurchase_Print_DetailsList(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMISFor30").FindList<Purchase_Print_DetailsEntity>(t=>t.Fid == keyValue ); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Print表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Purchase_PrintEntity GetPurchase_PrintEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMISFor30").FindEntity<Purchase_PrintEntity>(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Print_Details表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Purchase_Print_DetailsEntity GetPurchase_Print_DetailsEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMISFor30").FindEntity<Purchase_Print_DetailsEntity>(t=>t.Fid == keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取主表实体数据 | |||
/// <param name="processId">流程实例ID</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public Purchase_PrintEntity GetEntityByProcessId(string processId) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<Purchase_PrintEntity>(t => t.ProcessId == processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
var db = this.BaseRepository("CollegeMISFor30").BeginTrans(); | |||
try | |||
{ | |||
var purchase_WorkEntity = GetPurchase_PrintEntity(keyValue); | |||
db.Delete<Purchase_PrintEntity>(t=>t.Id == keyValue); | |||
db.Delete<Purchase_Print_DetailsEntity>(t=>t.Fid == purchase_WorkEntity.Id); | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
public void SaveEntity(string keyValue, Purchase_PrintEntity entity,List<Purchase_Print_DetailsEntity> purchase_Work_DetailsList) | |||
{ | |||
var db = this.BaseRepository("CollegeMISFor30").BeginTrans(); | |||
try | |||
{ | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
var purchase_WorkEntityTmp = GetPurchase_PrintEntity(keyValue); | |||
entity.Modify(keyValue); | |||
db.Update(entity); | |||
db.Delete<Purchase_Print_DetailsEntity>(t=>t.Fid == purchase_WorkEntityTmp.Id); | |||
foreach (Purchase_Print_DetailsEntity item in purchase_Work_DetailsList) | |||
{ | |||
item.Create(); | |||
item.Fid = purchase_WorkEntityTmp.Id; | |||
db.Insert(item); | |||
} | |||
} | |||
else | |||
{ | |||
entity.Create(); | |||
db.Insert(entity); | |||
foreach (Purchase_Print_DetailsEntity item in purchase_Work_DetailsList) | |||
{ | |||
item.Create(); | |||
item.Fid = entity.Id; | |||
db.Insert(item); | |||
} | |||
} | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 提交异动记录 | |||
/// </summary> | |||
/// <param name="keyValue">课程异动表主键</param> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
public void ModifyStatus(string keyValue, int status, string processId) | |||
{ | |||
try | |||
{ | |||
var now = DateTime.Now; | |||
var entity = this.BaseRepository("CollegeMIS").FindEntity<Purchase_PrintEntity>(x => x.Id == keyValue); | |||
if (entity != null) | |||
{ | |||
entity.Status = status; | |||
entity.ProcessId = processId; | |||
entity.SubmitTime = now; | |||
entity.CheckStatus = 1; | |||
this.BaseRepository("CollegeMIS").Update(entity); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 修改异动表的审核状态 | |||
/// </summary> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
public void ModifyStatusByProcessId(int status, string processId) | |||
{ | |||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||
var now = DateTime.Now; | |||
var loginUserInfo = LoginUserInfo.Get(); | |||
try | |||
{ | |||
var entity = db.FindEntity<Purchase_PrintEntity>(x => x.ProcessId == processId); | |||
if (entity != null) | |||
{ | |||
//审核通过 | |||
if (status == 2) | |||
{ | |||
} | |||
//更新课程异动表的审核状态 | |||
entity.Status = 1; | |||
entity.CheckStatus = status; | |||
entity.CheckUserId = loginUserInfo.userId; | |||
entity.CheckUserName = loginUserInfo.realName; | |||
entity.CheckTime = now; | |||
db.Update(entity); | |||
} | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,79 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_Print_DetailsEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// Id | |||
/// </summary> | |||
[Column("ID")] | |||
public string Id { get; set; } | |||
/// <summary> | |||
/// 所属主表ID | |||
/// </summary> | |||
[Column("FID")] | |||
public string Fid { get; set; } | |||
/// <summary> | |||
/// 采购物品名称 | |||
/// </summary> | |||
[Column("NAME")] | |||
public string Name { get; set; } | |||
/// <summary> | |||
/// Price | |||
/// </summary> | |||
[Column("PRICE")] | |||
public decimal? Price { get; set; } | |||
/// <summary> | |||
/// 采购数量 | |||
/// </summary> | |||
[Column("QUANTITY")] | |||
public decimal? Quantity { get; set; } | |||
/// <summary> | |||
/// 单位 | |||
/// </summary> | |||
[Column("UNIT")] | |||
public string Unit { get; set; } | |||
/// <summary> | |||
/// 用途 | |||
/// </summary> | |||
[Column("USETO")] | |||
public string UseTo { get; set; } | |||
/// <summary> | |||
/// CreateTime | |||
/// </summary> | |||
[Column("CREATETIME")] | |||
public DateTime? CreateTime { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.Id = Guid.NewGuid().ToString(); | |||
this.CreateTime = DateTime.Now; | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.Id = keyValue; | |||
} | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,248 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_StudentBLL : Purchase_StudentIBLL | |||
{ | |||
private Purchase_StudentService purchase_StudentService = new Purchase_StudentService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Purchase_StudentEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return purchase_StudentService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Student_Details表数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public IEnumerable<Purchase_Student_DetailsEntity> GetPurchase_Student_DetailsList(string keyValue) | |||
{ | |||
try | |||
{ | |||
return purchase_StudentService.GetPurchase_Student_DetailsList(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Student表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Purchase_StudentEntity GetPurchase_StudentEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return purchase_StudentService.GetPurchase_StudentEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Student_Details表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Purchase_Student_DetailsEntity GetPurchase_Student_DetailsEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return purchase_StudentService.GetPurchase_Student_DetailsEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取主表实体数据 | |||
/// <param name="processId">流程实例ID</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public Purchase_StudentEntity GetEntityByProcessId(string processId) | |||
{ | |||
try | |||
{ | |||
return purchase_StudentService.GetEntityByProcessId(processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
purchase_StudentService.DeleteEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
/// <returns></returns> | |||
public void SaveEntity(string keyValue, Purchase_StudentEntity entity,List<Purchase_Student_DetailsEntity> purchase_Student_DetailsList) | |||
{ | |||
try | |||
{ | |||
purchase_StudentService.SaveEntity(keyValue, entity,purchase_Student_DetailsList); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 提交课程异动记录 | |||
/// </summary> | |||
/// <param name="keyValue">课程异动表主键</param> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
public void ModifyStatus(string keyValue, int status, string processId) | |||
{ | |||
try | |||
{ | |||
purchase_StudentService.ModifyStatus(keyValue, status, processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 修改课程异动表的审核状态 | |||
/// </summary> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
public void ModifyStatusByProcessId(int status, string processId) | |||
{ | |||
try | |||
{ | |||
purchase_StudentService.ModifyStatusByProcessId(status, processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,122 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_StudentEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// Id | |||
/// </summary> | |||
[Column("ID")] | |||
public string Id { get; set; } | |||
/// <summary> | |||
/// 申请部门name | |||
/// </summary> | |||
[Column("DEPARTMENTNAME")] | |||
public string DepartmentName { get; set; } | |||
/// <summary> | |||
/// 申请部门 | |||
/// </summary> | |||
[Column("DEPARTMENTID")] | |||
public string DepartmentId { get; set; } | |||
/// <summary> | |||
/// 申请人 | |||
/// </summary> | |||
[Column("CREATORID")] | |||
public string CreatorId { get; set; } | |||
/// <summary> | |||
/// 申请人 | |||
/// </summary> | |||
[Column("CREATORNAME")] | |||
public string CreatorName { get; set; } | |||
/// <summary> | |||
/// 申请时间 | |||
/// </summary> | |||
[Column("CREATETIME")] | |||
public DateTime? CreateTime { get; set; } | |||
/// <summary> | |||
/// 采购总价 | |||
/// </summary> | |||
[Column("TOTALAMOUNT")] | |||
public decimal? TotalAmount { get; set; } | |||
/// <summary> | |||
/// 备注 | |||
/// </summary> | |||
[Column("REMARK")] | |||
public string Remark { get; set; } | |||
/// <summary> | |||
/// 附件 | |||
/// </summary> | |||
[Column("FILEPATH")] | |||
public string FilePath { get; set; } | |||
/// <summary> | |||
/// 是否草稿箱 | |||
/// </summary> | |||
[Column("STATUS")] | |||
public int Status { get; set; } | |||
/// <summary> | |||
/// 提交时间 | |||
/// </summary> | |||
[Column("SUBMITTIME")] | |||
public DateTime? SubmitTime { get; set; } | |||
/// <summary> | |||
/// 审核时间 | |||
/// </summary> | |||
[Column("CheckTime")] | |||
public DateTime? CheckTime { get; set; } | |||
/// <summary> | |||
/// 审核人id | |||
/// </summary> | |||
[Column("CHECKUSERID")] | |||
public string CheckUserId { get; set; } | |||
/// <summary> | |||
/// 审核人 | |||
/// </summary> | |||
[Column("CHECKUSERNAME")] | |||
public string CheckUserName { get; set; } | |||
/// <summary> | |||
/// 审核状态 | |||
/// </summary> | |||
[Column("CHECKSTATUS")] | |||
public int CheckStatus { get; set; } | |||
/// <summary> | |||
/// 工作流Id | |||
/// </summary> | |||
[Column("ProcessId")] | |||
public string ProcessId { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.Id = Guid.NewGuid().ToString(); | |||
this.CreateTime = DateTime.Now; | |||
this.Status = 0; | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.Id = keyValue; | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,83 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public interface Purchase_StudentIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<Purchase_StudentEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取Purchase_Student_Details表数据 | |||
/// </summary> | |||
/// <returns></returns> | |||
IEnumerable<Purchase_Student_DetailsEntity> GetPurchase_Student_DetailsList(string keyValue); | |||
/// <summary> | |||
/// 获取Purchase_Student表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
Purchase_StudentEntity GetPurchase_StudentEntity(string keyValue); | |||
/// <summary> | |||
/// 获取Purchase_Student_Details表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
Purchase_Student_DetailsEntity GetPurchase_Student_DetailsEntity(string keyValue); | |||
/// <summary> | |||
/// 获取主表实体数据 | |||
/// <param name="processId">流程实例ID</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
Purchase_StudentEntity GetEntityByProcessId(string processId); | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
void DeleteEntity(string keyValue); | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
void SaveEntity(string keyValue, Purchase_StudentEntity entity,List<Purchase_Student_DetailsEntity> purchase_Work_DetailsList); | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 提交课程异动记录 | |||
/// </summary> | |||
/// <param name="keyValue">课程异动表主键</param> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
void ModifyStatus(string keyValue, int status, string processId); | |||
/// <summary> | |||
/// 修改异动表的审核状态 | |||
/// </summary> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
void ModifyStatusByProcessId(int status, string processId); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,327 @@ | |||
using Dapper; | |||
using Learun.DataBase.Repository; | |||
using Learun.Util; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Data; | |||
using System.Text; | |||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_StudentService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Purchase_StudentEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
t.Id, | |||
t.DepartmentId, | |||
t.DepartmentName, | |||
t.CreatorId, | |||
t.CreatorName, | |||
t.TotalAmount, | |||
t.Remark, | |||
t.FilePath,t.Status,t.SubmitTime,t.CheckTime,t.CheckUserId,t.CheckStatus,t.ProcessId | |||
"); | |||
strSql.Append(" FROM Purchase_Student t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
return this.BaseRepository("CollegeMISFor30").FindList<Purchase_StudentEntity>(strSql.ToString(),dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Student_Details表数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public IEnumerable<Purchase_Student_DetailsEntity> GetPurchase_Student_DetailsList(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMISFor30").FindList<Purchase_Student_DetailsEntity>(t=>t.Fid == keyValue ); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Student表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Purchase_StudentEntity GetPurchase_StudentEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMISFor30").FindEntity<Purchase_StudentEntity>(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Student_Details表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Purchase_Student_DetailsEntity GetPurchase_Student_DetailsEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMISFor30").FindEntity<Purchase_Student_DetailsEntity>(t=>t.Fid == keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取主表实体数据 | |||
/// <param name="processId">流程实例ID</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public Purchase_StudentEntity GetEntityByProcessId(string processId) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<Purchase_StudentEntity>(t => t.ProcessId == processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
var db = this.BaseRepository("CollegeMISFor30").BeginTrans(); | |||
try | |||
{ | |||
var purchase_WorkEntity = GetPurchase_StudentEntity(keyValue); | |||
db.Delete<Purchase_StudentEntity>(t=>t.Id == keyValue); | |||
db.Delete<Purchase_Student_DetailsEntity>(t=>t.Fid == purchase_WorkEntity.Id); | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
public void SaveEntity(string keyValue, Purchase_StudentEntity entity,List<Purchase_Student_DetailsEntity> purchase_Work_DetailsList) | |||
{ | |||
var db = this.BaseRepository("CollegeMISFor30").BeginTrans(); | |||
try | |||
{ | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
var purchase_WorkEntityTmp = GetPurchase_StudentEntity(keyValue); | |||
entity.Modify(keyValue); | |||
db.Update(entity); | |||
db.Delete<Purchase_Student_DetailsEntity>(t=>t.Fid == purchase_WorkEntityTmp.Id); | |||
foreach (Purchase_Student_DetailsEntity item in purchase_Work_DetailsList) | |||
{ | |||
item.Create(); | |||
item.Fid = purchase_WorkEntityTmp.Id; | |||
db.Insert(item); | |||
} | |||
} | |||
else | |||
{ | |||
entity.Create(); | |||
db.Insert(entity); | |||
foreach (Purchase_Student_DetailsEntity item in purchase_Work_DetailsList) | |||
{ | |||
item.Create(); | |||
item.Fid = entity.Id; | |||
db.Insert(item); | |||
} | |||
} | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 提交异动记录 | |||
/// </summary> | |||
/// <param name="keyValue">课程异动表主键</param> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
public void ModifyStatus(string keyValue, int status, string processId) | |||
{ | |||
try | |||
{ | |||
var now = DateTime.Now; | |||
var entity = this.BaseRepository("CollegeMIS").FindEntity<Purchase_StudentEntity>(x => x.Id == keyValue); | |||
if (entity != null) | |||
{ | |||
entity.Status = status; | |||
entity.ProcessId = processId; | |||
entity.SubmitTime = now; | |||
entity.CheckStatus = 1; | |||
this.BaseRepository("CollegeMIS").Update(entity); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 修改异动表的审核状态 | |||
/// </summary> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
public void ModifyStatusByProcessId(int status, string processId) | |||
{ | |||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||
var now = DateTime.Now; | |||
var loginUserInfo = LoginUserInfo.Get(); | |||
try | |||
{ | |||
var entity = db.FindEntity<Purchase_StudentEntity>(x => x.ProcessId == processId); | |||
if (entity != null) | |||
{ | |||
//审核通过 | |||
if (status == 2) | |||
{ | |||
} | |||
//更新课程异动表的审核状态 | |||
entity.Status = 1; | |||
entity.CheckStatus = status; | |||
entity.CheckUserId = loginUserInfo.userId; | |||
entity.CheckUserName = loginUserInfo.realName; | |||
entity.CheckTime = now; | |||
db.Update(entity); | |||
} | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,79 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_Student_DetailsEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// Id | |||
/// </summary> | |||
[Column("ID")] | |||
public string Id { get; set; } | |||
/// <summary> | |||
/// 所属主表ID | |||
/// </summary> | |||
[Column("FID")] | |||
public string Fid { get; set; } | |||
/// <summary> | |||
/// 采购物品名称 | |||
/// </summary> | |||
[Column("NAME")] | |||
public string Name { get; set; } | |||
/// <summary> | |||
/// Price | |||
/// </summary> | |||
[Column("PRICE")] | |||
public decimal? Price { get; set; } | |||
/// <summary> | |||
/// 采购数量 | |||
/// </summary> | |||
[Column("QUANTITY")] | |||
public decimal? Quantity { get; set; } | |||
/// <summary> | |||
/// 单位 | |||
/// </summary> | |||
[Column("UNIT")] | |||
public string Unit { get; set; } | |||
/// <summary> | |||
/// 用途 | |||
/// </summary> | |||
[Column("USETO")] | |||
public string UseTo { get; set; } | |||
/// <summary> | |||
/// CreateTime | |||
/// </summary> | |||
[Column("CREATETIME")] | |||
public DateTime? CreateTime { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.Id = Guid.NewGuid().ToString(); | |||
this.CreateTime = DateTime.Now; | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.Id = keyValue; | |||
} | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,248 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_WorkBLL : Purchase_WorkIBLL | |||
{ | |||
private Purchase_WorkService purchase_WorkService = new Purchase_WorkService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Purchase_WorkEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return purchase_WorkService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Work_Details表数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public IEnumerable<Purchase_Work_DetailsEntity> GetPurchase_Work_DetailsList(string keyValue) | |||
{ | |||
try | |||
{ | |||
return purchase_WorkService.GetPurchase_Work_DetailsList(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Work表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Purchase_WorkEntity GetPurchase_WorkEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return purchase_WorkService.GetPurchase_WorkEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Purchase_Work_Details表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Purchase_Work_DetailsEntity GetPurchase_Work_DetailsEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return purchase_WorkService.GetPurchase_Work_DetailsEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取主表实体数据 | |||
/// <param name="processId">流程实例ID</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public Purchase_WorkEntity GetEntityByProcessId(string processId) | |||
{ | |||
try | |||
{ | |||
return purchase_WorkService.GetEntityByProcessId(processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
purchase_WorkService.DeleteEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
/// <returns></returns> | |||
public void SaveEntity(string keyValue, Purchase_WorkEntity entity,List<Purchase_Work_DetailsEntity> purchase_Work_DetailsList) | |||
{ | |||
try | |||
{ | |||
purchase_WorkService.SaveEntity(keyValue, entity,purchase_Work_DetailsList); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 提交课程异动记录 | |||
/// </summary> | |||
/// <param name="keyValue">课程异动表主键</param> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
public void ModifyStatus(string keyValue, int status, string processId) | |||
{ | |||
try | |||
{ | |||
purchase_WorkService.ModifyStatus(keyValue, status, processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 修改课程异动表的审核状态 | |||
/// </summary> | |||
/// <param name="status">审核状态</param> | |||
/// <param name="processId">流程Id</param> | |||
public void ModifyStatusByProcessId(int status, string processId) | |||
{ | |||
try | |||
{ | |||
purchase_WorkService.ModifyStatusByProcessId(status, processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,122 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
namespace Learun.Application.TwoDevelopment.LogisticsManagement | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2023-06-25 18:33 | |||
/// 描 述:申请类 | |||
/// </summary> | |||
public class Purchase_WorkEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// Id | |||
/// </summary> | |||
[Column("ID")] | |||
public string Id { get; set; } | |||
/// <summary> | |||
/// 申请部门name | |||
/// </summary> | |||
[Column("DEPARTMENTNAME")] | |||
public string DepartmentName { get; set; } | |||
/// <summary> | |||
/// 申请部门 | |||
/// </summary> | |||
[Column("DEPARTMENTID")] | |||
public string DepartmentId { get; set; } | |||
/// <summary> | |||
/// 申请人 | |||
/// </summary> | |||
[Column("CREATORID")] | |||
public string CreatorId { get; set; } | |||
/// <summary> | |||
/// 申请人 | |||
/// </summary> | |||
[Column("CREATORNAME")] | |||
public string CreatorName { get; set; } | |||
/// <summary> | |||
/// 申请时间 | |||
/// </summary> | |||
[Column("CREATETIME")] | |||
public DateTime? CreateTime { get; set; } | |||
/// <summary> | |||
/// 采购总价 | |||
/// </summary> | |||
[Column("TOTALAMOUNT")] | |||
public decimal? TotalAmount { get; set; } | |||
/// <summary> | |||
/// 备注 | |||
/// </summary> | |||
[Column("REMARK")] | |||
public string Remark { get; set; } | |||
/// <summary> | |||
/// 附件 | |||
/// </summary> | |||
[Column("FILEPATH")] | |||
public string FilePath { get; set; } | |||
/// <summary> | |||
/// 是否草稿箱 | |||
/// </summary> | |||
[Column("STATUS")] | |||
public int Status { get; set; } | |||
/// <summary> | |||
/// 提交时间 | |||
/// </summary> | |||
[Column("SUBMITTIME")] | |||
public DateTime? SubmitTime { get; set; } | |||
/// <summary> | |||
/// 审核时间 | |||
/// </summary> | |||
[Column("CheckTime")] | |||
public DateTime? CheckTime { get; set; } | |||
/// <summary> | |||
/// 审核人id | |||
/// </summary> | |||
[Column("CHECKUSERID")] | |||
public string CheckUserId { get; set; } | |||
/// <summary> | |||
/// 审核人 | |||
/// </summary> | |||
[Column("CHECKUSERNAME")] | |||
public string CheckUserName { get; set; } | |||
/// <summary> | |||
/// 审核状态 | |||
/// </summary> | |||
[Column("CHECKSTATUS")] | |||
public int CheckStatus { get; set; } | |||
/// <summary> | |||
/// 工作流Id | |||
/// </summary> | |||
[Column("ProcessId")] | |||
public string ProcessId { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.Id = Guid.NewGuid().ToString(); | |||
this.CreateTime = DateTime.Now; | |||
this.Status = 0; | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.Id = keyValue; | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
#endregion | |||
} | |||
} | |||