diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_AssetsInfoItemController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_AssetsInfoItemController.cs index 642a58260..43b23698c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_AssetsInfoItemController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_AssetsInfoItemController.cs @@ -24,6 +24,7 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers private DataSourceIBLL dataSourceIBLL = new DataSourceBLL(); private DepartmentIBLL departmentIBLL = new DepartmentBLL(); private UserIBLL userIBLL = new UserBLL(); + private Ass_AssetsTypeIBLL ass_AssetsTypeIBLL = new Ass_AssetsTypeBLL(); #region 视图功能 @@ -118,6 +119,7 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers var dataItem_AssState = dataItemIBLL.GetDetailList("AssState"); var departmentList = departmentIBLL.GetAllList(); var userList = userIBLL.GetAllList(); + var ass_AssetsTypeList = ass_AssetsTypeIBLL.GetAllList(); var dataSourceEntity = dataSourceIBLL.GetEntityByCode("BaseUser"); for (int i = 0; i < exportTable.Rows.Count; i++) { @@ -152,6 +154,11 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers { exportTable.Rows[i]["AIUsePeople"] = userList.Where(x=>x.F_UserId== AIUsePeople.ToString()).FirstOrDefault()?.F_RealName; } + var AIASSClass = exportTable.Rows[i]["AIASSClass"]; + if (AIASSClass != null && !string.IsNullOrEmpty(AIASSClass.ToString())) + { + exportTable.Rows[i]["AIASSClass"] = ass_AssetsTypeList.Where(x => x.ATId == AIASSClass.ToString()).FirstOrDefault()?.AName; + } } departmentList = null; @@ -171,6 +178,7 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers excelconfig.ColumnEntity.Add(new ColumnModel() { Column = "rarea", ExcelColumn = "房间面积" }); excelconfig.ColumnEntity.Add(new ColumnModel() { Column = "renabledname", ExcelColumn = "房间状态" }); excelconfig.ColumnEntity.Add(new ColumnModel() { Column = "aiassname", ExcelColumn = "资产名称" }); + excelconfig.ColumnEntity.Add(new ColumnModel() { Column = "aiassclass", ExcelColumn = "资产分类" }); excelconfig.ColumnEntity.Add(new ColumnModel() { Column = "aispecification", ExcelColumn = "资产品牌" }); excelconfig.ColumnEntity.Add(new ColumnModel() { Column = "aispecificationtype", ExcelColumn = "规格型号" }); excelconfig.ColumnEntity.Add(new ColumnModel() { Column = "aiunits", ExcelColumn = "计量单位" }); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsInfoItem/Ass_AssetsInfoItemService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsInfoItem/Ass_AssetsInfoItemService.cs index 1f0b41996..1b4ed5639 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsInfoItem/Ass_AssetsInfoItemService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsInfoItem/Ass_AssetsInfoItemService.cs @@ -170,7 +170,7 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem try { var strSql = new StringBuilder(); - strSql.Append(@"SELECT t.AICodeNumJY ,storage.sname as AIIStorageName,room.rcode,room.RFunction,room.RArea,'' as REnabledName,t.AIASSName,t.AISpecification, t.AISpecificationtype, t.AIUnits, '' as AIASSStateName,t.AIDepartment, t.AIUsePeople, AIPlace, AIAssValue,AIAddTime, AIRemark, DepreciationMethod, DepreciationStatus, UsefulLife, MonthlyDepreciation, MonthsOfDepreciation, MonthlyDepreciationRate, + strSql.Append(@"SELECT t.AICodeNumJY ,storage.sname as AIIStorageName,room.rcode,room.RFunction,room.RArea,'' as REnabledName,t.AIASSName,t.AIASSClass,t.AISpecification, t.AISpecificationtype, t.AIUnits, '' as AIASSStateName,t.AIDepartment, t.AIUsePeople, AIPlace, AIAssValue,AIAddTime, AIRemark, DepreciationMethod, DepreciationStatus, UsefulLife, MonthlyDepreciation, MonthsOfDepreciation, MonthlyDepreciationRate, AccumulatedDepreciation, NetWorth, VehicleLicenseUser, AIVehicleNumber, AIPlateNumber, AIBuiltArea, AIOwnership, LandUseType, LandUseUser,room.REnabled,t.AIASSState "); strSql.Append(" FROM Ass_AssetsInfoItem t "); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsType/Ass_AssetsTypeBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsType/Ass_AssetsTypeBLL.cs index 67413f570..a8d908b61 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsType/Ass_AssetsTypeBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsType/Ass_AssetsTypeBLL.cs @@ -160,6 +160,25 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem } } } + + public IEnumerable GetAllList() + { + try + { + return ass_AssetsTypeService.GetAllList(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } /// /// 获取树形数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsType/Ass_AssetsTypeIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsType/Ass_AssetsTypeIBLL.cs index 2edc19880..43f39739a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsType/Ass_AssetsTypeIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsType/Ass_AssetsTypeIBLL.cs @@ -53,6 +53,7 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem #endregion IEnumerable GetList(string queryJson); + IEnumerable GetAllList(); void Lock(string keyValue); void UnLock(string keyValue); IEnumerable GetTree(IEnumerable typelist); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsType/Ass_AssetsTypeService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsType/Ass_AssetsTypeService.cs index f4a54752e..d96417dbc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsType/Ass_AssetsTypeService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsType/Ass_AssetsTypeService.cs @@ -213,6 +213,29 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem return this.BaseRepository().FindList(strSql.ToString(), dp); } + public IEnumerable GetAllList() + { + var strSql = new StringBuilder(); + strSql.Append("SELECT "); + strSql.Append(@" + t.ATId, + t.ATCode, + t.AName, + t.ATPTId, + t.ATEName, + t.ATOrder, + t.ATCheckMark + "); + strSql.Append(" FROM Ass_AssetsType t "); + strSql.Append(" WHERE 1=1 "); + + // 虚拟参数 + var dp = new DynamicParameters(new { }); + + strSql.Append(" order by ATOrder "); + return this.BaseRepository().FindList(strSql.ToString(), dp); + } + public void Lock(string keyValue) { try