@@ -24,6 +24,7 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers | |||||
private DataSourceIBLL dataSourceIBLL = new DataSourceBLL(); | private DataSourceIBLL dataSourceIBLL = new DataSourceBLL(); | ||||
private DepartmentIBLL departmentIBLL = new DepartmentBLL(); | private DepartmentIBLL departmentIBLL = new DepartmentBLL(); | ||||
private UserIBLL userIBLL = new UserBLL(); | private UserIBLL userIBLL = new UserBLL(); | ||||
private Ass_AssetsTypeIBLL ass_AssetsTypeIBLL = new Ass_AssetsTypeBLL(); | |||||
#region 视图功能 | #region 视图功能 | ||||
@@ -118,6 +119,7 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers | |||||
var dataItem_AssState = dataItemIBLL.GetDetailList("AssState"); | var dataItem_AssState = dataItemIBLL.GetDetailList("AssState"); | ||||
var departmentList = departmentIBLL.GetAllList(); | var departmentList = departmentIBLL.GetAllList(); | ||||
var userList = userIBLL.GetAllList(); | var userList = userIBLL.GetAllList(); | ||||
var ass_AssetsTypeList = ass_AssetsTypeIBLL.GetAllList(); | |||||
var dataSourceEntity = dataSourceIBLL.GetEntityByCode("BaseUser"); | var dataSourceEntity = dataSourceIBLL.GetEntityByCode("BaseUser"); | ||||
for (int i = 0; i < exportTable.Rows.Count; i++) | 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; | 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; | 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 = "rarea", ExcelColumn = "房间面积" }); | ||||
excelconfig.ColumnEntity.Add(new ColumnModel() { Column = "renabledname", ExcelColumn = "房间状态" }); | excelconfig.ColumnEntity.Add(new ColumnModel() { Column = "renabledname", ExcelColumn = "房间状态" }); | ||||
excelconfig.ColumnEntity.Add(new ColumnModel() { Column = "aiassname", 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 = "aispecification", ExcelColumn = "资产品牌" }); | ||||
excelconfig.ColumnEntity.Add(new ColumnModel() { Column = "aispecificationtype", ExcelColumn = "规格型号" }); | excelconfig.ColumnEntity.Add(new ColumnModel() { Column = "aispecificationtype", ExcelColumn = "规格型号" }); | ||||
excelconfig.ColumnEntity.Add(new ColumnModel() { Column = "aiunits", ExcelColumn = "计量单位" }); | excelconfig.ColumnEntity.Add(new ColumnModel() { Column = "aiunits", ExcelColumn = "计量单位" }); | ||||
@@ -170,7 +170,7 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem | |||||
try | try | ||||
{ | { | ||||
var strSql = new StringBuilder(); | 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 | AccumulatedDepreciation, NetWorth, VehicleLicenseUser, AIVehicleNumber, AIPlateNumber, AIBuiltArea, AIOwnership, LandUseType, LandUseUser,room.REnabled,t.AIASSState | ||||
"); | "); | ||||
strSql.Append(" FROM Ass_AssetsInfoItem t "); | strSql.Append(" FROM Ass_AssetsInfoItem t "); | ||||
@@ -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> | /// <summary> | ||||
/// 获取树形数据 | /// 获取树形数据 | ||||
@@ -53,6 +53,7 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem | |||||
#endregion | #endregion | ||||
IEnumerable<Ass_AssetsTypeEntity> GetList(string queryJson); | IEnumerable<Ass_AssetsTypeEntity> GetList(string queryJson); | ||||
IEnumerable<Ass_AssetsTypeEntity> GetAllList(); | |||||
void Lock(string keyValue); | void Lock(string keyValue); | ||||
void UnLock(string keyValue); | void UnLock(string keyValue); | ||||
IEnumerable<TreeModel> GetTree(IEnumerable<Ass_AssetsTypeEntity> typelist); | IEnumerable<TreeModel> GetTree(IEnumerable<Ass_AssetsTypeEntity> typelist); | ||||
@@ -213,6 +213,29 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem | |||||
return this.BaseRepository().FindList<Ass_AssetsTypeEntity>(strSql.ToString(), dp); | 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) | public void Lock(string keyValue) | ||||
{ | { | ||||
try | try | ||||