From fe59cb0e4d060664927dca75d453162deae3e17d Mon Sep 17 00:00:00 2001 From: lixiaojun <1287241240@qq.com> Date: 星期四, 12 十二月 2024 22:23:52 +0800 Subject: [PATCH] 增加产品冷却塔至bll --- BLL/HStation.BLL.Assets.Core/02-httpclient/15-Tank/AssetsTankMain.cs | 2 BLL/HStation.BLL.Assets.Core/02-httpclient/16-Meter/AssetsMeterCoefficient.cs | 2 BLL/HStation.BLL.Assets.Core/02-httpclient/15-Tank/AssetsTankCoefficient.cs | 2 BLL/HStation.BLL.Assets.Core/02-httpclient/15-Tank/AssetsTankSeries.cs | 2 BLL/HStation.BLL.Assets.Core/02-httpclient/19-Pressmeter/AssetsPressmeterMain.cs | 2 Dto/HStation.Dto.Assets.Core/21-cooling/01-series/AssetsCoolingSeriesStdDto.cs | 68 + Application/HStation.Application.Assets.Core/22-cooling/03-factor/AssetsCoolingFactor_StdController.cs | 36 BLL/HStation.BLL.Assets.Core/02-httpclient/20-Translation/AssetsTranslationCoefficient.cs | 2 BLL/HStation.BLL.Assets.Core/02-httpclient/18-Hydrant/AssetsHydrantMain.cs | 2 BLL/HStation.BLL.Assets.Core/04-bll/00-core/CALCreateHelper.cs | 2 BLL/HStation.BLL.Assets.Core/04-bll/22-cooling/01-series/AssetsCoolingSeries_Instance.cs | 84 + BLL/HStation.BLL.Assets.Core/02-httpclient/17-Flowmeter/AssetsFlowmeterMain.cs | 2 Service/HStation.Service.Assets.Core/04-dal/03-sqlite/21-cooling/AssetsCoolingMain.cs | 30 Service/HStation.Service.Assets.Core/00-core/MemoryCacheKey.cs | 4 BLL/HStation.BLL.Assets.Core/00-core/ConfigHelper.cs | 2 BLL/HStation.BLL.Assets.Core/02-httpclient/15-Tank/AssetsTankPartMain.cs | 2 BLL/HStation.BLL.Assets.Core/02-httpclient/01-PumpProduct/PumpType.cs | 2 Service/HStation.Service.Assets.Core/04-dal/03-sqlite/21-cooling/AssetsCoolingFactor.cs | 18 BLL/HStation.BLL.Assets.Core/02-httpclient/01-PumpProduct/PumpSeries.cs | 2 Dto/HStation.Dto.Assets.Core/21-cooling/02-main/AddAssetsCoolingMainInput.cs | 68 + Service/HStation.Service.Assets.Core/04-dal/03-sqlite/21-cooling/AssetsCoolingSeries.cs | 18 Service/HStation.Service.Assets.Core/05-service/21-cooling/03-factor/AssetsCoolingFactor.cs | 13 BLL/HStation.BLL.Assets.Core/04-bll/22-cooling/03-factor/AssetsCoolingFactor.cs | 125 + BLL/HStation.BLL.Assets.Core/02-httpclient/16-Meter/AssetsMeterMain.cs | 2 Vmo/HStation.Vmo.Assets.Core/HStation.Vmo.Assets.Core.csproj | 2 Dto/HStation.Dto.Assets.Core/GlobalUsings.cs | 1 Dto/HStation.Dto.Assets.Core/21-cooling/01-series/UpdateAssetsCoolingSeriesInput.cs | 42 BLL/HStation.BLL.Assets.Core/02-httpclient/01-PumpProduct/PumpTypeSeriesMap.cs | 2 BLL/HStation.BLL.Assets.Core/02-httpclient/11-Exchanger/AssetsExchangerSeriesManufacturerMapping.cs | 2 BLL/HStation.BLL.Assets.Core/02-httpclient/01-PumpProduct/PumpPropContent.cs | 2 Dto/HStation.Dto.Assets.Core/21-cooling/02-main/UpdateAssetsCoolingMainInput.cs | 67 + BLL/HStation.BLL.Assets.Core/02-httpclient/17-Flowmeter/AssetsFlowmeterCoefficient.cs | 2 Dto/HStation.Dto.Assets.Core/21-cooling/03-factor/AssetsCoolingFactorDto.cs | 70 + BLL/HStation.BLL.Assets.Core/01-interface/22-cooling/01-series/IAssetsCoolingSeries.cs | 21 BLL/HStation.BLL.Assets.Core/02-httpclient/01-PumpProduct/PumpMain.cs | 2 BLL/HStation.BLL.Assets.Core/01-interface/22-cooling/03-factor/IAssetsCoolingFactor.cs | 12 Vmo/HStation.Vmo.Assets.Core/21-cooling/01-series/AssetsCoolingSeriesVmo.cs | 68 + Service/HStation.Service.Assets.Core/04-dal/02-postgresql/21-cooling/AssetsCoolingFactor.cs | 18 BLL/HStation.BLL.Assets.Core/02-httpclient/18-Hydrant/AssetsHydrantCoefficient.cs | 2 BLL/HStation.BLL.Assets.Core/02-httpclient/22-cooling/01-series/AssetsCoolingSeries.cs | 43 BLL/HStation.BLL.Assets.Core/04-bll/22-cooling/03-factor/AssetsCoolingFactor_Instance.cs | 84 + BLL/HStation.BLL.Assets.Core/02-httpclient/01-PumpProduct/PumpGroup.cs | 2 BLL/HStation.BLL.Assets.Core/02-httpclient/15-Tank/AssetsTankMainAndPartMapping.cs | 2 BLL/HStation.BLL.Assets.Core/03-localclient/22-cooling/01-series/AssetsCoolingSeries.cs | 360 +++++ BLL/HStation.BLL.Assets.Core/02-httpclient/19-Pressmeter/AssetsPressmeterSeries.cs | 2 Service/HStation.Service.Assets.Core/04-dal/02-postgresql/21-cooling/AssetsCoolingSeries.cs | 18 BLL/HStation.BLL.Assets.Core/02-httpclient/22-cooling/02-main/AssetsCoolingSeries.cs | 54 BLL/HStation.BLL.Assets.Core/02-httpclient/20-Translation/AssetsTranslationSeries.cs | 2 Dto/HStation.Dto.Assets.Core/21-cooling/02-main/AssetsCoolingMainStdDto.cs | 100 + Vmo/HStation.Vmo.Assets.Core/GlobalUsings.cs | 1 BLL/HStation.BLL.Assets.Core/02-httpclient/14-Blunthead/AssetsBluntheadSeries.cs | 2 BLL/HStation.BLL.Assets.Core/04-bll/22-cooling/02-main/AssetsCoolingMain_Instance.cs | 84 + Dto/HStation.Dto.Assets.Core/21-cooling/01-series/AddAssetsCoolingSeriesInput.cs | 41 BLL/HStation.BLL.Assets.Core/02-httpclient/17-Flowmeter/AssetsFlowmeterSeries.cs | 2 Application/HStation.Application.Assets.Core/22-cooling/01-series/AssetsCoolingSeries_Controller.cs | 281 ++++ Dto/HStation.Dto.Assets.Core/21-cooling/01-series/AssetsCoolingSeriesDto.cs | 68 + BLL/HStation.BLL.Assets.Core/02-httpclient/01-PumpProduct/PumpPart.cs | 2 BLL/HStation.BLL.Assets.Core/02-httpclient/22-cooling/03-factor/AssetsCoolingFactor.cs | 20 BLL/HStation.BLL.Assets.Core/02-httpclient/20-Translation/AssetsTranslationMain.cs | 2 Vmo/HStation.Vmo.Assets.Core/21-cooling/02-main/AssetsCoolingMainVmo.cs | 98 + BLL/HStation.BLL.Assets.Core/03-localclient/22-cooling/03-factor/AssetsCoolingFactor.cs | 207 +++ BLL/HStation.BLL.Assets.Core/04-bll/22-cooling/01-series/AssetsCoolingSeries.cs | 178 ++ BLL/HStation.BLL.Assets.Core/GlobalUsings.cs | 9 Dto/HStation.Dto.Assets.Core/21-cooling/03-factor/UpdateAssetsCoolingFactorInput.cs | 48 Dto/HStation.Dto.Assets.Core/99-models/seriesid/SeriesIDInput.cs | 14 Application/HStation.Application.Assets.Core/22-cooling/02-main/AssetsCoolingMain_Controller.cs | 233 +++ BLL/HStation.BLL.Assets.Core/02-httpclient/18-Hydrant/AssetsHydrantSeries.cs | 2 Dto/HStation.Dto.Assets.Core/21-cooling/02-main/AssetsCoolingMainDto.cs | 100 + Service/HStation.Service.Assets.Core/04-dal/02-postgresql/21-cooling/AssetsCoolingMain.cs | 30 Application/HStation.Application.Assets.Core/22-cooling/01-series/AssetsCoolingSeries_StdController.cs | 37 Dto/HStation.Dto.Assets.Core/21-cooling/03-factor/AddAssetsCoolingFactorInput.cs | 43 Application/HStation.Application.Assets.Core/22-cooling/02-main/AssetsCoolingMain_StdController.cs | 54 BLL/HStation.BLL.Assets.Core/03-localclient/22-cooling/02-main/AssetsCoolingMain.cs | 311 ++++ Application/HStation.Application.Assets.Core/GlobalUsings.cs | 6 Application/HStation.Application.Assets.Core/22-cooling/03-factor/AssetsCoolingFactor_Controller.cs | 136 ++ Application/HStation.Application.Assets.Core/HStation.Application.Assets.Core.csproj | 2 BLL/HStation.BLL.Assets.Core/02-httpclient/14-Blunthead/AssetsBluntheadCoefficient.cs | 2 Dto/HStation.Dto.Assets.Core/21-cooling/03-factor/AssetsCoolingFactorStdDto.cs | 70 + BLL/HStation.BLL.Assets.Core/02-httpclient/14-Blunthead/AssetsBluntheadMain.cs | 2 Vmo/HStation.Vmo.Assets.Core/21-cooling/03-factor/AssetsCoolingFactorVmo.cs | 68 + BLL/HStation.BLL.Assets.Core/04-bll/22-cooling/02-main/AssetsCoolingMain.cs | 179 ++ BLL/HStation.BLL.Assets.Core/02-httpclient/09-dbfirst/XhsDbFirstHelper.cs | 2 Dto/HStation.Dto.Assets.Core/HStation.Dto.Assets.Core.csproj | 50 BLL/HStation.BLL.Assets.Core/02-httpclient/16-Meter/AssetsMeterSeries.cs | 2 BLL/HStation.BLL.Assets.Core/HStation.BLL.Assets.Core.csproj | 3 BLL/HStation.BLL.Assets.Core/01-interface/22-cooling/02-main/IAssetsCoolingMain.cs | 24 BLL/HStation.BLL.Assets.Core/02-httpclient/19-Pressmeter/AssetsPressmeterCoefficient.cs | 2 BLL/HStation.BLL.Assets.Core/02-httpclient/01-PumpProduct/PumpGroupAndMainMap.cs | 2 Service/HStation.Service.Assets.Core/paras_hstation_assets_settings.json | 12 89 files changed, 3,824 insertions(+), 77 deletions(-) diff --git a/Application/HStation.Application.Assets.Core/22-cooling/01-series/AssetsCoolingSeries_Controller.cs b/Application/HStation.Application.Assets.Core/22-cooling/01-series/AssetsCoolingSeries_Controller.cs new file mode 100644 index 0000000..803c0c2 --- /dev/null +++ b/Application/HStation.Application.Assets.Core/22-cooling/01-series/AssetsCoolingSeries_Controller.cs @@ -0,0 +1,281 @@ +锘縩amespace HStation.Application +{ + /// <summary> + /// 鍐峰嵈濉旂郴鍒� + /// </summary> + [Route("Assets/Cooling/Series")] + [ApiDescriptionSettings("Assets", Name = "鍐峰嵈濉旂郴鍒�", Order = 10000)] + public class AssetsCoolingSeries_Controller : IDynamicApiController + { + private readonly HStation.Service.AssetsCoolingSeries _service = new(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + [Route("GetAll@V1.0")] + [HttpGet] + public List<AssetsCoolingSeriesDto> GetAll() + { + var list = _service.GetAll(); + var vmList = list?.Select(x => new AssetsCoolingSeriesDto(x)).ToList(); + return vmList; + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + [Route("GetByID@V1.0")] + [HttpGet] + public AssetsCoolingSeriesDto GetByID([FromQuery][Required] IDInput input) + { + var model = _service.GetByID(input.ID); + return model == null ? null : new AssetsCoolingSeriesDto(model); + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + [Route("GetByIds@V1.0")] + [HttpGet] + public List<AssetsCoolingSeriesDto> GetByIds([FromQuery][Required] IdsInput input) + { + var ids = LongListHelper.ToList(input.Ids); + var list = _service.GetByIds(ids); + var vmList = list?.Select(x => new AssetsCoolingSeriesDto(x)).ToList(); + return vmList; + } + + #endregion + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + [Route("Insert@V1.0")] + [HttpPost] + public long Insert([Required] AddAssetsCoolingSeriesInput input) + { + var parentIds = new List<long>(); + if (input.ParentID > 0) + { + var parent = _service.GetByID(input.ParentID); + if (parent == null) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D001, $"ParentID:{input.ParentID} 鏁版嵁涓嶅瓨鍦�"); + } + parentIds = TreeParentIdsHelper.GetChildParentIds(parent.ID, parent.ParentIds); + } + if (!string.IsNullOrEmpty(input.TagName)) + { + if (_service.IsExistTagName(input.TagName)) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.V001, $"TagName:{input.TagName} 鏍囪宸插瓨鍦�"); + } + } + var model = input.Adapt<AddAssetsCoolingSeriesInput, Model.AssetsCoolingSeries>(); + model.ParentIds = parentIds; + model.SortCode = _service.GetMaxSortCode(input.ParentID) + 1; + var id = _service.Insert(model); + return id; + } + + #endregion + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + [Route("Update@V1.0")] + [HttpPut] + public bool Update(UpdateAssetsCoolingSeriesInput input) + { + var model = _service.GetByID(input.ID); + if (model == null) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D001, $"ID:{input.ID} 鏁版嵁涓嶅瓨鍦�"); + } + if (!string.IsNullOrEmpty(input.TagName)) + { + if (_service.IsExistTagNameExceptID(input.TagName, input.ID)) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.V001, $"TagName:{input.TagName} 鏍囪宸插瓨鍦�"); + } + } + var rhs = new Model.AssetsCoolingSeries(model); + input.Adapt(rhs); + var bol = _service.Update(rhs); + return bol; + } + + /// <summary> + /// 鏇存柊鎺掑簭鐮� + /// </summary> + [Route("UpdateSortCode@V1.0")] + [HttpPut] + public bool UpdateSortCode([Required] UpdateSortCodeInput input) + { + var bol = _service.UpdateSortCode(input.ID, input.SortCode); + return bol; + } + + /// <summary> + /// 鏇存柊鎺掑簭 + /// </summary> + [Route("UpdateSorter@V1.0")] + [HttpPut] + public bool UpdateSorter([Required] List<UpdateSortCodeInput> input) + { + var list = input.Select(x => x.Adapt<UpdateSortCodeInput, Yw.Model.Sorter>()).ToList(); + var bol = _service.UpdateSorter(list); + return bol; + } + + /// <summary> + /// 鏇存柊鏍戞帓搴忕爜 + /// </summary> + [Route("UpdateTreeSortCode@V1.0")] + [HttpPut] + public bool UpdateTreeSortCode([Required] UpdateTreeSortCodeInput input) + { + var model = _service.GetByID(input.ID); + if (model == null) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D001, $"ID:{input.ID} 鏁版嵁涓嶅瓨鍦�"); + } + var parentIds = new List<long>(); + if (input.ParentID > 0) + { + var parent = _service.GetByID(input.ParentID); + if (parent == null) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D001, $"ParentID:{input.ParentID} 鏁版嵁涓嶅瓨鍦�"); + } + parentIds = TreeParentIdsHelper.GetChildParentIds(parent.ID, parent.ParentIds); + } + var sorterList = new List<Yw.Model.TreeSorter>() + { + new Yw.Model.TreeSorter() + { + ID=input.ID, + ParentIds=parentIds, + SortCode=input.SortCode + } + }; + if (TreeParentIdsHelper.ToString(parentIds) != TreeParentIdsHelper.ToString(model.ParentIds)) + { + var children = _service.GetChildrenByID(input.ID); + if (children != null && children.Count > 0) + { + foreach (var item in children) + { + var itemParent = sorterList.Find(x => x.ID == item.ParentIds.Last()); + var itemParentIds = TreeParentIdsHelper.GetChildParentIds(itemParent.ID, itemParent.ParentIds); + var sorter = new Yw.Model.TreeSorter() + { + ID = item.ID, + ParentIds = itemParentIds, + SortCode = item.SortCode + }; + sorterList.Add(sorter); + } + } + } + var bol = _service.UpdateTreeSorter(sorterList); + return bol; + } + + /// <summary> + /// 鏇存柊 Paras + /// </summary> + [Route("UpdateParas@V1.0")] + [HttpPut] + public bool UpdateParas([Required] UpdateParasInput input) + { + var bol = _service.UpdateParas(input.ID, input.Paras); + return bol; + } + + /// <summary> + /// 鏇存柊 Flags + /// </summary> + [Route("UpdateFlags@V1.0")] + [HttpPut] + public bool UpdateFlags([Required] UpdateFlagsInput input) + { + var bol = _service.UpdateFlags(input.ID, input.Flags); + return bol; + } + + /// <summary> + /// 鏇存柊TagName + /// </summary> + [Route("UpdateTagName@V1.0")] + [HttpPut] + public bool UpdateTagName([Required] UpdateTagNameInput input) + { + if (!string.IsNullOrEmpty(input.TagName)) + { + if (_service.IsExistTagNameExceptID(input.TagName, input.ID)) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.V001, $"TagName:{input.TagName} 鏍囪宸插瓨鍦�"); + } + } + var bol = _service.UpdateTagName(input.ID, input.TagName); + return bol; + } + + #endregion + + #region Exist + + /// <summary> + /// 鍒ゆ柇TagName鏄惁瀛樺湪 + /// </summary> + [Route("IsExistTagName@V1.0")] + [HttpGet] + public bool IsExistTagName([FromQuery][Required] TagNameInput input) + { + var bol = _service.IsExistTagName(input.TagName); + return bol; + } + + /// <summary> + /// 鍒ゆ柇TagName鏄惁瀛樺湪 ExceptID + /// </summary> + [Route("IsExistTagNameExceptID@V1.0")] + [HttpGet] + public bool IsExistTagNameExceptID([FromQuery][Required] TagNameExceptInput input) + { + var bol = _service.IsExistTagNameExceptID(input.TagName, input.ExceptID); + return bol; + } + + #endregion + + #region Delete + + /// <summary> + /// 鍒犻櫎 + /// </summary> + [Route("DeleteByID@V1.0")] + [HttpDelete] + public bool DeleteByID([FromQuery][Required] IDInput input) + { + var bol = _service.DeleteByID(input.ID, out string Msg); + if (!bol) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D999, Msg); + } + return bol; + } + + + #endregion + + + } +} \ No newline at end of file diff --git a/Application/HStation.Application.Assets.Core/22-cooling/01-series/AssetsCoolingSeries_StdController.cs b/Application/HStation.Application.Assets.Core/22-cooling/01-series/AssetsCoolingSeries_StdController.cs new file mode 100644 index 0000000..97c79f0 --- /dev/null +++ b/Application/HStation.Application.Assets.Core/22-cooling/01-series/AssetsCoolingSeries_StdController.cs @@ -0,0 +1,37 @@ +锘縩amespace HStation.Application +{ + /// <summary> + /// AssetsCoolingSeries + /// </summary> + [Route("Assets/Cooling/Series/Std")] + [ApiDescriptionSettings("Assets", Name = "鍐峰嵈濉旂郴鍒�(Std)", Order = 9900)] + public class AssetsCoolingSeries_StdController : IDynamicApiController + { + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + [Route("GetAll@V1.0")] + [HttpGet] + public List<AssetsCoolingSeriesStdDto> GetAll() + { + var keyContent = $"Assets_Cooling_Series_Std_GetAll"; + var cacheKey = MemoryCacheKeyHelper.GetKey(MemoryCacheKey.WebApiLevel, MemoryCacheKey.Module, keyContent); + + var vm_list = MemoryCacheHelper.GetSet(cacheKey, () => + { + var allList = new HStation.Service.AssetsCoolingSeries().GetAll(); + HStation.Service.AssetsCoolingSeries.PublishCache(cacheKey); + var vmList = allList?.Select(x => new AssetsCoolingSeriesStdDto(x)).ToList(); + return vmList; + }, Yw.Service.ConfigHelper.CacheLevel3); + return vm_list; + } + + + + + + + } +} \ No newline at end of file diff --git a/Application/HStation.Application.Assets.Core/22-cooling/02-main/AssetsCoolingMain_Controller.cs b/Application/HStation.Application.Assets.Core/22-cooling/02-main/AssetsCoolingMain_Controller.cs new file mode 100644 index 0000000..e061ea0 --- /dev/null +++ b/Application/HStation.Application.Assets.Core/22-cooling/02-main/AssetsCoolingMain_Controller.cs @@ -0,0 +1,233 @@ +锘縩amespace HStation.Application +{ + /// <summary> + /// 鍐峰嵈濉斿瀷鍙� + /// </summary> + [Route("Assets/Cooling/Main")] + [ApiDescriptionSettings("Assets", Name = "鍐峰嵈濉斿瀷鍙�", Order = 9000)] + public class AssetsCoolingMain_Controller : IDynamicApiController + { + private readonly HStation.Service.AssetsCoolingMain _service = new(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + [Route("GetAll@V1.0")] + [HttpGet] + public List<AssetsCoolingMainDto> GetAll() + { + var list = _service.GetAll(); + var vmList = list?.Select(x => new AssetsCoolingMainDto(x)).ToList(); + return vmList; + } + + /// <summary> + /// 閫氳繃 SeriesID 鑾峰彇 + /// </summary> + [Route("GetBySeriesID@V1.0")] + [HttpGet] + public List<AssetsCoolingMainDto> GetBySeriesID([FromQuery][Required] SeriesIDInput input) + { + var list = _service.GetBySeriesID(input.SeriesID); + var vmList = list?.Select(x => new AssetsCoolingMainDto(x)).ToList(); + return vmList; + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + [Route("GetByID@V1.0")] + [HttpGet] + public AssetsCoolingMainDto GetByID([FromQuery][Required] IDInput input) + { + var model = _service.GetByID(input.ID); + return model == null ? null : new AssetsCoolingMainDto(model); + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + [Route("GetByIds@V1.0")] + [HttpGet] + public List<AssetsCoolingMainDto> GetByIds([FromQuery][Required] IdsInput input) + { + var ids = LongListHelper.ToList(input.Ids); + var list = _service.GetByIds(ids); + var vmList = list?.Select(x => new AssetsCoolingMainDto(x)).ToList(); + return vmList; + } + + #endregion + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + [Route("Insert@V1.0")] + [HttpPost] + public long Insert([Required] AddAssetsCoolingMainInput input) + { + var series = new HStation.Service.AssetsCompressorMain().GetByID(input.SeriesID); + if (series == null) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D001, $"SeriesID:{input.SeriesID} 鏁版嵁涓嶅瓨鍦�"); + } + if (!string.IsNullOrEmpty(input.TagName)) + { + if (_service.IsExistTagName(input.TagName)) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.V001, $"TagName:{input.TagName} 鏍囪宸插瓨鍦�"); + } + } + var model = input.Adapt<AddAssetsCoolingMainInput, Model.AssetsCoolingMain>(); + model.SortCode = _service.GetMaxSortCode(input.SeriesID) + 1; + var id = _service.Insert(model); + return id; + } + + #endregion + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + [Route("Update@V1.0")] + [HttpPut] + public bool Update(UpdateAssetsCoolingMainInput input) + { + var model = _service.GetByID(input.ID); + if (model == null) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D001, $"ID:{input.ID} 鏁版嵁涓嶅瓨鍦�"); + } + if (!string.IsNullOrEmpty(input.TagName)) + { + if (_service.IsExistTagNameExceptID(input.TagName, input.ID)) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.V001, $"TagName:{input.TagName} 鏍囪宸插瓨鍦�"); + } + } + var rhs = new Model.AssetsCoolingMain(model); + input.Adapt(rhs); + var bol = _service.Update(rhs); + return bol; + } + + /// <summary> + /// 鏇存柊鎺掑簭鐮� + /// </summary> + [Route("UpdateSortCode@V1.0")] + [HttpPut] + public bool UpdateSortCode([Required] UpdateSortCodeInput input) + { + var bol = _service.UpdateSortCode(input.ID, input.SortCode); + return bol; + } + + /// <summary> + /// 鏇存柊鎺掑簭 + /// </summary> + [Route("UpdateSorter@V1.0")] + [HttpPut] + public bool UpdateSorter([Required] List<UpdateSortCodeInput> input) + { + var list = input.Select(x => x.Adapt<UpdateSortCodeInput, Yw.Model.Sorter>()).ToList(); + var bol = _service.UpdateSorter(list); + return bol; + } + + /// <summary> + /// 鏇存柊 Paras + /// </summary> + [Route("UpdateParas@V1.0")] + [HttpPut] + public bool UpdateParas([Required] UpdateParasInput input) + { + var bol = _service.UpdateParas(input.ID, input.Paras); + return bol; + } + + /// <summary> + /// 鏇存柊 Flags + /// </summary> + [Route("UpdateFlags@V1.0")] + [HttpPut] + public bool UpdateFlags([Required] UpdateFlagsInput input) + { + var bol = _service.UpdateFlags(input.ID, input.Flags); + return bol; + } + + /// <summary> + /// 鏇存柊TagName + /// </summary> + [Route("UpdateTagName@V1.0")] + [HttpPut] + public bool UpdateTagName([Required] UpdateTagNameInput input) + { + if (!string.IsNullOrEmpty(input.TagName)) + { + if (_service.IsExistTagNameExceptID(input.TagName, input.ID)) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.V001, $"TagName:{input.TagName} 鏍囪宸插瓨鍦�"); + } + } + var bol = _service.UpdateTagName(input.ID, input.TagName); + return bol; + } + + #endregion + + #region Exist + + /// <summary> + /// 鍒ゆ柇TagName鏄惁瀛樺湪 + /// </summary> + [Route("IsExistTagName@V1.0")] + [HttpGet] + public bool IsExistTagName([FromQuery][Required] TagNameInput input) + { + var bol = _service.IsExistTagName(input.TagName); + return bol; + } + + /// <summary> + /// 鍒ゆ柇TagName鏄惁瀛樺湪 ExceptID + /// </summary> + [Route("IsExistTagNameExceptID@V1.0")] + [HttpGet] + public bool IsExistTagNameExceptID([FromQuery][Required] TagNameExceptInput input) + { + var bol = _service.IsExistTagNameExceptID(input.TagName, input.ExceptID); + return bol; + } + + #endregion + + #region Delete + + /// <summary> + /// 鍒犻櫎 + /// </summary> + [Route("DeleteByID@V1.0")] + [HttpDelete] + public bool DeleteByID([FromQuery][Required] IDInput input) + { + var bol = _service.DeleteByID(input.ID, out string Msg); + if (!bol) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D999, Msg); + } + return bol; + } + + + #endregion + + + } +} \ No newline at end of file diff --git a/Application/HStation.Application.Assets.Core/22-cooling/02-main/AssetsCoolingMain_StdController.cs b/Application/HStation.Application.Assets.Core/22-cooling/02-main/AssetsCoolingMain_StdController.cs new file mode 100644 index 0000000..ab46e49 --- /dev/null +++ b/Application/HStation.Application.Assets.Core/22-cooling/02-main/AssetsCoolingMain_StdController.cs @@ -0,0 +1,54 @@ +锘縩amespace HStation.Application +{ + /// <summary> + /// AssetsCoolingMain + /// </summary> + [Route("Assets/Cooling/Main/Std")] + [ApiDescriptionSettings("Assets", Name = "鍐峰嵈濉斿瀷鍙�(Std)", Order = 8900)] + public class AssetsCoolingMain_StdController : IDynamicApiController + { + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + [Route("GetAll@V1.0")] + [HttpGet] + public List<AssetsCoolingMainStdDto> GetAll() + { + var keyContent = $"Assets_Cooling_Main_Std_GetAll"; + var cacheKey = MemoryCacheKeyHelper.GetKey(MemoryCacheKey.WebApiLevel, MemoryCacheKey.Module, keyContent); + + var vm_list = MemoryCacheHelper.GetSet(cacheKey, () => + { + var allList = new HStation.Service.AssetsCoolingMain().GetAll(); + HStation.Service.AssetsCoolingMain.PublishCache(cacheKey); + var vmList = allList?.Select(x => new AssetsCoolingMainStdDto(x)).ToList(); + return vmList; + }, Yw.Service.ConfigHelper.CacheLevel3); + return vm_list; + } + + /// <summary> + /// 閫氳繃 SeriesID 鑾峰彇 + /// </summary> + [Route("GetBySeriesID@V1.0")] + [HttpGet] + public List<AssetsCoolingMainStdDto> GetBySeriesID([FromQuery][Required] SeriesIDInput input) + { + var keyContent = $"Assets_Cooling_Main_Std_GetBySeriesID_{input.SeriesID}"; + var cacheKey = MemoryCacheKeyHelper.GetKey(MemoryCacheKey.WebApiLevel, MemoryCacheKey.Module, keyContent); + + var vm_list = MemoryCacheHelper.GetSet(cacheKey, () => + { + var allList = new HStation.Service.AssetsCoolingMain().GetBySeriesID(input.SeriesID); + HStation.Service.AssetsCoolingMain.PublishCache(cacheKey); + var vmList = allList?.Select(x => new AssetsCoolingMainStdDto(x)).ToList(); + return vmList; + }, Yw.Service.ConfigHelper.CacheLevel4); + return vm_list; + } + + + + } +} \ No newline at end of file diff --git a/Application/HStation.Application.Assets.Core/22-cooling/03-factor/AssetsCoolingFactor_Controller.cs b/Application/HStation.Application.Assets.Core/22-cooling/03-factor/AssetsCoolingFactor_Controller.cs new file mode 100644 index 0000000..a10954e --- /dev/null +++ b/Application/HStation.Application.Assets.Core/22-cooling/03-factor/AssetsCoolingFactor_Controller.cs @@ -0,0 +1,136 @@ +锘縩amespace HStation.Application +{ + /// <summary> + /// 鍐峰嵈濉旂郴鏁� + /// </summary> + [Route("Assets/Cooling/Factor")] + [ApiDescriptionSettings("Assets", Name = "鍐峰嵈濉旂郴鏁�", Order = 8000)] + public class AssetsCoolingFactor_Controller : IDynamicApiController + { + private readonly HStation.Service.AssetsCoolingFactor _service = new(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + [Route("GetAll@V1.0")] + [HttpGet] + public List<AssetsCoolingFactorDto> GetAll() + { + var list = _service.GetAll(); + var vmList = list?.Select(x => new AssetsCoolingFactorDto(x)).ToList(); + return vmList; + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + [Route("GetByID@V1.0")] + [HttpGet] + public AssetsCoolingFactorDto GetByID([FromQuery][Required] IDInput input) + { + var model = _service.GetByID(input.ID); + return model == null ? null : new AssetsCoolingFactorDto(model); + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + [Route("GetByIds@V1.0")] + [HttpGet] + public List<AssetsCoolingFactorDto> GetByIds([FromQuery][Required] IdsInput input) + { + var ids = LongListHelper.ToList(input.Ids); + var list = _service.GetByIds(ids); + var vmList = list?.Select(x => new AssetsCoolingFactorDto(x)).ToList(); + return vmList; + } + + #endregion + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + [Route("Insert@V1.0")] + [HttpPost] + public long Insert([Required] AddAssetsCoolingFactorInput input) + { + var model = input.Adapt<AddAssetsCoolingFactorInput, Model.AssetsCoolingFactor>(); + model.SortCode = _service.GetMaxSortCode() + 1; + var id = _service.Insert(model); + return id; + } + + #endregion + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + [Route("Update@V1.0")] + [HttpPut] + public bool Update(UpdateAssetsCoolingFactorInput input) + { + var model = _service.GetByID(input.ID); + if (model == null) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D001, $"ID:{input.ID} 鏁版嵁涓嶅瓨鍦�"); + } + var rhs = new Model.AssetsCoolingFactor(model); + input.Adapt(rhs); + var bol = _service.Update(rhs); + return bol; + } + + /// <summary> + /// 鏇存柊鎺掑簭鐮� + /// </summary> + [Route("UpdateSortCode@V1.0")] + [HttpPut] + public bool UpdateSortCode([Required] UpdateSortCodeInput input) + { + var bol = _service.UpdateSortCode(input.ID, input.SortCode); + return bol; + } + + /// <summary> + /// 鏇存柊鎺掑簭 + /// </summary> + [Route("UpdateSorter@V1.0")] + [HttpPut] + public bool UpdateSorter([Required] List<UpdateSortCodeInput> input) + { + var list = input.Select(x => x.Adapt<UpdateSortCodeInput, Yw.Model.Sorter>()).ToList(); + var bol = _service.UpdateSorter(list); + return bol; + } + + #endregion + + #region Delete + + /// <summary> + /// 鍒犻櫎 + /// </summary> + [Route("DeleteByID@V1.0")] + [HttpDelete] + public bool DeleteByID([FromQuery][Required] IDInput input) + { + var bol = _service.DeleteByID(input.ID, out string Msg); + if (!bol) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D999, Msg); + } + return bol; + } + + + #endregion + + + } +} \ No newline at end of file diff --git a/Application/HStation.Application.Assets.Core/22-cooling/03-factor/AssetsCoolingFactor_StdController.cs b/Application/HStation.Application.Assets.Core/22-cooling/03-factor/AssetsCoolingFactor_StdController.cs new file mode 100644 index 0000000..e457d8b --- /dev/null +++ b/Application/HStation.Application.Assets.Core/22-cooling/03-factor/AssetsCoolingFactor_StdController.cs @@ -0,0 +1,36 @@ +锘縩amespace HStation.Application +{ + /// <summary> + /// AssetsCoolingFactor + /// </summary> + [Route("Assets/Cooling/Factor/Std")] + [ApiDescriptionSettings("Assets", Name = "鍐峰嵈濉旂郴鏁�(Std)", Order = 7900)] + public class AssetsCoolingFactor_StdController : IDynamicApiController + { + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + [Route("GetAll@V1.0")] + [HttpGet] + public List<AssetsCoolingFactorStdDto> GetAll() + { + var keyContent = $"Assets_Cooling_Factor_Std_GetAll"; + var cacheKey = MemoryCacheKeyHelper.GetKey(MemoryCacheKey.WebApiLevel, MemoryCacheKey.Module, keyContent); + + var vm_list = MemoryCacheHelper.GetSet(cacheKey, () => + { + var allList = new HStation.Service.AssetsCoolingFactor().GetAll(); + HStation.Service.AssetsCoolingFactor.PublishCache(cacheKey); + var vmList = allList?.Select(x => new AssetsCoolingFactorStdDto(x)).ToList(); + return vmList; + }, Yw.Service.ConfigHelper.CacheLevel3); + return vm_list; + } + + + + + + } +} \ No newline at end of file diff --git a/Application/HStation.Application.Assets.Core/GlobalUsings.cs b/Application/HStation.Application.Assets.Core/GlobalUsings.cs index 162037f..4cc0919 100644 --- a/Application/HStation.Application.Assets.Core/GlobalUsings.cs +++ b/Application/HStation.Application.Assets.Core/GlobalUsings.cs @@ -3,5 +3,9 @@ global using Mapster; global using Microsoft.AspNetCore.Mvc; global using System.ComponentModel.DataAnnotations; +global using Yw; global using Yw.Dto; -global using Yw.Untity; \ No newline at end of file +global using Yw.Untity; +global using HStation.Dto; +global using HStation.Assets; +global using HStation.Dto.Assets; \ No newline at end of file diff --git a/Application/HStation.Application.Assets.Core/HStation.Application.Assets.Core.csproj b/Application/HStation.Application.Assets.Core/HStation.Application.Assets.Core.csproj index 96ef280..862ad03 100644 --- a/Application/HStation.Application.Assets.Core/HStation.Application.Assets.Core.csproj +++ b/Application/HStation.Application.Assets.Core/HStation.Application.Assets.Core.csproj @@ -3,7 +3,7 @@ <PropertyGroup> <TargetFramework>net6.0</TargetFramework> <ImplicitUsings>enable</ImplicitUsings> - <Nullable>enable</Nullable> + <Nullable>disable</Nullable> </PropertyGroup> <ItemGroup> diff --git a/BLL/HStation.BLL.Assets.Core/00-core/ConfigHelper.cs b/BLL/HStation.BLL.Assets.Core/00-core/ConfigHelper.cs index 62a7cfd..4c0ed55 100644 --- a/BLL/HStation.BLL.Assets.Core/00-core/ConfigHelper.cs +++ b/BLL/HStation.BLL.Assets.Core/00-core/ConfigHelper.cs @@ -1,4 +1,4 @@ -锘縩amespace HStation.BLL +锘縩amespace HStation.BLL.Assets { internal class ConfigHelper { diff --git a/BLL/HStation.BLL.Assets.Core/01-interface/22-cooling/01-series/IAssetsCoolingSeries.cs b/BLL/HStation.BLL.Assets.Core/01-interface/22-cooling/01-series/IAssetsCoolingSeries.cs new file mode 100644 index 0000000..4b3c163 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/01-interface/22-cooling/01-series/IAssetsCoolingSeries.cs @@ -0,0 +1,21 @@ +锘縰sing Yw.CAL; + +namespace HStation.CAL +{ + /// <summary> + /// + /// </summary> + public interface IAssetsCoolingSeries : IBaseCAL<AddAssetsCoolingSeriesInput, UpdateAssetsCoolingSeriesInput, AssetsCoolingSeriesDto>, IUpdateParas, IUpdateFlags, IUpdateTagName, IUpdateTreeSorter + { + + /// <summary> + /// + /// </summary> + Task<bool> IsExistTagName(string TagName); + + /// <summary> + /// + /// </summary> + Task<bool> IsExistTagNameExceptID(string TagName, long ExceptID); + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/01-interface/22-cooling/02-main/IAssetsCoolingMain.cs b/BLL/HStation.BLL.Assets.Core/01-interface/22-cooling/02-main/IAssetsCoolingMain.cs new file mode 100644 index 0000000..13ac2e9 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/01-interface/22-cooling/02-main/IAssetsCoolingMain.cs @@ -0,0 +1,24 @@ +锘縰sing Yw.CAL; +namespace HStation.CAL +{ + /// <summary> + /// + /// </summary> + public interface IAssetsCoolingMain : IBaseCAL<AddAssetsCoolingMainInput, UpdateAssetsCoolingMainInput, AssetsCoolingMainDto>, IUpdateParas, IUpdateFlags, IUpdateTagName, IUpdateSorter + { + /// <summary> + /// + /// </summary> + Task<List<AssetsCoolingMainDto>> GetBySeriesID(long SeriesID); + + /// <summary> + /// + /// </summary> + Task<bool> IsExistTagName(string TagName); + + /// <summary> + /// + /// </summary> + Task<bool> IsExistTagNameExceptID(string TagName, long ExceptID); + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/01-interface/22-cooling/03-factor/IAssetsCoolingFactor.cs b/BLL/HStation.BLL.Assets.Core/01-interface/22-cooling/03-factor/IAssetsCoolingFactor.cs new file mode 100644 index 0000000..f4278c2 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/01-interface/22-cooling/03-factor/IAssetsCoolingFactor.cs @@ -0,0 +1,12 @@ +锘縰sing Yw.CAL; + +namespace HStation.CAL +{ + /// <summary> + /// + /// </summary> + public interface IAssetsCoolingFactor : IBaseCAL<AddAssetsCoolingFactorInput, UpdateAssetsCoolingFactorInput, AssetsCoolingFactorDto>, IUpdateSorter + { + + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/01-PumpProduct/PumpGroup.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/01-PumpProduct/PumpGroup.cs index 03308b1..c878e85 100644 --- a/BLL/HStation.BLL.Assets.Core/02-httpclient/01-PumpProduct/PumpGroup.cs +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/01-PumpProduct/PumpGroup.cs @@ -9,7 +9,7 @@ { protected override string Prefix { - get { return $"{HStation.BLL.ConfigHelper.HttpUrl}/Assets/AssetsPumpGroup"; } + get { return $"{ConfigHelper.HttpUrl}/Assets/AssetsPumpGroup"; } } public async Task<bool> DeleteEx(long ID) diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/01-PumpProduct/PumpGroupAndMainMap.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/01-PumpProduct/PumpGroupAndMainMap.cs index 1d2ceac..c20ce77 100644 --- a/BLL/HStation.BLL.Assets.Core/02-httpclient/01-PumpProduct/PumpGroupAndMainMap.cs +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/01-PumpProduct/PumpGroupAndMainMap.cs @@ -9,7 +9,7 @@ { protected override string Prefix { - get { return $"{HStation.BLL.ConfigHelper.HttpUrl}/Assets/AssetsPumpGroupAndMainMap"; } + get { return $"{HStation.BLL.Assets.ConfigHelper.HttpUrl}/Assets/AssetsPumpGroupAndMainMap"; } } public async Task<List<long>> GetByGroupID(long ID) diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/01-PumpProduct/PumpMain.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/01-PumpProduct/PumpMain.cs index 2e76d08..41b3c36 100644 --- a/BLL/HStation.BLL.Assets.Core/02-httpclient/01-PumpProduct/PumpMain.cs +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/01-PumpProduct/PumpMain.cs @@ -9,7 +9,7 @@ { protected override string Prefix { - get { return $"{HStation.BLL.ConfigHelper.HttpUrl}/Assets/AssetsPumpMain"; } + get { return $"{HStation.BLL.Assets.ConfigHelper.HttpUrl}/Assets/AssetsPumpMain"; } } public async Task<bool> DeleteMapByMainID(long ID) diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/01-PumpProduct/PumpPart.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/01-PumpProduct/PumpPart.cs index a20286f..76f1172 100644 --- a/BLL/HStation.BLL.Assets.Core/02-httpclient/01-PumpProduct/PumpPart.cs +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/01-PumpProduct/PumpPart.cs @@ -9,7 +9,7 @@ { protected override string Prefix { - get { return $"{HStation.BLL.ConfigHelper.HttpUrl}/Assets/PumpPumpPart"; } + get { return $"{HStation.BLL.Assets.ConfigHelper.HttpUrl}/Assets/PumpPumpPart"; } } public async Task<bool> DeleteEx(long ID) diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/01-PumpProduct/PumpPropContent.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/01-PumpProduct/PumpPropContent.cs index 8479129..cb051e9 100644 --- a/BLL/HStation.BLL.Assets.Core/02-httpclient/01-PumpProduct/PumpPropContent.cs +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/01-PumpProduct/PumpPropContent.cs @@ -10,7 +10,7 @@ { protected override string Prefix { - get { return $"{HStation.BLL.ConfigHelper.HttpUrl}/Assets/AssetsPumpPropContent"; } + get { return $"{HStation.BLL.Assets.ConfigHelper.HttpUrl}/Assets/AssetsPumpPropContent"; } } public async Task<List<AssetsPumpPropContentDto>> GetByPumpPartID(long pumpPartId) diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/01-PumpProduct/PumpSeries.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/01-PumpProduct/PumpSeries.cs index 2d70093..b9db342 100644 --- a/BLL/HStation.BLL.Assets.Core/02-httpclient/01-PumpProduct/PumpSeries.cs +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/01-PumpProduct/PumpSeries.cs @@ -9,7 +9,7 @@ { protected override string Prefix { - get { return $"{HStation.BLL.ConfigHelper.HttpUrl}/Assets/AssetsPumpSeries"; } + get { return $"{HStation.BLL.Assets.ConfigHelper.HttpUrl}/Assets/AssetsPumpSeries"; } } public async Task<bool> UpdateUseStatus(long ID, int UseStatus) diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/01-PumpProduct/PumpType.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/01-PumpProduct/PumpType.cs index aa8d2ba..49c4546 100644 --- a/BLL/HStation.BLL.Assets.Core/02-httpclient/01-PumpProduct/PumpType.cs +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/01-PumpProduct/PumpType.cs @@ -9,7 +9,7 @@ { protected override string Prefix { - get { return $"{HStation.BLL.ConfigHelper.HttpUrl}/Assets/AssetsPumpType"; } + get { return $"{HStation.BLL.Assets.ConfigHelper.HttpUrl}/Assets/AssetsPumpType"; } } } } \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/01-PumpProduct/PumpTypeSeriesMap.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/01-PumpProduct/PumpTypeSeriesMap.cs index 84b7074..baee4b2 100644 --- a/BLL/HStation.BLL.Assets.Core/02-httpclient/01-PumpProduct/PumpTypeSeriesMap.cs +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/01-PumpProduct/PumpTypeSeriesMap.cs @@ -9,7 +9,7 @@ { protected override string Prefix { - get { return $"{HStation.BLL.ConfigHelper.HttpUrl}/Assets/AssetsPumpTypeSeriesMap"; } + get { return $"{HStation.BLL.Assets.ConfigHelper.HttpUrl}/Assets/AssetsPumpTypeSeriesMap"; } } public async Task<List<long>> GetSeriesIDByTypeID(long ID) diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/09-dbfirst/XhsDbFirstHelper.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/09-dbfirst/XhsDbFirstHelper.cs index 5c9ec2c..65ca280 100644 --- a/BLL/HStation.BLL.Assets.Core/02-httpclient/09-dbfirst/XhsDbFirstHelper.cs +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/09-dbfirst/XhsDbFirstHelper.cs @@ -9,7 +9,7 @@ { protected override string Prefix { - get { return $"{HStation.BLL.ConfigHelper.HttpUrl}/Assets/DbFirst"; } + get { return $"{HStation.BLL.Assets.ConfigHelper.HttpUrl}/Assets/DbFirst"; } } /// <summary> diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/11-Exchanger/AssetsExchangerSeriesManufacturerMapping.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/11-Exchanger/AssetsExchangerSeriesManufacturerMapping.cs index 3268ae3..407eb65 100644 --- a/BLL/HStation.BLL.Assets.Core/02-httpclient/11-Exchanger/AssetsExchangerSeriesManufacturerMapping.cs +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/11-Exchanger/AssetsExchangerSeriesManufacturerMapping.cs @@ -10,7 +10,7 @@ { protected override string Prefix { - get { return $"{HStation.BLL.ConfigHelper.HttpUrl}/AssetsExchangerSeriesManufacturerMapping"; } + get { return $"{HStation.BLL.Assets.ConfigHelper.HttpUrl}/AssetsExchangerSeriesManufacturerMapping"; } } /// <summary> diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/14-Blunthead/AssetsBluntheadCoefficient.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/14-Blunthead/AssetsBluntheadCoefficient.cs index b067249..5168881 100644 --- a/BLL/HStation.BLL.Assets.Core/02-httpclient/14-Blunthead/AssetsBluntheadCoefficient.cs +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/14-Blunthead/AssetsBluntheadCoefficient.cs @@ -13,7 +13,7 @@ { protected override string Prefix { - get { return $"{HStation.BLL.ConfigHelper.HttpUrl}/AssetsBluntheadCoefficient"; } + get { return $"{HStation.BLL.Assets.ConfigHelper.HttpUrl}/AssetsBluntheadCoefficient"; } } } } \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/14-Blunthead/AssetsBluntheadMain.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/14-Blunthead/AssetsBluntheadMain.cs index 1e1cc69..03de446 100644 --- a/BLL/HStation.BLL.Assets.Core/02-httpclient/14-Blunthead/AssetsBluntheadMain.cs +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/14-Blunthead/AssetsBluntheadMain.cs @@ -13,7 +13,7 @@ { protected override string Prefix { - get { return $"{HStation.BLL.ConfigHelper.HttpUrl}/AssetsBluntheadMain"; } + get { return $"{HStation.BLL.Assets.ConfigHelper.HttpUrl}/AssetsBluntheadMain"; } } public Task<List<AssetsBluntheadMainDto>> GetBySeriesID(long ID) diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/14-Blunthead/AssetsBluntheadSeries.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/14-Blunthead/AssetsBluntheadSeries.cs index 486e2bc..b809eee 100644 --- a/BLL/HStation.BLL.Assets.Core/02-httpclient/14-Blunthead/AssetsBluntheadSeries.cs +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/14-Blunthead/AssetsBluntheadSeries.cs @@ -13,7 +13,7 @@ { protected override string Prefix { - get { return $"{HStation.BLL.ConfigHelper.HttpUrl}/AssetsBluntheadSeries"; } + get { return $"{HStation.BLL.Assets.ConfigHelper.HttpUrl}/AssetsBluntheadSeries"; } } /// <summary> diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/15-Tank/AssetsTankCoefficient.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/15-Tank/AssetsTankCoefficient.cs index d7f26c3..117c86a 100644 --- a/BLL/HStation.BLL.Assets.Core/02-httpclient/15-Tank/AssetsTankCoefficient.cs +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/15-Tank/AssetsTankCoefficient.cs @@ -13,7 +13,7 @@ { protected override string Prefix { - get { return $"{HStation.BLL.ConfigHelper.HttpUrl}/AssetsTankCoefficient"; } + get { return $"{HStation.BLL.Assets.ConfigHelper.HttpUrl}/AssetsTankCoefficient"; } } public Task<List<AssetsTankCoefficientDto>> GetByMainID(long ID) diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/15-Tank/AssetsTankMain.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/15-Tank/AssetsTankMain.cs index 1f4201a..62d9c8e 100644 --- a/BLL/HStation.BLL.Assets.Core/02-httpclient/15-Tank/AssetsTankMain.cs +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/15-Tank/AssetsTankMain.cs @@ -13,7 +13,7 @@ { protected override string Prefix { - get { return $"{HStation.BLL.ConfigHelper.HttpUrl}/AssetsTankMain"; } + get { return $"{HStation.BLL.Assets.ConfigHelper.HttpUrl}/AssetsTankMain"; } } public Task<List<AssetsTankMainDto>> GetBySeriesID(long ID) diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/15-Tank/AssetsTankMainAndPartMapping.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/15-Tank/AssetsTankMainAndPartMapping.cs index c2d56f2..85dea48 100644 --- a/BLL/HStation.BLL.Assets.Core/02-httpclient/15-Tank/AssetsTankMainAndPartMapping.cs +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/15-Tank/AssetsTankMainAndPartMapping.cs @@ -13,7 +13,7 @@ { protected override string Prefix { - get { return $"{HStation.BLL.ConfigHelper.HttpUrl}/AssetsTankMainAndPartMapping"; } + get { return $"{HStation.BLL.Assets.ConfigHelper.HttpUrl}/AssetsTankMainAndPartMapping"; } } } } \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/15-Tank/AssetsTankPartMain.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/15-Tank/AssetsTankPartMain.cs index 27f32fe..1c13321 100644 --- a/BLL/HStation.BLL.Assets.Core/02-httpclient/15-Tank/AssetsTankPartMain.cs +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/15-Tank/AssetsTankPartMain.cs @@ -13,7 +13,7 @@ { protected override string Prefix { - get { return $"{HStation.BLL.ConfigHelper.HttpUrl}/AssetsTankPartMain"; } + get { return $"{HStation.BLL.Assets.ConfigHelper.HttpUrl}/AssetsTankPartMain"; } } } } \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/15-Tank/AssetsTankSeries.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/15-Tank/AssetsTankSeries.cs index 5d3a4df..a1a3d81 100644 --- a/BLL/HStation.BLL.Assets.Core/02-httpclient/15-Tank/AssetsTankSeries.cs +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/15-Tank/AssetsTankSeries.cs @@ -13,7 +13,7 @@ { protected override string Prefix { - get { return $"{HStation.BLL.ConfigHelper.HttpUrl}/AssetsTankSeries"; } + get { return $"{HStation.BLL.Assets.ConfigHelper.HttpUrl}/AssetsTankSeries"; } } /// <summary> diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/16-Meter/AssetsMeterCoefficient.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/16-Meter/AssetsMeterCoefficient.cs index 27bba88..139dfd8 100644 --- a/BLL/HStation.BLL.Assets.Core/02-httpclient/16-Meter/AssetsMeterCoefficient.cs +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/16-Meter/AssetsMeterCoefficient.cs @@ -13,7 +13,7 @@ { protected override string Prefix { - get { return $"{HStation.BLL.ConfigHelper.HttpUrl}/AssetsMeterCoefficient"; } + get { return $"{HStation.BLL.Assets.ConfigHelper.HttpUrl}/AssetsMeterCoefficient"; } } } } \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/16-Meter/AssetsMeterMain.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/16-Meter/AssetsMeterMain.cs index 70aadb4..a8d4058 100644 --- a/BLL/HStation.BLL.Assets.Core/02-httpclient/16-Meter/AssetsMeterMain.cs +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/16-Meter/AssetsMeterMain.cs @@ -13,7 +13,7 @@ { protected override string Prefix { - get { return $"{HStation.BLL.ConfigHelper.HttpUrl}/AssetsMeterMain"; } + get { return $"{HStation.BLL.Assets.ConfigHelper.HttpUrl}/AssetsMeterMain"; } } public Task<List<AssetsMeterMainDto>> GetBySeriesID(long ID) diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/16-Meter/AssetsMeterSeries.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/16-Meter/AssetsMeterSeries.cs index 7693a61..9aafce4 100644 --- a/BLL/HStation.BLL.Assets.Core/02-httpclient/16-Meter/AssetsMeterSeries.cs +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/16-Meter/AssetsMeterSeries.cs @@ -13,7 +13,7 @@ { protected override string Prefix { - get { return $"{HStation.BLL.ConfigHelper.HttpUrl}/AssetsMeterSeries"; } + get { return $"{HStation.BLL.Assets.ConfigHelper.HttpUrl}/AssetsMeterSeries"; } } /// <summary> diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/17-Flowmeter/AssetsFlowmeterCoefficient.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/17-Flowmeter/AssetsFlowmeterCoefficient.cs index 516ee65..eb8a16d 100644 --- a/BLL/HStation.BLL.Assets.Core/02-httpclient/17-Flowmeter/AssetsFlowmeterCoefficient.cs +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/17-Flowmeter/AssetsFlowmeterCoefficient.cs @@ -13,7 +13,7 @@ { protected override string Prefix { - get { return $"{HStation.BLL.ConfigHelper.HttpUrl}/AssetsFlowmeterCoefficient"; } + get { return $"{HStation.BLL.Assets.ConfigHelper.HttpUrl}/AssetsFlowmeterCoefficient"; } } } } \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/17-Flowmeter/AssetsFlowmeterMain.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/17-Flowmeter/AssetsFlowmeterMain.cs index 768200e..a688424 100644 --- a/BLL/HStation.BLL.Assets.Core/02-httpclient/17-Flowmeter/AssetsFlowmeterMain.cs +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/17-Flowmeter/AssetsFlowmeterMain.cs @@ -13,7 +13,7 @@ { protected override string Prefix { - get { return $"{HStation.BLL.ConfigHelper.HttpUrl}/AssetsFlowmeterMain"; } + get { return $"{HStation.BLL.Assets.ConfigHelper.HttpUrl}/AssetsFlowmeterMain"; } } public Task<List<AssetsFlowmeterMainDto>> GetBySeriesID(long ID) diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/17-Flowmeter/AssetsFlowmeterSeries.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/17-Flowmeter/AssetsFlowmeterSeries.cs index 5a51ef8..681a5cc 100644 --- a/BLL/HStation.BLL.Assets.Core/02-httpclient/17-Flowmeter/AssetsFlowmeterSeries.cs +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/17-Flowmeter/AssetsFlowmeterSeries.cs @@ -13,7 +13,7 @@ { protected override string Prefix { - get { return $"{HStation.BLL.ConfigHelper.HttpUrl}/AssetsFlowmeterSeries"; } + get { return $"{HStation.BLL.Assets.ConfigHelper.HttpUrl}/AssetsFlowmeterSeries"; } } /// <summary> diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/18-Hydrant/AssetsHydrantCoefficient.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/18-Hydrant/AssetsHydrantCoefficient.cs index bd27ee2..c06a93e 100644 --- a/BLL/HStation.BLL.Assets.Core/02-httpclient/18-Hydrant/AssetsHydrantCoefficient.cs +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/18-Hydrant/AssetsHydrantCoefficient.cs @@ -13,7 +13,7 @@ { protected override string Prefix { - get { return $"{HStation.BLL.ConfigHelper.HttpUrl}/AssetsHydrantCoefficient"; } + get { return $"{HStation.BLL.Assets.ConfigHelper.HttpUrl}/AssetsHydrantCoefficient"; } } } } \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/18-Hydrant/AssetsHydrantMain.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/18-Hydrant/AssetsHydrantMain.cs index cded4fa..f294313 100644 --- a/BLL/HStation.BLL.Assets.Core/02-httpclient/18-Hydrant/AssetsHydrantMain.cs +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/18-Hydrant/AssetsHydrantMain.cs @@ -13,7 +13,7 @@ { protected override string Prefix { - get { return $"{HStation.BLL.ConfigHelper.HttpUrl}/AssetsHydrantMain"; } + get { return $"{HStation.BLL.Assets.ConfigHelper.HttpUrl}/AssetsHydrantMain"; } } public Task<List<AssetsHydrantMainDto>> GetBySeriesID(long ID) diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/18-Hydrant/AssetsHydrantSeries.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/18-Hydrant/AssetsHydrantSeries.cs index 74cf144..da754fb 100644 --- a/BLL/HStation.BLL.Assets.Core/02-httpclient/18-Hydrant/AssetsHydrantSeries.cs +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/18-Hydrant/AssetsHydrantSeries.cs @@ -13,7 +13,7 @@ { protected override string Prefix { - get { return $"{HStation.BLL.ConfigHelper.HttpUrl}/AssetsHydrantSeries"; } + get { return $"{HStation.BLL.Assets.ConfigHelper.HttpUrl}/AssetsHydrantSeries"; } } /// <summary> diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/19-Pressmeter/AssetsPressmeterCoefficient.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/19-Pressmeter/AssetsPressmeterCoefficient.cs index 4cfa9c9..87ce817 100644 --- a/BLL/HStation.BLL.Assets.Core/02-httpclient/19-Pressmeter/AssetsPressmeterCoefficient.cs +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/19-Pressmeter/AssetsPressmeterCoefficient.cs @@ -13,7 +13,7 @@ { protected override string Prefix { - get { return $"{HStation.BLL.ConfigHelper.HttpUrl}/AssetsPressmeterCoefficient"; } + get { return $"{HStation.BLL.Assets.ConfigHelper.HttpUrl}/AssetsPressmeterCoefficient"; } } } } \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/19-Pressmeter/AssetsPressmeterMain.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/19-Pressmeter/AssetsPressmeterMain.cs index af8096d..2f7f001 100644 --- a/BLL/HStation.BLL.Assets.Core/02-httpclient/19-Pressmeter/AssetsPressmeterMain.cs +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/19-Pressmeter/AssetsPressmeterMain.cs @@ -13,7 +13,7 @@ { protected override string Prefix { - get { return $"{HStation.BLL.ConfigHelper.HttpUrl}/AssetsPressmeterMain"; } + get { return $"{HStation.BLL.Assets.ConfigHelper.HttpUrl}/AssetsPressmeterMain"; } } public Task<List<AssetsPressmeterMainDto>> GetBySeriesID(long ID) diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/19-Pressmeter/AssetsPressmeterSeries.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/19-Pressmeter/AssetsPressmeterSeries.cs index 925e516..b68cf21 100644 --- a/BLL/HStation.BLL.Assets.Core/02-httpclient/19-Pressmeter/AssetsPressmeterSeries.cs +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/19-Pressmeter/AssetsPressmeterSeries.cs @@ -13,7 +13,7 @@ { protected override string Prefix { - get { return $"{HStation.BLL.ConfigHelper.HttpUrl}/AssetsPressmeterSeries"; } + get { return $"{HStation.BLL.Assets.ConfigHelper.HttpUrl}/AssetsPressmeterSeries"; } } /// <summary> diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/20-Translation/AssetsTranslationCoefficient.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/20-Translation/AssetsTranslationCoefficient.cs index a8e489f..b3428c9 100644 --- a/BLL/HStation.BLL.Assets.Core/02-httpclient/20-Translation/AssetsTranslationCoefficient.cs +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/20-Translation/AssetsTranslationCoefficient.cs @@ -13,7 +13,7 @@ { protected override string Prefix { - get { return $"{HStation.BLL.ConfigHelper.HttpUrl}/AssetsTranslationCoefficient"; } + get { return $"{HStation.BLL.Assets.ConfigHelper.HttpUrl}/AssetsTranslationCoefficient"; } } } } \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/20-Translation/AssetsTranslationMain.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/20-Translation/AssetsTranslationMain.cs index 1bb609f..8d2f2d9 100644 --- a/BLL/HStation.BLL.Assets.Core/02-httpclient/20-Translation/AssetsTranslationMain.cs +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/20-Translation/AssetsTranslationMain.cs @@ -13,7 +13,7 @@ { protected override string Prefix { - get { return $"{HStation.BLL.ConfigHelper.HttpUrl}/AssetsTranslationMain"; } + get { return $"{HStation.BLL.Assets.ConfigHelper.HttpUrl}/AssetsTranslationMain"; } } public Task<List<AssetsTranslationMainDto>> GetBySeriesID(long ID) diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/20-Translation/AssetsTranslationSeries.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/20-Translation/AssetsTranslationSeries.cs index 4687cbb..0719348 100644 --- a/BLL/HStation.BLL.Assets.Core/02-httpclient/20-Translation/AssetsTranslationSeries.cs +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/20-Translation/AssetsTranslationSeries.cs @@ -13,7 +13,7 @@ { protected override string Prefix { - get { return $"{HStation.BLL.ConfigHelper.HttpUrl}/AssetsTranslationSeries"; } + get { return $"{HStation.BLL.Assets.ConfigHelper.HttpUrl}/AssetsTranslationSeries"; } } /// <summary> diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/22-cooling/01-series/AssetsCoolingSeries.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/22-cooling/01-series/AssetsCoolingSeries.cs new file mode 100644 index 0000000..5f275c2 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/22-cooling/01-series/AssetsCoolingSeries.cs @@ -0,0 +1,43 @@ +锘縰sing Yw.CAL.HttpClient; + +namespace HStation.CAL.HttpClient +{ + /// <summary> + /// + /// </summary> + public class AssetsCoolingSeries : BaseCAL_Paras_Flags_TagName_TreeSorter<AddAssetsCoolingSeriesInput, UpdateAssetsCoolingSeriesInput, AssetsCoolingSeriesDto>, IAssetsCoolingSeries + { + protected override string Prefix + { + get { return $"{ConfigHelper.HttpUrl}/Assets/Cooling/Series"; } + } + + + /// <summary> + /// + /// </summary> + public async Task<bool> IsExistTagName(string TagName) + { + var paras = new List<(string Name, object Value)>() + { + (nameof(TagName),TagName) + }; + return await GetUrl("IsExistTagName@V1.0").Get<bool>(paras); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> IsExistTagNameExceptID(string TagName, long ExceptID) + { + var paras = new List<(string Name, object Value)>() + { + (nameof(TagName),TagName), + (nameof(ExceptID),ExceptID) + }; + return await GetUrl("IsExistTagNameExceptID@V1.0").Get<bool>(paras); + } + + + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/22-cooling/02-main/AssetsCoolingSeries.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/22-cooling/02-main/AssetsCoolingSeries.cs new file mode 100644 index 0000000..45fa797 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/22-cooling/02-main/AssetsCoolingSeries.cs @@ -0,0 +1,54 @@ +锘縰sing Yw.CAL.HttpClient; + +namespace HStation.CAL.HttpClient +{ + /// <summary> + /// + /// </summary> + public class AssetsCoolingMain : BaseCAL_Paras_Flags_TagName_Sorter<AddAssetsCoolingMainInput, UpdateAssetsCoolingMainInput, AssetsCoolingMainDto>, IAssetsCoolingMain + { + protected override string Prefix + { + get { return $"{ConfigHelper.HttpUrl}/Assets/Cooling/Main"; } + } + + /// <summary> + /// + /// </summary> + public async Task<List<AssetsCoolingMainDto>> GetBySeriesID(long SeriesID) + { + var paras = new List<(string Name, object Value)>() + { + (nameof(SeriesID),SeriesID) + }; + return await GetUrl("GetBySeriesID@V1.0").Get<List<AssetsCoolingMainDto>>(paras); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> IsExistTagName(string TagName) + { + var paras = new List<(string Name, object Value)>() + { + (nameof(TagName),TagName) + }; + return await GetUrl("IsExistTagName@V1.0").Get<bool>(paras); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> IsExistTagNameExceptID(string TagName, long ExceptID) + { + var paras = new List<(string Name, object Value)>() + { + (nameof(TagName),TagName), + (nameof(ExceptID),ExceptID) + }; + return await GetUrl("IsExistTagNameExceptID@V1.0").Get<bool>(paras); + } + + + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/22-cooling/03-factor/AssetsCoolingFactor.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/22-cooling/03-factor/AssetsCoolingFactor.cs new file mode 100644 index 0000000..cde262b --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/22-cooling/03-factor/AssetsCoolingFactor.cs @@ -0,0 +1,20 @@ +锘縰sing Yw.CAL.HttpClient; + +namespace HStation.CAL.HttpClient +{ + /// <summary> + /// + /// </summary> + public class AssetsCoolingFactor : BaseCAL_Sorter<AddAssetsCoolingFactorInput, UpdateAssetsCoolingFactorInput, AssetsCoolingFactorDto>, IAssetsCoolingFactor + { + protected override string Prefix + { + get { return $"{ConfigHelper.HttpUrl}/Assets/Cooling/Factor"; } + } + + + + + + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/03-localclient/22-cooling/01-series/AssetsCoolingSeries.cs b/BLL/HStation.BLL.Assets.Core/03-localclient/22-cooling/01-series/AssetsCoolingSeries.cs new file mode 100644 index 0000000..0e62b35 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/03-localclient/22-cooling/01-series/AssetsCoolingSeries.cs @@ -0,0 +1,360 @@ +锘縩amespace HStation.CAL.LocalClient +{ + /// <summary> + /// 鍐峰嵈濉旂郴鍒� + /// </summary> + public class AssetsCoolingSeries : IAssetsCoolingSeries + { + private readonly HStation.Service.AssetsCoolingSeries _service = new(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public async Task<List<AssetsCoolingSeriesDto>> GetAll() + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetAll(); + var vm_list = list?.Select(x => new AssetsCoolingSeriesDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public async Task<AssetsCoolingSeriesDto> GetByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(ID); + return model == null ? null : new AssetsCoolingSeriesDto(model); + }); + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public async Task<List<AssetsCoolingSeriesDto>> GetByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByIds(Ids); + var vm_list = list?.Select(x => new AssetsCoolingSeriesDto(x)).ToList(); + return vm_list; + }); + } + + #endregion + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public async Task<long> Insert(AddAssetsCoolingSeriesInput input) + { + return await Task.Factory.StartNew(() => + { + var parentIds = new List<long>(); + if (input.ParentID > 0) + { + var parent = _service.GetByID(input.ParentID); + if (parent == null) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D001, $"ParentID:{input.ParentID} 鏁版嵁涓嶅瓨鍦�"); + } + parentIds = TreeParentIdsHelper.GetChildParentIds(parent.ID, parent.ParentIds); + } + if (!string.IsNullOrEmpty(input.TagName)) + { + if (_service.IsExistTagName(input.TagName)) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.V001, $"TagName:{input.TagName} 鏍囪宸插瓨鍦�"); + } + } + var model = input.Adapt<AddAssetsCoolingSeriesInput, Model.AssetsCoolingSeries>(); + model.ParentIds = parentIds; + model.SortCode = _service.GetMaxSortCode(input.ParentID) + 1; + var id = _service.Insert(model); + return id; + }); + } + + /// <summary> + /// 鎵归噺鎻掑叆 + /// </summary> + public async Task<bool> Inserts(List<AddAssetsCoolingSeriesInput> inputList) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 澶ф壒閲忔彃鍏� + /// </summary> + public async Task<bool> BulkInserts(List<AddAssetsCoolingSeriesInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + public async Task<bool> Update(UpdateAssetsCoolingSeriesInput input) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(input.ID); + if (model == null) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D001, $"ID:{input.ID} 鏁版嵁涓嶅瓨鍦�"); + } + if (!string.IsNullOrEmpty(input.TagName)) + { + if (_service.IsExistTagNameExceptID(input.TagName, input.ID)) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.V001, $"TagName:{input.TagName} 鏍囪宸插瓨鍦�"); + } + } + var rhs = new Model.AssetsCoolingSeries(model); + input.Adapt(rhs); + var bol = _service.Update(rhs); + return bol; + }); + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public async Task<bool> Updates(List<UpdateAssetsCoolingSeriesInput> inputList) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 澶ф壒閲忔洿鏂� + /// </summary> + public async Task<bool> BulkUpdates(List<UpdateAssetsCoolingSeriesInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鏇存柊鎺掑簭鐮� + /// </summary> + public async Task<bool> UpdateSortCode(long ID, int SortCode) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.UpdateSortCode(ID, SortCode); + return bol; + }); + } + + /// <summary> + /// 鏇存柊鎺掑簭 + /// </summary> + public async Task<bool> UpdateSorter(List<UpdateSortCodeInput> inputList) + { + return await Task.Factory.StartNew(() => + { + var list = inputList.Select(x => x.Adapt<Yw.Model.Sorter>()).ToList(); + var bol = _service.UpdateSorter(list); + return bol; + }); + } + + + /// <summary> + /// 鏇存柊鏍戞帓搴忕爜 + /// </summary> + public async Task<bool> UpdateTreeSortCode(long ID, long ParentID, int SortCode) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(ID); + if (model == null) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D001, $"ID:{ID} 鏁版嵁涓嶅瓨鍦�"); + } + var parentIds = new List<long>(); + if (ParentID > 0) + { + var parent = _service.GetByID(ParentID); + if (parent == null) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D001, $"ParentID:{ParentID} 鏁版嵁涓嶅瓨鍦�"); + } + parentIds = TreeParentIdsHelper.GetChildParentIds(parent.ID, parent.ParentIds); + } + var sorterList = new List<Yw.Model.TreeSorter>() + { + new Yw.Model.TreeSorter() + { + ID=ID, + ParentIds=parentIds, + SortCode=SortCode + } + }; + if (TreeParentIdsHelper.ToString(parentIds) != TreeParentIdsHelper.ToString(model.ParentIds)) + { + var children = _service.GetChildrenByID(ID); + if (children != null && children.Count > 0) + { + foreach (var item in children) + { + var itemParent = sorterList.Find(x => x.ID == item.ParentIds.Last()); + var itemParentIds = TreeParentIdsHelper.GetChildParentIds(itemParent.ID, itemParent.ParentIds); + var sorter = new Yw.Model.TreeSorter() + { + ID = item.ID, + ParentIds = itemParentIds, + SortCode = item.SortCode + }; + sorterList.Add(sorter); + } + } + } + var bol = _service.UpdateTreeSorter(sorterList); + return bol; + }); + } + + /// <summary> + /// 鏇存柊 Paras + /// </summary> + public async Task<bool> UpdateParas(long ID, Dictionary<string, string> Paras) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.UpdateParas(ID, Paras); + return bol; + }); + } + + /// <summary> + /// 鏇存柊 Flags + /// </summary> + public async Task<bool> UpdateFlags(long ID, List<string> Flags) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.UpdateFlags(ID, Flags); + return bol; + }); + } + + /// <summary> + /// 鏇存柊 TagName + /// </summary> + public async Task<bool> UpdateTagName(long ID, string TagName) + { + return await Task.Factory.StartNew(() => + { + if (!string.IsNullOrEmpty(TagName)) + { + if (_service.IsExistTagNameExceptID(TagName, ID)) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.V001, $"TagName:{TagName}", "鏍囪鍚嶇О宸插瓨鍦�"); + } + } + var bol = _service.UpdateTagName(ID, TagName); + return bol; + }); + } + + + #endregion + + #region Exist + + /// <summary> + /// + /// </summary> + public async Task<bool> IsExistTagName(string TagName) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.IsExistTagName(TagName); + return bol; + }); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> IsExistTagNameExceptID(string TagName, long ExceptID) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.IsExistTagNameExceptID(TagName, ExceptID); + return bol; + }); + } + + #endregion + + #region Delete + + /// <summary> + /// 閫氳繃 ID 鍒犻櫎 + /// </summary> + public async Task<bool> DeleteByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.DeleteByID(ID, out string msg); + if (!bol) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D999, msg); + } + return true; + }); + } + + /// <summary> + /// 閫氳繃 Ids 鍒犻櫎 + /// </summary> + public async Task<bool> DeleteByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鍒犻櫎鍏ㄩ儴 + /// </summary> + /// <returns></returns> + public async Task<bool> DeleteAll() + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + + #endregion + + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/03-localclient/22-cooling/02-main/AssetsCoolingMain.cs b/BLL/HStation.BLL.Assets.Core/03-localclient/22-cooling/02-main/AssetsCoolingMain.cs new file mode 100644 index 0000000..07b33c0 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/03-localclient/22-cooling/02-main/AssetsCoolingMain.cs @@ -0,0 +1,311 @@ +锘縩amespace HStation.CAL.LocalClient +{ + /// <summary> + /// 鍐峰嵈濉斿瀷鍙� + /// </summary> + public class AssetsCoolingMain : IAssetsCoolingMain + { + private readonly HStation.Service.AssetsCoolingMain _service = new(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public async Task<List<AssetsCoolingMainDto>> GetAll() + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetAll(); + var vm_list = list?.Select(x => new AssetsCoolingMainDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public async Task<AssetsCoolingMainDto> GetByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(ID); + return model == null ? null : new AssetsCoolingMainDto(model); + }); + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public async Task<List<AssetsCoolingMainDto>> GetByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByIds(Ids); + var vm_list = list?.Select(x => new AssetsCoolingMainDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 SeriesID 鑾峰彇 + /// </summary> + public async Task<List<AssetsCoolingMainDto>> GetBySeriesID(long SeriesID) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetBySeriesID(SeriesID); + var vm_list = list?.Select(x => new AssetsCoolingMainDto(x)).ToList(); + return vm_list; + }); + } + + #endregion + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public async Task<long> Insert(AddAssetsCoolingMainInput input) + { + return await Task.Factory.StartNew(() => + { + var series = new HStation.Service.AssetsCompressorMain().GetByID(input.SeriesID); + if (series == null) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D001, $"SeriesID:{input.SeriesID} 鏁版嵁涓嶅瓨鍦�"); + } + if (!string.IsNullOrEmpty(input.TagName)) + { + if (_service.IsExistTagName(input.TagName)) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.V001, $"TagName:{input.TagName} 鏍囪宸插瓨鍦�"); + } + } + var model = input.Adapt<AddAssetsCoolingMainInput, Model.AssetsCoolingMain>(); + model.SortCode = _service.GetMaxSortCode(input.SeriesID) + 1; + var id = _service.Insert(model); + return id; + }); + } + + /// <summary> + /// 鎵归噺鎻掑叆 + /// </summary> + public async Task<bool> Inserts(List<AddAssetsCoolingMainInput> inputList) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 澶ф壒閲忔彃鍏� + /// </summary> + public async Task<bool> BulkInserts(List<AddAssetsCoolingMainInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + public async Task<bool> Update(UpdateAssetsCoolingMainInput input) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(input.ID); + if (model == null) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D001, $"ID:{input.ID} 鏁版嵁涓嶅瓨鍦�"); + } + if (!string.IsNullOrEmpty(input.TagName)) + { + if (_service.IsExistTagNameExceptID(input.TagName, input.ID)) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.V001, $"TagName:{input.TagName} 鏍囪宸插瓨鍦�"); + } + } + var rhs = new Model.AssetsCoolingMain(model); + input.Adapt(rhs); + var bol = _service.Update(rhs); + return bol; + }); + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public async Task<bool> Updates(List<UpdateAssetsCoolingMainInput> inputList) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 澶ф壒閲忔洿鏂� + /// </summary> + public async Task<bool> BulkUpdates(List<UpdateAssetsCoolingMainInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鏇存柊鎺掑簭鐮� + /// </summary> + public async Task<bool> UpdateSortCode(long ID, int SortCode) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.UpdateSortCode(ID, SortCode); + return bol; + }); + } + + /// <summary> + /// 鏇存柊鎺掑簭 + /// </summary> + public async Task<bool> UpdateSorter(List<UpdateSortCodeInput> inputList) + { + return await Task.Factory.StartNew(() => + { + var list = inputList.Select(x => x.Adapt<Yw.Model.Sorter>()).ToList(); + var bol = _service.UpdateSorter(list); + return bol; + }); + } + + /// <summary> + /// 鏇存柊 Paras + /// </summary> + public async Task<bool> UpdateParas(long ID, Dictionary<string, string> Paras) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.UpdateParas(ID, Paras); + return bol; + }); + } + + /// <summary> + /// 鏇存柊 Flags + /// </summary> + public async Task<bool> UpdateFlags(long ID, List<string> Flags) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.UpdateFlags(ID, Flags); + return bol; + }); + } + + /// <summary> + /// 鏇存柊 TagName + /// </summary> + public async Task<bool> UpdateTagName(long ID, string TagName) + { + return await Task.Factory.StartNew(() => + { + if (!string.IsNullOrEmpty(TagName)) + { + if (_service.IsExistTagNameExceptID(TagName, ID)) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.V001, $"TagName:{TagName}", "鏍囪鍚嶇О宸插瓨鍦�"); + } + } + var bol = _service.UpdateTagName(ID, TagName); + return bol; + }); + } + + + #endregion + + #region Exist + + /// <summary> + /// + /// </summary> + public async Task<bool> IsExistTagName(string TagName) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.IsExistTagName(TagName); + return bol; + }); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> IsExistTagNameExceptID(string TagName, long ExceptID) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.IsExistTagNameExceptID(TagName, ExceptID); + return bol; + }); + } + + #endregion + + #region Delete + + /// <summary> + /// 閫氳繃 ID 鍒犻櫎 + /// </summary> + public async Task<bool> DeleteByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.DeleteByID(ID, out string msg); + if (!bol) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D999, msg); + } + return true; + }); + } + + /// <summary> + /// 閫氳繃 Ids 鍒犻櫎 + /// </summary> + public async Task<bool> DeleteByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鍒犻櫎鍏ㄩ儴 + /// </summary> + /// <returns></returns> + public async Task<bool> DeleteAll() + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + + #endregion + + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/03-localclient/22-cooling/03-factor/AssetsCoolingFactor.cs b/BLL/HStation.BLL.Assets.Core/03-localclient/22-cooling/03-factor/AssetsCoolingFactor.cs new file mode 100644 index 0000000..563f658 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/03-localclient/22-cooling/03-factor/AssetsCoolingFactor.cs @@ -0,0 +1,207 @@ +锘縩amespace HStation.CAL.LocalClient +{ + /// <summary> + /// 鍐峰嵈濉旂郴鏁� + /// </summary> + public class AssetsCoolingFactor : IAssetsCoolingFactor + { + private readonly HStation.Service.AssetsCoolingFactor _service = new(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public async Task<List<AssetsCoolingFactorDto>> GetAll() + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetAll(); + var vm_list = list?.Select(x => new AssetsCoolingFactorDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public async Task<AssetsCoolingFactorDto> GetByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(ID); + return model == null ? null : new AssetsCoolingFactorDto(model); + }); + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public async Task<List<AssetsCoolingFactorDto>> GetByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByIds(Ids); + var vm_list = list?.Select(x => new AssetsCoolingFactorDto(x)).ToList(); + return vm_list; + }); + } + + #endregion + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public async Task<long> Insert(AddAssetsCoolingFactorInput input) + { + return await Task.Factory.StartNew(() => + { + var model = input.Adapt<AddAssetsCoolingFactorInput, Model.AssetsCoolingFactor>(); + model.SortCode = _service.GetMaxSortCode() + 1; + var id = _service.Insert(model); + return id; + }); + } + + /// <summary> + /// 鎵归噺鎻掑叆 + /// </summary> + public async Task<bool> Inserts(List<AddAssetsCoolingFactorInput> inputList) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 澶ф壒閲忔彃鍏� + /// </summary> + public async Task<bool> BulkInserts(List<AddAssetsCoolingFactorInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + public async Task<bool> Update(UpdateAssetsCoolingFactorInput input) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(input.ID); + if (model == null) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D001, $"ID:{input.ID} 鏁版嵁涓嶅瓨鍦�"); + } + var rhs = new Model.AssetsCoolingFactor(model); + input.Adapt(rhs); + var bol = _service.Update(rhs); + return bol; + }); + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public async Task<bool> Updates(List<UpdateAssetsCoolingFactorInput> inputList) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 澶ф壒閲忔洿鏂� + /// </summary> + public async Task<bool> BulkUpdates(List<UpdateAssetsCoolingFactorInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鏇存柊鎺掑簭鐮� + /// </summary> + public async Task<bool> UpdateSortCode(long ID, int SortCode) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.UpdateSortCode(ID, SortCode); + return bol; + }); + } + + /// <summary> + /// 鏇存柊鎺掑簭 + /// </summary> + public async Task<bool> UpdateSorter(List<UpdateSortCodeInput> inputList) + { + return await Task.Factory.StartNew(() => + { + var list = inputList.Select(x => x.Adapt<Yw.Model.Sorter>()).ToList(); + var bol = _service.UpdateSorter(list); + return bol; + }); + } + + #endregion + + #region Delete + + /// <summary> + /// 閫氳繃 ID 鍒犻櫎 + /// </summary> + public async Task<bool> DeleteByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.DeleteByID(ID, out string msg); + if (!bol) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.D999, msg); + } + return true; + }); + } + + /// <summary> + /// 閫氳繃 Ids 鍒犻櫎 + /// </summary> + public async Task<bool> DeleteByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鍒犻櫎鍏ㄩ儴 + /// </summary> + /// <returns></returns> + public async Task<bool> DeleteAll() + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + + #endregion + + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/04-bll/00-core/CALCreateHelper.cs b/BLL/HStation.BLL.Assets.Core/04-bll/00-core/CALCreateHelper.cs index f1f6670..2376f93 100644 --- a/BLL/HStation.BLL.Assets.Core/04-bll/00-core/CALCreateHelper.cs +++ b/BLL/HStation.BLL.Assets.Core/04-bll/00-core/CALCreateHelper.cs @@ -1,4 +1,4 @@ -锘縩amespace HStation.BLL.Xhs +锘縩amespace HStation.BLL.Assets { /// <summary> /// CAL杈呭姪绫� diff --git a/BLL/HStation.BLL.Assets.Core/04-bll/22-cooling/01-series/AssetsCoolingSeries.cs b/BLL/HStation.BLL.Assets.Core/04-bll/22-cooling/01-series/AssetsCoolingSeries.cs new file mode 100644 index 0000000..78371d8 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/04-bll/22-cooling/01-series/AssetsCoolingSeries.cs @@ -0,0 +1,178 @@ +锘縰sing Yw.BLL; +namespace HStation.BLL +{ + /// <summary> + /// + /// </summary> + public partial class AssetsCoolingSeries + { + private readonly HStation.CAL.IAssetsCoolingSeries _cal = CALCreateHelper.CreateCAL<HStation.CAL.IAssetsCoolingSeries>(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public virtual async Task<List<AssetsCoolingSeriesVmo>> GetAll() + { + var dtoList = await _cal.GetAll(); + return Dto2Vmos(dtoList); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public virtual async Task<AssetsCoolingSeriesVmo> GetByID(long ID) + { + var dto = await _cal.GetByID(ID); + return Dto2Vmo(dto); + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public virtual async Task<List<AssetsCoolingSeriesVmo>> GetByIds(List<long> Ids) + { + var dtoList = await _cal.GetByIds(Ids); + return Dto2Vmos(dtoList); + } + + #endregion + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public virtual async Task<long> Insert(AssetsCoolingSeriesVmo vmo) + { + var dto = Vmo2AddDto(vmo); + var id = await _cal.Insert(dto); + return id; + } + + /// <summary> + /// 鎻掑叆澶氭潯 + /// </summary> + public virtual async Task<bool> Inserts(List<AssetsCoolingSeriesVmo> vmoList) + { + var dtoList = Vmo2AddDtos(vmoList); + var bol = await _cal.Inserts(dtoList); + return bol; + } + + #endregion + + #region Update + + /// <summary> + /// 鏇存柊 + /// </summary> + public virtual async Task<bool> Update(AssetsCoolingSeriesVmo vmo) + { + var dto = Vmo2UpdateDto(vmo); + var bol = await _cal.Update(dto); + return bol; + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public virtual async Task<bool> Updates(List<AssetsCoolingSeriesVmo> vmoList) + { + var dtoList = Vmo2UpdateDtos(vmoList); + var bol = await _cal.Updates(dtoList); + return bol; + } + + /// <summary> + /// 鏇存柊鎺掑簭鐮� + /// </summary> + public virtual async Task<bool> UpdateSortCode(long ID, int SortCode) + { + var bol = await _cal.UpdateSortCode(ID, SortCode); + return bol; + } + + /// <summary> + /// 鎵归噺鏇存柊鎺掑簭鐮� + /// </summary> + public virtual async Task<bool> UpdateSorter(List<Yw.Vmo.Sorter> Sorters) + { + var dtoList = Sorters.ToDtoList(); + var bol = await _cal.UpdateSorter(dtoList); + return bol; + } + + /// <summary> + /// 鏇存柊鏍戞帓搴忕爜 + /// </summary> + public virtual async Task<bool> UpdateTreeSortCode(long ID, long ParentID, int SortCode) + { + var bol = await _cal.UpdateTreeSortCode(ID, ParentID, SortCode); + return bol; + } + + /// <summary> + /// 鏇存柊 Flags + /// </summary> + public virtual async Task<bool> UpdateFlags(long ID, List<string> Flags) + { + return await _cal.UpdateFlags(ID, Flags); + } + + /// <summary> + /// 鏇存柊 Paras + /// </summary> + public virtual async Task<bool> UpdateParas(long ID, Dictionary<string, string> Paras) + { + return await _cal.UpdateParas(ID, Paras); + } + + /// <summary> + /// 鏇存柊 TagName + /// </summary> + public virtual async Task<bool> UpdateTagName(long ID, string TagName) + { + return await _cal.UpdateTagName(ID, TagName); + } + + #endregion + + #region Exist + + /// <summary> + /// 鍒ゆ柇 TagName 鏄惁瀛樺湪 + /// </summary> + public virtual async Task<bool> IsExistTagName(string TagName) + { + return await _cal.IsExistTagName(TagName); + } + + /// <summary> + /// 鍒ゆ柇TagName鏄惁瀛樺湪 ExceptID + /// </summary> + public virtual async Task<bool> IsExistTagNameExceptID(string TagName, long ExceptID) + { + return await _cal.IsExistTagNameExceptID(TagName, ExceptID); + } + + #endregion + + #region Delete + + /// <summary> + /// 閫氳繃 ID 鍒犻櫎 + /// </summary> + public virtual async Task<bool> DeleteByID(long ID) + { + var bol = await _cal.DeleteByID(ID); + return bol; + } + + + #endregion + + + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/04-bll/22-cooling/01-series/AssetsCoolingSeries_Instance.cs b/BLL/HStation.BLL.Assets.Core/04-bll/22-cooling/01-series/AssetsCoolingSeries_Instance.cs new file mode 100644 index 0000000..8c259cf --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/04-bll/22-cooling/01-series/AssetsCoolingSeries_Instance.cs @@ -0,0 +1,84 @@ +锘縩amespace HStation.BLL +{ + public partial class AssetsCoolingSeries + { + //dto to vmo + internal static HStation.Vmo.AssetsCoolingSeriesVmo Dto2Vmo(HStation.Dto.AssetsCoolingSeriesDto dto) + { + if (dto == null) + { + return default; + } + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Dto.AssetsCoolingSeriesDto, HStation.Vmo.AssetsCoolingSeriesVmo>() + ).CreateMapper(); + var vmo = mapper.Map<HStation.Dto.AssetsCoolingSeriesDto, HStation.Vmo.AssetsCoolingSeriesVmo>(dto); + return vmo; + } + + //dto to vmos + internal static List<HStation.Vmo.AssetsCoolingSeriesVmo> Dto2Vmos(List<HStation.Dto.AssetsCoolingSeriesDto> dtos) + { + if (dtos == null || dtos.Count < 1) + { + return default; + } + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Dto.AssetsCoolingSeriesDto, HStation.Vmo.AssetsCoolingSeriesVmo>() + ).CreateMapper(); + var vmos = mapper.Map<List<HStation.Dto.AssetsCoolingSeriesDto>, List<HStation.Vmo.AssetsCoolingSeriesVmo>>(dtos); + return vmos; + } + + //vmo to add dto + internal static HStation.Dto.AddAssetsCoolingSeriesInput Vmo2AddDto(HStation.Vmo.AssetsCoolingSeriesVmo vmo) + { + if (vmo == null) + { + return default; + } + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Vmo.AssetsCoolingSeriesVmo, HStation.Dto.AddAssetsCoolingSeriesInput>() + ).CreateMapper(); + var dto = mapper.Map<HStation.Vmo.AssetsCoolingSeriesVmo, HStation.Dto.AddAssetsCoolingSeriesInput>(vmo); + return dto; + } + + //vmo to add dtos + internal static List<HStation.Dto.AddAssetsCoolingSeriesInput> Vmo2AddDtos(List<HStation.Vmo.AssetsCoolingSeriesVmo> vmoList) + { + if (vmoList == null || vmoList.Count < 1) + { + return default; + } + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Vmo.AssetsCoolingSeriesVmo, HStation.Dto.AddAssetsCoolingSeriesInput>() + ).CreateMapper(); + var dtoList = mapper.Map<List<HStation.Vmo.AssetsCoolingSeriesVmo>, List<HStation.Dto.AddAssetsCoolingSeriesInput>>(vmoList); + return dtoList; + } + + //vmo to update dto + internal static HStation.Dto.UpdateAssetsCoolingSeriesInput Vmo2UpdateDto(HStation.Vmo.AssetsCoolingSeriesVmo vmo) + { + if (vmo == null) + { + return default; + } + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Vmo.AssetsCoolingSeriesVmo, HStation.Dto.UpdateAssetsCoolingSeriesInput>() + ).CreateMapper(); + var dto = mapper.Map<HStation.Vmo.AssetsCoolingSeriesVmo, HStation.Dto.UpdateAssetsCoolingSeriesInput>(vmo); + return dto; + } + + //vmo to update dtos + internal static List<HStation.Dto.UpdateAssetsCoolingSeriesInput> Vmo2UpdateDtos(List<HStation.Vmo.AssetsCoolingSeriesVmo> vmoList) + { + if (vmoList == null || vmoList.Count < 1) + { + return default; + } + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Vmo.AssetsCoolingSeriesVmo, HStation.Dto.UpdateAssetsCoolingSeriesInput>() + ).CreateMapper(); + var dtoList = mapper.Map<List<HStation.Vmo.AssetsCoolingSeriesVmo>, List<HStation.Dto.UpdateAssetsCoolingSeriesInput>>(vmoList); + return dtoList; + } + + } +} diff --git a/BLL/HStation.BLL.Assets.Core/04-bll/22-cooling/02-main/AssetsCoolingMain.cs b/BLL/HStation.BLL.Assets.Core/04-bll/22-cooling/02-main/AssetsCoolingMain.cs new file mode 100644 index 0000000..fa00800 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/04-bll/22-cooling/02-main/AssetsCoolingMain.cs @@ -0,0 +1,179 @@ +锘縰sing Yw.BLL; +namespace HStation.BLL +{ + /// <summary> + /// + /// </summary> + public partial class AssetsCoolingMain + { + private readonly HStation.CAL.IAssetsCoolingMain _cal = CALCreateHelper.CreateCAL<HStation.CAL.IAssetsCoolingMain>(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public virtual async Task<List<AssetsCoolingMainVmo>> GetAll() + { + var dtoList = await _cal.GetAll(); + return Dto2Vmos(dtoList); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public virtual async Task<AssetsCoolingMainVmo> GetByID(long ID) + { + var dto = await _cal.GetByID(ID); + return Dto2Vmo(dto); + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public virtual async Task<List<AssetsCoolingMainVmo>> GetByIds(List<long> Ids) + { + var dtoList = await _cal.GetByIds(Ids); + return Dto2Vmos(dtoList); + } + + /// <summary> + /// 閫氳繃 SeriesID 鑾峰彇 + /// </summary> + public virtual async Task<List<AssetsCoolingMainVmo>> GetBySeriesID(long SeriesID) + { + var dtoList = await _cal.GetBySeriesID(SeriesID); + return Dto2Vmos(dtoList); + } + + + #endregion + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public virtual async Task<long> Insert(AssetsCoolingMainVmo vmo) + { + var dto = Vmo2AddDto(vmo); + var id = await _cal.Insert(dto); + return id; + } + + /// <summary> + /// 鎻掑叆澶氭潯 + /// </summary> + public virtual async Task<bool> Inserts(List<AssetsCoolingMainVmo> vmoList) + { + var dtoList = Vmo2AddDtos(vmoList); + var bol = await _cal.Inserts(dtoList); + return bol; + } + + #endregion + + #region Update + + /// <summary> + /// 鏇存柊 + /// </summary> + public virtual async Task<bool> Update(AssetsCoolingMainVmo vmo) + { + var dto = Vmo2UpdateDto(vmo); + var bol = await _cal.Update(dto); + return bol; + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public virtual async Task<bool> Updates(List<AssetsCoolingMainVmo> vmoList) + { + var dtoList = Vmo2UpdateDtos(vmoList); + var bol = await _cal.Updates(dtoList); + return bol; + } + + /// <summary> + /// 鏇存柊鎺掑簭鐮� + /// </summary> + public virtual async Task<bool> UpdateSortCode(long ID, int SortCode) + { + var bol = await _cal.UpdateSortCode(ID, SortCode); + return bol; + } + + /// <summary> + /// 鎵归噺鏇存柊鎺掑簭鐮� + /// </summary> + public virtual async Task<bool> UpdateSorter(List<Yw.Vmo.Sorter> Sorters) + { + var dtoList = Sorters.ToDtoList(); + var bol = await _cal.UpdateSorter(dtoList); + return bol; + } + + /// <summary> + /// 鏇存柊 Flags + /// </summary> + public virtual async Task<bool> UpdateFlags(long ID, List<string> Flags) + { + return await _cal.UpdateFlags(ID, Flags); + } + + /// <summary> + /// 鏇存柊 Paras + /// </summary> + public virtual async Task<bool> UpdateParas(long ID, Dictionary<string, string> Paras) + { + return await _cal.UpdateParas(ID, Paras); + } + + /// <summary> + /// 鏇存柊 TagName + /// </summary> + public virtual async Task<bool> UpdateTagName(long ID, string TagName) + { + return await _cal.UpdateTagName(ID, TagName); + } + + #endregion + + #region Exist + + /// <summary> + /// 鍒ゆ柇 TagName 鏄惁瀛樺湪 + /// </summary> + public virtual async Task<bool> IsExistTagName(string TagName) + { + return await _cal.IsExistTagName(TagName); + } + + /// <summary> + /// 鍒ゆ柇TagName鏄惁瀛樺湪 ExceptID + /// </summary> + public virtual async Task<bool> IsExistTagNameExceptID(string TagName, long ExceptID) + { + return await _cal.IsExistTagNameExceptID(TagName, ExceptID); + } + + #endregion + + #region Delete + + /// <summary> + /// 閫氳繃 ID 鍒犻櫎 + /// </summary> + public virtual async Task<bool> DeleteByID(long ID) + { + var bol = await _cal.DeleteByID(ID); + return bol; + } + + + #endregion + + + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/04-bll/22-cooling/02-main/AssetsCoolingMain_Instance.cs b/BLL/HStation.BLL.Assets.Core/04-bll/22-cooling/02-main/AssetsCoolingMain_Instance.cs new file mode 100644 index 0000000..3b0b5b0 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/04-bll/22-cooling/02-main/AssetsCoolingMain_Instance.cs @@ -0,0 +1,84 @@ +锘縩amespace HStation.BLL +{ + public partial class AssetsCoolingMain + { + //dto to vmo + internal static HStation.Vmo.AssetsCoolingMainVmo Dto2Vmo(HStation.Dto.AssetsCoolingMainDto dto) + { + if (dto == null) + { + return default; + } + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Dto.AssetsCoolingMainDto, HStation.Vmo.AssetsCoolingMainVmo>() + ).CreateMapper(); + var vmo = mapper.Map<HStation.Dto.AssetsCoolingMainDto, HStation.Vmo.AssetsCoolingMainVmo>(dto); + return vmo; + } + + //dto to vmos + internal static List<HStation.Vmo.AssetsCoolingMainVmo> Dto2Vmos(List<HStation.Dto.AssetsCoolingMainDto> dtos) + { + if (dtos == null || dtos.Count < 1) + { + return default; + } + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Dto.AssetsCoolingMainDto, HStation.Vmo.AssetsCoolingMainVmo>() + ).CreateMapper(); + var vmos = mapper.Map<List<HStation.Dto.AssetsCoolingMainDto>, List<HStation.Vmo.AssetsCoolingMainVmo>>(dtos); + return vmos; + } + + //vmo to add dto + internal static HStation.Dto.AddAssetsCoolingMainInput Vmo2AddDto(HStation.Vmo.AssetsCoolingMainVmo vmo) + { + if (vmo == null) + { + return default; + } + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Vmo.AssetsCoolingMainVmo, HStation.Dto.AddAssetsCoolingMainInput>() + ).CreateMapper(); + var dto = mapper.Map<HStation.Vmo.AssetsCoolingMainVmo, HStation.Dto.AddAssetsCoolingMainInput>(vmo); + return dto; + } + + //vmo to add dtos + internal static List<HStation.Dto.AddAssetsCoolingMainInput> Vmo2AddDtos(List<HStation.Vmo.AssetsCoolingMainVmo> vmoList) + { + if (vmoList == null || vmoList.Count < 1) + { + return default; + } + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Vmo.AssetsCoolingMainVmo, HStation.Dto.AddAssetsCoolingMainInput>() + ).CreateMapper(); + var dtoList = mapper.Map<List<HStation.Vmo.AssetsCoolingMainVmo>, List<HStation.Dto.AddAssetsCoolingMainInput>>(vmoList); + return dtoList; + } + + //vmo to update dto + internal static HStation.Dto.UpdateAssetsCoolingMainInput Vmo2UpdateDto(HStation.Vmo.AssetsCoolingMainVmo vmo) + { + if (vmo == null) + { + return default; + } + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Vmo.AssetsCoolingMainVmo, HStation.Dto.UpdateAssetsCoolingMainInput>() + ).CreateMapper(); + var dto = mapper.Map<HStation.Vmo.AssetsCoolingMainVmo, HStation.Dto.UpdateAssetsCoolingMainInput>(vmo); + return dto; + } + + //vmo to update dtos + internal static List<HStation.Dto.UpdateAssetsCoolingMainInput> Vmo2UpdateDtos(List<HStation.Vmo.AssetsCoolingMainVmo> vmoList) + { + if (vmoList == null || vmoList.Count < 1) + { + return default; + } + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Vmo.AssetsCoolingMainVmo, HStation.Dto.UpdateAssetsCoolingMainInput>() + ).CreateMapper(); + var dtoList = mapper.Map<List<HStation.Vmo.AssetsCoolingMainVmo>, List<HStation.Dto.UpdateAssetsCoolingMainInput>>(vmoList); + return dtoList; + } + + } +} diff --git a/BLL/HStation.BLL.Assets.Core/04-bll/22-cooling/03-factor/AssetsCoolingFactor.cs b/BLL/HStation.BLL.Assets.Core/04-bll/22-cooling/03-factor/AssetsCoolingFactor.cs new file mode 100644 index 0000000..7beb9d4 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/04-bll/22-cooling/03-factor/AssetsCoolingFactor.cs @@ -0,0 +1,125 @@ +锘縰sing Yw.BLL; +namespace HStation.BLL +{ + /// <summary> + /// + /// </summary> + public partial class AssetsCoolingFactor + { + private readonly HStation.CAL.IAssetsCoolingFactor _cal = CALCreateHelper.CreateCAL<HStation.CAL.IAssetsCoolingFactor>(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public virtual async Task<List<AssetsCoolingFactorVmo>> GetAll() + { + var dtoList = await _cal.GetAll(); + return Dto2Vmos(dtoList); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public virtual async Task<AssetsCoolingFactorVmo> GetByID(long ID) + { + var dto = await _cal.GetByID(ID); + return Dto2Vmo(dto); + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public virtual async Task<List<AssetsCoolingFactorVmo>> GetByIds(List<long> Ids) + { + var dtoList = await _cal.GetByIds(Ids); + return Dto2Vmos(dtoList); + } + + #endregion + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public virtual async Task<long> Insert(AssetsCoolingFactorVmo vmo) + { + var dto = Vmo2AddDto(vmo); + var id = await _cal.Insert(dto); + return id; + } + + /// <summary> + /// 鎻掑叆澶氭潯 + /// </summary> + public virtual async Task<bool> Inserts(List<AssetsCoolingFactorVmo> vmoList) + { + var dtoList = Vmo2AddDtos(vmoList); + var bol = await _cal.Inserts(dtoList); + return bol; + } + + #endregion + + #region Update + + /// <summary> + /// 鏇存柊 + /// </summary> + public virtual async Task<bool> Update(AssetsCoolingFactorVmo vmo) + { + var dto = Vmo2UpdateDto(vmo); + var bol = await _cal.Update(dto); + return bol; + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public virtual async Task<bool> Updates(List<AssetsCoolingFactorVmo> vmoList) + { + var dtoList = Vmo2UpdateDtos(vmoList); + var bol = await _cal.Updates(dtoList); + return bol; + } + + /// <summary> + /// 鏇存柊鎺掑簭鐮� + /// </summary> + public virtual async Task<bool> UpdateSortCode(long ID, int SortCode) + { + var bol = await _cal.UpdateSortCode(ID, SortCode); + return bol; + } + + /// <summary> + /// 鎵归噺鏇存柊鎺掑簭鐮� + /// </summary> + public virtual async Task<bool> UpdateSorter(List<Yw.Vmo.Sorter> Sorters) + { + var dtoList = Sorters.ToDtoList(); + var bol = await _cal.UpdateSorter(dtoList); + return bol; + } + + #endregion + + #region Delete + + /// <summary> + /// 閫氳繃 ID 鍒犻櫎 + /// </summary> + public virtual async Task<bool> DeleteByID(long ID) + { + var bol = await _cal.DeleteByID(ID); + return bol; + } + + + #endregion + + + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/04-bll/22-cooling/03-factor/AssetsCoolingFactor_Instance.cs b/BLL/HStation.BLL.Assets.Core/04-bll/22-cooling/03-factor/AssetsCoolingFactor_Instance.cs new file mode 100644 index 0000000..c8d9865 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/04-bll/22-cooling/03-factor/AssetsCoolingFactor_Instance.cs @@ -0,0 +1,84 @@ +锘縩amespace HStation.BLL +{ + public partial class AssetsCoolingFactor + { + //dto to vmo + internal static HStation.Vmo.AssetsCoolingFactorVmo Dto2Vmo(HStation.Dto.AssetsCoolingFactorDto dto) + { + if (dto == null) + { + return default; + } + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Dto.AssetsCoolingFactorDto, HStation.Vmo.AssetsCoolingFactorVmo>() + ).CreateMapper(); + var vmo = mapper.Map<HStation.Dto.AssetsCoolingFactorDto, HStation.Vmo.AssetsCoolingFactorVmo>(dto); + return vmo; + } + + //dto to vmos + internal static List<HStation.Vmo.AssetsCoolingFactorVmo> Dto2Vmos(List<HStation.Dto.AssetsCoolingFactorDto> dtos) + { + if (dtos == null || dtos.Count < 1) + { + return default; + } + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Dto.AssetsCoolingFactorDto, HStation.Vmo.AssetsCoolingFactorVmo>() + ).CreateMapper(); + var vmos = mapper.Map<List<HStation.Dto.AssetsCoolingFactorDto>, List<HStation.Vmo.AssetsCoolingFactorVmo>>(dtos); + return vmos; + } + + //vmo to add dto + internal static HStation.Dto.AddAssetsCoolingFactorInput Vmo2AddDto(HStation.Vmo.AssetsCoolingFactorVmo vmo) + { + if (vmo == null) + { + return default; + } + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Vmo.AssetsCoolingFactorVmo, HStation.Dto.AddAssetsCoolingFactorInput>() + ).CreateMapper(); + var dto = mapper.Map<HStation.Vmo.AssetsCoolingFactorVmo, HStation.Dto.AddAssetsCoolingFactorInput>(vmo); + return dto; + } + + //vmo to add dtos + internal static List<HStation.Dto.AddAssetsCoolingFactorInput> Vmo2AddDtos(List<HStation.Vmo.AssetsCoolingFactorVmo> vmoList) + { + if (vmoList == null || vmoList.Count < 1) + { + return default; + } + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Vmo.AssetsCoolingFactorVmo, HStation.Dto.AddAssetsCoolingFactorInput>() + ).CreateMapper(); + var dtoList = mapper.Map<List<HStation.Vmo.AssetsCoolingFactorVmo>, List<HStation.Dto.AddAssetsCoolingFactorInput>>(vmoList); + return dtoList; + } + + //vmo to update dto + internal static HStation.Dto.UpdateAssetsCoolingFactorInput Vmo2UpdateDto(HStation.Vmo.AssetsCoolingFactorVmo vmo) + { + if (vmo == null) + { + return default; + } + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Vmo.AssetsCoolingFactorVmo, HStation.Dto.UpdateAssetsCoolingFactorInput>() + ).CreateMapper(); + var dto = mapper.Map<HStation.Vmo.AssetsCoolingFactorVmo, HStation.Dto.UpdateAssetsCoolingFactorInput>(vmo); + return dto; + } + + //vmo to update dtos + internal static List<HStation.Dto.UpdateAssetsCoolingFactorInput> Vmo2UpdateDtos(List<HStation.Vmo.AssetsCoolingFactorVmo> vmoList) + { + if (vmoList == null || vmoList.Count < 1) + { + return default; + } + var mapper = new MapperConfiguration(cfg => cfg.CreateMap<HStation.Vmo.AssetsCoolingFactorVmo, HStation.Dto.UpdateAssetsCoolingFactorInput>() + ).CreateMapper(); + var dtoList = mapper.Map<List<HStation.Vmo.AssetsCoolingFactorVmo>, List<HStation.Dto.UpdateAssetsCoolingFactorInput>>(vmoList); + return dtoList; + } + + } +} diff --git a/BLL/HStation.BLL.Assets.Core/GlobalUsings.cs b/BLL/HStation.BLL.Assets.Core/GlobalUsings.cs index fa0852b..cbe5c01 100644 --- a/BLL/HStation.BLL.Assets.Core/GlobalUsings.cs +++ b/BLL/HStation.BLL.Assets.Core/GlobalUsings.cs @@ -1,3 +1,8 @@ -锘縢lobal using HStation.BLL.Xhs; +锘縢lobal using Mapster; +global using HStation.Dto; global using HStation.Dto.Assets; -global using Mapster; \ No newline at end of file +global using HStation.BLL.Assets; +global using HStation.Vmo; +global using Yw.Dto; +global using Yw.Untity; +global using AutoMapper; \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/HStation.BLL.Assets.Core.csproj b/BLL/HStation.BLL.Assets.Core/HStation.BLL.Assets.Core.csproj index 27f195c..b100b0f 100644 --- a/BLL/HStation.BLL.Assets.Core/HStation.BLL.Assets.Core.csproj +++ b/BLL/HStation.BLL.Assets.Core/HStation.BLL.Assets.Core.csproj @@ -3,7 +3,7 @@ <PropertyGroup> <TargetFramework>net6.0</TargetFramework> <ImplicitUsings>enable</ImplicitUsings> - <Nullable>enable</Nullable> + <Nullable>disable</Nullable> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> @@ -48,7 +48,6 @@ </ItemGroup> <ItemGroup> - <ProjectReference Include="..\..\Dto\HStation.Dto.Assets.Core\HStation.Dto.Assets.Core.csproj" /> <ProjectReference Include="..\..\Vmo\HStation.Vmo.Assets.Core\HStation.Vmo.Assets.Core.csproj" /> <ProjectReference Include="..\HStation.BLL.Core\HStation.BLL.Core.csproj" /> </ItemGroup> diff --git a/Dto/HStation.Dto.Assets.Core/21-cooling/01-series/AddAssetsCoolingSeriesInput.cs b/Dto/HStation.Dto.Assets.Core/21-cooling/01-series/AddAssetsCoolingSeriesInput.cs new file mode 100644 index 0000000..76db494 --- /dev/null +++ b/Dto/HStation.Dto.Assets.Core/21-cooling/01-series/AddAssetsCoolingSeriesInput.cs @@ -0,0 +1,41 @@ +锘縩amespace HStation.Dto +{ + /// <summary> + /// + /// </summary> + public class AddAssetsCoolingSeriesInput + { + /// <summary> + /// 鐖剁骇id + /// </summary> + [Required] + public long ParentID { get; set; } + + /// <summary> + /// 鍚嶇О + /// </summary> + [Required] + public string Name { get; set; } + + /// <summary> + /// 鍙傛暟 + /// </summary> + public Dictionary<string, string> Paras { get; set; } + + /// <summary> + /// 鏍囩 + /// </summary> + public List<string> Flags { get; set; } + + /// <summary> + /// 鏍囧織 + /// </summary> + public string TagName { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } + + } +} \ No newline at end of file diff --git a/Dto/HStation.Dto.Assets.Core/21-cooling/01-series/AssetsCoolingSeriesDto.cs b/Dto/HStation.Dto.Assets.Core/21-cooling/01-series/AssetsCoolingSeriesDto.cs new file mode 100644 index 0000000..847afd0 --- /dev/null +++ b/Dto/HStation.Dto.Assets.Core/21-cooling/01-series/AssetsCoolingSeriesDto.cs @@ -0,0 +1,68 @@ +锘縩amespace HStation.Dto +{ + /// <summary> + /// 鍐峰嵈鍣ㄧ郴鍒� + /// </summary> + public class AssetsCoolingSeriesDto + { + /// <summary> + /// + /// </summary> + public AssetsCoolingSeriesDto() { } + + /// <summary> + /// + /// </summary> + public AssetsCoolingSeriesDto(Model.AssetsCoolingSeries rhs) + { + this.ID = rhs.ID; + this.ParentID = rhs.ParentIds.LastOrDefault(); + this.Name = rhs.Name; + this.Paras = rhs.Paras; + this.Flags = rhs.Flags; + this.TagName = rhs.TagName; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + } + + /// <summary> + /// id + /// </summary> + public long ID { get; set; } + + /// <summary> + /// 鐖剁骇id + /// </summary> + public long ParentID { get; set; } + + /// <summary> + /// 鍚嶇О + /// </summary> + public string Name { get; set; } + + /// <summary> + /// 鍙傛暟 + /// </summary> + public Dictionary<string, string> Paras { get; set; } + + /// <summary> + /// 鏍囩 + /// </summary> + public List<string> Flags { get; set; } + + /// <summary> + /// 鏍囧織 + /// </summary> + public string TagName { get; set; } + + /// <summary> + /// 鎺掑簭鐮� + /// </summary> + public int SortCode { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/Dto/HStation.Dto.Assets.Core/21-cooling/01-series/AssetsCoolingSeriesStdDto.cs b/Dto/HStation.Dto.Assets.Core/21-cooling/01-series/AssetsCoolingSeriesStdDto.cs new file mode 100644 index 0000000..a554a06 --- /dev/null +++ b/Dto/HStation.Dto.Assets.Core/21-cooling/01-series/AssetsCoolingSeriesStdDto.cs @@ -0,0 +1,68 @@ +锘縩amespace HStation.Dto +{ + /// <summary> + /// 鍐峰嵈鍣ㄧ郴鍒� + /// </summary> + public class AssetsCoolingSeriesStdDto + { + /// <summary> + /// + /// </summary> + public AssetsCoolingSeriesStdDto() { } + + /// <summary> + /// + /// </summary> + public AssetsCoolingSeriesStdDto(Model.AssetsCoolingSeries rhs) + { + this.ID = rhs.ID; + this.ParentID = rhs.ParentIds.LastOrDefault(); + this.Name = rhs.Name; + this.Paras = rhs.Paras; + this.Flags = rhs.Flags; + this.TagName = rhs.TagName; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + } + + /// <summary> + /// id + /// </summary> + public long ID { get; set; } + + /// <summary> + /// 鐖剁骇id + /// </summary> + public long ParentID { get; set; } + + /// <summary> + /// 鍚嶇О + /// </summary> + public string Name { get; set; } + + /// <summary> + /// 鍙傛暟 + /// </summary> + public Dictionary<string, string> Paras { get; set; } + + /// <summary> + /// 鏍囩 + /// </summary> + public List<string> Flags { get; set; } + + /// <summary> + /// 鏍囧織 + /// </summary> + public string TagName { get; set; } + + /// <summary> + /// 鎺掑簭鐮� + /// </summary> + public int SortCode { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/Dto/HStation.Dto.Assets.Core/21-cooling/01-series/UpdateAssetsCoolingSeriesInput.cs b/Dto/HStation.Dto.Assets.Core/21-cooling/01-series/UpdateAssetsCoolingSeriesInput.cs new file mode 100644 index 0000000..9ff7d67 --- /dev/null +++ b/Dto/HStation.Dto.Assets.Core/21-cooling/01-series/UpdateAssetsCoolingSeriesInput.cs @@ -0,0 +1,42 @@ +锘縩amespace HStation.Dto +{ + /// <summary> + /// + /// </summary> + public class UpdateAssetsCoolingSeriesInput + { + /// <summary> + /// id + /// </summary> + [Required, Range(1, long.MaxValue, ErrorMessage = "ID 蹇呴』澶т簬0")] + public long ID { get; set; } + + /// <summary> + /// 鍚嶇О + /// </summary> + [Required] + public string Name { get; set; } + + /// <summary> + /// 鍙傛暟 + /// </summary> + public Dictionary<string, string> Paras { get; set; } + + /// <summary> + /// 鏍囩 + /// </summary> + public List<string> Flags { get; set; } + + /// <summary> + /// 鏍囧織 + /// </summary> + public string TagName { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } + + + } +} \ No newline at end of file diff --git a/Dto/HStation.Dto.Assets.Core/21-cooling/02-main/AddAssetsCoolingMainInput.cs b/Dto/HStation.Dto.Assets.Core/21-cooling/02-main/AddAssetsCoolingMainInput.cs new file mode 100644 index 0000000..cb82a17 --- /dev/null +++ b/Dto/HStation.Dto.Assets.Core/21-cooling/02-main/AddAssetsCoolingMainInput.cs @@ -0,0 +1,68 @@ +锘縩amespace HStation.Dto +{ + /// <summary> + /// + /// </summary> + public class AddAssetsCoolingMainInput + { + + /// <summary> + /// 绯诲垪id + /// </summary> + [Required, Range(1, long.MaxValue, ErrorMessage = "SeriesID 蹇呴』澶т簬0")] + public long SeriesID { get; set; } + + /// <summary> + /// 鍚嶇О + /// </summary> + [Required] + public string Name { get; set; } + + /// <summary> + /// 鏉愭枡 + /// </summary> + public string Material { get; set; } + + /// <summary> + /// 鍙e緞 mm + /// </summary> + public double? Caliber { get; set; } + + /// <summary> + /// 鍠峰皠绯绘暟 + /// </summary> + [Required] + public double Coefficient { get; set; } + + /// <summary> + /// 鏈�灏忓帇鍔� m + /// </summary> + [Required] + public double LowerLimit { get; set; } + + /// <summary> + /// 鍏抽敭瀛� + /// </summary> + public List<string> KeyWords { get; set; } + + /// <summary> + /// 鍙傛暟 + /// </summary> + public Dictionary<string, string> Paras { get; set; } + + /// <summary> + /// 鏍囩 + /// </summary> + public List<string> Flags { get; set; } + + /// <summary> + /// 鏍囧織 + /// </summary> + public string TagName { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/Dto/HStation.Dto.Assets.Core/21-cooling/02-main/AssetsCoolingMainDto.cs b/Dto/HStation.Dto.Assets.Core/21-cooling/02-main/AssetsCoolingMainDto.cs new file mode 100644 index 0000000..281772e --- /dev/null +++ b/Dto/HStation.Dto.Assets.Core/21-cooling/02-main/AssetsCoolingMainDto.cs @@ -0,0 +1,100 @@ +锘縩amespace HStation.Dto +{ + /// <summary> + /// 鍐峰嵈濉斿瀷鍙� + /// </summary> + public class AssetsCoolingMainDto + { + /// <summary> + /// + /// </summary> + public AssetsCoolingMainDto() { } + + /// <summary> + /// + /// </summary> + public AssetsCoolingMainDto(Model.AssetsCoolingMain rhs) + { + this.ID = rhs.ID; + this.SeriesID = rhs.SeriesID; + this.Name = rhs.Name; + this.Material = rhs.Material; + this.Caliber = rhs.Caliber; + this.Coefficient = rhs.Coefficient; + this.LowerLimit = rhs.LowerLimit; + this.KeyWords = rhs.KeyWords; + this.Paras = rhs.Paras; + this.Flags = rhs.Flags; + this.TagName = rhs.TagName; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + } + + /// <summary> + /// id + /// </summary> + public long ID { get; set; } + + /// <summary> + /// 绯诲垪id + /// </summary> + public long SeriesID { get; set; } + + /// <summary> + /// 鍚嶇О + /// </summary> + public string Name { get; set; } + + /// <summary> + /// 鏉愭枡 + /// </summary> + public string Material { get; set; } + + /// <summary> + /// 鍙e緞 mm + /// </summary> + public double? Caliber { get; set; } + + /// <summary> + /// 鍠峰皠绯绘暟 + /// </summary> + public double Coefficient { get; set; } + + /// <summary> + /// 鏈�灏忓帇鍔� m + /// </summary> + public double LowerLimit { get; set; } + + /// <summary> + /// 鍏抽敭瀛� + /// </summary> + public List<string> KeyWords { get; set; } + + /// <summary> + /// 鍙傛暟 + /// </summary> + public Dictionary<string, string> Paras { get; set; } + + /// <summary> + /// 鏍囩 + /// </summary> + public List<string> Flags { get; set; } + + /// <summary> + /// 鏍囧織 + /// </summary> + public string TagName { get; set; } + + /// <summary> + /// 鎺掑簭鐮� + /// </summary> + public int SortCode { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } + + + } +} \ No newline at end of file diff --git a/Dto/HStation.Dto.Assets.Core/21-cooling/02-main/AssetsCoolingMainStdDto.cs b/Dto/HStation.Dto.Assets.Core/21-cooling/02-main/AssetsCoolingMainStdDto.cs new file mode 100644 index 0000000..490bec6 --- /dev/null +++ b/Dto/HStation.Dto.Assets.Core/21-cooling/02-main/AssetsCoolingMainStdDto.cs @@ -0,0 +1,100 @@ +锘縩amespace HStation.Dto +{ + /// <summary> + /// + /// </summary> + public class AssetsCoolingMainStdDto + { + /// <summary> + /// + /// </summary> + public AssetsCoolingMainStdDto() { } + + /// <summary> + /// + /// </summary> + public AssetsCoolingMainStdDto(Model.AssetsCoolingMain rhs) + { + this.ID = rhs.ID; + this.SeriesID = rhs.SeriesID; + this.Name = rhs.Name; + this.Material = rhs.Material; + this.Caliber = rhs.Caliber; + this.Coefficient = rhs.Coefficient; + this.LowerLimit = rhs.LowerLimit; + this.KeyWords = rhs.KeyWords; + this.Paras = rhs.Paras; + this.Flags = rhs.Flags; + this.TagName = rhs.TagName; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + } + + /// <summary> + /// id + /// </summary> + public long ID { get; set; } + + /// <summary> + /// 绯诲垪id + /// </summary> + public long SeriesID { get; set; } + + /// <summary> + /// 鍚嶇О + /// </summary> + public string Name { get; set; } + + /// <summary> + /// 鏉愭枡 + /// </summary> + public string Material { get; set; } + + /// <summary> + /// 鍙e緞 mm + /// </summary> + public double? Caliber { get; set; } + + /// <summary> + /// 鍠峰皠绯绘暟 + /// </summary> + public double Coefficient { get; set; } + + /// <summary> + /// 鏈�灏忓帇鍔� m + /// </summary> + public double LowerLimit { get; set; } + + /// <summary> + /// 鍏抽敭瀛� + /// </summary> + public List<string> KeyWords { get; set; } + + /// <summary> + /// 鍙傛暟 + /// </summary> + public Dictionary<string, string> Paras { get; set; } + + /// <summary> + /// 鏍囩 + /// </summary> + public List<string> Flags { get; set; } + + /// <summary> + /// 鏍囧織 + /// </summary> + public string TagName { get; set; } + + /// <summary> + /// 鎺掑簭鐮� + /// </summary> + public int SortCode { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } + + + } +} \ No newline at end of file diff --git a/Dto/HStation.Dto.Assets.Core/21-cooling/02-main/UpdateAssetsCoolingMainInput.cs b/Dto/HStation.Dto.Assets.Core/21-cooling/02-main/UpdateAssetsCoolingMainInput.cs new file mode 100644 index 0000000..8293fe4 --- /dev/null +++ b/Dto/HStation.Dto.Assets.Core/21-cooling/02-main/UpdateAssetsCoolingMainInput.cs @@ -0,0 +1,67 @@ +锘縩amespace HStation.Dto +{ + /// <summary> + /// + /// </summary> + public class UpdateAssetsCoolingMainInput + { + /// <summary> + /// id + /// </summary> + [Required, Range(1, long.MaxValue, ErrorMessage = "ID 蹇呴』澶т簬0")] + public long ID { get; set; } + + /// <summary> + /// 鍚嶇О + /// </summary> + [Required] + public string Name { get; set; } + + /// <summary> + /// 鏉愭枡 + /// </summary> + public string Material { get; set; } + + /// <summary> + /// 鍙e緞 mm + /// </summary> + public double? Caliber { get; set; } + + /// <summary> + /// 鍠峰皠绯绘暟 + /// </summary> + [Required] + public double Coefficient { get; set; } + + /// <summary> + /// 鏈�灏忓帇鍔� m + /// </summary> + [Required] + public double LowerLimit { get; set; } + + /// <summary> + /// 鍏抽敭瀛� + /// </summary> + public List<string> KeyWords { get; set; } + + /// <summary> + /// 鍙傛暟 + /// </summary> + public Dictionary<string, string> Paras { get; set; } + + /// <summary> + /// 鏍囩 + /// </summary> + public List<string> Flags { get; set; } + + /// <summary> + /// 鏍囧織 + /// </summary> + public string TagName { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/Dto/HStation.Dto.Assets.Core/21-cooling/03-factor/AddAssetsCoolingFactorInput.cs b/Dto/HStation.Dto.Assets.Core/21-cooling/03-factor/AddAssetsCoolingFactorInput.cs new file mode 100644 index 0000000..769bc6f --- /dev/null +++ b/Dto/HStation.Dto.Assets.Core/21-cooling/03-factor/AddAssetsCoolingFactorInput.cs @@ -0,0 +1,43 @@ +锘縩amespace HStation.Dto +{ + /// <summary> + /// + /// </summary> + public class AddAssetsCoolingFactorInput + { + + /// <summary> + /// 鍚嶇О + /// </summary> + [Required] + public string Name { get; set; } + + /// <summary> + /// 鏉愭枡 + /// </summary> + [Required] + public string Material { get; set; } + + /// <summary> + /// 鍙e緞 + /// </summary> + public double? Caliber { get; set; } + + /// <summary> + /// 鍠峰皠绯绘暟 + /// </summary> + [Required] + public double Coefficient { get; set; } + + /// <summary> + /// 鏈�灏忓帇鍔� m + /// </summary> + [Required] + public double LowerLimit { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/Dto/HStation.Dto.Assets.Core/21-cooling/03-factor/AssetsCoolingFactorDto.cs b/Dto/HStation.Dto.Assets.Core/21-cooling/03-factor/AssetsCoolingFactorDto.cs new file mode 100644 index 0000000..e41bcbe --- /dev/null +++ b/Dto/HStation.Dto.Assets.Core/21-cooling/03-factor/AssetsCoolingFactorDto.cs @@ -0,0 +1,70 @@ +锘縩amespace HStation.Dto +{ + /// <summary> + /// 鍐峰嵈濉旂郴鏁� + /// </summary> + public class AssetsCoolingFactorDto + { + /// <summary> + /// + /// </summary> + public AssetsCoolingFactorDto() { } + + /// <summary> + /// + /// </summary> + public AssetsCoolingFactorDto(Model.AssetsCoolingFactor rhs) + { + this.ID = rhs.ID; + this.Name = rhs.Name; + this.Material = rhs.Material; + this.Caliber = rhs.Caliber; + this.Coefficient = rhs.Coefficient; + this.LowerLimit = rhs.LowerLimit; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + } + + /// <summary> + /// id + /// </summary> + public long ID { get; set; } + + /// <summary> + /// 鍚嶇О + /// </summary> + public string Name { get; set; } + + /// <summary> + /// 鏉愭枡 + /// </summary> + public string Material { get; set; } + + /// <summary> + /// 鍙e緞 + /// </summary> + public double? Caliber { get; set; } + + /// <summary> + /// 鍠峰皠绯绘暟 + /// </summary> + public double Coefficient { get; set; } + + /// <summary> + /// 鏈�灏忓帇鍔� m + /// </summary> + public double LowerLimit { get; set; } + + /// <summary> + /// 鎺掑簭鐮� + /// </summary> + public int SortCode { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } + + + } +} \ No newline at end of file diff --git a/Dto/HStation.Dto.Assets.Core/21-cooling/03-factor/AssetsCoolingFactorStdDto.cs b/Dto/HStation.Dto.Assets.Core/21-cooling/03-factor/AssetsCoolingFactorStdDto.cs new file mode 100644 index 0000000..73c7447 --- /dev/null +++ b/Dto/HStation.Dto.Assets.Core/21-cooling/03-factor/AssetsCoolingFactorStdDto.cs @@ -0,0 +1,70 @@ +锘縩amespace HStation.Dto +{ + /// <summary> + /// + /// </summary> + public class AssetsCoolingFactorStdDto + { + /// <summary> + /// + /// </summary> + public AssetsCoolingFactorStdDto() { } + + /// <summary> + /// + /// </summary> + public AssetsCoolingFactorStdDto(Model.AssetsCoolingFactor rhs) + { + this.ID = rhs.ID; + this.Name = rhs.Name; + this.Material = rhs.Material; + this.Caliber = rhs.Caliber; + this.Coefficient = rhs.Coefficient; + this.LowerLimit = rhs.LowerLimit; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + } + + /// <summary> + /// id + /// </summary> + public long ID { get; set; } + + /// <summary> + /// 鍚嶇О + /// </summary> + public string Name { get; set; } + + /// <summary> + /// 鏉愭枡 + /// </summary> + public string Material { get; set; } + + /// <summary> + /// 鍙e緞 + /// </summary> + public double? Caliber { get; set; } + + /// <summary> + /// 鍠峰皠绯绘暟 + /// </summary> + public double Coefficient { get; set; } + + /// <summary> + /// 鏈�灏忓帇鍔� m + /// </summary> + public double LowerLimit { get; set; } + + /// <summary> + /// 鎺掑簭鐮� + /// </summary> + public int SortCode { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } + + + } +} \ No newline at end of file diff --git a/Dto/HStation.Dto.Assets.Core/21-cooling/03-factor/UpdateAssetsCoolingFactorInput.cs b/Dto/HStation.Dto.Assets.Core/21-cooling/03-factor/UpdateAssetsCoolingFactorInput.cs new file mode 100644 index 0000000..1f23a3f --- /dev/null +++ b/Dto/HStation.Dto.Assets.Core/21-cooling/03-factor/UpdateAssetsCoolingFactorInput.cs @@ -0,0 +1,48 @@ +锘縩amespace HStation.Dto +{ + /// <summary> + /// + /// </summary> + public class UpdateAssetsCoolingFactorInput + { + /// <summary> + /// id + /// </summary> + [Required, Range(1, long.MaxValue, ErrorMessage = "ID 蹇呴』澶т簬0")] + public long ID { get; set; } + + /// <summary> + /// 鍚嶇О + /// </summary> + [Required] + public string Name { get; set; } + + /// <summary> + /// 鏉愭枡 + /// </summary> + [Required] + public string Material { get; set; } + + /// <summary> + /// 鍙e緞 + /// </summary> + public double? Caliber { get; set; } + + /// <summary> + /// 鍠峰皠绯绘暟 + /// </summary> + [Required] + public double Coefficient { get; set; } + + /// <summary> + /// 鏈�灏忓帇鍔� m + /// </summary> + [Required] + public double LowerLimit { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/Dto/HStation.Dto.Assets.Core/99-models/seriesid/SeriesIDInput.cs b/Dto/HStation.Dto.Assets.Core/99-models/seriesid/SeriesIDInput.cs new file mode 100644 index 0000000..c99078e --- /dev/null +++ b/Dto/HStation.Dto.Assets.Core/99-models/seriesid/SeriesIDInput.cs @@ -0,0 +1,14 @@ +锘縩amespace HStation.Dto.Assets +{ + /// <summary> + /// + /// </summary> + public class SeriesIDInput + { + /// <summary> + /// + /// </summary> + [Required, Range(1, long.MaxValue, ErrorMessage = "SeriesID 蹇呴』澶т簬0")] + public long SeriesID { get; set; } + } +} diff --git a/Dto/HStation.Dto.Assets.Core/GlobalUsings.cs b/Dto/HStation.Dto.Assets.Core/GlobalUsings.cs new file mode 100644 index 0000000..426f8ca --- /dev/null +++ b/Dto/HStation.Dto.Assets.Core/GlobalUsings.cs @@ -0,0 +1 @@ +锘縢lobal using System.ComponentModel.DataAnnotations; \ No newline at end of file diff --git a/Dto/HStation.Dto.Assets.Core/HStation.Dto.Assets.Core.csproj b/Dto/HStation.Dto.Assets.Core/HStation.Dto.Assets.Core.csproj index 4e814eb..1e81945 100644 --- a/Dto/HStation.Dto.Assets.Core/HStation.Dto.Assets.Core.csproj +++ b/Dto/HStation.Dto.Assets.Core/HStation.Dto.Assets.Core.csproj @@ -1,33 +1,33 @@ 锘�<Project Sdk="Microsoft.NET.Sdk"> - <PropertyGroup> - <TargetFramework>net6.0</TargetFramework> - <ImplicitUsings>enable</ImplicitUsings> - <Nullable>enable</Nullable> - </PropertyGroup> + <PropertyGroup> + <TargetFramework>net6.0</TargetFramework> + <ImplicitUsings>enable</ImplicitUsings> + <Nullable>enable</Nullable> + </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> - <NoWarn>1701;1702;8618</NoWarn> - </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> + <NoWarn>1701;1702;8618</NoWarn> + </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> - <NoWarn>1701;1702;8618</NoWarn> - </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> + <NoWarn>1701;1702;8618</NoWarn> + </PropertyGroup> - <ItemGroup> - <Compile Remove="01-Valve\02-ValveGroup\**" /> - <Compile Remove="01-Valve\04-ValveMaping\**" /> - <Compile Remove="09-Manufacturer\02-ManufacturerMapping\**" /> - <EmbeddedResource Remove="01-Valve\02-ValveGroup\**" /> - <EmbeddedResource Remove="01-Valve\04-ValveMaping\**" /> - <EmbeddedResource Remove="09-Manufacturer\02-ManufacturerMapping\**" /> - <None Remove="01-Valve\02-ValveGroup\**" /> - <None Remove="01-Valve\04-ValveMaping\**" /> - <None Remove="09-Manufacturer\02-ManufacturerMapping\**" /> - </ItemGroup> + <ItemGroup> + <Compile Remove="01-Valve\02-ValveGroup\**" /> + <Compile Remove="01-Valve\04-ValveMaping\**" /> + <Compile Remove="09-Manufacturer\02-ManufacturerMapping\**" /> + <EmbeddedResource Remove="01-Valve\02-ValveGroup\**" /> + <EmbeddedResource Remove="01-Valve\04-ValveMaping\**" /> + <EmbeddedResource Remove="09-Manufacturer\02-ManufacturerMapping\**" /> + <None Remove="01-Valve\02-ValveGroup\**" /> + <None Remove="01-Valve\04-ValveMaping\**" /> + <None Remove="09-Manufacturer\02-ManufacturerMapping\**" /> + </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\..\Service\HStation.Service.Assets.Core\HStation.Service.Assets.Core.csproj" /> - </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\Service\HStation.Service.Assets.Core\HStation.Service.Assets.Core.csproj" /> + </ItemGroup> </Project> diff --git a/Service/HStation.Service.Assets.Core/00-core/MemoryCacheKey.cs b/Service/HStation.Service.Assets.Core/00-core/MemoryCacheKey.cs index 97af733..1e4fc14 100644 --- a/Service/HStation.Service.Assets.Core/00-core/MemoryCacheKey.cs +++ b/Service/HStation.Service.Assets.Core/00-core/MemoryCacheKey.cs @@ -3,7 +3,7 @@ /// <summary> /// 鍐呭瓨缂撳瓨閿�-涓轰互鍚庡鍔犳竻闄ょ紦瀛樺仛鍑嗗 /// </summary> - internal class MemoryCacheKey + public class MemoryCacheKey { /// <summary> /// 鏈嶅姟灞傜骇 @@ -18,7 +18,7 @@ /// <summary> /// BLL灞傜骇 /// </summary> - public const string BllLevel = "BLL"; + public const string BLLLevel = "BLL"; /// <summary> /// 妯″潡 diff --git a/Service/HStation.Service.Assets.Core/04-dal/02-postgresql/21-cooling/AssetsCoolingFactor.cs b/Service/HStation.Service.Assets.Core/04-dal/02-postgresql/21-cooling/AssetsCoolingFactor.cs new file mode 100644 index 0000000..0b2088c --- /dev/null +++ b/Service/HStation.Service.Assets.Core/04-dal/02-postgresql/21-cooling/AssetsCoolingFactor.cs @@ -0,0 +1,18 @@ +锘縰sing Yw.DAL.PostgreSql; + +namespace HStation.DAL.PostgreSql +{ + /// <summary> + /// + /// </summary> + public partial class AssetsCoolingFactor : BaseDAL_Sorter<Entity.AssetsCoolingFactor>, IAssetsCoolingFactor + { + /// <summary> + /// + /// </summary> + public override ConnectionConfig ConnectionConfig + { + get { return Assets.ConfigHelper.PostgreSqlConnectionConfig; } + } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Assets.Core/04-dal/02-postgresql/21-cooling/AssetsCoolingMain.cs b/Service/HStation.Service.Assets.Core/04-dal/02-postgresql/21-cooling/AssetsCoolingMain.cs new file mode 100644 index 0000000..921a3da --- /dev/null +++ b/Service/HStation.Service.Assets.Core/04-dal/02-postgresql/21-cooling/AssetsCoolingMain.cs @@ -0,0 +1,30 @@ +锘縰sing Yw.DAL.PostgreSql; + +namespace HStation.DAL.PostgreSql +{ + /// <summary> + /// + /// </summary> + public partial class AssetsCoolingMain : BaseDAL_Paras_Flags_TagName_Sorter<Entity.AssetsCoolingMain>, IAssetsCoolingMain + { + /// <summary> + /// + /// </summary> + public override ConnectionConfig ConnectionConfig + { + get { return Assets.ConfigHelper.PostgreSqlConnectionConfig; } + } + + /// <summary> + /// + /// </summary> + public List<Entity.AssetsCoolingMain> GetBySeriesID(long SeriesID) + { + using (var db = new SqlSugarClient(ConnectionConfig)) + { + return db.Queryable<Entity.AssetsCoolingMain>() + .Where(x => x.SeriesID == SeriesID).ToList(); + } + } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Assets.Core/04-dal/02-postgresql/21-cooling/AssetsCoolingSeries.cs b/Service/HStation.Service.Assets.Core/04-dal/02-postgresql/21-cooling/AssetsCoolingSeries.cs new file mode 100644 index 0000000..ea5b334 --- /dev/null +++ b/Service/HStation.Service.Assets.Core/04-dal/02-postgresql/21-cooling/AssetsCoolingSeries.cs @@ -0,0 +1,18 @@ +锘縰sing Yw.DAL.PostgreSql; + +namespace HStation.DAL.PostgreSql +{ + /// <summary> + /// + /// </summary> + public partial class AssetsCoolingSeries : BaseDAL_Paras_Flags_TagName_TreeSorter<Entity.AssetsCoolingSeries>, IAssetsCoolingSeries + { + /// <summary> + /// + /// </summary> + public override ConnectionConfig ConnectionConfig + { + get { return Assets.ConfigHelper.PostgreSqlConnectionConfig; } + } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Assets.Core/04-dal/03-sqlite/21-cooling/AssetsCoolingFactor.cs b/Service/HStation.Service.Assets.Core/04-dal/03-sqlite/21-cooling/AssetsCoolingFactor.cs new file mode 100644 index 0000000..d92cb9d --- /dev/null +++ b/Service/HStation.Service.Assets.Core/04-dal/03-sqlite/21-cooling/AssetsCoolingFactor.cs @@ -0,0 +1,18 @@ +锘縰sing Yw.DAL.SQLite; + +namespace HStation.DAL.SQLite +{ + /// <summary> + /// + /// </summary> + public partial class AssetsCoolingFactor : BaseDAL_Sorter<Entity.AssetsCoolingFactor>, IAssetsCoolingFactor + { + /// <summary> + /// + /// </summary> + public override ConnectionConfig ConnectionConfig + { + get { return Assets.ConfigHelper.SQLiteConnectionConfig; } + } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Assets.Core/04-dal/03-sqlite/21-cooling/AssetsCoolingMain.cs b/Service/HStation.Service.Assets.Core/04-dal/03-sqlite/21-cooling/AssetsCoolingMain.cs new file mode 100644 index 0000000..2417732 --- /dev/null +++ b/Service/HStation.Service.Assets.Core/04-dal/03-sqlite/21-cooling/AssetsCoolingMain.cs @@ -0,0 +1,30 @@ +锘縰sing Yw.DAL.SQLite; + +namespace HStation.DAL.SQLite +{ + /// <summary> + /// + /// </summary> + public partial class AssetsCoolingMain : BaseDAL_Paras_Flags_TagName_Sorter<Entity.AssetsCoolingMain>, IAssetsCoolingMain + { + /// <summary> + /// + /// </summary> + public override ConnectionConfig ConnectionConfig + { + get { return Assets.ConfigHelper.SQLiteConnectionConfig; } + } + + /// <summary> + /// + /// </summary> + public List<Entity.AssetsCoolingMain> GetBySeriesID(long SeriesID) + { + using (var db = new SqlSugarClient(ConnectionConfig)) + { + return db.Queryable<Entity.AssetsCoolingMain>() + .Where(x => x.SeriesID == SeriesID).ToList(); + } + } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Assets.Core/04-dal/03-sqlite/21-cooling/AssetsCoolingSeries.cs b/Service/HStation.Service.Assets.Core/04-dal/03-sqlite/21-cooling/AssetsCoolingSeries.cs new file mode 100644 index 0000000..230a4b9 --- /dev/null +++ b/Service/HStation.Service.Assets.Core/04-dal/03-sqlite/21-cooling/AssetsCoolingSeries.cs @@ -0,0 +1,18 @@ +锘縰sing Yw.DAL.SQLite; + +namespace HStation.DAL.SQLite +{ + /// <summary> + /// + /// </summary> + public partial class AssetsCoolingSeries : BaseDAL_Paras_Flags_TagName_TreeSorter<Entity.AssetsCoolingSeries>, IAssetsCoolingSeries + { + /// <summary> + /// + /// </summary> + public override ConnectionConfig ConnectionConfig + { + get { return Assets.ConfigHelper.SQLiteConnectionConfig; } + } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Assets.Core/05-service/21-cooling/03-factor/AssetsCoolingFactor.cs b/Service/HStation.Service.Assets.Core/05-service/21-cooling/03-factor/AssetsCoolingFactor.cs index 36490f5..9c92c02 100644 --- a/Service/HStation.Service.Assets.Core/05-service/21-cooling/03-factor/AssetsCoolingFactor.cs +++ b/Service/HStation.Service.Assets.Core/05-service/21-cooling/03-factor/AssetsCoolingFactor.cs @@ -121,6 +121,19 @@ return all.Where(x => Ids.Contains(x.ID)).ToList(); } + /// <summary> + /// 鑾峰彇鏈�澶ф帓搴忕爜 + /// </summary> + public int GetMaxSortCode() + { + var all = GetAll(); + if (all == null || all.Count < 1) + { + return 0; + } + return all.Max(x => x.SortCode); + } + #endregion #region Insert diff --git a/Service/HStation.Service.Assets.Core/paras_hstation_assets_settings.json b/Service/HStation.Service.Assets.Core/paras_hstation_assets_settings.json index 5f1b6a8..73fa8c6 100644 --- a/Service/HStation.Service.Assets.Core/paras_hstation_assets_settings.json +++ b/Service/HStation.Service.Assets.Core/paras_hstation_assets_settings.json @@ -1,7 +1,7 @@ { "$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json", - "Xhs": { + "Assets": { "DataBase": { "DbType": "SQLite", //PostgreSql/SQLite "Factory": { @@ -9,13 +9,13 @@ "CacheTime": 10 }, "PostgreSql": { - "ConnectString": "PORT=5432;DATABASE=hstation_xhs;HOST=localhost;PASSWORD=123456;USER ID=postgres;" + "ConnectString": "PORT=5432;DATABASE=hstation_assets;HOST=localhost;PASSWORD=123456;USER ID=postgres;" }, "SQLite": { - "ConnectString": "Data Source=hstation_assets_xhs.db;" + "ConnectString": "Data Source=hstation_assets.db;" } }, - "DataFolder": "Xhs", + "DataFolder": "Assets", "CAL": { "CALType": "LocalClient", //HttpClient/LocalClient "HttpClient": { @@ -23,10 +23,6 @@ }, "LocalClient": { } - }, - "File": { - "Suffix": ".ywrvt", - "Password": "123456" } } } \ No newline at end of file diff --git a/Vmo/HStation.Vmo.Assets.Core/21-cooling/01-series/AssetsCoolingSeriesVmo.cs b/Vmo/HStation.Vmo.Assets.Core/21-cooling/01-series/AssetsCoolingSeriesVmo.cs new file mode 100644 index 0000000..4f1d85b --- /dev/null +++ b/Vmo/HStation.Vmo.Assets.Core/21-cooling/01-series/AssetsCoolingSeriesVmo.cs @@ -0,0 +1,68 @@ +锘縩amespace HStation.Vmo +{ + /// <summary> + /// 鍐峰嵈濉旂郴鍒� + ///</summary> + public class AssetsCoolingSeriesVmo + { + /// <summary> + /// + /// </summary> + public AssetsCoolingSeriesVmo() { } + + /// <summary> + /// + /// </summary> + public AssetsCoolingSeriesVmo(AssetsCoolingSeriesDto rhs) + { + this.ID = rhs.ID; + this.ParentID = rhs.ParentID; + this.Name = rhs.Name; + this.Paras = rhs.Paras; + this.Flags = rhs.Flags; + this.TagName = rhs.TagName; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + } + + /// <summary> + /// id + /// </summary> + public long ID { get; set; } + + /// <summary> + /// 鐖剁骇id + /// </summary> + public long ParentID { get; set; } + + /// <summary> + /// 鍚嶇О + /// </summary> + public string Name { get; set; } + + /// <summary> + /// 鍙傛暟 + /// </summary> + public Dictionary<string, string> Paras { get; set; } + + /// <summary> + /// 鏍囩 + /// </summary> + public List<string> Flags { get; set; } + + /// <summary> + /// 鏍囧織 + /// </summary> + public string TagName { get; set; } + + /// <summary> + /// 鎺掑簭鐮� + /// </summary> + public int SortCode { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/Vmo/HStation.Vmo.Assets.Core/21-cooling/02-main/AssetsCoolingMainVmo.cs b/Vmo/HStation.Vmo.Assets.Core/21-cooling/02-main/AssetsCoolingMainVmo.cs new file mode 100644 index 0000000..1738823 --- /dev/null +++ b/Vmo/HStation.Vmo.Assets.Core/21-cooling/02-main/AssetsCoolingMainVmo.cs @@ -0,0 +1,98 @@ +锘縩amespace HStation.Vmo +{ + /// <summary> + /// 鍐峰嵈濉斿瀷鍙� + ///</summary> + public class AssetsCoolingMainVmo + { + /// <summary> + /// + /// </summary> + public AssetsCoolingMainVmo() { } + + /// <summary> + /// + /// </summary> + public AssetsCoolingMainVmo(AssetsCoolingMainDto rhs) + { + this.ID = rhs.ID; + this.SeriesID = rhs.SeriesID; + this.Name = rhs.Name; + this.Material = rhs.Material; + this.Caliber = rhs.Caliber; + this.Coefficient = rhs.Coefficient; + this.LowerLimit = rhs.LowerLimit; + this.KeyWords = rhs.KeyWords; + this.Paras = rhs.Paras; + this.Flags = rhs.Flags; + this.TagName = rhs.TagName; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + } + + /// <summary> + /// id + /// </summary> + public long ID { get; set; } + + /// <summary> + /// 绯诲垪id + /// </summary> + public long SeriesID { get; set; } + + /// <summary> + /// 鍚嶇О + /// </summary> + public string Name { get; set; } + + /// <summary> + /// 鏉愭枡 + /// </summary> + public string Material { get; set; } + + /// <summary> + /// 鍙e緞 mm + /// </summary> + public double? Caliber { get; set; } + + /// <summary> + /// 鍠峰皠绯绘暟 + /// </summary> + public double Coefficient { get; set; } + + /// <summary> + /// 鏈�灏忓帇鍔� m + /// </summary> + public double LowerLimit { get; set; } + + /// <summary> + /// 鍏抽敭瀛� + /// </summary> + public List<string> KeyWords { get; set; } + + /// <summary> + /// 鍙傛暟 + /// </summary> + public Dictionary<string, string> Paras { get; set; } + + /// <summary> + /// 鏍囩 + /// </summary> + public List<string> Flags { get; set; } + + /// <summary> + /// 鏍囧織 + /// </summary> + public string TagName { get; set; } + + /// <summary> + /// 鎺掑簭鐮� + /// </summary> + public int SortCode { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/Vmo/HStation.Vmo.Assets.Core/21-cooling/03-factor/AssetsCoolingFactorVmo.cs b/Vmo/HStation.Vmo.Assets.Core/21-cooling/03-factor/AssetsCoolingFactorVmo.cs new file mode 100644 index 0000000..b6f9320 --- /dev/null +++ b/Vmo/HStation.Vmo.Assets.Core/21-cooling/03-factor/AssetsCoolingFactorVmo.cs @@ -0,0 +1,68 @@ +锘縩amespace HStation.Vmo +{ + /// <summary> + /// 鍐峰嵈濉旂郴鏁� + ///</summary> + public class AssetsCoolingFactorVmo + { + /// <summary> + /// + /// </summary> + public AssetsCoolingFactorVmo() { } + + /// <summary> + /// + /// </summary> + public AssetsCoolingFactorVmo(AssetsCoolingFactorDto rhs) + { + this.ID = rhs.ID; + this.Name = rhs.Name; + this.Material = rhs.Material; + this.Caliber = rhs.Caliber; + this.Coefficient = rhs.Coefficient; + this.LowerLimit = rhs.LowerLimit; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + } + + /// <summary> + /// id + /// </summary> + public long ID { get; set; } + + /// <summary> + /// 鍚嶇О + /// </summary> + public string Name { get; set; } + + /// <summary> + /// 鏉愭枡 + /// </summary> + public string Material { get; set; } + + /// <summary> + /// 鍙e緞 + /// </summary> + public double? Caliber { get; set; } + + /// <summary> + /// 鍠峰皠绯绘暟 + /// </summary> + public double Coefficient { get; set; } + + /// <summary> + /// 鏈�灏忓帇鍔� m + /// </summary> + public double LowerLimit { get; set; } + + /// <summary> + /// 鎺掑簭鐮� + /// </summary> + public int SortCode { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/Vmo/HStation.Vmo.Assets.Core/GlobalUsings.cs b/Vmo/HStation.Vmo.Assets.Core/GlobalUsings.cs index 7713d4d..9cdd968 100644 --- a/Vmo/HStation.Vmo.Assets.Core/GlobalUsings.cs +++ b/Vmo/HStation.Vmo.Assets.Core/GlobalUsings.cs @@ -1 +1,2 @@ 锘縢lobal using Yw.Vmo; +global using HStation.Dto; \ No newline at end of file diff --git a/Vmo/HStation.Vmo.Assets.Core/HStation.Vmo.Assets.Core.csproj b/Vmo/HStation.Vmo.Assets.Core/HStation.Vmo.Assets.Core.csproj index 8ccda63..2776fc7 100644 --- a/Vmo/HStation.Vmo.Assets.Core/HStation.Vmo.Assets.Core.csproj +++ b/Vmo/HStation.Vmo.Assets.Core/HStation.Vmo.Assets.Core.csproj @@ -3,7 +3,7 @@ <PropertyGroup> <TargetFramework>net6.0</TargetFramework> <ImplicitUsings>enable</ImplicitUsings> - <Nullable>enable</Nullable> + <Nullable>disable</Nullable> </PropertyGroup> <ItemGroup> -- Gitblit v1.9.3