Browse Source

Merge branch '塔里木分支' of 123.57.209.16:bjquanjiang/DigitalScholl into 塔里木分支

新疆体育高职分支
liangkun 1 year ago
parent
commit
b383c3d6f5
28 changed files with 3015 additions and 2 deletions
  1. +143
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_FixAssetsApplyController.cs
  2. +135
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_FixAssetsController.cs
  3. +160
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/Form.cshtml
  4. +139
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/Form.js
  5. +96
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/Index.cshtml
  6. +369
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/Index.js
  7. +47
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/Form.cshtml
  8. +128
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/Form.js
  9. +63
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/Index.cshtml
  10. +273
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/Index.js
  11. +10
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  12. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config
  13. +12
    -2
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/DesktopApi.cs
  14. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/AssetManagementSystem/Ass_FixAssetsApplyMap.cs
  15. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/AssetManagementSystem/Ass_FixAssetsMap.cs
  16. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  17. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsType/Ass_AssetsTypeService.cs
  18. +148
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssets/Ass_FixAssetsBLL.cs
  19. +260
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssets/Ass_FixAssetsEntity.cs
  20. +55
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssets/Ass_FixAssetsIBLL.cs
  21. +231
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssets/Ass_FixAssetsService.cs
  22. +186
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssetsApply/Ass_FixAssetsApplyBLL.cs
  23. +140
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssetsApply/Ass_FixAssetsApplyEntity.cs
  24. +63
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssetsApply/Ass_FixAssetsApplyIBLL.cs
  25. +253
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssetsApply/Ass_FixAssetsApplyService.cs
  26. +8
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
  27. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj
  28. +28
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/Ass_FixAssetsApplyMethod.cs

+ 143
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_FixAssetsApplyController.cs View File

@@ -0,0 +1,143 @@
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.AssetManagementSystem;
using System.Web.Mvc;
using Learun.Application.TwoDevelopment.LR_CodeDemo;
using System.Collections.Generic;
using Learun.Application.Base.SystemModule;

namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2023-05-05 14:52
/// 描 述:Ass_FixAssetsApply
/// </summary>
public class Ass_FixAssetsApplyController : MvcControllerBase
{
private Ass_FixAssetsApplyIBLL ass_FixAssetsApplyIBLL = new Ass_FixAssetsApplyBLL();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
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 = ass_FixAssetsApplyIBLL.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 Ass_FixAssetsApplyData = ass_FixAssetsApplyIBLL.GetAss_FixAssetsApplyEntity(keyValue);
var jsonData = new
{
Ass_FixAssetsApply = Ass_FixAssetsApplyData,
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="processId">流程实例主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormDataByProcessId(string processId)
{
var Ass_FixAssetsApplyData = ass_FixAssetsApplyIBLL.GetEntityByProcessId(processId);
var jsonData = new
{
Ass_FixAssetsApply = Ass_FixAssetsApplyData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
ass_FixAssetsApplyIBLL.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)
{
Ass_FixAssetsApplyEntity entity = strEntity.ToObject<Ass_FixAssetsApplyEntity>();
ass_FixAssetsApplyIBLL.SaveEntity(keyValue, entity);
if (string.IsNullOrEmpty(keyValue))
{
}
return Success("保存成功!");
}
[HttpPost]
[AjaxOnly]
public ActionResult ModifyStatus(string keyValue, int pastatus, string processId)
{
ass_FixAssetsApplyIBLL.ModifyStatus(keyValue, pastatus, processId);
return Success("提交成功!");
}
#endregion

}
}

+ 135
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_FixAssetsController.cs View File

@@ -0,0 +1,135 @@
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.AssetManagementSystem;
using System.Web.Mvc;
using Learun.Application.TwoDevelopment.LR_CodeDemo;
using System.Collections.Generic;
using Learun.Application.Base.SystemModule;

namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2023-05-05 14:37
/// 描 述:固定资产
/// </summary>
public class Ass_FixAssetsController : MvcControllerBase
{
private Ass_FixAssetsIBLL ass_FixAssetsIBLL = new Ass_FixAssetsBLL();
private CodeRuleIBLL codeRuleIBLL = new CodeRuleBLL();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
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 = ass_FixAssetsIBLL.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 Ass_FixAssetsData = ass_FixAssetsIBLL.GetAss_FixAssetsEntity( keyValue );
var jsonData = new {
Ass_FixAssets = Ass_FixAssetsData,
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="processId">流程实例主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormDataByProcessId(string processId)
{
var Ass_FixAssetsData = ass_FixAssetsIBLL.GetEntityByProcessId( processId );
var jsonData = new {
Ass_FixAssets = Ass_FixAssetsData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
ass_FixAssetsIBLL.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)
{
Ass_FixAssetsEntity entity = strEntity.ToObject<Ass_FixAssetsEntity>();
ass_FixAssetsIBLL.SaveEntity(keyValue,entity);
if (string.IsNullOrEmpty(keyValue))
{
}
return Success("保存成功!");
}
#endregion

}
}

+ 160
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/Form.cshtml View File

@@ -0,0 +1,160 @@
@{
ViewBag.Title = "固定资产";
Layout = "~/Views/Shared/_Form.cshtml";
}
<style>
.lr-form-item {
padding-left: 125px;
}

.lr-form-item-title {
width: 125px;
}

.coloreee {
background-color: #eee !important;
}

.colorpink {
background-color:antiquewhite !important;
}
</style>
<div class="lr-form-wrap" id="form">
<div class="col-xs-6 lr-form-item" data-table="Ass_FixAssets">
<div class="lr-form-item-title">资产编号<font face="宋体">*</font></div>
<input id="FACode" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_FixAssets">
<div class="lr-form-item-title">资产名称<font face="宋体">*</font></div>
<input id="FAName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_FixAssets">
<div class="lr-form-item-title">资产国标大类<font face="宋体">*</font></div>
<div id="ATGId" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_FixAssets">
<div class="lr-form-item-title">资产分类<font face="宋体">*</font></div>
<div id="ATId" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Ass_FixAssets">
<div class="lr-form-item-title">财务入账日期<font face="宋体">*</font></div>
<input id="FinanceEntryDate" type="text" class="form-control lr-input-wdatepicker colorpink" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked: function () { $('#FinanceEntryDate').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_FixAssets">
<div class="lr-form-item-title">价值类型<font face="宋体">*</font></div>
<div id="ValueType" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_FixAssets">
<div class="lr-form-item-title">价值<font face="宋体">*</font></div>
<input id="Value" type="text" class="form-control coloreee" isvalid="yes" checkexpession="Num" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_FixAssets">
<div class="lr-form-item-title">取得方式<font face="宋体">*</font></div>
<div id="GetWay" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_FixAssets">
<div class="lr-form-item-title">取得日期<font face="宋体">*</font></div>
<input id="GetDate" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked: function () { $('#GetDate').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_FixAssets">
<div class="lr-form-item-title">使用状况<font face="宋体">*</font></div>
<div id="UseCondition" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_FixAssets">
<div class="lr-form-item-title">使用部门<font face="宋体">*</font></div>
<div id="UseDepartment" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_FixAssets">
<div class="lr-form-item-title">管理部门<font face="宋体">*</font></div>
<div id="ManageDepartment" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_FixAssets">
<div class="lr-form-item-title">使用人<font face="宋体">*</font></div>
<div id="UsePeople" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Ass_FixAssets">
<div class="lr-form-item-title">数量<font face="宋体">*</font></div>
<input id="Amount" type="number" class="form-control" isvalid="yes" checkexpession="PositiveInteger" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_FixAssets">
<div class="lr-form-item-title">制单人<font face="宋体">*</font></div>
<input id="MakePeople" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_FixAssets">
<div class="lr-form-item-title">制单时间<font face="宋体">*</font></div>
<input id="MakeDate" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked: function () { $('#MakeDate').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_FixAssets">
<div class="lr-form-item-title">所属单位<font face="宋体">*</font></div>
<div id="Unit" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_FixAssets">
<div class="lr-form-item-title">卡片状态<font face="宋体">*</font></div>
<div id="CardStatus" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_FixAssets">
<div class="lr-form-item-title">折旧年限<font face="宋体">*</font></div>
<input id="DepreciationLife" type="number" class="form-control colorpink" isvalid="yes" checkexpession="PositiveInteger" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_FixAssets">
<div class="lr-form-item-title">累计折旧<font face="宋体">*</font></div>
<input id="AccumulatedDepreciation" type="text" class="form-control coloreee" isvalid="yes" checkexpession="Num" readonly/>
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_FixAssets">
<div class="lr-form-item-title">已提折旧月数<font face="宋体">*</font></div>
<input id="HaveDepreciationMonths" type="text" class="form-control coloreee" isvalid="yes" checkexpession="Num" readonly/>
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_FixAssets">
<div class="lr-form-item-title">月折旧额<font face="宋体">*</font></div>
<input id="MonthlyDepreciation" type="text" class="form-control coloreee" isvalid="yes" checkexpession="Num" readonly/>
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_FixAssets">
<div class="lr-form-item-title">折旧方法<font face="宋体">*</font></div>
<div id="DepreciationMothod" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_FixAssets">
<div class="lr-form-item-title">净值<font face="宋体">*</font></div>
<input id="NetValue" type="text" class="form-control coloreee" isvalid="yes" checkexpession="Num" readonly/>
</div>
<div class="col-xs-12 lr-form-item" data-table="Ass_FixAssets">
<div class="lr-form-item-title">采购组织形式</div>
<input id="PurchaseOrganizationForm" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Ass_FixAssets">
<div class="lr-form-item-title">品牌</div>
<input id="Brand" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Ass_FixAssets">
<div class="lr-form-item-title">规格型号</div>
<input id="SpecificationModel" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_FixAssets">
<div class="lr-form-item-title">存放地点</div>
<div id="StorageId"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_FixAssets">
<div class="lr-form-item-title">销售商</div>
<div id="SupplierId"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Ass_FixAssets">
<div class="lr-form-item-title">使用权面积/建筑面积<font face="宋体">*</font></div>
<input id="UseArea" type="number" class="form-control" isvalid="yes" checkexpession="Num"/>
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_FixAssets">
<div class="lr-form-item-title">财政拨款<font face="宋体">*</font></div>
<input id="FinancialAppropriation" type="number" class="form-control colorpink" isvalid="yes" checkexpession="Num" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_FixAssets">
<div class="lr-form-item-title">非财政拨款<font face="宋体">*</font></div>
<input id="NonFinancialAppropriation" type="number" class="form-control colorpink" isvalid="yes" checkexpession="Num" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_FixAssets">
<div class="lr-form-item-title">会计凭证号<font face="宋体">*</font></div>
<input id="AccountDocumentNumber" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_FixAssets">
<div class="lr-form-item-title">折旧/摊销状态<font face="宋体">*</font></div>
<div id="DepreciationStatus" isvalid="yes" checkexpession="NotNull"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/AssetManagementSystem/Views/Ass_FixAssets/Form.js")

+ 139
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/Form.js View File

@@ -0,0 +1,139 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2023-05-05 14:37
* 描 述:固定资产
*/
var acceptClick;
var keyValue = request('keyValue');
// 设置权限
var setAuthorize;
// 设置表单数据
var setFormData;
// 验证数据是否填写完整
var validForm;
// 保存数据
var save;
var bootstrap = function ($, learun) {
"use strict";
// 设置权限
setAuthorize = function (data) {
if (!!data) {
for (var field in data) {
if (data[field].isLook != 1) {// 如果没有查看权限就直接移除
$('#' + data[field].fieldId).parent().remove();
}
else {
if (data[field].isEdit != 1) {
$('#' + data[field].fieldId).attr('disabled', 'disabled');
if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) {
$('#' + data[field].fieldId).css({ 'padding-right': '58px' });
$('#' + data[field].fieldId).find('.btn-success').remove();
}
}
}
}
}
};
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#ATGId').lrselect({
allowSearch: true,
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=Ass_AssetsType',
param: { strWhere: "ATPTId='0' " },
value: "atid",
text: "aname",
select: function (item) {
if (!!item) {
$('#ATId').lrselectRefresh({
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=Ass_AssetsType',
param: { strWhere: "ATPTId='" + item.atid + "' " },
value: "atid",
text: "aname"
});
}
}
});
$('#ATId').lrselect({ allowSearch: true});
$('#ValueType').lrDataItemSelect({ code: 'ValueType' });
$('#GetWay').lrDataItemSelect({ code: 'GetWay' });
$('#UseCondition').lrDataItemSelect({ code: 'AssState' });
$('#UseDepartment').lrDepartmentSelect();
$('#ManageDepartment').lrDepartmentSelect();
$('#UsePeople').lrformselect({
layerUrl: top.$.rootUrl + '/LR_OrganizationModule/User/SelectOnlyForm',
layerUrlW: 400,
layerUrlH: 300,
dataUrl: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByUserIds'
});
$('#Unit').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' });
$('#CardStatus').lrDataItemSelect({ code: 'CardStatus' });
$('#DepreciationMothod').lrDataItemSelect({ code: 'DepreciationMothod' });
$('#StorageId').lrDataSourceSelect({ code: 'Ass_StorageData', value: 'sid', text: 'sname' });
$('#SupplierId').lrDataSourceSelect({ code: 'Ass_SupplierData', value: 'sid', text: 'sname' });
$('#DepreciationStatus').lrDataItemSelect({ code: 'DepreciationStatus' });
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/Ass_FixAssets/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 + '/AssetManagementSystem/Ass_FixAssets/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 == 'Ass_FixAssets' && data[id]) {
keyValue = data[id].FAId;
}
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
callback && callback();
}
// 验证数据是否填写完整
validForm = function () {
if (!$('body').lrValidform()) {
return false;
}
return true;
};
// 保存数据
save = function (processId, callBack, i) {
var formData = $('body').lrGetFormData();
if (!!processId) {
formData.ProcessId = processId;
}
var postData = {
strEntity: JSON.stringify(formData)
};
$.lrSaveForm(top.$.rootUrl + '/AssetManagementSystem/Ass_FixAssets/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack(res, i);
}
});
};
page.init();
}

+ 96
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/Index.cshtml View File

@@ -0,0 +1,96 @@
@{
ViewBag.Title = "固定资产";
Layout = "~/Views/Shared/_Index.cshtml";
}
<style>
.lr-form-item{
padding-left:85px;
}
.lr-form-item-title{
width:90px;
}
</style>
<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 class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">资产编号</div>
<input id="FACode" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">资产名称</div>
<input id="FAName" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">资产国标大类</div>
<div id="ATGId"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">资产分类</div>
<div id="ATId"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">取得方式</div>
<div id="GetWay"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">使用状况</div>
<div id="UseCondition"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">使用部门</div>
<div id="UseDepartment"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">管理部门</div>
<div id="ManageDepartment"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">使用人</div>
<div id="UsePeople"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">卡片状态</div>
<div id="CardStatus"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">采购组织形式</div>
<input id="PurchaseOrganizationForm" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">存放地点</div>
<div id="StorageId"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">折旧/摊销状态</div>
<div id="DepreciationStatus"></div>
</div>
</div>
</div>
</div>
</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" learun-authorize="yes">
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_view" class="btn btn-default"><i class="fa fa-eye"></i>&nbsp;查看</a>
<a id="lr_submit" class="btn btn-default"><i class="fa fa-arrow-up"></i>&nbsp;提交</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/AssetManagementSystem/Views/Ass_FixAssets/Index.js")

+ 369
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/Index.js View File

@@ -0,0 +1,369 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2023-05-05 14:37
* 描 述:固定资产
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var processId = '';
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 350, 450);
$('#ATGId').lrDataSourceSelect({ code: 'Ass_AssetsType', value: 'atid', text: 'aname' });
$('#ATId').lrDataSourceSelect({ code: 'Ass_AssetsType', value: 'atid', text: 'aname' });
$('#GetWay').lrDataItemSelect({ code: 'GetWay' });
$('#UseCondition').lrDataItemSelect({ code: 'AssState' });
$('#UseDepartment').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' });
$('#ManageDepartment').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' });
$('#UsePeople').lrUserSelect(0);
$('#CardStatus').lrDataItemSelect({ code: 'CardStatus' });
$('#StorageId').lrDataSourceSelect({ code: 'Ass_StorageData', value: 'sid', text: 'sname' });
$('#DepreciationStatus').lrDataItemSelect({ code: 'DepreciationStatus' });
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/AssetManagementSystem/Ass_FixAssets/Form',
width: 1000,
height: 800,
callBack: function (id) {
var res = false;
// 验证数据
res = top[id].validForm();
// 保存数据
if (res) {
res = top[id].save('', function () {
page.search();
});
}
return res;
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('FAId');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status !== 0) {
learun.alert.warning("当前项目已提交不能编辑!");
return;
}
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/AssetManagementSystem/Ass_FixAssets/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 res;
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('FAId');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status !== 0) {
learun.alert.warning("当前项目已提交不能删除!");
return;
}
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/AssetManagementSystem/Ass_FixAssets/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});

// 查看申请
$('#lr_view').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('FAId');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'formAss_FixAssets',
title: '查看固定资产',
url: top.$.rootUrl + '/AssetManagementSystem/Ass_FixAssets/FormView?keyValue=' + keyValue,
width: 1000,
height: 800,
btn: null
});
}
});

//  提交
$('#lr_submit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('FAId');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status !== 0) {
learun.alert.warning("当前项目已提交,请耐心等待审批!");
return;
}
learun.layerConfirm('是否确认提交该项!', function (res) {
if (res) {
processId = learun.newGuid();
learun.postForm(top.$.rootUrl + '/AssetManagementSystem/Ass_FixAssets/ModifyStatus', { keyValue: keyValue, status: 1, processId: processId }, function (res) {
refreshGirdData(res, {});
});
}
});
}
});

},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/AssetManagementSystem/Ass_FixAssets/GetPageList',
headData: [
{ label: "资产编号", name: "FACode", width: 100, align: "left" },
{ label: "资产名称", name: "FAName", width: 100, align: "left" },
{
label: "资产国标大类", name: "ATGId", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_AssetsType',
key: value,
keyId: 'atid',
callback: function (_data) {
callback(_data['aname']);
}
});
}
},
{
label: "资产分类", name: "ATId", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_AssetsType',
key: value,
keyId: 'atid',
callback: function (_data) {
callback(_data['aname']);
}
});
}
},
{ label: "财务入账日期", name: "FinanceEntryDate", width: 100, align: "left" },
{
label: "价值类型", name: "ValueType", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'ValueType',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{ label: "价值", name: "Value", width: 100, align: "left" },
{
label: "取得方式", name: "GetWay", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'GetWay',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{ label: "取得日期", name: "GetDate", width: 100, align: "left" },
{
label: "使用状况", name: "UseCondition", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'AssState',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{
label: "使用部门", name: "UseDepartment", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata',
key: value,
keyId: 'id',
callback: function (_data) {
callback(_data['name']);
}
});
}
},
{
label: "管理部门", name: "ManageDepartment", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata',
key: value,
keyId: 'id',
callback: function (_data) {
callback(_data['name']);
}
});
}
},
{
label: "使用人", name: "UsePeople", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('user', {
key: value,
callback: function (_data) {
callback(_data.name);
}
});
}
},
{ label: "数量", name: "Amount", width: 100, align: "left" },
{ label: "制单人", name: "MakePeople", width: 100, align: "left" },
{ label: "制单时间", name: "MakeDate", width: 100, align: "left" },
{
label: "所属单位", name: "Unit", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company',
key: value,
keyId: 'f_companyid',
callback: function (_data) {
callback(_data['f_fullname']);
}
});
}
},
{
label: "卡片状态", name: "CardStatus", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'CardStatus',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{ label: "折旧年限", name: "DepreciationLife", width: 100, align: "left" },
{ label: "累计折旧", name: "AccumulatedDepreciation", width: 100, align: "left" },
{ label: "已提折旧月数", name: "HaveDepreciationMonths", width: 100, align: "left" },
{ label: "月折旧额", name: "MonthlyDepreciation", width: 100, align: "left" },
{
label: "折旧方法", name: "DepreciationMothod", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'DepreciationMothod',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{ label: "净值", name: "NetValue", width: 100, align: "left" },
{ label: "采购组织形式", name: "PurchaseOrganizationForm", width: 100, align: "left" },
{ label: "品牌", name: "Brand", width: 100, align: "left" },
{ label: "规格型号", name: "SpecificationModel", width: 100, align: "left" },
{
label: "存放地点", name: "StorageId", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData',
key: value,
keyId: 'sid',
callback: function (_data) {
callback(_data['sname']);
}
});
}
},
{
label: "销售商", name: "SupplierId", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_SupplierData',
key: value,
keyId: 'sid',
callback: function (_data) {
callback(_data['sname']);
}
});
}
},
{ label: "使用权面积/建筑面积", name: "UseArea", width: 100, align: "left" },
{ label: "财政拨款", name: "FinancialAppropriation", width: 100, align: "left" },
{ label: "非财政拨款", name: "NonFinancialAppropriation", width: 100, align: "left" },
{ label: "会计凭证号", name: "AccountDocumentNumber", width: 100, align: "left" },
{
label: "折旧/摊销状态", name: "DepreciationStatus", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'DepreciationStatus',
callback: function (_data) {
callback(_data.text);
}
});
}
},
],
mainId: 'FAId',
isPage: true,
sidx:'CreateTime desc'
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function (res, postData) {
if (!!res) {
if (res.code == 200) {
// 发起流程
var postData = {
schemeCode: 'Ass_FixAssets',// 填写流程对应模板编号
processId: processId,
level: '1',
};
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) {
learun.loading(false);
});
}
page.search();
}
};
page.init();
}

+ 47
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/Form.cshtml View File

@@ -0,0 +1,47 @@
@{
ViewBag.Title = "Ass_FixAssetsApply";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-6 lr-form-item" data-table="Ass_FixAssetsApply" >
<div class="lr-form-item-title">申请人</div>
<input id="CreateUser" type="text" readonly class="form-control currentInfo lr-currentInfo-user" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_FixAssetsApply" >
<div class="lr-form-item-title">联系方式</div>
<input id="ContactWay" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_FixAssetsApply" >
<div class="lr-form-item-title">接收人<font face="宋体">*</font></div>
<div id="UsePeople" isvalid="yes" checkexpession="NotNull" ></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_FixAssetsApply" >
<div class="lr-form-item-title">联系方式<font face="宋体">*</font></div>
<input id="ContactWayNew" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_FixAssetsApply" >
<div class="lr-form-item-title">卡片编号<font face="宋体">*</font></div>
<input id="CardNumber" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_FixAssetsApply" >
<div class="lr-form-item-title">资产名称<font face="宋体">*</font></div>
<input id="FAName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_FixAssetsApply" >
<div class="lr-form-item-title">现存放地点<font face="宋体">*</font></div>
<div id="StorageId" isvalid="yes" checkexpession="NotNull" ></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="Ass_FixAssetsApply" >
<div class="lr-form-item-title">存放地点新<font face="宋体">*</font></div>
<div id="StorageIdNew" isvalid="yes" checkexpession="NotNull" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Ass_FixAssetsApply" >
<div class="lr-form-item-title">申请事由<font face="宋体">*</font></div>
<textarea id="ApplyReasons" class="form-control" style="height:100px;" isvalid="yes" checkexpession="NotNull" ></textarea>
</div>
<div class="col-xs-12 lr-form-item" data-table="Ass_FixAssetsApply" >
<div class="lr-form-item-title">附件说明</div>
<div id="Files" ></div>
</div>
</div>
@Html.AppendJsFile("/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/Form.js")

+ 128
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/Form.js View File

@@ -0,0 +1,128 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2023-05-05 14:52
* 描 述:Ass_FixAssetsApply
*/
var acceptClick;
var keyValue = request('keyValue');
// 设置权限
var setAuthorize;
// 设置表单数据
var setFormData;
// 验证数据是否填写完整
var validForm;
// 保存数据
var save;
var bootstrap = function ($, learun) {
"use strict";
// 设置权限
setAuthorize = function (data) {
if (!!data) {
for (var field in data) {
if (data[field].isLook != 1) {// 如果没有查看权限就直接移除
$('#' + data[field].fieldId).parent().remove();
}
else {
if (data[field].isEdit != 1) {
$('#' + data[field].fieldId).attr('disabled', 'disabled');
if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) {
$('#' + data[field].fieldId).css({ 'padding-right': '58px' });
$('#' + data[field].fieldId).find('.btn-success').remove();
}
}
}
}
}
};
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#CreateUser')[0].lrvalue = learun.clientdata.get(['userinfo']).userId;
$('#CreateUser').val(learun.clientdata.get(['userinfo']).realName);
$('#ContactWay').val(learun.clientdata.get(['userinfo']).mobile);
$('#UsePeople').lrGirdSelect({
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=FormulaMain',
selectWord: 'name',
value: 'id',
text: 'name',
headData:
[
{ label: "公式", name: "result", width: 300, align: "left" },
{ label: "公式名称", name: "name", width: 300, align: "left" }
],
select: function (item) {
//赋值
$("#StuName").val(item.stuname);
$("#StuId").val(item.stuno);
$("#ClassNo").val(item.classno);
}
});
$('#UsePeople').lrDataItemSelect({ code: '' });
//$('#StorageId').lrDataItemSelect({ code: '' });
//$('#StorageIdNew').lrDataItemSelect({ code: '' });
$('#Files').lrUploader();
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/Ass_FixAssetsApply/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 + '/AssetManagementSystem/Ass_FixAssetsApply/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 == 'Ass_FixAssetsApply' && data[id]) {
keyValue = data[id].ID;
}
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
callback && callback();
}
// 验证数据是否填写完整
validForm = function () {
if (!$('body').lrValidform()) {
return false;
}
return true;
};
// 保存数据
save = function (processId, callBack, i) {
var formData = $('body').lrGetFormData();
if (!!processId) {
formData.ProcessId = processId;
}
var postData = {
strEntity: JSON.stringify(formData)
};
$.lrSaveForm(top.$.rootUrl + '/AssetManagementSystem/Ass_FixAssetsApply/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack(res, i);
}
});
};
page.init();
}

+ 63
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/Index.cshtml View File

@@ -0,0 +1,63 @@
@{
ViewBag.Title = "Ass_FixAssetsApply";
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 class="lr-layout-tool-item">
<div id="datesearch"></div>
</div>
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">申请人</div>
<div id="CreateUser"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">接收人</div>
<div id="UsePeople"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">存放地点新</div>
<div id="StorageIdNew"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">现存放地点</div>
<div id="StorageId"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">卡片编号</div>
<input id="CardNumber" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">资产名称</div>
<input id="FAName" type="text" class="form-control" />
</div>
</div>
</div>
</div>
</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" learun-authorize="yes">
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp; 提交</a>
<a id="lr_view" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp; 查看</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/Index.js")

+ 273
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssetsApply/Index.js View File

@@ -0,0 +1,273 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2023-05-05 14:52
* 描 述:Ass_FixAssetsApply
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var startTime;
var endTime;
var processId = '';
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
// 时间搜索框
$('#datesearch').lrdate({
dfdata: [
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }
],
// 月
mShow: false,
premShow: false,
// 季度
jShow: false,
prejShow: false,
// 年
ysShow: false,
yxShow: false,
preyShow: false,
yShow: false,
// 默认
dfvalue: '1',
selectfn: function (begin, end) {
startTime = begin;
endTime = end;
page.search();
}
});
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
$('#CreateUser').lrUserSelect(0);
$('#UsePeople').lrDataItemSelect({ code: '' });
$('#StorageIdNew').lrDataItemSelect({ code: '' });
$('#StorageId').lrDataItemSelect({ code: '' });
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/AssetManagementSystem/Ass_FixAssetsApply/Form',
width: 600,
height: 400,
callBack: function (id) {
var res = false;
// 验证数据
res = top[id].validForm();
// 保存数据
if (res) {
processId = learun.newGuid();
res = top[id].save(processId, refreshGirdData);
}
return res;
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/AssetManagementSystem/Ass_FixAssetsApply/Form?keyValue=' + keyValue,
width: 600,
height: 400,
callBack: function (id) {
var res = false;
// 验证数据
res = top[id].validForm();
// 保存数据
if (res) {
res = top[id].save('', function () {
page.search();
});
}
return res;
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/AssetManagementSystem/Ass_FixAssetsApply/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
//提交
$('#lr_submit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var FlowNo = $('#gridtable').jfGridValue('FlowNo');
if (FlowNo != 0) {
learun.alert.warning("当前项目已提交,请耐心等待审批!");
return;
}
learun.layerConfirm('是否确认提交该项!', function (res) {
if (res) {
processId = learun.newGuid();
learun.postForm(top.$.rootUrl + '/EducationalAdministration/ModifyStatus/ModifyStatus', { keyValue: keyValue, pastatus: 1, processId: processId }, function (res) {
refreshGirdData(res, {});
});
}
});
}
});
//  查看
$('#lr_view').on('click', function () {
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/AssetManagementSystem/Ass_FixAssetsApply/GetPageList',
headData: [
{
label: "申请人", name: "CreateUser", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('user', {
key: value,
callback: function (_data) {
callback(_data.name);
}
});
}
},
{ label: "联系方式", name: "ContactWay", width: 100, align: "left" },
{
label: "接收人", name: "UsePeople", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: '',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{ label: "联系方式", name: "ContactWayNew", width: 100, align: "left" },
{ label: "卡片编号", name: "CardNumber", width: 200, align: "left" },
{ label: "资产名称", name: "FAName", width: 200, align: "left" },
{
label: "现存放地点", name: "StorageId", width: 200, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: '',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{
label: "存放地点新", name: "StorageIdNew", width: 200, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: '',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{ label: "申请事由", name: "ApplyReasons", width: 240, align: "left" },
{
label: "附件说明", name: "Files", width: 200, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
$.ajax({
url: '/LR_SystemModule/Annexes/GetAnnexesFileList',
data: { folderId: value },
type: 'GET',
dataType: "json",
async: false,
cache: false,
success: function (res) {
var bb = '';
$.each(res.data, function (i, item) {
bb += item.F_FileName.substring(0, item.F_FileName.indexOf(".")) + ','
})
//$.each(res.data, function(i, item) {
// bb += '<span onclick="downLoad(\'' +
// item.F_Id +
// '\')" style="color:blue">' +
// item.F_FileName.substring(0,item.F_FileName.indexOf(".")) +
// '</span>,&nbsp;&nbsp;&nbsp;';
//})
callback(bb);
}
});
}
},
{
label: "审批状态", name: "Status", width: 100, align: "center",
formatter: function (cellvalue, row) {
if (cellvalue == 0) {
return '<span class=\"label label-warning\">草稿</span>';
} if (cellvalue == 1) {
return '<span class=\"label label-warning\">审批中</span>';
} else if (cellvalue == 2) {
return '<span class=\"label label-success\">审批通过</span>';
}
}
}
],
mainId: 'ID',
isPage: true
});
},
search: function (param) {
param = param || {};
param.StartTime = startTime;
param.EndTime = endTime;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function (res, postData) {
if (!!res) {
if (res.code == 200) {
// 发起流程
var postData = {
schemeCode: '',// 填写流程对应模板编号
processId: processId,
level: '1',
};
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) {
learun.loading(false);
});
}
page.search();
}
};
page.init();
}
function downLoad(fileId, fileTwo) {
if (fileTwo) {

top.learun.postFormSilence(top.$.rootUrl + '/PersonnelManagement/MP_QualityObjectives/AddRecord', { fileId: fileTwo }, function () {

});
}
top.learun.download({ url: top.$.rootUrl + '/LR_SystemModule/Annexes/DownAnnexesFile', param: { fileId: fileId, __RequestVerificationToken: $.lrToken }, method: 'POST' });
}

+ 10
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj View File

@@ -882,6 +882,8 @@
<Compile Include="Areas\LR_Desktop\Controllers\PsychologyReplyInfoController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\StuFellowshipController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\SchoolLevelScholarshipController.cs" />
<Compile Include="Areas\AssetManagementSystem\Controllers\Ass_FixAssetsController.cs" />
<Compile Include="Areas\AssetManagementSystem\Controllers\Ass_FixAssetsApplyController.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" />
@@ -6751,6 +6753,14 @@
<Content Include="Areas\EducationalAdministration\Views\SchoolLevelScholarship\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\SchoolLevelScholarship\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\SchoolLevelScholarship\Form.js" />
<Content Include="Areas\AssetManagementSystem\Views\Ass_FixAssets\Index.cshtml" />
<Content Include="Areas\AssetManagementSystem\Views\Ass_FixAssets\Index.js" />
<Content Include="Areas\AssetManagementSystem\Views\Ass_FixAssets\Form.cshtml" />
<Content Include="Areas\AssetManagementSystem\Views\Ass_FixAssets\Form.js" />
<Content Include="Areas\AssetManagementSystem\Views\Ass_FixAssetsApply\Index.cshtml" />
<Content Include="Areas\AssetManagementSystem\Views\Ass_FixAssetsApply\Index.js" />
<Content Include="Areas\AssetManagementSystem\Views\Ass_FixAssetsApply\Form.cshtml" />
<Content Include="Areas\AssetManagementSystem\Views\Ass_FixAssetsApply\Form.js" />
</ItemGroup>
<ItemGroup>
<Folder Include="Areas\EducationalAdministration\Views\HomeStatistics\" />


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config View File

@@ -38,6 +38,7 @@
<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="Ass_FixAssetsApplyMethod" type="Learun.Application.WorkFlow.Ass_FixAssetsApplyMethod,Learun.Application.WorkFlow" />


<!--任务调度器-->
@@ -87,6 +88,7 @@
<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="Ass_FixAssetsApplyMethod" name="Ass_FixAssetsApplyMethod"></type>

</container>



+ 12
- 2
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/DesktopApi.cs View File

@@ -36,6 +36,7 @@ namespace Learun.Application.WebApi.Modules
string ver = this.GetReqData();// 获取模板请求数据
var targetData = functionIBLL.GetDesktopList("1").OrderBy(m => m.F_Sort);
var listData = functionIBLL.GetDesktopList("2").OrderBy(m => m.F_Sort);

var chartData = functionIBLL.GetDesktopList("3").OrderBy(m => m.F_Sort);
var data = new { target = targetData, list = listData, chart = chartData };
string md5 = Md5Helper.Encrypt(data.ToJson(), 32);
@@ -43,8 +44,17 @@ namespace Learun.Application.WebApi.Modules
{
return Success("");
}
var data1 = new { data = new { target = targetData, list = listData, chart = chartData }, ver = md5 };
return Success(data1);
if (userInfo.Description == "学生")
{
var result = new string[0];
var data1 = new { data = new { target = targetData, list = result, chart = chartData }, ver = md5 };
return Success(data1);
}
else
{
var data1 = new { data = new { target = targetData, list = listData, chart = chartData }, ver = md5 };
return Success(data1);
}
}

public Response GetData(dynamic _)


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/AssetManagementSystem/Ass_FixAssetsApplyMap.cs View File

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.AssetManagementSystem;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2023-05-05 14:52
/// 描 述:Ass_FixAssetsApply
/// </summary>
public class Ass_FixAssetsApplyMap : EntityTypeConfiguration<Ass_FixAssetsApplyEntity>
{
public Ass_FixAssetsApplyMap()
{
#region 表、主键
//表
this.ToTable("ASS_FIXASSETSAPPLY");
//主键
this.HasKey(t => t.ID);
#endregion

#region 配置关系
#endregion
}
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/AssetManagementSystem/Ass_FixAssetsMap.cs View File

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.AssetManagementSystem;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2023-05-05 14:37
/// 描 述:固定资产
/// </summary>
public class Ass_FixAssetsMap : EntityTypeConfiguration<Ass_FixAssetsEntity>
{
public Ass_FixAssetsMap()
{
#region 表、主键
//表
this.ToTable("ASS_FIXASSETS");
//主键
this.HasKey(t => t.FAId);
#endregion

#region 配置关系
#endregion
}
}
}


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj View File

@@ -613,6 +613,8 @@
<Compile Include="EducationalAdministration\PsychologyInfoMap.cs" />
<Compile Include="EducationalAdministration\StuFellowshipMap.cs" />
<Compile Include="EducationalAdministration\SchoolLevelScholarshipMap.cs" />
<Compile Include="AssetManagementSystem\Ass_FixAssetsMap.cs" />
<Compile Include="AssetManagementSystem\Ass_FixAssetsApplyMap.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsType/Ass_AssetsTypeService.cs View File

@@ -209,6 +209,11 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
dp.Add("AName", "%" + queryParam["AName"].ToString() + "%", DbType.String);
strSql.Append(" AND t.AName Like @AName ");
}
if (!queryParam["ATPTId"].IsEmpty())
{
dp.Add("ATPTId", queryParam["ATPTId"].ToString(), DbType.String);
strSql.Append(" AND t.ATPTId = @ATPTId ");
}
strSql.Append(" order by ATOrder ");
return this.BaseRepository().FindList<Ass_AssetsTypeEntity>(strSql.ToString(), dp);
}


+ 148
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssets/Ass_FixAssetsBLL.cs View File

@@ -0,0 +1,148 @@
using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.AssetManagementSystem
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2023-05-05 14:37
/// 描 述:固定资产
/// </summary>
public class Ass_FixAssetsBLL : Ass_FixAssetsIBLL
{
private Ass_FixAssetsService ass_FixAssetsService = new Ass_FixAssetsService();

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<Ass_FixAssetsEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
return ass_FixAssetsService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取Ass_FixAssets表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public Ass_FixAssetsEntity GetAss_FixAssetsEntity(string keyValue)
{
try
{
return ass_FixAssetsService.GetAss_FixAssetsEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取主表实体数据
/// </summary>
/// <param name="processId">流程实例ID</param>
/// <returns></returns>
public Ass_FixAssetsEntity GetEntityByProcessId(string processId)
{
try
{
return ass_FixAssetsService.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
{
ass_FixAssetsService.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>
public void SaveEntity(string keyValue, Ass_FixAssetsEntity entity)
{
try
{
ass_FixAssetsService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

}
}

+ 260
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssets/Ass_FixAssetsEntity.cs View File

@@ -0,0 +1,260 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.AssetManagementSystem
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2023-05-05 14:37
/// 描 述:固定资产
/// </summary>
public class Ass_FixAssetsEntity
{
#region 实体成员
/// <summary>
/// 主键
/// </summary>
[Column("FAID")]
public string FAId { get; set; }
/// <summary>
/// 资产编号
/// </summary>
[Column("FACODE")]
public string FACode { get; set; }
/// <summary>
/// 资产国标大类
/// </summary>
[Column("ATGID")]
public string ATGId { get; set; }
/// <summary>
/// 资产分类
/// </summary>
[Column("ATID")]
public string ATId { get; set; }
/// <summary>
/// 资产名称
/// </summary>
[Column("FANAME")]
public string FAName { get; set; }
/// <summary>
/// 财务入账日期
/// </summary>
[Column("FINANCEENTRYDATE")]
public DateTime? FinanceEntryDate { get; set; }
/// <summary>
/// 价值类型
/// </summary>
[Column("VALUETYPE")]
public string ValueType { get; set; }
/// <summary>
/// 价值
/// </summary>
[Column("VALUE")]
public decimal? Value { get; set; }
/// <summary>
/// 取得方式
/// </summary>
[Column("GETWAY")]
public string GetWay { get; set; }
/// <summary>
/// 取得日期
/// </summary>
[Column("GETDATE")]
public DateTime? GetDate { get; set; }
/// <summary>
/// 使用状况
/// </summary>
[Column("USECONDITION")]
public string UseCondition { get; set; }
/// <summary>
/// 使用部门
/// </summary>
[Column("USEDEPARTMENT")]
public string UseDepartment { get; set; }
/// <summary>
/// 管理部门
/// </summary>
[Column("MANAGEDEPARTMENT")]
public string ManageDepartment { get; set; }
/// <summary>
/// 使用人
/// </summary>
[Column("USEPEOPLE")]
public string UsePeople { get; set; }
/// <summary>
/// 数量
/// </summary>
[Column("AMOUNT")]
public int? Amount { get; set; }
/// <summary>
/// 制单人
/// </summary>
[Column("MAKEPEOPLE")]
public string MakePeople { get; set; }
/// <summary>
/// 制单时间
/// </summary>
[Column("MAKEDATE")]
public DateTime? MakeDate { get; set; }
/// <summary>
/// 所属单位
/// </summary>
[Column("UNIT")]
public string Unit { get; set; }
/// <summary>
/// 卡片状态
/// </summary>
[Column("CARDSTATUS")]
public string CardStatus { get; set; }
/// <summary>
/// 折旧年限
/// </summary>
[Column("DEPRECIATIONLIFE")]
public int? DepreciationLife { get; set; }
/// <summary>
/// 累计折旧
/// </summary>
[Column("ACCUMULATEDDEPRECIATION")]
public decimal? AccumulatedDepreciation { get; set; }
/// <summary>
/// 已提折旧月数
/// </summary>
[Column("HAVEDEPRECIATIONMONTHS")]
public int? HaveDepreciationMonths { get; set; }
/// <summary>
/// 月折旧额
/// </summary>
[Column("MONTHLYDEPRECIATION")]
public decimal? MonthlyDepreciation { get; set; }
/// <summary>
/// 折旧方法
/// </summary>
[Column("DEPRECIATIONMOTHOD")]
public string DepreciationMothod { get; set; }
/// <summary>
/// 净值
/// </summary>
[Column("NETVALUE")]
public decimal? NetValue { get; set; }
/// <summary>
/// 采购组织形式
/// </summary>
[Column("PURCHASEORGANIZATIONFORM")]
public string PurchaseOrganizationForm { get; set; }
/// <summary>
/// 品牌
/// </summary>
[Column("BRAND")]
public string Brand { get; set; }
/// <summary>
/// 规格型号
/// </summary>
[Column("SPECIFICATIONMODEL")]
public string SpecificationModel { get; set; }
/// <summary>
/// 存放地点
/// </summary>
[Column("STORAGEID")]
public string StorageId { get; set; }
/// <summary>
/// 销售商
/// </summary>
[Column("SUPPLIERID")]
public string SupplierId { get; set; }
/// <summary>
/// 使用权面积/建筑面积
/// </summary>
[Column("USEAREA")]
public decimal? UseArea { get; set; }
/// <summary>
/// 财政拨款
/// </summary>
[Column("FINANCIALAPPROPRIATION")]
public decimal? FinancialAppropriation { get; set; }
/// <summary>
/// 非财政拨款
/// </summary>
[Column("NONFINANCIALAPPROPRIATION")]
public decimal? NonFinancialAppropriation { get; set; }
/// <summary>
/// 会计凭证号
/// </summary>
[Column("ACCOUNTDOCUMENTNUMBER")]
public string AccountDocumentNumber { get; set; }
/// <summary>
/// 折旧/摊销状态
/// </summary>
[Column("DEPRECIATIONSTATUS")]
public string DepreciationStatus { get; set; }
/// <summary>
/// CreateUserId
/// </summary>
[Column("CREATEUSERID")]
public string CreateUserId { get; set; }
/// <summary>
/// CreateTime
/// </summary>
[Column("CREATETIME")]
public DateTime? CreateTime { get; set; }
/// <summary>
/// ModifyUserId
/// </summary>
[Column("MODIFYUSERID")]
public string ModifyUserId { get; set; }
/// <summary>
/// ModifyTime
/// </summary>
[Column("MODIFYTIME")]
public DateTime? ModifyTime { get; set; }
/// <summary>
/// SubmitUserId
/// </summary>
[Column("SUBMITUSERID")]
public string SubmitUserId { get; set; }
/// <summary>
/// SubmitTime
/// </summary>
[Column("SUBMITTIME")]
public DateTime? SubmitTime { get; set; }
/// <summary>
/// 状态(0草稿,1已提交,2审核通过,3审核未通过)
/// </summary>
[Column("STATUS")]
public int? Status { get; set; }
/// <summary>
/// 流程主键
/// </summary>
[Column("PROCESSID")]
public string ProcessId { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.FAId = Guid.NewGuid().ToString();
this.CreateTime = DateTime.Now;
this.CreateUserId = LoginUserInfo.Get().userId;
this.Status = 0;
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.FAId = keyValue;
this.ModifyTime = DateTime.Now;
this.ModifyUserId = LoginUserInfo.Get().userId;
}
#endregion
#region 扩展字段
#endregion
}
}


+ 55
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssets/Ass_FixAssetsIBLL.cs View File

@@ -0,0 +1,55 @@
using Learun.Util;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.AssetManagementSystem
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2023-05-05 14:37
/// 描 述:固定资产
/// </summary>
public interface Ass_FixAssetsIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<Ass_FixAssetsEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取Ass_FixAssets表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
Ass_FixAssetsEntity GetAss_FixAssetsEntity(string keyValue);
/// <summary>
/// 获取主表实体数据
/// </summary>
/// <param name="processId">流程实例ID</param>
/// <returns></returns>
Ass_FixAssetsEntity 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, Ass_FixAssetsEntity entity);
#endregion

}
}

+ 231
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssets/Ass_FixAssetsService.cs View File

@@ -0,0 +1,231 @@
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.AssetManagementSystem
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2023-05-05 14:37
/// 描 述:固定资产
/// </summary>
public class Ass_FixAssetsService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<Ass_FixAssetsEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT t.* ");
strSql.Append(" FROM Ass_FixAssets t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["FACode"].IsEmpty())
{
dp.Add("FACode", "%" + queryParam["FACode"].ToString() + "%", DbType.String);
strSql.Append(" AND t.FACode Like @FACode ");
}
if (!queryParam["FAName"].IsEmpty())
{
dp.Add("FAName", "%" + queryParam["FAName"].ToString() + "%", DbType.String);
strSql.Append(" AND t.FAName Like @FAName ");
}
if (!queryParam["ATGId"].IsEmpty())
{
dp.Add("ATGId",queryParam["ATGId"].ToString(), DbType.String);
strSql.Append(" AND t.ATGId = @ATGId ");
}
if (!queryParam["ATId"].IsEmpty())
{
dp.Add("ATId",queryParam["ATId"].ToString(), DbType.String);
strSql.Append(" AND t.ATId = @ATId ");
}
if (!queryParam["GetWay"].IsEmpty())
{
dp.Add("GetWay",queryParam["GetWay"].ToString(), DbType.String);
strSql.Append(" AND t.GetWay = @GetWay ");
}
if (!queryParam["UseCondition"].IsEmpty())
{
dp.Add("UseCondition",queryParam["UseCondition"].ToString(), DbType.String);
strSql.Append(" AND t.UseCondition = @UseCondition ");
}
if (!queryParam["UseDepartment"].IsEmpty())
{
dp.Add("UseDepartment",queryParam["UseDepartment"].ToString(), DbType.String);
strSql.Append(" AND t.UseDepartment = @UseDepartment ");
}
if (!queryParam["ManageDepartment"].IsEmpty())
{
dp.Add("ManageDepartment",queryParam["ManageDepartment"].ToString(), DbType.String);
strSql.Append(" AND t.ManageDepartment = @ManageDepartment ");
}
if (!queryParam["UsePeople"].IsEmpty())
{
dp.Add("UsePeople",queryParam["UsePeople"].ToString(), DbType.String);
strSql.Append(" AND t.UsePeople = @UsePeople ");
}
if (!queryParam["CardStatus"].IsEmpty())
{
dp.Add("CardStatus",queryParam["CardStatus"].ToString(), DbType.String);
strSql.Append(" AND t.CardStatus = @CardStatus ");
}
if (!queryParam["PurchaseOrganizationForm"].IsEmpty())
{
dp.Add("PurchaseOrganizationForm", "%" + queryParam["PurchaseOrganizationForm"].ToString() + "%", DbType.String);
strSql.Append(" AND t.PurchaseOrganizationForm Like @PurchaseOrganizationForm ");
}
if (!queryParam["StorageId"].IsEmpty())
{
dp.Add("StorageId",queryParam["StorageId"].ToString(), DbType.String);
strSql.Append(" AND t.StorageId = @StorageId ");
}
if (!queryParam["DepreciationStatus"].IsEmpty())
{
dp.Add("DepreciationStatus",queryParam["DepreciationStatus"].ToString(), DbType.String);
strSql.Append(" AND t.DepreciationStatus = @DepreciationStatus ");
}
return this.BaseRepository().FindList<Ass_FixAssetsEntity>(strSql.ToString(),dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取Ass_FixAssets表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public Ass_FixAssetsEntity GetAss_FixAssetsEntity(string keyValue)
{
try
{
return this.BaseRepository().FindEntity<Ass_FixAssetsEntity>(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取主表实体数据
/// </summary>
/// <param name="processId">流程实例ID</param>
/// <returns></returns>
public Ass_FixAssetsEntity GetEntityByProcessId(string processId)
{
try
{
return this.BaseRepository().FindEntity<Ass_FixAssetsEntity>(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)
{
try
{
this.BaseRepository().Delete<Ass_FixAssetsEntity>(t=>t.FAId == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
public void SaveEntity(string keyValue, Ass_FixAssetsEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository().Update(entity);
}
else
{
entity.Create();
this.BaseRepository().Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

}
}

+ 186
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssetsApply/Ass_FixAssetsApplyBLL.cs View File

@@ -0,0 +1,186 @@
using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.AssetManagementSystem
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2023-05-05 14:52
/// 描 述:Ass_FixAssetsApply
/// </summary>
public class Ass_FixAssetsApplyBLL : Ass_FixAssetsApplyIBLL
{
private Ass_FixAssetsApplyService ass_FixAssetsApplyService = new Ass_FixAssetsApplyService();

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<Ass_FixAssetsApplyEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
return ass_FixAssetsApplyService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取Ass_FixAssetsApply表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public Ass_FixAssetsApplyEntity GetAss_FixAssetsApplyEntity(string keyValue)
{
try
{
return ass_FixAssetsApplyService.GetAss_FixAssetsApplyEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取主表实体数据
/// </summary>
/// <param name="processId">流程实例ID</param>
/// <returns></returns>
public Ass_FixAssetsApplyEntity GetEntityByProcessId(string processId)
{
try
{
return ass_FixAssetsApplyService.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
{
ass_FixAssetsApplyService.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>
public void SaveEntity(string keyValue, Ass_FixAssetsApplyEntity entity)
{
try
{
ass_FixAssetsApplyService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

#region MyRegion
public void ModifyStatusByProcessId(int status, string processId)
{
try
{
ass_FixAssetsApplyService.ModifyStatusByProcessId(status, processId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
public void ModifyStatus(string keyValue, int pastatus, string processId)
{
try
{
ass_FixAssetsApplyService.ModifyStatus(keyValue, pastatus, processId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion
}
}

+ 140
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssetsApply/Ass_FixAssetsApplyEntity.cs View File

@@ -0,0 +1,140 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.AssetManagementSystem
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2023-05-05 14:52
/// 描 述:Ass_FixAssetsApply
/// </summary>
public class Ass_FixAssetsApplyEntity
{
#region 实体成员
/// <summary>
/// ID
/// </summary>
[Column("ID")]
public string ID { get; set; }
/// <summary>
/// 资产编号
/// </summary>
[Column("FACODE")]
public string FACode { get; set; }
/// <summary>
/// 资产名称
/// </summary>
[Column("FANAME")]
public string FAName { get; set; }
/// <summary>
/// 存放地点
/// </summary>
[Column("STORAGEID")]
public string StorageId { get; set; }
/// <summary>
/// 现存放地点
/// </summary>
[Column("STORAGEIDNEW")]
public string StorageIdNew { get; set; }
/// <summary>
/// 接收人
/// </summary>
[Column("RECIPIENTS")]
public string Recipients { get; set; }
/// <summary>
/// ContactWay
/// </summary>
[Column("CONTACTWAY")]
public string ContactWay { get; set; }
/// <summary>
/// 联系方式
/// </summary>
[Column("CONTACTWAYNEW")]
public string ContactWayNew { get; set; }
/// <summary>
/// 卡片编号
/// </summary>
[Column("CARDNUMBER")]
public string CardNumber { get; set; }
/// <summary>
/// 资产名称
/// </summary>
[Column("NAME")]
public string Name { get; set; }
/// <summary>
/// 使用人
/// </summary>
[Column("USEPEOPLE")]
public string UsePeople { get; set; }
/// <summary>
/// 申请事由
/// </summary>
[Column("APPLYREASONS")]
public string ApplyReasons { get; set; }
/// <summary>
/// 附件说明
/// </summary>
[Column("FILES")]
public string Files { get; set; }
/// <summary>
/// CreateTime
/// </summary>
[Column("CREATETIME")]
public DateTime? CreateTime { get; set; }
/// <summary>
/// CreateUser
/// </summary>
[Column("CREATEUSER")]
public string CreateUser { get; set; }
/// <summary>
/// UpdateTime
/// </summary>
[Column("UPDATETIME")]
public DateTime? UpdateTime { get; set; }
/// <summary>
/// UpdateUser
/// </summary>
[Column("UPDATEUSER")]
public string UpdateUser { get; set; }
/// <summary>
/// 0草稿,1部门审批2接收人查看3资产负责人
/// </summary>
[Column("STATUS")]
public int? Status { get; set; }
/// <summary>
/// 流程主键
/// </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)
{
var user = LoginUserInfo.Get();
this.ID = keyValue;
this.UpdateTime = DateTime.Now;
this.UpdateUser = user.userId;
}
#endregion
#region 扩展字段
#endregion
}
}


+ 63
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssetsApply/Ass_FixAssetsApplyIBLL.cs View File

@@ -0,0 +1,63 @@
using Learun.Util;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.AssetManagementSystem
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2023-05-05 14:52
/// 描 述:Ass_FixAssetsApply
/// </summary>
public interface Ass_FixAssetsApplyIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<Ass_FixAssetsApplyEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取Ass_FixAssetsApply表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
Ass_FixAssetsApplyEntity GetAss_FixAssetsApplyEntity(string keyValue);
/// <summary>
/// 获取主表实体数据
/// </summary>
/// <param name="processId">流程实例ID</param>
/// <returns></returns>
Ass_FixAssetsApplyEntity 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, Ass_FixAssetsApplyEntity entity);
#endregion

#region MyRegion
void ModifyStatus(string keyValue, int pastatus, string processId);

void ModifyStatusByProcessId(int status, string processId);

#endregion


}
}

+ 253
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssetsApply/Ass_FixAssetsApplyService.cs View File

@@ -0,0 +1,253 @@
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.AssetManagementSystem
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2023-05-05 14:52
/// 描 述:Ass_FixAssetsApply
/// </summary>
public class Ass_FixAssetsApplyService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<Ass_FixAssetsApplyEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@" t.* ");
strSql.Append(" FROM Ass_FixAssetsApply t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty())
{
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime);
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime);
strSql.Append(" AND ( t.CreateTime >= @startTime AND t.CreateTime <= @endTime ) ");
}
if (!queryParam["CreateUser"].IsEmpty())
{
dp.Add("CreateUser", queryParam["CreateUser"].ToString(), DbType.String);
strSql.Append(" AND t.CreateUser = @CreateUser ");
}
if (!queryParam["UsePeople"].IsEmpty())
{
dp.Add("UsePeople", queryParam["UsePeople"].ToString(), DbType.String);
strSql.Append(" AND t.UsePeople = @UsePeople ");
}
if (!queryParam["StorageIdNew"].IsEmpty())
{
dp.Add("StorageIdNew", queryParam["StorageIdNew"].ToString(), DbType.String);
strSql.Append(" AND t.StorageIdNew = @StorageIdNew ");
}
if (!queryParam["StorageId"].IsEmpty())
{
dp.Add("StorageId", queryParam["StorageId"].ToString(), DbType.String);
strSql.Append(" AND t.StorageId = @StorageId ");
}
if (!queryParam["CardNumber"].IsEmpty())
{
dp.Add("CardNumber", "%" + queryParam["CardNumber"].ToString() + "%", DbType.String);
strSql.Append(" AND t.CardNumber Like @CardNumber ");
}
if (!queryParam["FAName"].IsEmpty())
{
dp.Add("FAName", "%" + queryParam["FAName"].ToString() + "%", DbType.String);
strSql.Append(" AND t.FAName Like @FAName ");
}
return this.BaseRepository("CollegeMIS").FindList<Ass_FixAssetsApplyEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取Ass_FixAssetsApply表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public Ass_FixAssetsApplyEntity GetAss_FixAssetsApplyEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<Ass_FixAssetsApplyEntity>(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取主表实体数据
/// </summary>
/// <param name="processId">流程实例ID</param>
/// <returns></returns>
public Ass_FixAssetsApplyEntity GetEntityByProcessId(string processId)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<Ass_FixAssetsApplyEntity>(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)
{
try
{
this.BaseRepository("CollegeMIS").Delete<Ass_FixAssetsApplyEntity>(t => t.ID == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
public void SaveEntity(string keyValue, Ass_FixAssetsApplyEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity);
}
else
{
entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

#region

public void ModifyStatus(string keyValue, int pastatus, string processId)
{
try
{
var entity = this.BaseRepository().FindEntity<Ass_FixAssetsApplyEntity>(a => a.ID == keyValue);
entity.ProcessId = processId;
entity.Status = pastatus;
this.BaseRepository().Update(entity);
}
catch (Exception e)
{
if (e is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(e);
}
}
}
/// <summary>
/// 审批后修改状态
/// </summary>
/// <param name="pastatus"></param>
/// <param name="processId"></param>
public void ModifyStatusByProcessId(int pastatus, string processId)
{
try
{
var entity = this.BaseRepository().FindEntity<Ass_FixAssetsApplyEntity>(a => a.ProcessId == processId);
entity.Status = pastatus;
this.BaseRepository().Update(entity);
}
catch (Exception e)
{
if (e is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(e);
}
}

}
#endregion
}
}

+ 8
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj View File

@@ -1875,6 +1875,14 @@
<Compile Include="EducationalAdministration\SchoolLevelScholarship\SchoolLevelScholarshipService.cs" />
<Compile Include="EducationalAdministration\SchoolLevelScholarship\SchoolLevelScholarshipBLL.cs" />
<Compile Include="EducationalAdministration\SchoolLevelScholarship\SchoolLevelScholarshipIBLL.cs" />
<Compile Include="AssetManagementSystem\Ass_FixAssets\Ass_FixAssetsEntity.cs" />
<Compile Include="AssetManagementSystem\Ass_FixAssets\Ass_FixAssetsService.cs" />
<Compile Include="AssetManagementSystem\Ass_FixAssets\Ass_FixAssetsBLL.cs" />
<Compile Include="AssetManagementSystem\Ass_FixAssets\Ass_FixAssetsIBLL.cs" />
<Compile Include="AssetManagementSystem\Ass_FixAssetsApply\Ass_FixAssetsApplyEntity.cs" />
<Compile Include="AssetManagementSystem\Ass_FixAssetsApply\Ass_FixAssetsApplyService.cs" />
<Compile Include="AssetManagementSystem\Ass_FixAssetsApply\Ass_FixAssetsApplyBLL.cs" />
<Compile Include="AssetManagementSystem\Ass_FixAssetsApply\Ass_FixAssetsApplyIBLL.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj View File

@@ -95,6 +95,7 @@
<Compile Include="Delegate\NWFDelegateRuleEntity.cs" />
<Compile Include="Delegate\NWFDelegateService.cs" />
<Compile Include="NodeMethod\Acc_DormitoryChangeMethod.cs" />
<Compile Include="NodeMethod\Ass_FixAssetsApplyMethod.cs" />
<Compile Include="NodeMethod\DispatchMethod.cs" />
<Compile Include="NodeMethod\MeetingManagementApplyMethod.cs" />
<Compile Include="NodeMethod\StuCancelDisciplineManageMethod.cs" />


+ 28
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/Ass_FixAssetsApplyMethod.cs View File

@@ -0,0 +1,28 @@
using Learun.Application.TwoDevelopment.AssetManagementSystem;
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Learun.Application.WorkFlow
{
public class Ass_FixAssetsApplyMethod : IWorkFlowMethod
{
Ass_FixAssetsApplyIBLL ass_FixAssetsApplyIBLL = new Ass_FixAssetsApplyBLL();
public void Execute(WfMethodParameter parameter)
{
if (parameter.code == "agree")
{
ass_FixAssetsApplyIBLL.ModifyStatusByProcessId(2, parameter.processId);
}
else
{
ass_FixAssetsApplyIBLL.ModifyStatusByProcessId(0, parameter.processId);
}
}
}
}

Loading…
Cancel
Save