浏览代码

资产明细导出加资产分类

金隅分支
zhangli 3 年前
父节点
当前提交
ae598a1b65
共有 5 个文件被更改,包括 52 次插入1 次删除
  1. +8
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_AssetsInfoItemController.cs
  2. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsInfoItem/Ass_AssetsInfoItemService.cs
  3. +19
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsType/Ass_AssetsTypeBLL.cs
  4. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsType/Ass_AssetsTypeIBLL.cs
  5. +23
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsType/Ass_AssetsTypeService.cs

+ 8
- 0
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 = "计量单位" });


+ 1
- 1
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 ");


+ 19
- 0
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<Ass_AssetsTypeEntity> GetAllList()
{
try
{
return ass_AssetsTypeService.GetAllList();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取树形数据


+ 1
- 0
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<Ass_AssetsTypeEntity> GetList(string queryJson);
IEnumerable<Ass_AssetsTypeEntity> GetAllList();
void Lock(string keyValue);
void UnLock(string keyValue);
IEnumerable<TreeModel> GetTree(IEnumerable<Ass_AssetsTypeEntity> typelist);


+ 23
- 0
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<Ass_AssetsTypeEntity>(strSql.ToString(), dp);
}

public IEnumerable<Ass_AssetsTypeEntity> 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<Ass_AssetsTypeEntity>(strSql.ToString(), dp);
}

public void Lock(string keyValue)
{
try


正在加载...
取消
保存