From 7bf79c6515f27ba9be8d2b3fb4e3ceae5718e3e5 Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期四, 18 七月 2024 17:48:45 +0800 Subject: [PATCH] 提交修改 --- BLL/HStation.BLL.Assets.Core/04-bll/01-ProjectItem/03-projectItemModel/XhsProjectItemModel.cs | 177 BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProject/IXhsProjectItem.cs | 13 HStation.Dto.Assets.Core/00-PumpProduct/02-PumpGroup/PumpGroupDto.cs | 62 WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/AddPumpProductSeriesDlg.resx | 0 BLL/HStation.BLL.Assets.Core/04-bll/02-PumpProdcuct/02-PumpGroup/PumpGroup.cs | 164 HStation.Dto.Assets.Core/00-PumpProduct/03-PumpMain/PumpMainDto.cs | 60 WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/HStation.WinFrmUI.Xhs.ModuleViewModel.datasource | 0 Service/HStation.Service.Assets.Core/00-core/ConfigHelper.cs | 0 BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProduct/IPumpPartMain.cs | 11 BLL/HStation.BLL.Xhs.Core/04-bll/02-PumpProdcuct/02-PumpGroup/PumpGroup.cs | 164 BLL/HStation.BLL.Assets.Core/04-bll/01-ProjectItem/04-projectItemModelMap/XhsProjectItemModelMap.cs | 132 WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/00-DocumentPage/MainForm.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/AddPumpProductGroupDlg.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/PumpPartDlg.Designer.cs | 38 Service/HStation.Service.Assets.Core/03-service/05-PumpPartMain/Cache/PumpPartMainCacheHelper.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/00-DocumentPage/ObjectType.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/00-ViewModel/PropGroupChoiceViewModel.cs | 1 BLL/HStation.BLL.Assets.Core/03-localclient/PumpProduct/PumpGroup.cs | 283 + Model/HStation.Model.Assets.Core/00-PumpProduct/PumpGroup.cs | 0 WinFrmUI/HStation.WinFrmUI.Xhs.Curve/GlobalUsing.cs | 1 BLL/HStation.BLL.Xhs.Core/HStation.BLL.Xhs.Core.csproj | 12 Service/HStation.Service.Assets.Core/01-entity/PumpPropContent.cs | 4 WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-扩展类/ControlNavigatorExtend.cs | 0 WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-HomePageMainPanel/AddXhsProjectDlg.cs | 2 Model/HStation.Model.Assets.Core/00-PumpProduct/PumpPartMain.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-扩展类/ListBoxControlExtend.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/TypeViewModel.datasource | 0 BLL/HStation.BLL.Xhs.Core/03-localclient/PumpProject/XhsProject.cs | 313 + WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/02-提示弹窗/MessageBoxHelper.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-扩展类/ControlExtend.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/00-DocumentPage/DocumentPage.resx | 0 BLL/HStation.BLL.Assets.Core/HStation.BLL.Xhs.Core.csproj | 22 BLL/HStation.BLL.Xhs.Core/04-bll/02-PumpProdcuct/03-PumpMain/PumpMain.cs | 184 Service/HStation.Service.Assets.Core/03-service/02-PumpGroup/PumpGroup.cs | 0 BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProduct/IPumpGroupAndMainMap.cs | 12 Service/HStation.Service.Assets.Core/00-core/Flags.cs | 0 BLL/HStation.BLL.Assets.Core/03-localclient/Pump/PumpGroup.cs | 283 + HStation.Dto.Assets.Core/00-PumpProduct/03-PumpMain/AddPumpMainDto.cs | 75 WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/PumpProductMainPanel.Designer.cs | 24 WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/HStation.WinFrmUI.Xhs.CatlogViewModel.datasource | 0 BLL/HStation.BLL.Assets.Core/04-bll/02-PumpProdcuct/01-PumpSeries/PumpSeries.cs | 183 WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-扩展类/LayoutControlExtensions.cs | 0 BLL/HStation.BLL.Xhs.Core/03-localclient/Pump/PumpGroupAndMainMap.cs | 247 WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-扩展类/BandGridViewExtend.cs | 0 WinFrmUI/HStation.WinFrmUI.Core/00-UICore/01-用户登陆类/LoginUser.cs | 0 BLL/HStation.BLL.Xhs.Core/03-localclient/PumpProject/XhsProjectItemModelMap.cs | 225 BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProject/IXhsProject.cs | 21 BLL/HStation.BLL.Xhs.Core/02-httpclient/XhsProjectItemModelMap.cs | 15 HStation.Dto.Assets.Core/00-PumpProduct/07-PumpMainAndPartMap/UpdatePumpMainAndPartMapDto.cs | 28 BLL/HStation.BLL.Assets.Core/03-localclient/XhsProjectItem.cs | 289 + BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProduct/IPumpMain.cs | 16 BLL/HStation.BLL.Assets.Core/02-httpclient/XhsProjectItem.cs | 20 Service/HStation.Service.Assets.Core/03-service/05-PumpPartMain/PumpPartMain_Instance.cs | 0 BLL/HStation.BLL.Assets.Core/01-interface/IPumpProduct/IPumpPartPropContent.cs | 11 BLL/HStation.BLL.Xhs.Core/03-localclient/PumpProduct/PumpGroupAndMainMap.cs | 247 Desktop/HStation.DeskTop.Xhs.Main/HStation.Desktop.Xhs.Main.csproj | 2 BLL/HStation.BLL.Assets.Core/03-localclient/XhsProjectItemModelMap.cs | 225 BLL/HStation.BLL.Xhs.Core/04-bll/02-PumpProdcuct/05-PumpPartMain/PumpPartMain.cs | 122 Model/HStation.Model.Assets.Core/00-PumpProduct/PumpMain.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/00-DocumentPage/SurfaceGuid.cs | 0 BLL/HStation.BLL.Xhs.Core/04-bll/01-ProjectItem/02-projectItem/XhsProjectItem.cs | 180 WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/EditPumpProductGroupDlg.resx | 0 BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProduct/IPumpSeries.cs | 17 BLL/HStation.BLL.Assets.Core/01-interface/IPumpProduct/IPumpGroupAndMainMap.cs | 12 BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProduct/IPumpPartPropContent.cs | 11 WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/ProjectModelViewModel.datasource | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-扩展类/TextEditExtend.cs | 0 BLL/HStation.BLL.Xhs.Core/04-bll/01-ProjectItem/03-projectItemModel/XhsProjectItemModel.cs | 177 HStation.Dto.Assets.Core/00-PumpProduct/04-PumpMaping/AddPumpMainDto.cs | 35 HStation.Dto.Assets.Core/00-PumpProduct/05-PumpPartMain/PumpPartMainDto.cs | 45 Service/HStation.Service.Assets.Core/03-service/03-PumpMain/PumpMain_Instance.cs | 0 HStation.Dto.Assets.Core/00-PumpProduct/01-PumpSeries/PumpSeriesDto.cs | 74 Service/HStation.Service.Assets.Core/03-service/03-PumpMain/Cache/PumpMainCacheHelper.cs | 0 Service/HStation.Service.Assets.Core/01-entity/PumpMain.cs | 4 BLL/HStation.BLL.Xhs.Core/04-bll/02-PumpProdcuct/04-PumpGroupAndMainMap/PumpGroupAndMainMap.cs | 152 Service/HStation.Service.Assets.Core/02-settings/00-core/XhsFileHelper.cs | 0 BLL/HStation.BLL.Assets.Core/01-interface/IPumpProduct/IPumpGroup.cs | 17 BLL/HStation.BLL.Assets.Core/01-interface/IPumpProduct/IPumpMain.cs | 16 BLL/HStation.BLL.Assets.Core/04-bll/02-PumpProdcuct/03-PumpMain/PumpMain.cs | 184 Service/HStation.Service.Assets.Core/03-service/07-PumpMainAndPartMap/PumpMainAndPartMap_Instance.cs | 0 Service/HStation.Service.Assets.Core/02-settings/01-paras/01-database/Paras_Xhs_DataBase_PostgreSql.cs | 0 BLL/HStation.BLL.Assets.Core/01-interface/IPumpProject/IXhsProject.cs | 21 BLL/HStation.BLL.Xhs.Core/03-localclient/PumpProduct/PumpGroup.cs | 283 + Service/HStation.Service.Assets.Core/02-dal/01-interface/IPumpPartMain.cs | 0 BLL/HStation.BLL.Assets.Core/04-bll/00-core/CALCreateHelper.cs | 19 WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/PumpPartDlg.cs | 31 WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/PumpProductMainPanel.cs | 22 WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/HStation.WinFrmUI.Xhs.PropGroupTreeListViewModel.datasource | 0 HStation.Dto.Assets.Core/00-PumpProduct/04-PumpMaping/UpdatePumpMainDto.cs | 43 WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/03-文件帮助类/ExcelSaveFilePathHelper.cs | 0 BLL/HStation.BLL.Assets.Core/03-localclient/PumpProduct/PumpMain.cs | 315 + WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/EditPumpProductMainDlg.Designer.cs | 0 BLL/HStation.BLL.Assets.Core/04-bll/01-ProjectItem/02-projectItem/XhsProjectItem.cs | 180 Service/HStation.Service.Assets.Core/03-service/01-PumpSeries/PumpSeries_Instance.cs | 0 BLL/HStation.BLL.Xhs.Core/03-localclient/PumpProject/XhsProjectItemModel.cs | 289 + WinFrmUI/HStation.WinFrmUI.Assets.Core/GlobalUsing.cs | 1 HStation.Dto.Assets.Core/00-PumpProduct/06-PumpPropContent/PumpPropContentDto.cs | 50 Service/HStation.Service.Assets.Core/02-dal/02-postgresql/PumpMapGroupAndMain.cs | 0 BLL/HStation.BLL.Assets.Core/04-bll/02-PumpProdcuct/06-PumpPropContent/PumpPartPropContent.cs | 122 WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/EditPumpProductGroupDlg.Designer.cs | 0 HStation.Dto.Assets.Core/00-PumpProduct/06-PumpPropContent/AddPumpPropContentDto.cs | 30 WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/AddPumpProductSeriesDlg.cs | 0 HStation.Dto.Assets.Core/00-PumpProduct/06-PumpPropContent/UpdatePumpPropContentDto.cs | 38 WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/EditPumpProductSeriesDlg.Designer.cs | 0 BLL/HStation.BLL.Assets.Core/02-httpclient/XhsProjectItemModelMap.cs | 15 Model/HStation.Model.Assets.Core/GlobalUsings.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/00-DocumentPage/PageDataSync.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-扩展类/FormExtend.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/PumpProductSeriesTreeListCtrl.resx | 0 BLL/HStation.BLL.Assets.Core/03-localclient/XhsProjectItemModel.cs | 289 + WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/AddPumpProductGroupDlg.Designer.cs | 0 WinFrmUI/HStation.WinFrmUI.Xhs.Curve/HStation.WinFrmUI.Xhs.Curve.csproj | 4 BLL/HStation.BLL.Assets.Core/03-localclient/PumpProject/XhsProjectItem.cs | 289 + Service/HStation.Service.Assets.Core/03-service/02-PumpGroup/Cache/PumpGroupCacheHelper.cs | 0 BLL/HStation.BLL.Xhs.Core/04-bll/01-ProjectItem/01-project/XhsProject.cs | 188 Service/HStation.Service.Assets.Core/03-service/04-PumpGroupAndMainMap/PumpMaping.cs | 0 Model/HStation.Model.Assets.Core/HStation.Model.Assets.Core.csproj | 0 Service/HStation.Service.Assets.Core/02-dal/02-postgresql/PumpSeries.cs | 0 Service/HStation.Service.Assets.Core/02-settings/01-paras/02-cal/Paras_Xhs_CAL_HttpClient.cs | 0 Service/HStation.Service.Assets.Core/03-service/04-PumpGroupAndMainMap/PumpMaping_Instance.cs | 0 HStation.Dto.Assets.Core/00-PumpProduct/04-PumpMaping/PumpMainDto.cs | 57 BLL/HStation.BLL.Xhs.Core/02-httpclient/XhsProjectItem.cs | 20 Service/HStation.Service.Assets.Core/02-dal/01-interface/IPumpGroupAndMainMap.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/EditPumpProductSeriesDlg.resx | 0 BLL/HStation.BLL.Assets.Core/02-httpclient/XhsProject.cs | 45 WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/00-DocumentPage/PageMenu.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/AddPumpProductMainDlg.cs | 55 Service/HStation.Service.Assets.Core/03-service/03-PumpMain/PumpMain.cs | 26 Service/HStation.Service.Assets.Core/03-service/06-PumpPropContent/Cache/PumpPropContentCacheHelper.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/AddPumpProductMainDlg.Designer.cs | 364 + Service/HStation.Service.Assets.Core/HStation.Service.Assets.Core.csproj | 2 BLL/HStation.BLL.Assets.Core/02-httpclient/XhsProjectItemModel.cs | 20 Service/HStation.Service.Assets.Core/03-service/05-PumpPartMain/PumpPartMain.cs | 13 WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/AddPumpProductMainDlg.resx | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/00-DocumentPage/ePageDataOperation.cs | 0 Desktop/HStation.DeskTop.Xhs.Main/Program.cs | 2 HStation.Dto.Assets.Core/00-PumpProduct/01-PumpSeries/AddPumpSeriesDto.cs | 50 Service/HStation.Service.Assets.Core/02-settings/01-paras/01-database/Paras_Xhs_DataBase_Factory.cs | 0 Service/HStation.Service.Assets.Core/02-settings/00-core/XhsParasHelper.cs | 0 BLL/HStation.BLL.Xhs.Core/03-localclient/PumpProject/XhsProjectItem.cs | 289 + Desktop/HStation.DeskTop.Xhs.Main/GuideMain.cs | 73 HStation.Dto.Assets.Core/00-PumpProduct/02-PumpGroup/UpdatePumpGroupDto.cs | 48 WinFrmUI/HStation.WinFrmUI.Xhs.Curve/HStation.WinFrmUI.Xhs.Curve.csproj.user | 6 WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/AddPumpProductGroupDlg.resx | 0 BLL/HStation.BLL.Assets.Core/01-interface/IPumpProject/IXhsProjectItemModel.cs | 13 WinFrmUI/HStation.WinFrmUI.Basic/HStation.WinFrmUI.Basic.csproj.user | 6 Service/HStation.Service.Assets.Core/03-service/04-PumpGroupAndMainMap/Cache/PumpGroupAndMainMapCacheHelper.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/EditPumpProductSeriesDlg.cs | 0 BLL/HStation.BLL.Assets.Core/01-interface/IPumpProduct/IPumpPartMain.cs | 11 BLL/HStation.BLL.Assets.Core/04-bll/01-ProjectItem/01-project/XhsProject.cs | 188 WinFrmUI/HStation.WinFrmUI.Basic/GlobalUsing.cs | 1 HStation.Dto.Assets.Core/00-PumpProduct/07-PumpMainAndPartMap/PumpMainAndPartMapDto.cs | 38 BLL/HStation.BLL.Assets.Core/04-bll/02-PumpProdcuct/05-PumpPartMain/PumpPartMain.cs | 122 Service/HStation.Service.Assets.Core/03-service/01-PumpSeries/PumpSeries.cs | 0 BLL/HStation.BLL.Xhs.Core/04-bll/02-PumpProdcuct/07-PumpMainAndPartMap/PumpPartPropContent.cs | 122 WinFrmUI/HStation.WinFrmUI.Core/GlobalUsing.cs | 1 WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/EditPumpProductMainDlg.resx | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj | 1 Service/HStation.Service.Assets.Core/02-dal/01-interface/IPumpPropContent.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/HStation.WinFrmUI.Xhs.PropGroupViewModel.datasource | 0 BLL/HStation.BLL.Xhs.Core/03-localclient/XhsProjectItem.cs | 289 + HStation.Dto.Assets.Core/00-PumpProduct/05-PumpPartMain/AddPumpPartMainDto.cs | 25 BLL/HStation.BLL.Xhs.Core/03-localclient/Pump/PumpGroup.cs | 283 + Model/HStation.Model.Assets.Core/00-PumpProduct/PumpMainAndPartMap.cs | 0 BLL/HStation.BLL.Assets.Core/03-localclient/PumpProject/XhsProject.cs | 313 + WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/EditPumpProductMainDlg.cs | 0 Service/HStation.Service.Assets.Core/02-settings/01-paras/02-cal/Paras_Xhs_CAL_LocalClient.cs | 0 Service/HStation.Service.Assets.Core/03-service/02-PumpGroup/PumpGroup_Instance.cs | 0 BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProject/IXhsProjectItemModelMap.cs | 11 BLL/HStation.BLL.Assets.Core/01-interface/IPumpProject/IXhsProjectItemModelMap.cs | 11 Model/HStation.Model.Xhs.Project/HStation.Model.Xhs.Project.csproj | 4 BLL/HStation.BLL.Xhs.Core/04-bll/02-PumpProdcuct/06-PumpPropContent/PumpPartPropContent.cs | 122 BLL/HStation.BLL.Xhs.Core/03-localclient/XhsProjectItemModel.cs | 289 + BLL/HStation.BLL.Xhs.Core/03-localclient/Pump/PumpSeries.cs | 291 + Service/HStation.Service.Assets.Core/02-settings/01-paras/01-database/Paras_Xhs_DataBase.cs | 0 Service/HStation.Service.Assets.Core/02-settings/01-paras/01-database/Paras_Xhs_DataBase_SQLite.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/00-DocumentPage/MainForm.resx | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-扩展类/DateEditExtend.cs | 0 Service/HStation.Service.Assets.Core/01-entity/PumpPartMain.cs | 4 BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProduct/IPumpMainAndPartMap.cs | 11 Service/HStation.Service.Assets.Core/00-core/Prop.cs | 0 Service/HStation.Service.Assets.Core/03-service/00-core/02-cache/CacheHelper.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-扩展类/TilePeekItemsExtensions.cs | 0 HStation.Dto.Assets.Core/HStation.Dto.Assets.Core.csproj | 13 BLL/HStation.BLL.Assets.Core/01-interface/IPumpProduct/IPumpMainAndPartMap.cs | 11 BLL/HStation.BLL.Xhs.Core/03-localclient/Pump/PumpMain.cs | 312 + Service/HStation.Service.Assets.Core/GlobalUsings.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/CurrentViewModel.datasource | 0 BLL/HStation.BLL.Xhs.Core/03-localclient/XhsProjectItemModelMap.cs | 225 WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-扩展类/RibbonControlExtend.cs | 0 WinFrmUI/Hstation.WinFrmUI.Core/Hstation.WinFrmUI.Core.csproj | 24 BLL/HStation.BLL.Xhs.Core/02-httpclient/XhsProject.cs | 45 WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/PumpProductMainPanel.resx | 3 BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProject/IXhsProjectItemModel.cs | 13 HStation.Dto.Assets.Core/00-PumpProduct/07-PumpMainAndPartMap/AddPumpMainAndPartMapDto.cs | 20 WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/00-DocumentPage/PageFunctionItem.cs | 0 Service/HStation.Service.Assets.Core/02-dal/01-interface/IPumpMain.cs | 2 BLL/HStation.BLL.Xhs.Core/04-bll/01-ProjectItem/04-projectItemModelMap/XhsProjectItemModelMap.cs | 132 BLL/HStation.BLL.Xhs.Core/04-bll/02-PumpProdcuct/01-PumpSeries/PumpSeries.cs | 183 HStation.Dto.Assets.Core/00-PumpProduct/03-PumpMain/UpdatePumpMainDto.cs | 83 WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-扩展类/TreeListExtend.cs | 0 Model/HStation.Model.Assets.Core/00-PumpProduct/PumpSeries.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-扩展类/MessageBoxShow.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/Resources.Designer.cs | 4 BLL/HStation.BLL.Assets.Core/01-interface/IPumpProject/IXhsProjectItem.cs | 13 BLL/HStation.BLL.Assets.Core/03-localclient/Pump/PumpMain.cs | 312 + WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-扩展类/DevHelper.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-扩展类/GridContorlExtend.cs | 0 BLL/HStation.BLL.Assets.Core/GlobalUsings.cs | 7 WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-扩展类/TileControlExtensions.cs | 0 BLL/HStation.BLL.Xhs.Core/03-localclient/XhsProject.cs | 313 + Service/HStation.Service.Assets.Core/02-dal/01-interface/IPumpGroup.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/ProjectViewModel.datasource | 0 Service/HStation.Service.Assets.Core/03-service/06-PumpPropContent/PumpPropContent.cs | 13 BLL/HStation.BLL.Assets.Core/03-localclient/PumpProduct/PumpGroupAndMainMap.cs | 247 HStation.Dto.Assets.Core/00-PumpProduct/01-PumpSeries/UpdatePumpSeriesDto.cs | 58 WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/00-DocumentPage/PageTitle.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-扩展类/XtraFormExtend.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/00-ViewModel/PumpMainViewModel.cs | 0 HStation.Dto.Assets.Core/00-PumpProduct/05-PumpPartMain/UpdatePumpPartMainDto.cs | 33 WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/Resources.resx | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-扩展类/ExtensionsDev.cs | 0 Service/HStation.Service.Assets.Core/02-settings/01-paras/00-core/XhsParas.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/00-DocumentPage/DocumentPage.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/03-文件帮助类/DataTabelToList.cs | 0 BLL/HStation.BLL.Assets.Core/01-interface/IPumpProduct/IPumpSeries.cs | 17 BLL/HStation.BLL.Assets.Core/04-bll/02-PumpProdcuct/07-PumpMainAndPartMap/PumpPartPropContent.cs | 122 Service/HStation.Service.Assets.Core/01-entity/PumpGroup.cs | 4 BLL/HStation.BLL.Assets.Core/00-core/Mapper.cs | 44 Model/HStation.Model.Assets.Core/00-PumpProduct/PumpPropContent.cs | 0 HStation.Xhs.Desktop.sln | 72 Service/HStation.Service.Assets.Core/03-service/07-PumpMainAndPartMap/PumpMainAndPartMap.cs | 13 BLL/HStation.BLL.Assets.Core/04-bll/02-PumpProdcuct/04-PumpGroupAndMainMap/PumpGroupAndMainMap.cs | 152 WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-扩展类/ClassUpdateVailDataHelper.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/PumpProductSeriesTreeListCtrl.cs | 0 Service/HStation.Service.Assets.Core/00-core/MemoryCacheKey.cs | 0 WinFrmUI/HStation.WinFrmUI.Core/00-UICore/00-提示弹窗/MessageBoxHelper.cs | 0 BLL/HStation.BLL.Assets.Core/00-core/ConfigHelper.cs | 13 WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-扩展类/TokenEditExtend.cs | 0 BLL/HStation.BLL.Assets.Core/03-localclient/PumpProject/XhsProjectItemModel.cs | 289 + Desktop/HStation.DeskTop.Xhs.Main/GlobalUsing.cs | 1 BLL/HStation.BLL.Assets.Core/03-localclient/PumpProject/XhsProjectItemModelMap.cs | 225 Service/HStation.Service.Assets.Core/02-dal/01-interface/IPumpSeries.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/PumpPartDlg.resx | 0 Service/HStation.Service.Assets.Core/DbFirstHelper.cs | 98 Service/HStation.Service.Assets.Core/01-entity/PumpSeries.cs | 4 WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj.user | 9 Service/HStation.Service.Assets.Core/03-service/06-PumpPropContent/PumpPropContent_Instance.cs | 0 Service/HStation.Service.Assets.Core/03-service/00-core/01-dal/DALCreateHelper.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/PumpProductSeriesTreeListCtrl.designer.cs | 0 Service/HStation.Service.Assets.Core/00-core/DataType.cs | 0 HStation.BLL.Assets.Core/HStation.BLL.Assets.Core.csproj | 9 Service/HStation.Service.Assets.Core/02-dal/01-interface/IPumpMainAndPartMap.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-扩展类/XtraChartHelper.cs | 0 BLL/HStation.BLL.Xhs.Core/02-httpclient/XhsProjectItemModel.cs | 20 WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-扩展类/GridViewExtend.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/00-ViewModel/TreelistViewModel.cs | 0 Service/HStation.Service.Assets.Core/02-settings/01-paras/02-cal/Paras_Xhs_CAL.cs | 0 Service/HStation.Service.Assets.Core/02-settings/01-paras/00-core/Paras_Xhs.cs | 0 HStation.Dto.Assets.Core/00-PumpProduct/02-PumpGroup/AddPumpGroupDto.cs | 40 WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-扩展类/ButtonEditExtend.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/HStation.WinFrmUI.Xhs.PropViewModel.datasource | 0 BLL/HStation.BLL.Assets.Core/03-localclient/Pump/PumpGroupAndMainMap.cs | 247 BLL/HStation.BLL.Xhs.Core/03-localclient/PumpProduct/PumpSeries.cs | 291 + Service/HStation.Service.Assets.Core/01-entity/PumpGroupAndMainMap.cs | 4 BLL/HStation.BLL.Assets.Core/03-localclient/Pump/PumpSeries.cs | 291 + BLL/HStation.BLL.Assets.Core/03-localclient/XhsProject.cs | 313 + WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-扩展类/ImageExtend.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/PropGroupChoiceViewModel.datasource | 0 Model/HStation.Model.Assets.Core/00-PumpProduct/PumpGroupAndMainMap.cs | 0 Service/HStation.Service.Assets.Core/03-service/01-PumpSeries/Cache/PumpSeriesCacheHelper.cs | 0 BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProduct/IPumpGroup.cs | 17 Service/HStation.Service.Assets.Core/01-entity/PumpMainAndPartMap.cs | 44 WinFrmUI/Yw.WinFrmUI.Core/06-document/DocumentPage.cs | 32 WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/AddPumpProductSeriesDlg.Designer.cs | 0 Service/HStation.Service.Assets.Core/02-dal/02-postgresql/PumpGroup.cs | 0 /dev/null | 91 BLL/HStation.BLL.Xhs.Core/03-localclient/PumpProduct/PumpMain.cs | 315 + Service/HStation.Service.Assets.Core/02-dal/02-postgresql/PumpMain.cs | 145 WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-扩展类/LookUpEditExtend.cs | 0 WinFrmUI/HStation.WinFrmUI.Core/00-UICore/01-用户登陆类/gloabparas.cs | 108 BLL/HStation.BLL.Assets.Core/03-localclient/PumpProduct/PumpSeries.cs | 291 + WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-扩展类/SearchLookUpEditExtend.cs | 0 WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/EditPumpProductGroupDlg.cs | 0 WinFrmUI/HStation.WinFrmUI.Core/HStation.WinFrmUI.Core.csproj.user | 4 Service/HStation.Service.Assets.Core/03-service/07-PumpMainAndPartMap/Cache/PumpMainAndPartMapCacheHelper.cs | 0 286 files changed, 15,085 insertions(+), 373 deletions(-) diff --git a/BLL/HStation.BLL.Assets.Core/00-core/ConfigHelper.cs b/BLL/HStation.BLL.Assets.Core/00-core/ConfigHelper.cs new file mode 100644 index 0000000..3fde54f --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/00-core/ConfigHelper.cs @@ -0,0 +1,13 @@ +锘縩amespace HStation.BLL.Xhs +{ + internal class ConfigHelper + { + /// <summary> + /// + /// </summary> + public static string HttpUrl + { + get { return Settings.XhsParasHelper.Xhs.CAL.HttpClient.HttpUrl; } + } + } +} diff --git a/BLL/HStation.BLL.Assets.Core/00-core/Mapper.cs b/BLL/HStation.BLL.Assets.Core/00-core/Mapper.cs new file mode 100644 index 0000000..49d4254 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/00-core/Mapper.cs @@ -0,0 +1,44 @@ +锘縩amespace HStation.BLL.Xhs +{ + /// <summary> + /// + /// </summary> + public class Mapper : IRegister + { + /// <summary> + /// + /// </summary> + /// <param name="config"></param> + public void Register(TypeAdapterConfig config) + { + #region project + + config.ForType<AddXhsProjectItemInput, Model.XhsProject>() + .Map(dest => dest.Paras, src => src.Paras) + .Map(dest => dest.Flags, src => src.Flags) + .Map(dest => dest.UseStatus, src => Yw.Model.eUseStatus.Enable); + + config.ForType<UpdateXhsProjectInput, Model.XhsProject>() + .Map(dest => dest.Paras, src => src.Paras) + .Map(dest => dest.Flags, src => src.Flags); + + config.ForType<Model.XhsProject, XhsProjectItemDto>() + .Map(dest => dest.Paras, src => src.Paras) + .Map(dest => dest.Flags, src => src.Flags); + + config.ForType<AddPumpSeriesDto, Model.PumpSeries>() + .Map(dest => dest.Paras, src => src.Paras) + .Map(dest => dest.Flags, src => src.Flags); + + config.ForType<UpdatePumpSeriesDto, Model.PumpSeries>() + .Map(dest => dest.Paras, src => src.Paras) + .Map(dest => dest.Flags, src => src.Flags); + + config.ForType<Model.PumpSeries, PumpSeriesDto>() + .Map(dest => dest.Paras, src => src.Paras) + .Map(dest => dest.Flags, src => src.Flags); + + #endregion project + } + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/01-interface/IPumpProduct/IPumpGroup.cs b/BLL/HStation.BLL.Assets.Core/01-interface/IPumpProduct/IPumpGroup.cs new file mode 100644 index 0000000..3f4ffed --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/01-interface/IPumpProduct/IPumpGroup.cs @@ -0,0 +1,17 @@ +锘縰sing Yw.CAL; + +namespace HStation.CAL +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public interface IPumpGroup : IBaseCAL<AddPumpGroupDto, UpdatePumpGroupDto, PumpGroupDto>, IUpdateParas, IUpdateFlags, IUpdateTagName, IUpdateSorter + { + /// <summary> + /// 鍒犻櫎鎷撳睍 + /// </summary> + /// <param name="ID"></param> + /// <returns></returns> + bool DeleteEx(long ID); + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/01-interface/IPumpProduct/IPumpGroupAndMainMap.cs b/BLL/HStation.BLL.Assets.Core/01-interface/IPumpProduct/IPumpGroupAndMainMap.cs new file mode 100644 index 0000000..483c2c2 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/01-interface/IPumpProduct/IPumpGroupAndMainMap.cs @@ -0,0 +1,12 @@ +锘縰sing Yw.CAL; + +namespace HStation.CAL +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public interface IPumpGroupAndMainMap : IBaseCAL<AddPumpGroupAndMainMapDto, UpdatePumpGroupAndMainMapDto, PumpGroupAndMainMapDto>, IUpdateParas, IUpdateFlags, IUpdateTagName + { + List<long> GetByGroupID(long ID); + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/01-interface/IPumpProduct/IPumpMain.cs b/BLL/HStation.BLL.Assets.Core/01-interface/IPumpProduct/IPumpMain.cs new file mode 100644 index 0000000..884aec9 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/01-interface/IPumpProduct/IPumpMain.cs @@ -0,0 +1,16 @@ +锘縰sing Yw.CAL; + +namespace HStation.CAL +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public interface IPumpMain : IBaseCAL<AddPumpMainDto, UpdatePumpMainDto, PumpMainDto>, IUpdateParas, IUpdateFlags, IUpdateTagName, IUpdateSorter + { + Task<List<PumpMainDto>> GetByPumpSeriesID(long ID); + + Task<long> InsertEx(AddPumpMainDto input, AddPumpGroupAndMainMapDto map); + + Task<bool> DeleteMapByMainID(long ID); + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/01-interface/IPumpProduct/IPumpMainAndPartMap.cs b/BLL/HStation.BLL.Assets.Core/01-interface/IPumpProduct/IPumpMainAndPartMap.cs new file mode 100644 index 0000000..5201252 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/01-interface/IPumpProduct/IPumpMainAndPartMap.cs @@ -0,0 +1,11 @@ +锘縰sing Yw.CAL; + +namespace HStation.CAL +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public interface IPumpMainAndPartMap : IBaseCAL<AddPumpMainAndPartMapDto, UpdatePumpMainAndPartMapDto, PumpMainAndPartMapDto> + { + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/01-interface/IPumpProduct/IPumpPartMain.cs b/BLL/HStation.BLL.Assets.Core/01-interface/IPumpProduct/IPumpPartMain.cs new file mode 100644 index 0000000..04829bc --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/01-interface/IPumpProduct/IPumpPartMain.cs @@ -0,0 +1,11 @@ +锘縰sing Yw.CAL; + +namespace HStation.CAL +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public interface IPumpPartMain : IBaseCAL<AddPumpPartMainDto, UpdatePumpPartMainDto, PumpPartMainDto> + { + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/01-interface/IPumpProduct/IPumpPartPropContent.cs b/BLL/HStation.BLL.Assets.Core/01-interface/IPumpProduct/IPumpPartPropContent.cs new file mode 100644 index 0000000..0220840 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/01-interface/IPumpProduct/IPumpPartPropContent.cs @@ -0,0 +1,11 @@ +锘縰sing Yw.CAL; + +namespace HStation.CAL +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public interface IPumpPartPropContent : IBaseCAL<AddPumpPropContentDto, UpdatePumpPropContentDto, PumpPropContentDto> + { + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/01-interface/IPumpProduct/IPumpSeries.cs b/BLL/HStation.BLL.Assets.Core/01-interface/IPumpProduct/IPumpSeries.cs new file mode 100644 index 0000000..8b983a2 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/01-interface/IPumpProduct/IPumpSeries.cs @@ -0,0 +1,17 @@ +锘縰sing Yw.CAL; + +namespace HStation.CAL +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public interface IPumpSeries : IBaseCAL<AddPumpSeriesDto, UpdatePumpSeriesDto, PumpSeriesDto>, IUpdateParas, IUpdateFlags, IUpdateTagName, IUpdateSorter, IUpdateUseStatus + { + /// <summary> + /// 鍒犻櫎鎷撳睍 + /// </summary> + /// <param name="ID"></param> + /// <returns></returns> + bool DeleteEx(long ID); + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/01-interface/IPumpProject/IXhsProject.cs b/BLL/HStation.BLL.Assets.Core/01-interface/IPumpProject/IXhsProject.cs new file mode 100644 index 0000000..e6cfa69 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/01-interface/IPumpProject/IXhsProject.cs @@ -0,0 +1,21 @@ +锘縰sing Yw.CAL; + +namespace HStation.CAL +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public interface IXhsProject : IBaseCAL<AddXhsProjectInput, UpdateXhsProjectInput, XhsProjectDto>, IUpdateParas, IUpdateFlags, IUpdateTagName, IUpdateSorter, IUpdateUseStatus + { + /// <summary> + /// 鎻掑叆鎷撳睍 + /// </summary> + Task<long> InsertEx(AddXhsProjectInput projectInput, AddXhsProjectItemInput itemInput, AddXhsProjectItemModelInput modelInput, AddXhsProjectItemModelMapInput MapInput); + + //鍒犻櫎鎷撳睍 + Task<bool> DeleteEx(long ID); + + //缂栬緫鎷撳睍 + Task<bool> UpdateEx(UpdateXhsProjectInput projectInput, UpdateXhsProjectItemInput itemInput); + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/01-interface/IPumpProject/IXhsProjectItem.cs b/BLL/HStation.BLL.Assets.Core/01-interface/IPumpProject/IXhsProjectItem.cs new file mode 100644 index 0000000..2887c3c --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/01-interface/IPumpProject/IXhsProjectItem.cs @@ -0,0 +1,13 @@ +锘縰sing Yw.CAL; + +namespace HStation.CAL +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public interface IXhsProjectItem : IBaseCAL<AddXhsProjectItemInput, UpdateXhsProjectItemInput, XhsProjectItemDto>, IUpdateParas, IUpdateFlags, IUpdateTagName, IUpdateSorter, IUpdateUseStatus + { + //閫氳繃椤圭洰id鏌ユ壘 + Task<XhsProjectItemDto> GetByPrjID(long ID); + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/01-interface/IPumpProject/IXhsProjectItemModel.cs b/BLL/HStation.BLL.Assets.Core/01-interface/IPumpProject/IXhsProjectItemModel.cs new file mode 100644 index 0000000..dc1dac8 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/01-interface/IPumpProject/IXhsProjectItemModel.cs @@ -0,0 +1,13 @@ +锘縰sing Yw.CAL; + +namespace HStation.CAL +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public interface IXhsProjectItemModel : IBaseCAL<AddXhsProjectItemModelInput, UpdateXhsProjectItemModelInput, XhsProjectItemModelDto>, IUpdateParas, IUpdateFlags, IUpdateTagName, IUpdateSorter, IUpdateUseStatus + { + //鏍规嵁椤圭洰ID鏌ユ壘 + Task<List<XhsProjectItemModelDto>> GetByPrjID(long ID); + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/01-interface/IPumpProject/IXhsProjectItemModelMap.cs b/BLL/HStation.BLL.Assets.Core/01-interface/IPumpProject/IXhsProjectItemModelMap.cs new file mode 100644 index 0000000..1c9fe8c --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/01-interface/IPumpProject/IXhsProjectItemModelMap.cs @@ -0,0 +1,11 @@ +锘縰sing Yw.CAL; + +namespace HStation.CAL +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public interface IXhsProjectItemModelMap : IBaseCAL<AddXhsProjectItemModelMapInput, UpdateXhsProjectItemModelMapInput, XhsProjectItemModelMapDto>, IUpdateUseStatus + { + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/XhsProject.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/XhsProject.cs new file mode 100644 index 0000000..55966f0 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/XhsProject.cs @@ -0,0 +1,45 @@ +锘縰sing Yw.CAL.HttpClient; + +namespace HStation.CAL.HttpClient +{ + /// <summary> + /// + /// </summary> + public class XhsProject : BaseCAL_Paras_Flags_TagName_Sorter_UseStatus<AddXhsProjectInput, UpdateXhsProjectInput, XhsProjectDto>, IXhsProject + { + protected override string Prefix + { + get { return $"{HStation.BLL.Xhs.ConfigHelper.HttpUrl}/Xhs/Project"; } + } + + public Task<bool> DeleteEx(long ID) + { + return default; + } + + public class ProjectInputs + { + public AddXhsProjectInput ProjectInput { get; set; } + public AddXhsProjectItemInput ItemInput { get; set; } + public AddXhsProjectItemModelInput ModelInput { get; set; } + public AddXhsProjectItemModelMapInput MapInput { get; set; } + } + + public async Task<long> InsertEx(AddXhsProjectInput projectInput, AddXhsProjectItemInput itemInput, AddXhsProjectItemModelInput modelInput, AddXhsProjectItemModelMapInput MapInput) + { + var posttext = new ProjectInputs + { + ItemInput = itemInput, + ModelInput = modelInput, + MapInput = MapInput, + ProjectInput = projectInput, + }; + return await GetUrl("InsertEx@V1.0").Post<long>(posttext); + } + + public Task<bool> UpdateEx(UpdateXhsProjectInput projectInput, UpdateXhsProjectItemInput itemInput) + { + throw new NotImplementedException(); + } + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/XhsProjectItem.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/XhsProjectItem.cs new file mode 100644 index 0000000..d5be948 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/XhsProjectItem.cs @@ -0,0 +1,20 @@ +锘縰sing Yw.CAL.HttpClient; + +namespace HStation.CAL.HttpClient +{ + /// <summary> + /// + /// </summary> + public class XhsProjectItem : BaseCAL_Paras_Flags_TagName_Sorter_UseStatus<AddXhsProjectItemInput, UpdateXhsProjectItemInput, XhsProjectItemDto>, IXhsProjectItem + { + protected override string Prefix + { + get { return $"{HStation.BLL.Xhs.ConfigHelper.HttpUrl}/Xhs/Project/Item"; } + } + + public Task<XhsProjectItemDto> GetByPrjID(long ID) + { + throw new NotImplementedException(); + } + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/XhsProjectItemModel.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/XhsProjectItemModel.cs new file mode 100644 index 0000000..f0429a7 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/XhsProjectItemModel.cs @@ -0,0 +1,20 @@ +锘縰sing Yw.CAL.HttpClient; + +namespace HStation.CAL.HttpClient +{ + /// <summary> + /// + /// </summary> + public class XhsProjectItemModel : BaseCAL_Paras_Flags_TagName_Sorter_UseStatus<AddXhsProjectItemModelInput, UpdateXhsProjectItemModelInput, XhsProjectItemModelDto>, IXhsProjectItemModel + { + protected override string Prefix + { + get { return $"{HStation.BLL.Xhs.ConfigHelper.HttpUrl}/Xhs/Project/Item/Model"; } + } + + public Task<List<XhsProjectItemModelDto>> GetByPrjID(long ID) + { + throw new NotImplementedException(); + } + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/02-httpclient/XhsProjectItemModelMap.cs b/BLL/HStation.BLL.Assets.Core/02-httpclient/XhsProjectItemModelMap.cs new file mode 100644 index 0000000..cc353b3 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/02-httpclient/XhsProjectItemModelMap.cs @@ -0,0 +1,15 @@ +锘縰sing Yw.CAL.HttpClient; + +namespace HStation.CAL.HttpClient +{ + /// <summary> + /// + /// </summary> + public class XhsProjectItemModelMap : BaseCAL_Paras_Flags_TagName_Sorter_UseStatus<AddXhsProjectItemModelMapInput, UpdateXhsProjectItemModelMapInput, XhsProjectItemModelMapDto>, IXhsProjectItemModelMap + { + protected override string Prefix + { + get { return $"{HStation.BLL.Xhs.ConfigHelper.HttpUrl}/Xhs/Project/Model/Map"; } + } + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/03-localclient/Pump/PumpGroup.cs b/BLL/HStation.BLL.Assets.Core/03-localclient/Pump/PumpGroup.cs new file mode 100644 index 0000000..8d9c7ba --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/03-localclient/Pump/PumpGroup.cs @@ -0,0 +1,283 @@ +锘縰sing HStation.Xhs; +using Yw.Dto; + +namespace HStation.CAL.LocalClient +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public class PumpGroup : IPumpGroup + { + private readonly HStation.Service.PumpGroup _service = new(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public async Task<List<PumpGroupDto>> GetAll() + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetAll(); + var vm_list = list?.Select(x => new PumpGroupDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public async Task<PumpGroupDto> GetByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(ID); + return model == null ? null : new PumpGroupDto(model); + }); + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public async Task<List<PumpGroupDto>> GetByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByIds(Ids); + var vm_list = list?.Select(x => new PumpGroupDto(x)).ToList(); + return vm_list; + }); + } + + #endregion Query + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public async Task<long> Insert(AddPumpGroupDto input) + { + return await Task.Factory.StartNew(() => + { + var model = input.Adapt<AddPumpGroupDto, Model.PumpGroup>(); + model.SortCode = _service.GetMaxSortCode() + 1; + var id = _service.Insert(model); + return id; + }); + } + + /// <summary> + /// 鎵归噺鎻掑叆 + /// </summary> + public async Task<bool> Inserts(List<AddPumpGroupDto> inputList) + { + return await Task.Factory.StartNew(() => + { + var list = inputList.Select(x => x.Adapt<AddPumpGroupDto, Model.PumpGroup>()).ToList(); + list.ForEach(x => + { + x.SortCode = _service.GetMaxSortCode() + 1 + list.IndexOf(x); + }); + var bol = _service.Inserts(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔彃鍏� + /// </summary> + public async Task<bool> BulkInserts(List<AddPumpGroupDto> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion Insert + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + public async Task<bool> Update(UpdatePumpGroupDto 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.PumpGroup(model); + input.Adapt(rhs); + var bol = _service.Update(rhs); + return bol; + }); + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public async Task<bool> Updates(List<UpdatePumpGroupDto> inputList) + { + return await Task.Factory.StartNew(() => + { + if (inputList == null || inputList.Count < 1) + { + return false; + } + var list = inputList.Select(x => x.Adapt<UpdatePumpGroupDto, Model.PumpGroup>()).ToList(); + var bol = _service.Updates(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔洿鏂� + /// </summary> + public async Task<bool> BulkUpdates(List<UpdatePumpGroupDto> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鏇存柊缂栫爜 + /// </summary> + public async Task<bool> UpdateCode(long ID, string Code) + { + 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(() => + { + var bol = _service.UpdateTagName(ID, TagName); + return bol; + }); + } + + #endregion Update + + #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; + }); + } + + /// <summary> + /// 鍒犻櫎鎷撳睍 + /// </summary> + /// <param name="ID"></param> + /// <returns></returns> + public bool DeleteEx(long ID) + { + if (ID > 0) + { + var bol = _service.DeleteEx(ID); + return bol; + } + return false; + } + + #endregion Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/03-localclient/Pump/PumpGroupAndMainMap.cs b/BLL/HStation.BLL.Assets.Core/03-localclient/Pump/PumpGroupAndMainMap.cs new file mode 100644 index 0000000..dddfc83 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/03-localclient/Pump/PumpGroupAndMainMap.cs @@ -0,0 +1,247 @@ +锘縰sing HStation.Xhs; +using Yw.Dto; + +namespace HStation.CAL.LocalClient +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public class PumpGroupAndMainMap : IPumpGroupAndMainMap + { + private readonly HStation.Service.PumpGroupAndMainMap _service = new(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public async Task<List<PumpGroupAndMainMapDto>> GetAll() + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetAll(); + var vm_list = list?.Select(x => new PumpGroupAndMainMapDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public async Task<PumpGroupAndMainMapDto> GetByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(ID); + return model == null ? null : new PumpGroupAndMainMapDto(model); + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public List<long> GetByGroupID(long ID) + { + var model = Service.PumpGroupAndMainMap.GetMainIDByGroupID(ID); + return model; + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public async Task<List<PumpGroupAndMainMapDto>> GetByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByIds(Ids); + var vm_list = list?.Select(x => new PumpGroupAndMainMapDto(x)).ToList(); + return vm_list; + }); + } + + #endregion Query + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public async Task<long> Insert(AddPumpGroupAndMainMapDto input) + { + return await Task.Factory.StartNew(() => + { + var model = input.Adapt<AddPumpGroupAndMainMapDto, Model.PumpGroupAndMainMap>(); + var id = _service.Insert(model); + return id; + }); + } + + /// <summary> + /// 鎵归噺鎻掑叆 + /// </summary> + public async Task<bool> Inserts(List<AddPumpGroupAndMainMapDto> inputList) + { + return await Task.Factory.StartNew(() => + { + var list = inputList.Select(x => x.Adapt<AddPumpGroupAndMainMapDto, Model.PumpGroupAndMainMap>()).ToList(); + var bol = _service.Inserts(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔彃鍏� + /// </summary> + public async Task<bool> BulkInserts(List<AddPumpGroupAndMainMapDto> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion Insert + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + public async Task<bool> Update(UpdatePumpGroupAndMainMapDto 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.PumpGroupAndMainMap(model); + input.Adapt(rhs); + var bol = _service.Update(rhs); + return bol; + }); + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public async Task<bool> Updates(List<UpdatePumpGroupAndMainMapDto> inputList) + { + return await Task.Factory.StartNew(() => + { + if (inputList == null || inputList.Count < 1) + { + return false; + } + var list = inputList.Select(x => x.Adapt<UpdatePumpGroupAndMainMapDto, Model.PumpGroupAndMainMap>()).ToList(); + var bol = _service.Updates(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔洿鏂� + /// </summary> + public async Task<bool> BulkUpdates(List<UpdatePumpGroupAndMainMapDto> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鏇存柊缂栫爜 + /// </summary> + public async Task<bool> UpdateCode(long ID, string Code) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <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(() => + { + var bol = _service.UpdateTagName(ID, TagName); + return bol; + }); + } + + #endregion Update + + #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 Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/03-localclient/Pump/PumpMain.cs b/BLL/HStation.BLL.Assets.Core/03-localclient/Pump/PumpMain.cs new file mode 100644 index 0000000..c01835e --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/03-localclient/Pump/PumpMain.cs @@ -0,0 +1,312 @@ +锘縰sing HStation.Xhs; +using Yw.Dto; + +namespace HStation.CAL.LocalClient +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public class PumpMain : IPumpMain + { + private readonly HStation.Service.PumpMain _service = new(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public async Task<List<PumpMainDto>> GetAll() + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetAll(); + var vm_list = list?.Select(x => new PumpMainDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public async Task<PumpMainDto> GetByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(ID); + return model == null ? null : new PumpMainDto(model); + }); + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public async Task<List<PumpMainDto>> GetByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByIds(Ids); + var vm_list = list?.Select(x => new PumpMainDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 绯诲垪ID 鑾峰彇 + /// </summary> + public async Task<List<PumpMainDto>> GetByPumpSeriesID(long ID) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByPumpSeriesID(ID); + var vm_list = list?.Select(x => new PumpMainDto(x)).ToList(); + return vm_list; + }); + } + + #endregion Query + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public async Task<long> Insert(AddPumpMainDto input) + { + return await Task.Factory.StartNew(() => + { + var model = input.Adapt<AddPumpMainDto, Model.PumpMain>(); + model.SortCode = _service.GetMaxSortCode() + 1; + var id = _service.Insert(model); + return id; + }); + } + + /// <summary> + /// 鎻掑叆鎷撳睍(鎻掑叆鍨嬪彿鍜屾槧灏勮〃) + /// </summary> + public async Task<long> InsertEx(AddPumpMainDto input, AddPumpGroupAndMainMapDto map) + { + return await Task.Factory.StartNew(() => + { + var model = input.Adapt<AddPumpMainDto, Model.PumpMain>(); + var entity = map.Adapt<AddPumpGroupAndMainMapDto, Model.PumpGroupAndMainMap>(); + model.SortCode = _service.GetMaxSortCode() + 1; + var id = _service.InsertEx(model, entity); + return id; + }); + } + + /// <summary> + /// 鎵归噺鎻掑叆 + /// </summary> + public async Task<bool> Inserts(List<AddPumpMainDto> inputList) + { + return await Task.Factory.StartNew(() => + { + var list = inputList.Select(x => x.Adapt<AddPumpMainDto, Model.PumpMain>()).ToList(); + list.ForEach(x => + { + x.SortCode = _service.GetMaxSortCode() + 1 + list.IndexOf(x); + }); + var bol = _service.Inserts(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔彃鍏� + /// </summary> + public async Task<bool> BulkInserts(List<AddPumpMainDto> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion Insert + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + public async Task<bool> Update(UpdatePumpMainDto 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.PumpMain(model); + input.Adapt(rhs); + var bol = _service.Update(rhs); + return bol; + }); + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public async Task<bool> Updates(List<UpdatePumpMainDto> inputList) + { + return await Task.Factory.StartNew(() => + { + if (inputList == null || inputList.Count < 1) + { + return false; + } + var list = inputList.Select(x => x.Adapt<UpdatePumpMainDto, Model.PumpMain>()).ToList(); + var bol = _service.Updates(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔洿鏂� + /// </summary> + public async Task<bool> BulkUpdates(List<UpdatePumpMainDto> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鏇存柊缂栫爜 + /// </summary> + public async Task<bool> UpdateCode(long ID, string Code) + { + 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(() => + { + var bol = _service.UpdateTagName(ID, TagName); + return bol; + }); + } + + #endregion Update + + #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> + /// 閫氳繃绯诲垪 ID 鍒犻櫎 鑷韩鍙妋ap鏄犲皠琛ㄤ腑ID + /// </summary> + public async Task<bool> DeleteMapByMainID(long ID) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.DeleteByMainIDEx(ID); + if (!bol) + { + return false; + } + 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 Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/03-localclient/Pump/PumpSeries.cs b/BLL/HStation.BLL.Assets.Core/03-localclient/Pump/PumpSeries.cs new file mode 100644 index 0000000..8d8b88c --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/03-localclient/Pump/PumpSeries.cs @@ -0,0 +1,291 @@ +锘縰sing HStation.Xhs; +using Yw.Dto; + +namespace HStation.CAL.LocalClient +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public class PumpSeries : IPumpSeries + { + private readonly HStation.Service.PumpSeries _service = new(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public async Task<List<PumpSeriesDto>> GetAll() + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetAll(); + var vm_list = list?.Select(x => new PumpSeriesDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public async Task<PumpSeriesDto> GetByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(ID); + return model == null ? null : new PumpSeriesDto(model); + }); + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public async Task<List<PumpSeriesDto>> GetByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByIds(Ids); + var vm_list = list?.Select(x => new PumpSeriesDto(x)).ToList(); + return vm_list; + }); + } + + #endregion Query + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public async Task<long> Insert(AddPumpSeriesDto input) + { + return await Task.Factory.StartNew(() => + { + var model = input.Adapt<AddPumpSeriesDto, Model.PumpSeries>(); + model.SortCode = _service.GetMaxSortCode() + 1; + var id = _service.Insert(model); + return id; + }); + } + + /// <summary> + /// 鎵归噺鎻掑叆 + /// </summary> + public async Task<bool> Inserts(List<AddPumpSeriesDto> inputList) + { + return await Task.Factory.StartNew(() => + { + var list = inputList.Select(x => x.Adapt<AddPumpSeriesDto, Model.PumpSeries>()).ToList(); + list.ForEach(x => + { + x.SortCode = _service.GetMaxSortCode() + 1 + list.IndexOf(x); + }); + var bol = _service.Inserts(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔彃鍏� + /// </summary> + public async Task<bool> BulkInserts(List<AddPumpSeriesDto> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion Insert + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + public async Task<bool> Update(UpdatePumpSeriesDto 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.PumpSeries(model); + input.Adapt(rhs); + var bol = _service.Update(rhs); + return bol; + }); + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public async Task<bool> Updates(List<UpdatePumpSeriesDto> inputList) + { + return await Task.Factory.StartNew(() => + { + if (inputList == null || inputList.Count < 1) + { + return false; + } + var list = inputList.Select(x => x.Adapt<UpdatePumpSeriesDto, Model.PumpSeries>()).ToList(); + var bol = _service.Updates(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔洿鏂� + /// </summary> + public async Task<bool> BulkUpdates(List<UpdatePumpSeriesDto> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鏇存柊缂栫爜 + /// </summary> + public async Task<bool> UpdateCode(long ID, string Code) + { + 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(() => + { + var bol = _service.UpdateTagName(ID, TagName); + return bol; + }); + } + + /// <summary> + /// 鏇存柊 UseStatus + /// </summary> + public async Task<bool> UpdateUseStatus(long ID, int UseStatus) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.UpdateUseStatus(ID, (Yw.Model.eUseStatus)UseStatus); + return bol; + }); + } + + #endregion Update + + #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; + }); + } + + //鍒犻櫎鎷撳睍(鍒犻櫎绯诲垪涓嬫墍鏈夊唴瀹�) + public bool DeleteEx(long ID) + { + if (ID > 0) + { + var bol = _service.DeleteEx(ID); + return bol; + } + return false; + } + + #endregion Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/03-localclient/PumpProduct/PumpGroup.cs b/BLL/HStation.BLL.Assets.Core/03-localclient/PumpProduct/PumpGroup.cs new file mode 100644 index 0000000..8d9c7ba --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/03-localclient/PumpProduct/PumpGroup.cs @@ -0,0 +1,283 @@ +锘縰sing HStation.Xhs; +using Yw.Dto; + +namespace HStation.CAL.LocalClient +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public class PumpGroup : IPumpGroup + { + private readonly HStation.Service.PumpGroup _service = new(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public async Task<List<PumpGroupDto>> GetAll() + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetAll(); + var vm_list = list?.Select(x => new PumpGroupDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public async Task<PumpGroupDto> GetByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(ID); + return model == null ? null : new PumpGroupDto(model); + }); + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public async Task<List<PumpGroupDto>> GetByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByIds(Ids); + var vm_list = list?.Select(x => new PumpGroupDto(x)).ToList(); + return vm_list; + }); + } + + #endregion Query + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public async Task<long> Insert(AddPumpGroupDto input) + { + return await Task.Factory.StartNew(() => + { + var model = input.Adapt<AddPumpGroupDto, Model.PumpGroup>(); + model.SortCode = _service.GetMaxSortCode() + 1; + var id = _service.Insert(model); + return id; + }); + } + + /// <summary> + /// 鎵归噺鎻掑叆 + /// </summary> + public async Task<bool> Inserts(List<AddPumpGroupDto> inputList) + { + return await Task.Factory.StartNew(() => + { + var list = inputList.Select(x => x.Adapt<AddPumpGroupDto, Model.PumpGroup>()).ToList(); + list.ForEach(x => + { + x.SortCode = _service.GetMaxSortCode() + 1 + list.IndexOf(x); + }); + var bol = _service.Inserts(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔彃鍏� + /// </summary> + public async Task<bool> BulkInserts(List<AddPumpGroupDto> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion Insert + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + public async Task<bool> Update(UpdatePumpGroupDto 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.PumpGroup(model); + input.Adapt(rhs); + var bol = _service.Update(rhs); + return bol; + }); + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public async Task<bool> Updates(List<UpdatePumpGroupDto> inputList) + { + return await Task.Factory.StartNew(() => + { + if (inputList == null || inputList.Count < 1) + { + return false; + } + var list = inputList.Select(x => x.Adapt<UpdatePumpGroupDto, Model.PumpGroup>()).ToList(); + var bol = _service.Updates(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔洿鏂� + /// </summary> + public async Task<bool> BulkUpdates(List<UpdatePumpGroupDto> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鏇存柊缂栫爜 + /// </summary> + public async Task<bool> UpdateCode(long ID, string Code) + { + 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(() => + { + var bol = _service.UpdateTagName(ID, TagName); + return bol; + }); + } + + #endregion Update + + #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; + }); + } + + /// <summary> + /// 鍒犻櫎鎷撳睍 + /// </summary> + /// <param name="ID"></param> + /// <returns></returns> + public bool DeleteEx(long ID) + { + if (ID > 0) + { + var bol = _service.DeleteEx(ID); + return bol; + } + return false; + } + + #endregion Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/03-localclient/PumpProduct/PumpGroupAndMainMap.cs b/BLL/HStation.BLL.Assets.Core/03-localclient/PumpProduct/PumpGroupAndMainMap.cs new file mode 100644 index 0000000..dddfc83 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/03-localclient/PumpProduct/PumpGroupAndMainMap.cs @@ -0,0 +1,247 @@ +锘縰sing HStation.Xhs; +using Yw.Dto; + +namespace HStation.CAL.LocalClient +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public class PumpGroupAndMainMap : IPumpGroupAndMainMap + { + private readonly HStation.Service.PumpGroupAndMainMap _service = new(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public async Task<List<PumpGroupAndMainMapDto>> GetAll() + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetAll(); + var vm_list = list?.Select(x => new PumpGroupAndMainMapDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public async Task<PumpGroupAndMainMapDto> GetByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(ID); + return model == null ? null : new PumpGroupAndMainMapDto(model); + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public List<long> GetByGroupID(long ID) + { + var model = Service.PumpGroupAndMainMap.GetMainIDByGroupID(ID); + return model; + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public async Task<List<PumpGroupAndMainMapDto>> GetByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByIds(Ids); + var vm_list = list?.Select(x => new PumpGroupAndMainMapDto(x)).ToList(); + return vm_list; + }); + } + + #endregion Query + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public async Task<long> Insert(AddPumpGroupAndMainMapDto input) + { + return await Task.Factory.StartNew(() => + { + var model = input.Adapt<AddPumpGroupAndMainMapDto, Model.PumpGroupAndMainMap>(); + var id = _service.Insert(model); + return id; + }); + } + + /// <summary> + /// 鎵归噺鎻掑叆 + /// </summary> + public async Task<bool> Inserts(List<AddPumpGroupAndMainMapDto> inputList) + { + return await Task.Factory.StartNew(() => + { + var list = inputList.Select(x => x.Adapt<AddPumpGroupAndMainMapDto, Model.PumpGroupAndMainMap>()).ToList(); + var bol = _service.Inserts(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔彃鍏� + /// </summary> + public async Task<bool> BulkInserts(List<AddPumpGroupAndMainMapDto> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion Insert + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + public async Task<bool> Update(UpdatePumpGroupAndMainMapDto 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.PumpGroupAndMainMap(model); + input.Adapt(rhs); + var bol = _service.Update(rhs); + return bol; + }); + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public async Task<bool> Updates(List<UpdatePumpGroupAndMainMapDto> inputList) + { + return await Task.Factory.StartNew(() => + { + if (inputList == null || inputList.Count < 1) + { + return false; + } + var list = inputList.Select(x => x.Adapt<UpdatePumpGroupAndMainMapDto, Model.PumpGroupAndMainMap>()).ToList(); + var bol = _service.Updates(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔洿鏂� + /// </summary> + public async Task<bool> BulkUpdates(List<UpdatePumpGroupAndMainMapDto> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鏇存柊缂栫爜 + /// </summary> + public async Task<bool> UpdateCode(long ID, string Code) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <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(() => + { + var bol = _service.UpdateTagName(ID, TagName); + return bol; + }); + } + + #endregion Update + + #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 Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/03-localclient/PumpProduct/PumpMain.cs b/BLL/HStation.BLL.Assets.Core/03-localclient/PumpProduct/PumpMain.cs new file mode 100644 index 0000000..5f195f2 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/03-localclient/PumpProduct/PumpMain.cs @@ -0,0 +1,315 @@ +锘縰sing HStation.Xhs; +using Yw.Dto; + +namespace HStation.CAL.LocalClient +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public class PumpMain : IPumpMain + { + private readonly HStation.Service.PumpMain _service = new(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public async Task<List<PumpMainDto>> GetAll() + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetAll(); + var vm_list = list?.Select(x => new PumpMainDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public async Task<PumpMainDto> GetByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(ID); + return model == null ? null : new PumpMainDto(model); + }); + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public async Task<List<PumpMainDto>> GetByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByIds(Ids); + var vm_list = list?.Select(x => new PumpMainDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 绯诲垪ID 鑾峰彇 + /// </summary> + public async Task<List<PumpMainDto>> GetByPumpSeriesID(long ID) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByPumpSeriesID(ID); + var vm_list = list?.Select(x => new PumpMainDto(x)).ToList(); + return vm_list; + }); + } + + #endregion Query + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public async Task<long> Insert(AddPumpMainDto input) + { + return await Task.Factory.StartNew(() => + { + var model = input.Adapt<AddPumpMainDto, Model.PumpMain>(); + model.SortCode = _service.GetMaxSortCode() + 1; + var id = _service.Insert(model); + return id; + }); + } + + /// <summary> + /// 鎻掑叆鎷撳睍(鎻掑叆鍨嬪彿鍜屾槧灏勮〃) + /// </summary> + public async Task<long> InsertEx(AddPumpMainDto input, AddPumpGroupAndMainMapDto mainmap, AddPumpPartMainDto part, List<AddPumpPropContentDto> content, AddPumpMainAndPartMapDto partmap) + { + return await Task.Factory.StartNew(() => + { + var mainmodel = input.Adapt<AddPumpMainDto, Model.PumpMain>(); + var mainmapmodel = mainmap.Adapt<AddPumpGroupAndMainMapDto, Model.PumpGroupAndMainMap>(); + mainmodel.SortCode = _service.GetMaxSortCode() + 1; + var partmodel = part.Adapt<AddPumpPartMainDto, Model.PumpPartMain>(); + var contentlist = content.Select(x => x.Adapt<AddPumpPropContentDto, Model.PumpPropContent>()).ToList(); + var partmapmodel = partmap.Adapt<AddPumpMainAndPartMapDto, Model.PumpMainAndPartMap>(); + var id = _service.InsertEx(mainmodel, mainmapmodel, partmodel, contentlist, partmapmodel); + return id; + }); + } + + /// <summary> + /// 鎵归噺鎻掑叆 + /// </summary> + public async Task<bool> Inserts(List<AddPumpMainDto> inputList) + { + return await Task.Factory.StartNew(() => + { + var list = inputList.Select(x => x.Adapt<AddPumpMainDto, Model.PumpMain>()).ToList(); + list.ForEach(x => + { + x.SortCode = _service.GetMaxSortCode() + 1 + list.IndexOf(x); + }); + var bol = _service.Inserts(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔彃鍏� + /// </summary> + public async Task<bool> BulkInserts(List<AddPumpMainDto> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion Insert + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + public async Task<bool> Update(UpdatePumpMainDto 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.PumpMain(model); + input.Adapt(rhs); + var bol = _service.Update(rhs); + return bol; + }); + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public async Task<bool> Updates(List<UpdatePumpMainDto> inputList) + { + return await Task.Factory.StartNew(() => + { + if (inputList == null || inputList.Count < 1) + { + return false; + } + var list = inputList.Select(x => x.Adapt<UpdatePumpMainDto, Model.PumpMain>()).ToList(); + var bol = _service.Updates(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔洿鏂� + /// </summary> + public async Task<bool> BulkUpdates(List<UpdatePumpMainDto> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鏇存柊缂栫爜 + /// </summary> + public async Task<bool> UpdateCode(long ID, string Code) + { + 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(() => + { + var bol = _service.UpdateTagName(ID, TagName); + return bol; + }); + } + + #endregion Update + + #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> + /// 閫氳繃绯诲垪 ID 鍒犻櫎 鑷韩鍙妋ap鏄犲皠琛ㄤ腑ID + /// </summary> + public async Task<bool> DeleteMapByMainID(long ID) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.DeleteByMainIDEx(ID); + if (!bol) + { + return false; + } + 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 Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/03-localclient/PumpProduct/PumpSeries.cs b/BLL/HStation.BLL.Assets.Core/03-localclient/PumpProduct/PumpSeries.cs new file mode 100644 index 0000000..8d8b88c --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/03-localclient/PumpProduct/PumpSeries.cs @@ -0,0 +1,291 @@ +锘縰sing HStation.Xhs; +using Yw.Dto; + +namespace HStation.CAL.LocalClient +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public class PumpSeries : IPumpSeries + { + private readonly HStation.Service.PumpSeries _service = new(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public async Task<List<PumpSeriesDto>> GetAll() + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetAll(); + var vm_list = list?.Select(x => new PumpSeriesDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public async Task<PumpSeriesDto> GetByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(ID); + return model == null ? null : new PumpSeriesDto(model); + }); + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public async Task<List<PumpSeriesDto>> GetByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByIds(Ids); + var vm_list = list?.Select(x => new PumpSeriesDto(x)).ToList(); + return vm_list; + }); + } + + #endregion Query + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public async Task<long> Insert(AddPumpSeriesDto input) + { + return await Task.Factory.StartNew(() => + { + var model = input.Adapt<AddPumpSeriesDto, Model.PumpSeries>(); + model.SortCode = _service.GetMaxSortCode() + 1; + var id = _service.Insert(model); + return id; + }); + } + + /// <summary> + /// 鎵归噺鎻掑叆 + /// </summary> + public async Task<bool> Inserts(List<AddPumpSeriesDto> inputList) + { + return await Task.Factory.StartNew(() => + { + var list = inputList.Select(x => x.Adapt<AddPumpSeriesDto, Model.PumpSeries>()).ToList(); + list.ForEach(x => + { + x.SortCode = _service.GetMaxSortCode() + 1 + list.IndexOf(x); + }); + var bol = _service.Inserts(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔彃鍏� + /// </summary> + public async Task<bool> BulkInserts(List<AddPumpSeriesDto> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion Insert + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + public async Task<bool> Update(UpdatePumpSeriesDto 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.PumpSeries(model); + input.Adapt(rhs); + var bol = _service.Update(rhs); + return bol; + }); + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public async Task<bool> Updates(List<UpdatePumpSeriesDto> inputList) + { + return await Task.Factory.StartNew(() => + { + if (inputList == null || inputList.Count < 1) + { + return false; + } + var list = inputList.Select(x => x.Adapt<UpdatePumpSeriesDto, Model.PumpSeries>()).ToList(); + var bol = _service.Updates(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔洿鏂� + /// </summary> + public async Task<bool> BulkUpdates(List<UpdatePumpSeriesDto> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鏇存柊缂栫爜 + /// </summary> + public async Task<bool> UpdateCode(long ID, string Code) + { + 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(() => + { + var bol = _service.UpdateTagName(ID, TagName); + return bol; + }); + } + + /// <summary> + /// 鏇存柊 UseStatus + /// </summary> + public async Task<bool> UpdateUseStatus(long ID, int UseStatus) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.UpdateUseStatus(ID, (Yw.Model.eUseStatus)UseStatus); + return bol; + }); + } + + #endregion Update + + #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; + }); + } + + //鍒犻櫎鎷撳睍(鍒犻櫎绯诲垪涓嬫墍鏈夊唴瀹�) + public bool DeleteEx(long ID) + { + if (ID > 0) + { + var bol = _service.DeleteEx(ID); + return bol; + } + return false; + } + + #endregion Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/03-localclient/PumpProject/XhsProject.cs b/BLL/HStation.BLL.Assets.Core/03-localclient/PumpProject/XhsProject.cs new file mode 100644 index 0000000..b2ee939 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/03-localclient/PumpProject/XhsProject.cs @@ -0,0 +1,313 @@ +锘縰sing HStation.Xhs; +using Yw.Dto; + +namespace HStation.CAL.LocalClient +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public class XhsProject : IXhsProject + { + private readonly HStation.Service.XhsProject _service = new(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public async Task<List<XhsProjectDto>> GetAll() + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetAll(); + var vm_list = list?.Select(x => new XhsProjectDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public async Task<XhsProjectDto> GetByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(ID); + return model == null ? null : new XhsProjectDto(model); + }); + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public async Task<List<XhsProjectDto>> GetByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByIds(Ids); + var vm_list = list?.Select(x => new XhsProjectDto(x)).ToList(); + return vm_list; + }); + } + + #endregion Query + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public async Task<long> Insert(AddXhsProjectInput input) + { + return await Task.Factory.StartNew(() => + { + var model = input.Adapt<AddXhsProjectInput, Model.XhsProject>(); + model.SortCode = _service.GetMaxSortCode() + 1; + var id = _service.Insert(model); + return id; + }); + } + + /// <summary> + /// 鎵归噺鎻掑叆 + /// </summary> + public async Task<bool> Inserts(List<AddXhsProjectInput> inputList) + { + return await Task.Factory.StartNew(() => + { + var list = inputList.Select(x => x.Adapt<AddXhsProjectInput, Model.XhsProject>()).ToList(); + list.ForEach(x => + { + x.SortCode = _service.GetMaxSortCode() + 1 + list.IndexOf(x); + }); + var bol = _service.Inserts(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔彃鍏� + /// </summary> + public async Task<bool> BulkInserts(List<AddXhsProjectInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion Insert + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + public async Task<bool> Update(UpdateXhsProjectInput 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.XhsProject(model); + input.Adapt(rhs); + var bol = _service.Update(rhs); + return bol; + }); + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public async Task<bool> Updates(List<UpdateXhsProjectInput> inputList) + { + return await Task.Factory.StartNew(() => + { + if (inputList == null || inputList.Count < 1) + { + return false; + } + var list = inputList.Select(x => x.Adapt<UpdateXhsProjectInput, Model.XhsProject>()).ToList(); + var bol = _service.Updates(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔洿鏂� + /// </summary> + public async Task<bool> BulkUpdates(List<UpdateXhsProjectInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鏇存柊缂栫爜 + /// </summary> + public async Task<bool> UpdateCode(long ID, string Code) + { + 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(() => + { + var bol = _service.UpdateTagName(ID, TagName); + return bol; + }); + } + + /// <summary> + /// 鏇存柊 UseStatus + /// </summary> + public async Task<bool> UpdateUseStatus(long ID, int UseStatus) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.UpdateUseStatus(ID, (Yw.Model.eUseStatus)UseStatus); + return bol; + }); + } + + #endregion Update + + #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; + }); + } + + public Task<long> InsertEx(AddXhsProjectInput projectInput, AddXhsProjectItemInput itemInput, AddXhsProjectItemModelInput modelInput, AddXhsProjectItemModelMapInput MapInput) + { + return Task.Factory.StartNew(() => + { + var project = projectInput.Adapt<AddXhsProjectInput, Model.XhsProject>(); + var item = itemInput.Adapt<AddXhsProjectItemInput, Model.XhsProjectItem>(); + var model = modelInput.Adapt<AddXhsProjectItemModelInput, Model.XhsProjectItemModel>(); + var map = MapInput.Adapt<AddXhsProjectItemModelMapInput, Model.XhsProjectItemModelMap>(); + var bol = _service.InsertsEx(project, item, model, map); + return bol; + }); + } + + public Task<bool> DeleteEx(long ID) + { + return Task.Factory.StartNew(() => + { + var bol = _service.DeleteEx(ID); + return bol; + }); + } + + public Task<bool> UpdateEx(UpdateXhsProjectInput projectInput, UpdateXhsProjectItemInput itemInput) + { + return Task.Factory.StartNew(() => + { + var project = projectInput.Adapt<UpdateXhsProjectInput, Model.XhsProject>(); + var item = itemInput.Adapt<UpdateXhsProjectItemInput, Model.XhsProjectItem>(); + var bol = _service.UpdateEx(project, item); + return bol; + }); + } + + #endregion Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/03-localclient/PumpProject/XhsProjectItem.cs b/BLL/HStation.BLL.Assets.Core/03-localclient/PumpProject/XhsProjectItem.cs new file mode 100644 index 0000000..339e6f9 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/03-localclient/PumpProject/XhsProjectItem.cs @@ -0,0 +1,289 @@ +锘縰sing HStation.Xhs; + +namespace HStation.CAL.LocalClient +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public class XhsProjectItem : IXhsProjectItem + { + private readonly HStation.Service.XhsProjectItem _service = new(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public async Task<List<XhsProjectItemDto>> GetAll() + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetAll(); + var vm_list = list?.Select(x => new XhsProjectItemDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public async Task<XhsProjectItemDto> GetByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(ID); + return model == null ? null : new XhsProjectItemDto(model); + }); + } + + /// <summary> + /// 閫氳繃 椤圭洰ID 鑾峰彇 + /// </summary> + public async Task<XhsProjectItemDto> GetByPrjID(long ID) + { + var all = await GetAll(); + var model = all.Where(x => x.ProjectID == ID).FirstOrDefault(); + return model == null ? null : model; + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public async Task<List<XhsProjectItemDto>> GetByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByIds(Ids); + var vm_list = list?.Select(x => new XhsProjectItemDto(x)).ToList(); + return vm_list; + }); + } + + #endregion Query + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public async Task<long> Insert(AddXhsProjectItemInput input) + { + return await Task.Factory.StartNew(() => + { + var model = input.Adapt<AddXhsProjectItemInput, Model.XhsProjectItem>(); + model.SortCode = _service.GetMaxSortCode() + 1; + var id = _service.Insert(model); + return id; + }); + } + + /// <summary> + /// 鎵归噺鎻掑叆 + /// </summary> + public async Task<bool> Inserts(List<AddXhsProjectItemInput> inputList) + { + return await Task.Factory.StartNew(() => + { + var list = inputList.Select(x => x.Adapt<AddXhsProjectItemInput, Model.XhsProjectItem>()).ToList(); + list.ForEach(x => + { + x.SortCode = _service.GetMaxSortCode() + 1 + list.IndexOf(x); + }); + var bol = _service.Inserts(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔彃鍏� + /// </summary> + public async Task<bool> BulkInserts(List<AddXhsProjectItemInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion Insert + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + public async Task<bool> Update(UpdateXhsProjectItemInput 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.XhsProjectItem(model); + input.Adapt(rhs); + var bol = _service.Update(rhs); + return bol; + }); + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public async Task<bool> Updates(List<UpdateXhsProjectItemInput> inputList) + { + return await Task.Factory.StartNew(() => + { + if (inputList == null || inputList.Count < 1) + { + return false; + } + var list = inputList.Select(x => x.Adapt<UpdateXhsProjectItemInput, Model.XhsProjectItem>()).ToList(); + var bol = _service.Updates(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔洿鏂� + /// </summary> + public async Task<bool> BulkUpdates(List<UpdateXhsProjectItemInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鏇存柊缂栫爜 + /// </summary> + public async Task<bool> UpdateCode(long ID, string Code) + { + 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(() => + { + var bol = _service.UpdateTagName(ID, TagName); + return bol; + }); + } + + /// <summary> + /// 鏇存柊 UseStatus + /// </summary> + public async Task<bool> UpdateUseStatus(long ID, int UseStatus) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.UpdateUseStatus(ID, (Yw.Model.eUseStatus)UseStatus); + return bol; + }); + } + + #endregion Update + + #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 Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/03-localclient/PumpProject/XhsProjectItemModel.cs b/BLL/HStation.BLL.Assets.Core/03-localclient/PumpProject/XhsProjectItemModel.cs new file mode 100644 index 0000000..2f28579 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/03-localclient/PumpProject/XhsProjectItemModel.cs @@ -0,0 +1,289 @@ +锘縰sing HStation.Xhs; + +namespace HStation.CAL.LocalClient +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public class XhsProjectItemModel : IXhsProjectItemModel + { + private readonly HStation.Service.XhsProjectItemModel _service = new(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public async Task<List<XhsProjectItemModelDto>> GetAll() + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetAll(); + var vm_list = list?.Select(x => new XhsProjectItemModelDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public async Task<XhsProjectItemModelDto> GetByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(ID); + return model == null ? null : new XhsProjectItemModelDto(model); + }); + } + + public async Task<List<XhsProjectItemModelDto>> GetByPrjID(long ID) + { + var alllist = await GetAll(); + if (alllist != null || alllist.Count > 0) + { + return alllist.Where(x => x.ProjectID == ID).ToList(); + } + return null; + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public async Task<List<XhsProjectItemModelDto>> GetByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByIds(Ids); + var vm_list = list?.Select(x => new XhsProjectItemModelDto(x)).ToList(); + return vm_list; + }); + } + + #endregion Query + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public async Task<long> Insert(AddXhsProjectItemModelInput input) + { + return await Task.Factory.StartNew(() => + { + var model = input.Adapt<AddXhsProjectItemModelInput, Model.XhsProjectItemModel>(); + model.SortCode = _service.GetMaxSortCode() + 1; + var id = _service.Insert(model); + return id; + }); + } + + /// <summary> + /// 鎵归噺鎻掑叆 + /// </summary> + public async Task<bool> Inserts(List<AddXhsProjectItemModelInput> inputList) + { + return await Task.Factory.StartNew(() => + { + var list = inputList.Select(x => x.Adapt<AddXhsProjectItemModelInput, Model.XhsProjectItemModel>()).ToList(); + list.ForEach(x => + { + x.SortCode = _service.GetMaxSortCode() + 1 + list.IndexOf(x); + }); + var bol = _service.Inserts(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔彃鍏� + /// </summary> + public async Task<bool> BulkInserts(List<AddXhsProjectItemModelInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion Insert + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + public async Task<bool> Update(UpdateXhsProjectItemModelInput 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.XhsProjectItemModel(model); + input.Adapt(rhs); + var bol = _service.Update(rhs); + return bol; + }); + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public async Task<bool> Updates(List<UpdateXhsProjectItemModelInput> inputList) + { + return await Task.Factory.StartNew(() => + { + if (inputList == null || inputList.Count < 1) + { + return false; + } + var list = inputList.Select(x => x.Adapt<UpdateXhsProjectItemModelInput, Model.XhsProjectItemModel>()).ToList(); + var bol = _service.Updates(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔洿鏂� + /// </summary> + public async Task<bool> BulkUpdates(List<UpdateXhsProjectItemModelInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鏇存柊缂栫爜 + /// </summary> + public async Task<bool> UpdateCode(long ID, string Code) + { + 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(() => + { + var bol = _service.UpdateTagName(ID, TagName); + return bol; + }); + } + + /// <summary> + /// 鏇存柊 UseStatus + /// </summary> + public async Task<bool> UpdateUseStatus(long ID, int UseStatus) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.UpdateUseStatus(ID, (Yw.Model.eUseStatus)UseStatus); + return bol; + }); + } + + #endregion Update + + #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 Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/03-localclient/PumpProject/XhsProjectItemModelMap.cs b/BLL/HStation.BLL.Assets.Core/03-localclient/PumpProject/XhsProjectItemModelMap.cs new file mode 100644 index 0000000..2e54218 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/03-localclient/PumpProject/XhsProjectItemModelMap.cs @@ -0,0 +1,225 @@ +锘縰sing HStation.Xhs; + +namespace HStation.CAL.LocalClient +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public class XhsProjectItemModelMap : IXhsProjectItemModelMap + { + private readonly HStation.Service.XhsProjectItemModelMap _service = new(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public async Task<List<XhsProjectItemModelMapDto>> GetAll() + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetAll(); + var vm_list = list?.Select(x => new XhsProjectItemModelMapDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public async Task<XhsProjectItemModelMapDto> GetByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(ID); + return model == null ? null : new XhsProjectItemModelMapDto(model); + }); + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public async Task<List<XhsProjectItemModelMapDto>> GetByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByIds(Ids); + var vm_list = list?.Select(x => new XhsProjectItemModelMapDto(x)).ToList(); + return vm_list; + }); + } + + #endregion Query + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public async Task<long> Insert(AddXhsProjectItemModelMapInput input) + { + return await Task.Factory.StartNew(() => + { + var model = input.Adapt<AddXhsProjectItemModelMapInput, Model.XhsProjectItemModelMap>(); + var id = _service.Insert(model); + return id; + }); + } + + /// <summary> + /// 鎵归噺鎻掑叆 + /// </summary> + public async Task<bool> Inserts(List<AddXhsProjectItemModelMapInput> inputList) + { + return await Task.Factory.StartNew(() => + { + var list = inputList.Select(x => x.Adapt<AddXhsProjectItemModelMapInput, Model.XhsProjectItemModelMap>()).ToList(); + var bol = _service.Inserts(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔彃鍏� + /// </summary> + public async Task<bool> BulkInserts(List<AddXhsProjectItemModelMapInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion Insert + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + public async Task<bool> Update(UpdateXhsProjectItemModelMapInput 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.XhsProjectItemModelMap(model); + input.Adapt(rhs); + var bol = _service.Update(rhs); + return bol; + }); + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public async Task<bool> Updates(List<UpdateXhsProjectItemModelMapInput> inputList) + { + return await Task.Factory.StartNew(() => + { + if (inputList == null || inputList.Count < 1) + { + return false; + } + var list = inputList.Select(x => x.Adapt<UpdateXhsProjectItemModelMapInput, Model.XhsProjectItemModelMap>()).ToList(); + var bol = _service.Updates(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔洿鏂� + /// </summary> + public async Task<bool> BulkUpdates(List<UpdateXhsProjectItemModelMapInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鏇存柊缂栫爜 + /// </summary> + public async Task<bool> UpdateCode(long ID, string Code) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <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> + /// 鏇存柊 UseStatus + /// </summary> + public async Task<bool> UpdateUseStatus(long ID, int UseStatus) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.UpdateUseStatus(ID, (Yw.Model.eUseStatus)UseStatus); + return bol; + }); + } + + #endregion Update + + #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 Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/03-localclient/XhsProject.cs b/BLL/HStation.BLL.Assets.Core/03-localclient/XhsProject.cs new file mode 100644 index 0000000..b2ee939 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/03-localclient/XhsProject.cs @@ -0,0 +1,313 @@ +锘縰sing HStation.Xhs; +using Yw.Dto; + +namespace HStation.CAL.LocalClient +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public class XhsProject : IXhsProject + { + private readonly HStation.Service.XhsProject _service = new(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public async Task<List<XhsProjectDto>> GetAll() + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetAll(); + var vm_list = list?.Select(x => new XhsProjectDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public async Task<XhsProjectDto> GetByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(ID); + return model == null ? null : new XhsProjectDto(model); + }); + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public async Task<List<XhsProjectDto>> GetByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByIds(Ids); + var vm_list = list?.Select(x => new XhsProjectDto(x)).ToList(); + return vm_list; + }); + } + + #endregion Query + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public async Task<long> Insert(AddXhsProjectInput input) + { + return await Task.Factory.StartNew(() => + { + var model = input.Adapt<AddXhsProjectInput, Model.XhsProject>(); + model.SortCode = _service.GetMaxSortCode() + 1; + var id = _service.Insert(model); + return id; + }); + } + + /// <summary> + /// 鎵归噺鎻掑叆 + /// </summary> + public async Task<bool> Inserts(List<AddXhsProjectInput> inputList) + { + return await Task.Factory.StartNew(() => + { + var list = inputList.Select(x => x.Adapt<AddXhsProjectInput, Model.XhsProject>()).ToList(); + list.ForEach(x => + { + x.SortCode = _service.GetMaxSortCode() + 1 + list.IndexOf(x); + }); + var bol = _service.Inserts(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔彃鍏� + /// </summary> + public async Task<bool> BulkInserts(List<AddXhsProjectInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion Insert + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + public async Task<bool> Update(UpdateXhsProjectInput 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.XhsProject(model); + input.Adapt(rhs); + var bol = _service.Update(rhs); + return bol; + }); + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public async Task<bool> Updates(List<UpdateXhsProjectInput> inputList) + { + return await Task.Factory.StartNew(() => + { + if (inputList == null || inputList.Count < 1) + { + return false; + } + var list = inputList.Select(x => x.Adapt<UpdateXhsProjectInput, Model.XhsProject>()).ToList(); + var bol = _service.Updates(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔洿鏂� + /// </summary> + public async Task<bool> BulkUpdates(List<UpdateXhsProjectInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鏇存柊缂栫爜 + /// </summary> + public async Task<bool> UpdateCode(long ID, string Code) + { + 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(() => + { + var bol = _service.UpdateTagName(ID, TagName); + return bol; + }); + } + + /// <summary> + /// 鏇存柊 UseStatus + /// </summary> + public async Task<bool> UpdateUseStatus(long ID, int UseStatus) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.UpdateUseStatus(ID, (Yw.Model.eUseStatus)UseStatus); + return bol; + }); + } + + #endregion Update + + #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; + }); + } + + public Task<long> InsertEx(AddXhsProjectInput projectInput, AddXhsProjectItemInput itemInput, AddXhsProjectItemModelInput modelInput, AddXhsProjectItemModelMapInput MapInput) + { + return Task.Factory.StartNew(() => + { + var project = projectInput.Adapt<AddXhsProjectInput, Model.XhsProject>(); + var item = itemInput.Adapt<AddXhsProjectItemInput, Model.XhsProjectItem>(); + var model = modelInput.Adapt<AddXhsProjectItemModelInput, Model.XhsProjectItemModel>(); + var map = MapInput.Adapt<AddXhsProjectItemModelMapInput, Model.XhsProjectItemModelMap>(); + var bol = _service.InsertsEx(project, item, model, map); + return bol; + }); + } + + public Task<bool> DeleteEx(long ID) + { + return Task.Factory.StartNew(() => + { + var bol = _service.DeleteEx(ID); + return bol; + }); + } + + public Task<bool> UpdateEx(UpdateXhsProjectInput projectInput, UpdateXhsProjectItemInput itemInput) + { + return Task.Factory.StartNew(() => + { + var project = projectInput.Adapt<UpdateXhsProjectInput, Model.XhsProject>(); + var item = itemInput.Adapt<UpdateXhsProjectItemInput, Model.XhsProjectItem>(); + var bol = _service.UpdateEx(project, item); + return bol; + }); + } + + #endregion Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/03-localclient/XhsProjectItem.cs b/BLL/HStation.BLL.Assets.Core/03-localclient/XhsProjectItem.cs new file mode 100644 index 0000000..339e6f9 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/03-localclient/XhsProjectItem.cs @@ -0,0 +1,289 @@ +锘縰sing HStation.Xhs; + +namespace HStation.CAL.LocalClient +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public class XhsProjectItem : IXhsProjectItem + { + private readonly HStation.Service.XhsProjectItem _service = new(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public async Task<List<XhsProjectItemDto>> GetAll() + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetAll(); + var vm_list = list?.Select(x => new XhsProjectItemDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public async Task<XhsProjectItemDto> GetByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(ID); + return model == null ? null : new XhsProjectItemDto(model); + }); + } + + /// <summary> + /// 閫氳繃 椤圭洰ID 鑾峰彇 + /// </summary> + public async Task<XhsProjectItemDto> GetByPrjID(long ID) + { + var all = await GetAll(); + var model = all.Where(x => x.ProjectID == ID).FirstOrDefault(); + return model == null ? null : model; + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public async Task<List<XhsProjectItemDto>> GetByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByIds(Ids); + var vm_list = list?.Select(x => new XhsProjectItemDto(x)).ToList(); + return vm_list; + }); + } + + #endregion Query + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public async Task<long> Insert(AddXhsProjectItemInput input) + { + return await Task.Factory.StartNew(() => + { + var model = input.Adapt<AddXhsProjectItemInput, Model.XhsProjectItem>(); + model.SortCode = _service.GetMaxSortCode() + 1; + var id = _service.Insert(model); + return id; + }); + } + + /// <summary> + /// 鎵归噺鎻掑叆 + /// </summary> + public async Task<bool> Inserts(List<AddXhsProjectItemInput> inputList) + { + return await Task.Factory.StartNew(() => + { + var list = inputList.Select(x => x.Adapt<AddXhsProjectItemInput, Model.XhsProjectItem>()).ToList(); + list.ForEach(x => + { + x.SortCode = _service.GetMaxSortCode() + 1 + list.IndexOf(x); + }); + var bol = _service.Inserts(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔彃鍏� + /// </summary> + public async Task<bool> BulkInserts(List<AddXhsProjectItemInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion Insert + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + public async Task<bool> Update(UpdateXhsProjectItemInput 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.XhsProjectItem(model); + input.Adapt(rhs); + var bol = _service.Update(rhs); + return bol; + }); + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public async Task<bool> Updates(List<UpdateXhsProjectItemInput> inputList) + { + return await Task.Factory.StartNew(() => + { + if (inputList == null || inputList.Count < 1) + { + return false; + } + var list = inputList.Select(x => x.Adapt<UpdateXhsProjectItemInput, Model.XhsProjectItem>()).ToList(); + var bol = _service.Updates(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔洿鏂� + /// </summary> + public async Task<bool> BulkUpdates(List<UpdateXhsProjectItemInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鏇存柊缂栫爜 + /// </summary> + public async Task<bool> UpdateCode(long ID, string Code) + { + 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(() => + { + var bol = _service.UpdateTagName(ID, TagName); + return bol; + }); + } + + /// <summary> + /// 鏇存柊 UseStatus + /// </summary> + public async Task<bool> UpdateUseStatus(long ID, int UseStatus) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.UpdateUseStatus(ID, (Yw.Model.eUseStatus)UseStatus); + return bol; + }); + } + + #endregion Update + + #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 Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/03-localclient/XhsProjectItemModel.cs b/BLL/HStation.BLL.Assets.Core/03-localclient/XhsProjectItemModel.cs new file mode 100644 index 0000000..2f28579 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/03-localclient/XhsProjectItemModel.cs @@ -0,0 +1,289 @@ +锘縰sing HStation.Xhs; + +namespace HStation.CAL.LocalClient +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public class XhsProjectItemModel : IXhsProjectItemModel + { + private readonly HStation.Service.XhsProjectItemModel _service = new(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public async Task<List<XhsProjectItemModelDto>> GetAll() + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetAll(); + var vm_list = list?.Select(x => new XhsProjectItemModelDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public async Task<XhsProjectItemModelDto> GetByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(ID); + return model == null ? null : new XhsProjectItemModelDto(model); + }); + } + + public async Task<List<XhsProjectItemModelDto>> GetByPrjID(long ID) + { + var alllist = await GetAll(); + if (alllist != null || alllist.Count > 0) + { + return alllist.Where(x => x.ProjectID == ID).ToList(); + } + return null; + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public async Task<List<XhsProjectItemModelDto>> GetByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByIds(Ids); + var vm_list = list?.Select(x => new XhsProjectItemModelDto(x)).ToList(); + return vm_list; + }); + } + + #endregion Query + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public async Task<long> Insert(AddXhsProjectItemModelInput input) + { + return await Task.Factory.StartNew(() => + { + var model = input.Adapt<AddXhsProjectItemModelInput, Model.XhsProjectItemModel>(); + model.SortCode = _service.GetMaxSortCode() + 1; + var id = _service.Insert(model); + return id; + }); + } + + /// <summary> + /// 鎵归噺鎻掑叆 + /// </summary> + public async Task<bool> Inserts(List<AddXhsProjectItemModelInput> inputList) + { + return await Task.Factory.StartNew(() => + { + var list = inputList.Select(x => x.Adapt<AddXhsProjectItemModelInput, Model.XhsProjectItemModel>()).ToList(); + list.ForEach(x => + { + x.SortCode = _service.GetMaxSortCode() + 1 + list.IndexOf(x); + }); + var bol = _service.Inserts(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔彃鍏� + /// </summary> + public async Task<bool> BulkInserts(List<AddXhsProjectItemModelInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion Insert + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + public async Task<bool> Update(UpdateXhsProjectItemModelInput 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.XhsProjectItemModel(model); + input.Adapt(rhs); + var bol = _service.Update(rhs); + return bol; + }); + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public async Task<bool> Updates(List<UpdateXhsProjectItemModelInput> inputList) + { + return await Task.Factory.StartNew(() => + { + if (inputList == null || inputList.Count < 1) + { + return false; + } + var list = inputList.Select(x => x.Adapt<UpdateXhsProjectItemModelInput, Model.XhsProjectItemModel>()).ToList(); + var bol = _service.Updates(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔洿鏂� + /// </summary> + public async Task<bool> BulkUpdates(List<UpdateXhsProjectItemModelInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鏇存柊缂栫爜 + /// </summary> + public async Task<bool> UpdateCode(long ID, string Code) + { + 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(() => + { + var bol = _service.UpdateTagName(ID, TagName); + return bol; + }); + } + + /// <summary> + /// 鏇存柊 UseStatus + /// </summary> + public async Task<bool> UpdateUseStatus(long ID, int UseStatus) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.UpdateUseStatus(ID, (Yw.Model.eUseStatus)UseStatus); + return bol; + }); + } + + #endregion Update + + #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 Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/03-localclient/XhsProjectItemModelMap.cs b/BLL/HStation.BLL.Assets.Core/03-localclient/XhsProjectItemModelMap.cs new file mode 100644 index 0000000..2e54218 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/03-localclient/XhsProjectItemModelMap.cs @@ -0,0 +1,225 @@ +锘縰sing HStation.Xhs; + +namespace HStation.CAL.LocalClient +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public class XhsProjectItemModelMap : IXhsProjectItemModelMap + { + private readonly HStation.Service.XhsProjectItemModelMap _service = new(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public async Task<List<XhsProjectItemModelMapDto>> GetAll() + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetAll(); + var vm_list = list?.Select(x => new XhsProjectItemModelMapDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public async Task<XhsProjectItemModelMapDto> GetByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(ID); + return model == null ? null : new XhsProjectItemModelMapDto(model); + }); + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public async Task<List<XhsProjectItemModelMapDto>> GetByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByIds(Ids); + var vm_list = list?.Select(x => new XhsProjectItemModelMapDto(x)).ToList(); + return vm_list; + }); + } + + #endregion Query + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public async Task<long> Insert(AddXhsProjectItemModelMapInput input) + { + return await Task.Factory.StartNew(() => + { + var model = input.Adapt<AddXhsProjectItemModelMapInput, Model.XhsProjectItemModelMap>(); + var id = _service.Insert(model); + return id; + }); + } + + /// <summary> + /// 鎵归噺鎻掑叆 + /// </summary> + public async Task<bool> Inserts(List<AddXhsProjectItemModelMapInput> inputList) + { + return await Task.Factory.StartNew(() => + { + var list = inputList.Select(x => x.Adapt<AddXhsProjectItemModelMapInput, Model.XhsProjectItemModelMap>()).ToList(); + var bol = _service.Inserts(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔彃鍏� + /// </summary> + public async Task<bool> BulkInserts(List<AddXhsProjectItemModelMapInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion Insert + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + public async Task<bool> Update(UpdateXhsProjectItemModelMapInput 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.XhsProjectItemModelMap(model); + input.Adapt(rhs); + var bol = _service.Update(rhs); + return bol; + }); + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public async Task<bool> Updates(List<UpdateXhsProjectItemModelMapInput> inputList) + { + return await Task.Factory.StartNew(() => + { + if (inputList == null || inputList.Count < 1) + { + return false; + } + var list = inputList.Select(x => x.Adapt<UpdateXhsProjectItemModelMapInput, Model.XhsProjectItemModelMap>()).ToList(); + var bol = _service.Updates(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔洿鏂� + /// </summary> + public async Task<bool> BulkUpdates(List<UpdateXhsProjectItemModelMapInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鏇存柊缂栫爜 + /// </summary> + public async Task<bool> UpdateCode(long ID, string Code) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <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> + /// 鏇存柊 UseStatus + /// </summary> + public async Task<bool> UpdateUseStatus(long ID, int UseStatus) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.UpdateUseStatus(ID, (Yw.Model.eUseStatus)UseStatus); + return bol; + }); + } + + #endregion Update + + #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 Delete + } +} \ 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 new file mode 100644 index 0000000..db41fda --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/04-bll/00-core/CALCreateHelper.cs @@ -0,0 +1,19 @@ +锘縩amespace HStation.BLL.Xhs +{ + /// <summary> + /// CAL杈呭姪绫� + /// </summary> + internal class CALCreateHelper + { + /// <summary> + /// 鍒涘缓DAL + /// </summary> + /// <typeparam name="T"></typeparam> + /// <returns></returns> + public static T CreateCAL<T>() + { + var type = Settings.XhsParasHelper.Xhs.CAL.CALType; + return Yw.CALFactory.CreateCAL<T>(type); + } + } +} diff --git a/BLL/HStation.BLL.Assets.Core/04-bll/01-ProjectItem/01-project/XhsProject.cs b/BLL/HStation.BLL.Assets.Core/04-bll/01-ProjectItem/01-project/XhsProject.cs new file mode 100644 index 0000000..226b89e --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/04-bll/01-ProjectItem/01-project/XhsProject.cs @@ -0,0 +1,188 @@ +锘縰sing HStation.CAL; +using Yw.DAL.Basic; + +namespace HStation.BLL +{ + /// <summary> + /// + /// </summary> + public class XhsProject : IXhsProject + { + private readonly HStation.CAL.IXhsProject _cal = CALCreateHelper.CreateCAL<HStation.CAL.IXhsProject>(); + + #region Query + + /// <summary> + /// + /// </summary> + public async Task<List<XhsProjectDto>> GetAll() + { + return await _cal.GetAll(); + } + + /// <summary> + /// + /// </summary> + public async Task<XhsProjectDto> GetByID(long ID) + { + return await _cal.GetByID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<List<XhsProjectDto>> GetByIds(List<long> Ids) + { + return await _cal.GetByIds(Ids); + } + + #endregion Query + + #region Insert + + /// <summary> + /// + /// </summary> + public async Task<long> Insert(AddXhsProjectInput model) + { + return await _cal.Insert(model); + } + + public async Task<long> InsertEx(AddXhsProjectInput projectInput, AddXhsProjectItemInput itemInput, AddXhsProjectItemModelInput modelInput, AddXhsProjectItemModelMapInput MapInput) + { + return await _cal.InsertEx(projectInput, itemInput, modelInput, MapInput); + } + + public async Task<bool> DeleteEx(long ID) + { + return await _cal.DeleteEx(ID); + } + + public async Task<bool> UpdateEx(UpdateXhsProjectInput projectInput, UpdateXhsProjectItemInput itemInput) + { + return await _cal.UpdateEx(projectInput, itemInput); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Inserts(List<AddXhsProjectInput> list) + { + return await _cal.Inserts(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkInserts(List<AddXhsProjectInput> list) + { + return await _cal.BulkInserts(list); + } + + #endregion Insert + + #region Update + + /// <summary> + /// + /// </summary> + public async Task<bool> Update(UpdateXhsProjectInput model) + { + return await _cal.Update(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Updates(List<UpdateXhsProjectInput> list) + { + return await _cal.Updates(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkUpdates(List<UpdateXhsProjectInput> list) + { + return await _cal.BulkUpdates(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> UpdateSortCode(long ID, int SortCode) + { + return await _cal.UpdateSortCode(ID, SortCode); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> UpdateSorter(List<UpdateSortCodeInput> Sorters) + { + return await _cal.UpdateSorter(Sorters); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateParas(long ID, Dictionary<string, string> Paras) + { + return _cal.UpdateParas(ID, Paras); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateFlags(long ID, List<string> Flags) + { + return _cal.UpdateFlags(ID, Flags); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateTagName(long ID, string TagName) + { + return _cal.UpdateTagName(ID, TagName); + } + + #endregion Update + + #region Delete + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByID(long ID) + { + return await _cal.DeleteByID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByIds(List<long> Ids) + { + return await _cal.DeleteByIds(Ids); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteAll() + { + return await _cal.DeleteAll(); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateUseStatus(long ID, int UseStatus) + { + return _cal.UpdateUseStatus(ID, UseStatus); + } + + #endregion Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/04-bll/01-ProjectItem/02-projectItem/XhsProjectItem.cs b/BLL/HStation.BLL.Assets.Core/04-bll/01-ProjectItem/02-projectItem/XhsProjectItem.cs new file mode 100644 index 0000000..14bad92 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/04-bll/01-ProjectItem/02-projectItem/XhsProjectItem.cs @@ -0,0 +1,180 @@ +锘縰sing HStation.CAL; + +namespace HStation.BLL +{ + /// <summary> + /// + /// </summary> + public class XhsProjectItem : IXhsProjectItem + { + private readonly HStation.CAL.IXhsProjectItem _cal = CALCreateHelper.CreateCAL<HStation.CAL.IXhsProjectItem>(); + + #region Query + + /// <summary> + /// + /// </summary> + public async Task<List<XhsProjectItemDto>> GetAll() + { + return await _cal.GetAll(); + } + + /// <summary> + /// + /// </summary> + public async Task<XhsProjectItemDto> GetByID(long ID) + { + return await _cal.GetByID(ID); + } + + /// <summary> + ///鏍规嵁椤圭洰id鏌ヨ + /// </summary> + public async Task<XhsProjectItemDto> GetByPrjID(long ID) + { + return await _cal.GetByPrjID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<List<XhsProjectItemDto>> GetByIds(List<long> Ids) + { + return await _cal.GetByIds(Ids); + } + + #endregion Query + + #region Insert + + /// <summary> + /// + /// </summary> + public async Task<long> Insert(AddXhsProjectItemInput model) + { + return await _cal.Insert(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Inserts(List<AddXhsProjectItemInput> list) + { + return await _cal.Inserts(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkInserts(List<AddXhsProjectItemInput> list) + { + return await _cal.BulkInserts(list); + } + + #endregion Insert + + #region Update + + /// <summary> + /// + /// </summary> + public async Task<bool> Update(UpdateXhsProjectItemInput model) + { + return await _cal.Update(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Updates(List<UpdateXhsProjectItemInput> list) + { + return await _cal.Updates(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkUpdates(List<UpdateXhsProjectItemInput> list) + { + return await _cal.BulkUpdates(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> UpdateSortCode(long ID, int SortCode) + { + return await _cal.UpdateSortCode(ID, SortCode); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> UpdateSorter(List<UpdateSortCodeInput> Sorters) + { + return await _cal.UpdateSorter(Sorters); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateParas(long ID, Dictionary<string, string> Paras) + { + return _cal.UpdateParas(ID, Paras); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateFlags(long ID, List<string> Flags) + { + return _cal.UpdateFlags(ID, Flags); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateTagName(long ID, string TagName) + { + return _cal.UpdateTagName(ID, TagName); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateUseStatus(long ID, int UseStatus) + { + return _cal.UpdateUseStatus(ID, UseStatus); + } + + #endregion Update + + #region Delete + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByID(long ID) + { + return await _cal.DeleteByID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByIds(List<long> Ids) + { + return await _cal.DeleteByIds(Ids); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteAll() + { + return await _cal.DeleteAll(); + } + + #endregion Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/04-bll/01-ProjectItem/03-projectItemModel/XhsProjectItemModel.cs b/BLL/HStation.BLL.Assets.Core/04-bll/01-ProjectItem/03-projectItemModel/XhsProjectItemModel.cs new file mode 100644 index 0000000..42fa5f0 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/04-bll/01-ProjectItem/03-projectItemModel/XhsProjectItemModel.cs @@ -0,0 +1,177 @@ +锘縰sing HStation.CAL; + +namespace HStation.BLL +{ + /// <summary> + /// + /// </summary> + public class XhsProjectItemModel : IXhsProjectItemModel + { + private readonly HStation.CAL.IXhsProjectItemModel _cal = CALCreateHelper.CreateCAL<HStation.CAL.IXhsProjectItemModel>(); + + #region Query + + /// <summary> + /// + /// </summary> + public async Task<List<XhsProjectItemModelDto>> GetAll() + { + return await _cal.GetAll(); + } + + /// <summary> + /// + /// </summary> + public async Task<XhsProjectItemModelDto> GetByID(long ID) + { + return await _cal.GetByID(ID); + } + + public async Task<List<XhsProjectItemModelDto>> GetByPrjID(long ID) + { + return await _cal.GetByPrjID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<List<XhsProjectItemModelDto>> GetByIds(List<long> Ids) + { + return await _cal.GetByIds(Ids); + } + + #endregion Query + + #region Insert + + /// <summary> + /// + /// </summary> + public async Task<long> Insert(AddXhsProjectItemModelInput model) + { + return await _cal.Insert(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Inserts(List<AddXhsProjectItemModelInput> list) + { + return await _cal.Inserts(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkInserts(List<AddXhsProjectItemModelInput> list) + { + return await _cal.BulkInserts(list); + } + + #endregion Insert + + #region Update + + /// <summary> + /// + /// </summary> + public async Task<bool> Update(UpdateXhsProjectItemModelInput model) + { + return await _cal.Update(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Updates(List<UpdateXhsProjectItemModelInput> list) + { + return await _cal.Updates(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkUpdates(List<UpdateXhsProjectItemModelInput> list) + { + return await _cal.BulkUpdates(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> UpdateSortCode(long ID, int SortCode) + { + return await _cal.UpdateSortCode(ID, SortCode); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> UpdateSorter(List<UpdateSortCodeInput> Sorters) + { + return await _cal.UpdateSorter(Sorters); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateParas(long ID, Dictionary<string, string> Paras) + { + return _cal.UpdateParas(ID, Paras); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateFlags(long ID, List<string> Flags) + { + return _cal.UpdateFlags(ID, Flags); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateTagName(long ID, string TagName) + { + return _cal.UpdateTagName(ID, TagName); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateUseStatus(long ID, int UseStatus) + { + return _cal.UpdateUseStatus(ID, UseStatus); + } + + #endregion Update + + #region Delete + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByID(long ID) + { + return await _cal.DeleteByID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByIds(List<long> Ids) + { + return await _cal.DeleteByIds(Ids); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteAll() + { + return await _cal.DeleteAll(); + } + + #endregion Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/04-bll/01-ProjectItem/04-projectItemModelMap/XhsProjectItemModelMap.cs b/BLL/HStation.BLL.Assets.Core/04-bll/01-ProjectItem/04-projectItemModelMap/XhsProjectItemModelMap.cs new file mode 100644 index 0000000..1f15461 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/04-bll/01-ProjectItem/04-projectItemModelMap/XhsProjectItemModelMap.cs @@ -0,0 +1,132 @@ +锘縰sing HStation.CAL; + +namespace HStation.BLL +{ + /// <summary> + /// + /// </summary> + public class XhsProjectItemModelMap : IXhsProjectItemModelMap + { + private readonly HStation.CAL.IXhsProjectItemModelMap _cal = CALCreateHelper.CreateCAL<HStation.CAL.IXhsProjectItemModelMap>(); + + #region Query + + /// <summary> + /// + /// </summary> + public async Task<List<XhsProjectItemModelMapDto>> GetAll() + { + return await _cal.GetAll(); + } + + /// <summary> + /// + /// </summary> + public async Task<XhsProjectItemModelMapDto> GetByID(long ID) + { + return await _cal.GetByID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<List<XhsProjectItemModelMapDto>> GetByIds(List<long> Ids) + { + return await _cal.GetByIds(Ids); + } + + #endregion Query + + #region Insert + + /// <summary> + /// + /// </summary> + public async Task<long> Insert(AddXhsProjectItemModelMapInput model) + { + return await _cal.Insert(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Inserts(List<AddXhsProjectItemModelMapInput> list) + { + return await _cal.Inserts(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkInserts(List<AddXhsProjectItemModelMapInput> list) + { + return await _cal.BulkInserts(list); + } + + #endregion Insert + + #region Update + + /// <summary> + /// + /// </summary> + public async Task<bool> Update(UpdateXhsProjectItemModelMapInput model) + { + return await _cal.Update(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Updates(List<UpdateXhsProjectItemModelMapInput> list) + { + return await _cal.Updates(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkUpdates(List<UpdateXhsProjectItemModelMapInput> list) + { + return await _cal.BulkUpdates(list); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateUseStatus(long ID, int UseStatus) + { + return _cal.UpdateUseStatus(ID, UseStatus); + } + + #endregion Update + + #region Delete + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByID(long ID) + { + return await _cal.DeleteByID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByIds(List<long> Ids) + { + return await _cal.DeleteByIds(Ids); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteAll() + { + return await _cal.DeleteAll(); + } + + #endregion Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/04-bll/02-PumpProdcuct/01-PumpSeries/PumpSeries.cs b/BLL/HStation.BLL.Assets.Core/04-bll/02-PumpProdcuct/01-PumpSeries/PumpSeries.cs new file mode 100644 index 0000000..a3fe656 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/04-bll/02-PumpProdcuct/01-PumpSeries/PumpSeries.cs @@ -0,0 +1,183 @@ +锘縰sing HStation.CAL; +using HStation.DAL; +using Yw.CAL; +using Yw.DAL.Basic; + +namespace HStation.BLL +{ + /// <summary> + /// + /// </summary> + public class PumpSeries : CAL.IPumpSeries + { + private readonly HStation.CAL.IPumpSeries _cal = CALCreateHelper.CreateCAL<HStation.CAL.IPumpSeries>(); + + #region Query + + /// <summary> + /// + /// </summary> + public async Task<List<PumpSeriesDto>> GetAll() + { + return await _cal.GetAll(); + } + + /// <summary> + /// + /// </summary> + public async Task<PumpSeriesDto> GetByID(long ID) + { + return await _cal.GetByID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<List<PumpSeriesDto>> GetByIds(List<long> Ids) + { + return await _cal.GetByIds(Ids); + } + + #endregion Query + + #region Insert + + /// <summary> + /// + /// </summary> + public async Task<long> Insert(AddPumpSeriesDto model) + { + return await _cal.Insert(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Inserts(List<AddPumpSeriesDto> list) + { + return await _cal.Inserts(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkInserts(List<AddPumpSeriesDto> list) + { + return await _cal.BulkInserts(list); + } + + #endregion Insert + + #region Update + + /// <summary> + /// + /// </summary> + public async Task<bool> Update(UpdatePumpSeriesDto model) + { + return await _cal.Update(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Updates(List<UpdatePumpSeriesDto> list) + { + return await _cal.Updates(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkUpdates(List<UpdatePumpSeriesDto> list) + { + return await _cal.BulkUpdates(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> UpdateSortCode(long ID, int SortCode) + { + return await _cal.UpdateSortCode(ID, SortCode); + } + + public async Task<bool> UpdateSorter(List<UpdateSortCodeInput> Sorters) + { + return await _cal.UpdateSorter(Sorters); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateParas(long ID, Dictionary<string, string> Paras) + { + return _cal.UpdateParas(ID, Paras); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateFlags(long ID, List<string> Flags) + { + return _cal.UpdateFlags(ID, Flags); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateTagName(long ID, string TagName) + { + return _cal.UpdateTagName(ID, TagName); + } + + #endregion Update + + #region Delete + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByID(long ID) + { + return await _cal.DeleteByID(ID); + } + + /// <summary> + /// 鍒犻櫎鎷撳睍 + /// </summary> + /// <param name="ID"></param> + /// <returns></returns> + /// <exception cref="NotImplementedException"></exception> + public bool DeleteEx(long ID) + { + return _cal.DeleteEx(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByIds(List<long> Ids) + { + return await _cal.DeleteByIds(Ids); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteAll() + { + return await _cal.DeleteAll(); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateUseStatus(long ID, int UseStatus) + { + return _cal.UpdateUseStatus(ID, UseStatus); + } + + #endregion Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/04-bll/02-PumpProdcuct/02-PumpGroup/PumpGroup.cs b/BLL/HStation.BLL.Assets.Core/04-bll/02-PumpProdcuct/02-PumpGroup/PumpGroup.cs new file mode 100644 index 0000000..6fa1e86 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/04-bll/02-PumpProdcuct/02-PumpGroup/PumpGroup.cs @@ -0,0 +1,164 @@ +锘縩amespace HStation.BLL +{ + /// <summary> + /// + /// </summary> + public class PumpGroup : CAL.IPumpGroup + { + private readonly HStation.CAL.IPumpGroup _cal = CALCreateHelper.CreateCAL<HStation.CAL.IPumpGroup>(); + + #region Query + + /// <summary> + /// + /// </summary> + public async Task<List<PumpGroupDto>> GetAll() + { + return await _cal.GetAll(); + } + + /// <summary> + /// + /// </summary> + public async Task<PumpGroupDto> GetByID(long ID) + { + return await _cal.GetByID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<List<PumpGroupDto>> GetByIds(List<long> Ids) + { + return await _cal.GetByIds(Ids); + } + + #endregion Query + + #region Insert + + /// <summary> + /// + /// </summary> + public async Task<long> Insert(AddPumpGroupDto model) + { + return await _cal.Insert(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Inserts(List<AddPumpGroupDto> list) + { + return await _cal.Inserts(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkInserts(List<AddPumpGroupDto> list) + { + return await _cal.BulkInserts(list); + } + + #endregion Insert + + #region Update + + /// <summary> + /// + /// </summary> + public async Task<bool> Update(UpdatePumpGroupDto model) + { + return await _cal.Update(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Updates(List<UpdatePumpGroupDto> list) + { + return await _cal.Updates(list); + } + + public bool DeleteEx(long ID) + { + return _cal.DeleteEx(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkUpdates(List<UpdatePumpGroupDto> list) + { + return await _cal.BulkUpdates(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> UpdateSortCode(long ID, int SortCode) + { + return await _cal.UpdateSortCode(ID, SortCode); + } + + public async Task<bool> UpdateSorter(List<UpdateSortCodeInput> Sorters) + { + return await _cal.UpdateSorter(Sorters); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateParas(long ID, Dictionary<string, string> Paras) + { + return _cal.UpdateParas(ID, Paras); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateFlags(long ID, List<string> Flags) + { + return _cal.UpdateFlags(ID, Flags); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateTagName(long ID, string TagName) + { + return _cal.UpdateTagName(ID, TagName); + } + + #endregion Update + + #region Delete + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByID(long ID) + { + return await _cal.DeleteByID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByIds(List<long> Ids) + { + return await _cal.DeleteByIds(Ids); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteAll() + { + return await _cal.DeleteAll(); + } + + #endregion Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/04-bll/02-PumpProdcuct/03-PumpMain/PumpMain.cs b/BLL/HStation.BLL.Assets.Core/04-bll/02-PumpProdcuct/03-PumpMain/PumpMain.cs new file mode 100644 index 0000000..b7fb9f8 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/04-bll/02-PumpProdcuct/03-PumpMain/PumpMain.cs @@ -0,0 +1,184 @@ +锘縩amespace HStation.BLL +{ + /// <summary> + /// + /// </summary> + public class PumpMain : CAL.IPumpMain + { + private readonly HStation.CAL.IPumpMain _cal = CALCreateHelper.CreateCAL<HStation.CAL.IPumpMain>(); + + #region Query + + /// <summary> + /// + /// </summary> + public async Task<List<PumpMainDto>> GetAll() + { + return await _cal.GetAll(); + } + + /// <summary> + /// + /// </summary> + public async Task<PumpMainDto> GetByID(long ID) + { + return await _cal.GetByID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<List<PumpMainDto>> GetByIds(List<long> Ids) + { + return await _cal.GetByIds(Ids); + } + + #endregion Query + + #region Insert + + /// <summary> + /// + /// </summary> + public async Task<long> Insert(AddPumpMainDto model) + { + return await _cal.Insert(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Inserts(List<AddPumpMainDto> list) + { + return await _cal.Inserts(list); + } + + /// <summary> + /// 鎻掑叆鎷撳睍 + /// </summary> + /// <param name="input"></param> + /// <param name="map"></param> + /// <returns></returns> + /// <exception cref="NotImplementedException"></exception> + public async Task<long> InsertEx(AddPumpMainDto input, AddPumpGroupAndMainMapDto map) + { + return await _cal.InsertEx(input, map); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkInserts(List<AddPumpMainDto> list) + { + return await _cal.BulkInserts(list); + } + + #endregion Insert + + #region Update + + /// <summary> + /// + /// </summary> + public async Task<bool> Update(UpdatePumpMainDto model) + { + return await _cal.Update(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Updates(List<UpdatePumpMainDto> list) + { + return await _cal.Updates(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkUpdates(List<UpdatePumpMainDto> list) + { + return await _cal.BulkUpdates(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> UpdateSortCode(long ID, int SortCode) + { + return await _cal.UpdateSortCode(ID, SortCode); + } + + public async Task<bool> UpdateSorter(List<UpdateSortCodeInput> Sorters) + { + return await _cal.UpdateSorter(Sorters); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateParas(long ID, Dictionary<string, string> Paras) + { + return _cal.UpdateParas(ID, Paras); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateFlags(long ID, List<string> Flags) + { + return _cal.UpdateFlags(ID, Flags); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateTagName(long ID, string TagName) + { + return _cal.UpdateTagName(ID, TagName); + } + + #endregion Update + + #region Delete + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByID(long ID) + { + return await _cal.DeleteByID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByIds(List<long> Ids) + { + return await _cal.DeleteByIds(Ids); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteAll() + { + return await _cal.DeleteAll(); + } + + public async Task<List<PumpMainDto>> GetByPumpSeriesID(long ID) + { + return await _cal.GetByPumpSeriesID(ID); + } + + /// <summary> + ///閫氳繃鍨嬪彿ID鍒犻櫎Map涓搴旀暟鎹� + /// </summary> + public async Task<bool> DeleteMapByMainID(long ID) + { + return await _cal.DeleteMapByMainID(ID); + } + + #endregion Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/04-bll/02-PumpProdcuct/04-PumpGroupAndMainMap/PumpGroupAndMainMap.cs b/BLL/HStation.BLL.Assets.Core/04-bll/02-PumpProdcuct/04-PumpGroupAndMainMap/PumpGroupAndMainMap.cs new file mode 100644 index 0000000..b2a28e1 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/04-bll/02-PumpProdcuct/04-PumpGroupAndMainMap/PumpGroupAndMainMap.cs @@ -0,0 +1,152 @@ +锘縩amespace HStation.BLL +{ + /// <summary> + /// + /// </summary> + public class PumpGroupAndMainMap : CAL.IPumpGroupAndMainMap + { + private readonly HStation.CAL.IPumpGroupAndMainMap _cal = CALCreateHelper.CreateCAL<HStation.CAL.IPumpGroupAndMainMap>(); + + #region Query + + /// <summary> + /// + /// </summary> + public async Task<List<PumpGroupAndMainMapDto>> GetAll() + { + return await _cal.GetAll(); + } + + /// <summary> + /// + /// </summary> + public async Task<PumpGroupAndMainMapDto> GetByID(long ID) + { + return await _cal.GetByID(ID); + } + + //閫氳繃缁処d鏌ユ壘杩斿洖鍨嬪彿 ID + public List<long> GetByGroupID(long ID) + { + return _cal.GetByGroupID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<List<PumpGroupAndMainMapDto>> GetByIds(List<long> Ids) + { + return await _cal.GetByIds(Ids); + } + + #endregion Query + + #region Insert + + /// <summary> + /// + /// </summary> + public async Task<long> Insert(AddPumpGroupAndMainMapDto model) + { + return await _cal.Insert(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Inserts(List<AddPumpGroupAndMainMapDto> list) + { + return await _cal.Inserts(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkInserts(List<AddPumpGroupAndMainMapDto> list) + { + return await _cal.BulkInserts(list); + } + + #endregion Insert + + #region Update + + /// <summary> + /// + /// </summary> + public async Task<bool> Update(UpdatePumpGroupAndMainMapDto model) + { + return await _cal.Update(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Updates(List<UpdatePumpGroupAndMainMapDto> list) + { + return await _cal.Updates(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkUpdates(List<UpdatePumpGroupAndMainMapDto> list) + { + return await _cal.BulkUpdates(list); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateParas(long ID, Dictionary<string, string> Paras) + { + return _cal.UpdateParas(ID, Paras); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateFlags(long ID, List<string> Flags) + { + return _cal.UpdateFlags(ID, Flags); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateTagName(long ID, string TagName) + { + return _cal.UpdateTagName(ID, TagName); + } + + #endregion Update + + #region Delete + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByID(long ID) + { + return await _cal.DeleteByID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByIds(List<long> Ids) + { + return await _cal.DeleteByIds(Ids); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteAll() + { + return await _cal.DeleteAll(); + } + + #endregion Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/04-bll/02-PumpProdcuct/05-PumpPartMain/PumpPartMain.cs b/BLL/HStation.BLL.Assets.Core/04-bll/02-PumpProdcuct/05-PumpPartMain/PumpPartMain.cs new file mode 100644 index 0000000..81bc07f --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/04-bll/02-PumpProdcuct/05-PumpPartMain/PumpPartMain.cs @@ -0,0 +1,122 @@ +锘縩amespace HStation.BLL +{ + /// <summary> + /// + /// </summary> + public class PumpPartMain : CAL.IPumpPartMain + { + private readonly HStation.CAL.IPumpPartMain _cal = CALCreateHelper.CreateCAL<HStation.CAL.IPumpPartMain>(); + + #region Query + + /// <summary> + /// + /// </summary> + public async Task<List<PumpPartMainDto>> GetAll() + { + return await _cal.GetAll(); + } + + /// <summary> + /// + /// </summary> + public async Task<PumpPartMainDto> GetByID(long ID) + { + return await _cal.GetByID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<List<PumpPartMainDto>> GetByIds(List<long> Ids) + { + return await _cal.GetByIds(Ids); + } + + #endregion Query + + #region Insert + + /// <summary> + /// + /// </summary> + public async Task<long> Insert(AddPumpPartMainDto model) + { + return await _cal.Insert(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Inserts(List<AddPumpPartMainDto> list) + { + return await _cal.Inserts(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkInserts(List<AddPumpPartMainDto> list) + { + return await _cal.BulkInserts(list); + } + + #endregion Insert + + #region Update + + /// <summary> + /// + /// </summary> + public async Task<bool> Update(UpdatePumpPartMainDto model) + { + return await _cal.Update(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Updates(List<UpdatePumpPartMainDto> list) + { + return await _cal.Updates(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkUpdates(List<UpdatePumpPartMainDto> list) + { + return await _cal.BulkUpdates(list); + } + + #endregion Update + + #region Delete + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByID(long ID) + { + return await _cal.DeleteByID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByIds(List<long> Ids) + { + return await _cal.DeleteByIds(Ids); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteAll() + { + return await _cal.DeleteAll(); + } + + #endregion Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/04-bll/02-PumpProdcuct/06-PumpPropContent/PumpPartPropContent.cs b/BLL/HStation.BLL.Assets.Core/04-bll/02-PumpProdcuct/06-PumpPropContent/PumpPartPropContent.cs new file mode 100644 index 0000000..c7590b6 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/04-bll/02-PumpProdcuct/06-PumpPropContent/PumpPartPropContent.cs @@ -0,0 +1,122 @@ +锘縩amespace HStation.BLL +{ + /// <summary> + /// + /// </summary> + public class PumpPartPropContent : CAL.IPumpPartPropContent + { + private readonly HStation.CAL.IPumpPartPropContent _cal = CALCreateHelper.CreateCAL<HStation.CAL.IPumpPartPropContent>(); + + #region Query + + /// <summary> + /// + /// </summary> + public async Task<List<PumpPropContentDto>> GetAll() + { + return await _cal.GetAll(); + } + + /// <summary> + /// + /// </summary> + public async Task<PumpPropContentDto> GetByID(long ID) + { + return await _cal.GetByID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<List<PumpPropContentDto>> GetByIds(List<long> Ids) + { + return await _cal.GetByIds(Ids); + } + + #endregion Query + + #region Insert + + /// <summary> + /// + /// </summary> + public async Task<long> Insert(AddPumpPropContentDto model) + { + return await _cal.Insert(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Inserts(List<AddPumpPropContentDto> list) + { + return await _cal.Inserts(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkInserts(List<AddPumpPropContentDto> list) + { + return await _cal.BulkInserts(list); + } + + #endregion Insert + + #region Update + + /// <summary> + /// + /// </summary> + public async Task<bool> Update(UpdatePumpPropContentDto model) + { + return await _cal.Update(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Updates(List<UpdatePumpPropContentDto> list) + { + return await _cal.Updates(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkUpdates(List<UpdatePumpPropContentDto> list) + { + return await _cal.BulkUpdates(list); + } + + #endregion Update + + #region Delete + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByID(long ID) + { + return await _cal.DeleteByID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByIds(List<long> Ids) + { + return await _cal.DeleteByIds(Ids); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteAll() + { + return await _cal.DeleteAll(); + } + + #endregion Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/04-bll/02-PumpProdcuct/07-PumpMainAndPartMap/PumpPartPropContent.cs b/BLL/HStation.BLL.Assets.Core/04-bll/02-PumpProdcuct/07-PumpMainAndPartMap/PumpPartPropContent.cs new file mode 100644 index 0000000..b3e8c11 --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/04-bll/02-PumpProdcuct/07-PumpMainAndPartMap/PumpPartPropContent.cs @@ -0,0 +1,122 @@ +锘縩amespace HStation.BLL +{ + /// <summary> + /// + /// </summary> + public class PumpMainAndPartMap : CAL.IPumpMainAndPartMap + { + private readonly HStation.CAL.IPumpMainAndPartMap _cal = CALCreateHelper.CreateCAL<HStation.CAL.IPumpMainAndPartMap>(); + + #region Query + + /// <summary> + /// + /// </summary> + public async Task<List<PumpMainAndPartMapDto>> GetAll() + { + return await _cal.GetAll(); + } + + /// <summary> + /// + /// </summary> + public async Task<PumpMainAndPartMapDto> GetByID(long ID) + { + return await _cal.GetByID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<List<PumpMainAndPartMapDto>> GetByIds(List<long> Ids) + { + return await _cal.GetByIds(Ids); + } + + #endregion Query + + #region Insert + + /// <summary> + /// + /// </summary> + public async Task<long> Insert(AddPumpMainAndPartMapDto model) + { + return await _cal.Insert(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Inserts(List<AddPumpMainAndPartMapDto> list) + { + return await _cal.Inserts(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkInserts(List<AddPumpMainAndPartMapDto> list) + { + return await _cal.BulkInserts(list); + } + + #endregion Insert + + #region Update + + /// <summary> + /// + /// </summary> + public async Task<bool> Update(UpdatePumpMainAndPartMapDto model) + { + return await _cal.Update(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Updates(List<UpdatePumpMainAndPartMapDto> list) + { + return await _cal.Updates(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkUpdates(List<UpdatePumpMainAndPartMapDto> list) + { + return await _cal.BulkUpdates(list); + } + + #endregion Update + + #region Delete + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByID(long ID) + { + return await _cal.DeleteByID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByIds(List<long> Ids) + { + return await _cal.DeleteByIds(Ids); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteAll() + { + return await _cal.DeleteAll(); + } + + #endregion Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Assets.Core/GlobalUsings.cs b/BLL/HStation.BLL.Assets.Core/GlobalUsings.cs new file mode 100644 index 0000000..dd2535c --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/GlobalUsings.cs @@ -0,0 +1,7 @@ +锘縢lobal using Flurl.Http; +global using Mapster; +global using Yw.Dto; +global using Yw.Untity; +global using HStation.Dto; +global using HStation.BLL.Xhs; + diff --git a/BLL/HStation.BLL.Assets.Core/HStation.BLL.Xhs.Core.csproj b/BLL/HStation.BLL.Assets.Core/HStation.BLL.Xhs.Core.csproj new file mode 100644 index 0000000..f0f60dc --- /dev/null +++ b/BLL/HStation.BLL.Assets.Core/HStation.BLL.Xhs.Core.csproj @@ -0,0 +1,22 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <TargetFramework>net6.0</TargetFramework> + <ImplicitUsings>enable</ImplicitUsings> + <Nullable>disable</Nullable> + <Version>3.0.0</Version> + </PropertyGroup> + + <ItemGroup> + <PackageReference Include="Yw.CAL.HttpClient.Core" Version="3.0.9" /> + <PackageReference Include="Yw.CALFactory.Core" Version="3.0.2" /> + <PackageReference Include="Yw.Mapster.Core" Version="3.0.0" /> + </ItemGroup> + + <ItemGroup> + <ProjectReference Include="..\..\Dto\HStation.Dto.Xhs.Core\HStation.Dto.Xhs.Core.csproj" /> + <ProjectReference Include="..\..\Service\HStation.Service.Xhs.Project.Core\HStation.Service.Xhs.Project.csproj" /> + <ProjectReference Include="..\..\Service\HStation.Service.Xhs.PumpProduct.Core\HStation.Service.Xhs.PumpProduct.csproj" /> + </ItemGroup> + +</Project> diff --git a/BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProduct/IPumpGroup.cs b/BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProduct/IPumpGroup.cs new file mode 100644 index 0000000..3f4ffed --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProduct/IPumpGroup.cs @@ -0,0 +1,17 @@ +锘縰sing Yw.CAL; + +namespace HStation.CAL +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public interface IPumpGroup : IBaseCAL<AddPumpGroupDto, UpdatePumpGroupDto, PumpGroupDto>, IUpdateParas, IUpdateFlags, IUpdateTagName, IUpdateSorter + { + /// <summary> + /// 鍒犻櫎鎷撳睍 + /// </summary> + /// <param name="ID"></param> + /// <returns></returns> + bool DeleteEx(long ID); + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProduct/IPumpGroupAndMainMap.cs b/BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProduct/IPumpGroupAndMainMap.cs new file mode 100644 index 0000000..483c2c2 --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProduct/IPumpGroupAndMainMap.cs @@ -0,0 +1,12 @@ +锘縰sing Yw.CAL; + +namespace HStation.CAL +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public interface IPumpGroupAndMainMap : IBaseCAL<AddPumpGroupAndMainMapDto, UpdatePumpGroupAndMainMapDto, PumpGroupAndMainMapDto>, IUpdateParas, IUpdateFlags, IUpdateTagName + { + List<long> GetByGroupID(long ID); + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProduct/IPumpMain.cs b/BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProduct/IPumpMain.cs new file mode 100644 index 0000000..884aec9 --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProduct/IPumpMain.cs @@ -0,0 +1,16 @@ +锘縰sing Yw.CAL; + +namespace HStation.CAL +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public interface IPumpMain : IBaseCAL<AddPumpMainDto, UpdatePumpMainDto, PumpMainDto>, IUpdateParas, IUpdateFlags, IUpdateTagName, IUpdateSorter + { + Task<List<PumpMainDto>> GetByPumpSeriesID(long ID); + + Task<long> InsertEx(AddPumpMainDto input, AddPumpGroupAndMainMapDto map); + + Task<bool> DeleteMapByMainID(long ID); + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProduct/IPumpMainAndPartMap.cs b/BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProduct/IPumpMainAndPartMap.cs new file mode 100644 index 0000000..5201252 --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProduct/IPumpMainAndPartMap.cs @@ -0,0 +1,11 @@ +锘縰sing Yw.CAL; + +namespace HStation.CAL +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public interface IPumpMainAndPartMap : IBaseCAL<AddPumpMainAndPartMapDto, UpdatePumpMainAndPartMapDto, PumpMainAndPartMapDto> + { + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProduct/IPumpPartMain.cs b/BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProduct/IPumpPartMain.cs new file mode 100644 index 0000000..04829bc --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProduct/IPumpPartMain.cs @@ -0,0 +1,11 @@ +锘縰sing Yw.CAL; + +namespace HStation.CAL +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public interface IPumpPartMain : IBaseCAL<AddPumpPartMainDto, UpdatePumpPartMainDto, PumpPartMainDto> + { + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProduct/IPumpPartPropContent.cs b/BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProduct/IPumpPartPropContent.cs new file mode 100644 index 0000000..0220840 --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProduct/IPumpPartPropContent.cs @@ -0,0 +1,11 @@ +锘縰sing Yw.CAL; + +namespace HStation.CAL +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public interface IPumpPartPropContent : IBaseCAL<AddPumpPropContentDto, UpdatePumpPropContentDto, PumpPropContentDto> + { + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProduct/IPumpSeries.cs b/BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProduct/IPumpSeries.cs new file mode 100644 index 0000000..8b983a2 --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProduct/IPumpSeries.cs @@ -0,0 +1,17 @@ +锘縰sing Yw.CAL; + +namespace HStation.CAL +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public interface IPumpSeries : IBaseCAL<AddPumpSeriesDto, UpdatePumpSeriesDto, PumpSeriesDto>, IUpdateParas, IUpdateFlags, IUpdateTagName, IUpdateSorter, IUpdateUseStatus + { + /// <summary> + /// 鍒犻櫎鎷撳睍 + /// </summary> + /// <param name="ID"></param> + /// <returns></returns> + bool DeleteEx(long ID); + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProject/IXhsProject.cs b/BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProject/IXhsProject.cs new file mode 100644 index 0000000..e6cfa69 --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProject/IXhsProject.cs @@ -0,0 +1,21 @@ +锘縰sing Yw.CAL; + +namespace HStation.CAL +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public interface IXhsProject : IBaseCAL<AddXhsProjectInput, UpdateXhsProjectInput, XhsProjectDto>, IUpdateParas, IUpdateFlags, IUpdateTagName, IUpdateSorter, IUpdateUseStatus + { + /// <summary> + /// 鎻掑叆鎷撳睍 + /// </summary> + Task<long> InsertEx(AddXhsProjectInput projectInput, AddXhsProjectItemInput itemInput, AddXhsProjectItemModelInput modelInput, AddXhsProjectItemModelMapInput MapInput); + + //鍒犻櫎鎷撳睍 + Task<bool> DeleteEx(long ID); + + //缂栬緫鎷撳睍 + Task<bool> UpdateEx(UpdateXhsProjectInput projectInput, UpdateXhsProjectItemInput itemInput); + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProject/IXhsProjectItem.cs b/BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProject/IXhsProjectItem.cs new file mode 100644 index 0000000..2887c3c --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProject/IXhsProjectItem.cs @@ -0,0 +1,13 @@ +锘縰sing Yw.CAL; + +namespace HStation.CAL +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public interface IXhsProjectItem : IBaseCAL<AddXhsProjectItemInput, UpdateXhsProjectItemInput, XhsProjectItemDto>, IUpdateParas, IUpdateFlags, IUpdateTagName, IUpdateSorter, IUpdateUseStatus + { + //閫氳繃椤圭洰id鏌ユ壘 + Task<XhsProjectItemDto> GetByPrjID(long ID); + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProject/IXhsProjectItemModel.cs b/BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProject/IXhsProjectItemModel.cs new file mode 100644 index 0000000..dc1dac8 --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProject/IXhsProjectItemModel.cs @@ -0,0 +1,13 @@ +锘縰sing Yw.CAL; + +namespace HStation.CAL +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public interface IXhsProjectItemModel : IBaseCAL<AddXhsProjectItemModelInput, UpdateXhsProjectItemModelInput, XhsProjectItemModelDto>, IUpdateParas, IUpdateFlags, IUpdateTagName, IUpdateSorter, IUpdateUseStatus + { + //鏍规嵁椤圭洰ID鏌ユ壘 + Task<List<XhsProjectItemModelDto>> GetByPrjID(long ID); + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProject/IXhsProjectItemModelMap.cs b/BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProject/IXhsProjectItemModelMap.cs new file mode 100644 index 0000000..1c9fe8c --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/01-interface/IPumpProject/IXhsProjectItemModelMap.cs @@ -0,0 +1,11 @@ +锘縰sing Yw.CAL; + +namespace HStation.CAL +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public interface IXhsProjectItemModelMap : IBaseCAL<AddXhsProjectItemModelMapInput, UpdateXhsProjectItemModelMapInput, XhsProjectItemModelMapDto>, IUpdateUseStatus + { + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/02-httpclient/XhsProject.cs b/BLL/HStation.BLL.Xhs.Core/02-httpclient/XhsProject.cs new file mode 100644 index 0000000..55966f0 --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/02-httpclient/XhsProject.cs @@ -0,0 +1,45 @@ +锘縰sing Yw.CAL.HttpClient; + +namespace HStation.CAL.HttpClient +{ + /// <summary> + /// + /// </summary> + public class XhsProject : BaseCAL_Paras_Flags_TagName_Sorter_UseStatus<AddXhsProjectInput, UpdateXhsProjectInput, XhsProjectDto>, IXhsProject + { + protected override string Prefix + { + get { return $"{HStation.BLL.Xhs.ConfigHelper.HttpUrl}/Xhs/Project"; } + } + + public Task<bool> DeleteEx(long ID) + { + return default; + } + + public class ProjectInputs + { + public AddXhsProjectInput ProjectInput { get; set; } + public AddXhsProjectItemInput ItemInput { get; set; } + public AddXhsProjectItemModelInput ModelInput { get; set; } + public AddXhsProjectItemModelMapInput MapInput { get; set; } + } + + public async Task<long> InsertEx(AddXhsProjectInput projectInput, AddXhsProjectItemInput itemInput, AddXhsProjectItemModelInput modelInput, AddXhsProjectItemModelMapInput MapInput) + { + var posttext = new ProjectInputs + { + ItemInput = itemInput, + ModelInput = modelInput, + MapInput = MapInput, + ProjectInput = projectInput, + }; + return await GetUrl("InsertEx@V1.0").Post<long>(posttext); + } + + public Task<bool> UpdateEx(UpdateXhsProjectInput projectInput, UpdateXhsProjectItemInput itemInput) + { + throw new NotImplementedException(); + } + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/02-httpclient/XhsProjectItem.cs b/BLL/HStation.BLL.Xhs.Core/02-httpclient/XhsProjectItem.cs new file mode 100644 index 0000000..d5be948 --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/02-httpclient/XhsProjectItem.cs @@ -0,0 +1,20 @@ +锘縰sing Yw.CAL.HttpClient; + +namespace HStation.CAL.HttpClient +{ + /// <summary> + /// + /// </summary> + public class XhsProjectItem : BaseCAL_Paras_Flags_TagName_Sorter_UseStatus<AddXhsProjectItemInput, UpdateXhsProjectItemInput, XhsProjectItemDto>, IXhsProjectItem + { + protected override string Prefix + { + get { return $"{HStation.BLL.Xhs.ConfigHelper.HttpUrl}/Xhs/Project/Item"; } + } + + public Task<XhsProjectItemDto> GetByPrjID(long ID) + { + throw new NotImplementedException(); + } + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/02-httpclient/XhsProjectItemModel.cs b/BLL/HStation.BLL.Xhs.Core/02-httpclient/XhsProjectItemModel.cs new file mode 100644 index 0000000..f0429a7 --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/02-httpclient/XhsProjectItemModel.cs @@ -0,0 +1,20 @@ +锘縰sing Yw.CAL.HttpClient; + +namespace HStation.CAL.HttpClient +{ + /// <summary> + /// + /// </summary> + public class XhsProjectItemModel : BaseCAL_Paras_Flags_TagName_Sorter_UseStatus<AddXhsProjectItemModelInput, UpdateXhsProjectItemModelInput, XhsProjectItemModelDto>, IXhsProjectItemModel + { + protected override string Prefix + { + get { return $"{HStation.BLL.Xhs.ConfigHelper.HttpUrl}/Xhs/Project/Item/Model"; } + } + + public Task<List<XhsProjectItemModelDto>> GetByPrjID(long ID) + { + throw new NotImplementedException(); + } + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/02-httpclient/XhsProjectItemModelMap.cs b/BLL/HStation.BLL.Xhs.Core/02-httpclient/XhsProjectItemModelMap.cs new file mode 100644 index 0000000..cc353b3 --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/02-httpclient/XhsProjectItemModelMap.cs @@ -0,0 +1,15 @@ +锘縰sing Yw.CAL.HttpClient; + +namespace HStation.CAL.HttpClient +{ + /// <summary> + /// + /// </summary> + public class XhsProjectItemModelMap : BaseCAL_Paras_Flags_TagName_Sorter_UseStatus<AddXhsProjectItemModelMapInput, UpdateXhsProjectItemModelMapInput, XhsProjectItemModelMapDto>, IXhsProjectItemModelMap + { + protected override string Prefix + { + get { return $"{HStation.BLL.Xhs.ConfigHelper.HttpUrl}/Xhs/Project/Model/Map"; } + } + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/03-localclient/Pump/PumpGroup.cs b/BLL/HStation.BLL.Xhs.Core/03-localclient/Pump/PumpGroup.cs new file mode 100644 index 0000000..8d9c7ba --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/03-localclient/Pump/PumpGroup.cs @@ -0,0 +1,283 @@ +锘縰sing HStation.Xhs; +using Yw.Dto; + +namespace HStation.CAL.LocalClient +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public class PumpGroup : IPumpGroup + { + private readonly HStation.Service.PumpGroup _service = new(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public async Task<List<PumpGroupDto>> GetAll() + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetAll(); + var vm_list = list?.Select(x => new PumpGroupDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public async Task<PumpGroupDto> GetByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(ID); + return model == null ? null : new PumpGroupDto(model); + }); + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public async Task<List<PumpGroupDto>> GetByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByIds(Ids); + var vm_list = list?.Select(x => new PumpGroupDto(x)).ToList(); + return vm_list; + }); + } + + #endregion Query + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public async Task<long> Insert(AddPumpGroupDto input) + { + return await Task.Factory.StartNew(() => + { + var model = input.Adapt<AddPumpGroupDto, Model.PumpGroup>(); + model.SortCode = _service.GetMaxSortCode() + 1; + var id = _service.Insert(model); + return id; + }); + } + + /// <summary> + /// 鎵归噺鎻掑叆 + /// </summary> + public async Task<bool> Inserts(List<AddPumpGroupDto> inputList) + { + return await Task.Factory.StartNew(() => + { + var list = inputList.Select(x => x.Adapt<AddPumpGroupDto, Model.PumpGroup>()).ToList(); + list.ForEach(x => + { + x.SortCode = _service.GetMaxSortCode() + 1 + list.IndexOf(x); + }); + var bol = _service.Inserts(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔彃鍏� + /// </summary> + public async Task<bool> BulkInserts(List<AddPumpGroupDto> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion Insert + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + public async Task<bool> Update(UpdatePumpGroupDto 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.PumpGroup(model); + input.Adapt(rhs); + var bol = _service.Update(rhs); + return bol; + }); + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public async Task<bool> Updates(List<UpdatePumpGroupDto> inputList) + { + return await Task.Factory.StartNew(() => + { + if (inputList == null || inputList.Count < 1) + { + return false; + } + var list = inputList.Select(x => x.Adapt<UpdatePumpGroupDto, Model.PumpGroup>()).ToList(); + var bol = _service.Updates(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔洿鏂� + /// </summary> + public async Task<bool> BulkUpdates(List<UpdatePumpGroupDto> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鏇存柊缂栫爜 + /// </summary> + public async Task<bool> UpdateCode(long ID, string Code) + { + 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(() => + { + var bol = _service.UpdateTagName(ID, TagName); + return bol; + }); + } + + #endregion Update + + #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; + }); + } + + /// <summary> + /// 鍒犻櫎鎷撳睍 + /// </summary> + /// <param name="ID"></param> + /// <returns></returns> + public bool DeleteEx(long ID) + { + if (ID > 0) + { + var bol = _service.DeleteEx(ID); + return bol; + } + return false; + } + + #endregion Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/03-localclient/Pump/PumpGroupAndMainMap.cs b/BLL/HStation.BLL.Xhs.Core/03-localclient/Pump/PumpGroupAndMainMap.cs new file mode 100644 index 0000000..dddfc83 --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/03-localclient/Pump/PumpGroupAndMainMap.cs @@ -0,0 +1,247 @@ +锘縰sing HStation.Xhs; +using Yw.Dto; + +namespace HStation.CAL.LocalClient +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public class PumpGroupAndMainMap : IPumpGroupAndMainMap + { + private readonly HStation.Service.PumpGroupAndMainMap _service = new(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public async Task<List<PumpGroupAndMainMapDto>> GetAll() + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetAll(); + var vm_list = list?.Select(x => new PumpGroupAndMainMapDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public async Task<PumpGroupAndMainMapDto> GetByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(ID); + return model == null ? null : new PumpGroupAndMainMapDto(model); + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public List<long> GetByGroupID(long ID) + { + var model = Service.PumpGroupAndMainMap.GetMainIDByGroupID(ID); + return model; + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public async Task<List<PumpGroupAndMainMapDto>> GetByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByIds(Ids); + var vm_list = list?.Select(x => new PumpGroupAndMainMapDto(x)).ToList(); + return vm_list; + }); + } + + #endregion Query + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public async Task<long> Insert(AddPumpGroupAndMainMapDto input) + { + return await Task.Factory.StartNew(() => + { + var model = input.Adapt<AddPumpGroupAndMainMapDto, Model.PumpGroupAndMainMap>(); + var id = _service.Insert(model); + return id; + }); + } + + /// <summary> + /// 鎵归噺鎻掑叆 + /// </summary> + public async Task<bool> Inserts(List<AddPumpGroupAndMainMapDto> inputList) + { + return await Task.Factory.StartNew(() => + { + var list = inputList.Select(x => x.Adapt<AddPumpGroupAndMainMapDto, Model.PumpGroupAndMainMap>()).ToList(); + var bol = _service.Inserts(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔彃鍏� + /// </summary> + public async Task<bool> BulkInserts(List<AddPumpGroupAndMainMapDto> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion Insert + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + public async Task<bool> Update(UpdatePumpGroupAndMainMapDto 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.PumpGroupAndMainMap(model); + input.Adapt(rhs); + var bol = _service.Update(rhs); + return bol; + }); + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public async Task<bool> Updates(List<UpdatePumpGroupAndMainMapDto> inputList) + { + return await Task.Factory.StartNew(() => + { + if (inputList == null || inputList.Count < 1) + { + return false; + } + var list = inputList.Select(x => x.Adapt<UpdatePumpGroupAndMainMapDto, Model.PumpGroupAndMainMap>()).ToList(); + var bol = _service.Updates(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔洿鏂� + /// </summary> + public async Task<bool> BulkUpdates(List<UpdatePumpGroupAndMainMapDto> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鏇存柊缂栫爜 + /// </summary> + public async Task<bool> UpdateCode(long ID, string Code) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <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(() => + { + var bol = _service.UpdateTagName(ID, TagName); + return bol; + }); + } + + #endregion Update + + #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 Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/03-localclient/Pump/PumpMain.cs b/BLL/HStation.BLL.Xhs.Core/03-localclient/Pump/PumpMain.cs new file mode 100644 index 0000000..c01835e --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/03-localclient/Pump/PumpMain.cs @@ -0,0 +1,312 @@ +锘縰sing HStation.Xhs; +using Yw.Dto; + +namespace HStation.CAL.LocalClient +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public class PumpMain : IPumpMain + { + private readonly HStation.Service.PumpMain _service = new(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public async Task<List<PumpMainDto>> GetAll() + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetAll(); + var vm_list = list?.Select(x => new PumpMainDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public async Task<PumpMainDto> GetByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(ID); + return model == null ? null : new PumpMainDto(model); + }); + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public async Task<List<PumpMainDto>> GetByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByIds(Ids); + var vm_list = list?.Select(x => new PumpMainDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 绯诲垪ID 鑾峰彇 + /// </summary> + public async Task<List<PumpMainDto>> GetByPumpSeriesID(long ID) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByPumpSeriesID(ID); + var vm_list = list?.Select(x => new PumpMainDto(x)).ToList(); + return vm_list; + }); + } + + #endregion Query + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public async Task<long> Insert(AddPumpMainDto input) + { + return await Task.Factory.StartNew(() => + { + var model = input.Adapt<AddPumpMainDto, Model.PumpMain>(); + model.SortCode = _service.GetMaxSortCode() + 1; + var id = _service.Insert(model); + return id; + }); + } + + /// <summary> + /// 鎻掑叆鎷撳睍(鎻掑叆鍨嬪彿鍜屾槧灏勮〃) + /// </summary> + public async Task<long> InsertEx(AddPumpMainDto input, AddPumpGroupAndMainMapDto map) + { + return await Task.Factory.StartNew(() => + { + var model = input.Adapt<AddPumpMainDto, Model.PumpMain>(); + var entity = map.Adapt<AddPumpGroupAndMainMapDto, Model.PumpGroupAndMainMap>(); + model.SortCode = _service.GetMaxSortCode() + 1; + var id = _service.InsertEx(model, entity); + return id; + }); + } + + /// <summary> + /// 鎵归噺鎻掑叆 + /// </summary> + public async Task<bool> Inserts(List<AddPumpMainDto> inputList) + { + return await Task.Factory.StartNew(() => + { + var list = inputList.Select(x => x.Adapt<AddPumpMainDto, Model.PumpMain>()).ToList(); + list.ForEach(x => + { + x.SortCode = _service.GetMaxSortCode() + 1 + list.IndexOf(x); + }); + var bol = _service.Inserts(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔彃鍏� + /// </summary> + public async Task<bool> BulkInserts(List<AddPumpMainDto> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion Insert + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + public async Task<bool> Update(UpdatePumpMainDto 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.PumpMain(model); + input.Adapt(rhs); + var bol = _service.Update(rhs); + return bol; + }); + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public async Task<bool> Updates(List<UpdatePumpMainDto> inputList) + { + return await Task.Factory.StartNew(() => + { + if (inputList == null || inputList.Count < 1) + { + return false; + } + var list = inputList.Select(x => x.Adapt<UpdatePumpMainDto, Model.PumpMain>()).ToList(); + var bol = _service.Updates(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔洿鏂� + /// </summary> + public async Task<bool> BulkUpdates(List<UpdatePumpMainDto> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鏇存柊缂栫爜 + /// </summary> + public async Task<bool> UpdateCode(long ID, string Code) + { + 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(() => + { + var bol = _service.UpdateTagName(ID, TagName); + return bol; + }); + } + + #endregion Update + + #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> + /// 閫氳繃绯诲垪 ID 鍒犻櫎 鑷韩鍙妋ap鏄犲皠琛ㄤ腑ID + /// </summary> + public async Task<bool> DeleteMapByMainID(long ID) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.DeleteByMainIDEx(ID); + if (!bol) + { + return false; + } + 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 Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/03-localclient/Pump/PumpSeries.cs b/BLL/HStation.BLL.Xhs.Core/03-localclient/Pump/PumpSeries.cs new file mode 100644 index 0000000..8d8b88c --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/03-localclient/Pump/PumpSeries.cs @@ -0,0 +1,291 @@ +锘縰sing HStation.Xhs; +using Yw.Dto; + +namespace HStation.CAL.LocalClient +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public class PumpSeries : IPumpSeries + { + private readonly HStation.Service.PumpSeries _service = new(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public async Task<List<PumpSeriesDto>> GetAll() + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetAll(); + var vm_list = list?.Select(x => new PumpSeriesDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public async Task<PumpSeriesDto> GetByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(ID); + return model == null ? null : new PumpSeriesDto(model); + }); + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public async Task<List<PumpSeriesDto>> GetByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByIds(Ids); + var vm_list = list?.Select(x => new PumpSeriesDto(x)).ToList(); + return vm_list; + }); + } + + #endregion Query + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public async Task<long> Insert(AddPumpSeriesDto input) + { + return await Task.Factory.StartNew(() => + { + var model = input.Adapt<AddPumpSeriesDto, Model.PumpSeries>(); + model.SortCode = _service.GetMaxSortCode() + 1; + var id = _service.Insert(model); + return id; + }); + } + + /// <summary> + /// 鎵归噺鎻掑叆 + /// </summary> + public async Task<bool> Inserts(List<AddPumpSeriesDto> inputList) + { + return await Task.Factory.StartNew(() => + { + var list = inputList.Select(x => x.Adapt<AddPumpSeriesDto, Model.PumpSeries>()).ToList(); + list.ForEach(x => + { + x.SortCode = _service.GetMaxSortCode() + 1 + list.IndexOf(x); + }); + var bol = _service.Inserts(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔彃鍏� + /// </summary> + public async Task<bool> BulkInserts(List<AddPumpSeriesDto> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion Insert + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + public async Task<bool> Update(UpdatePumpSeriesDto 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.PumpSeries(model); + input.Adapt(rhs); + var bol = _service.Update(rhs); + return bol; + }); + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public async Task<bool> Updates(List<UpdatePumpSeriesDto> inputList) + { + return await Task.Factory.StartNew(() => + { + if (inputList == null || inputList.Count < 1) + { + return false; + } + var list = inputList.Select(x => x.Adapt<UpdatePumpSeriesDto, Model.PumpSeries>()).ToList(); + var bol = _service.Updates(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔洿鏂� + /// </summary> + public async Task<bool> BulkUpdates(List<UpdatePumpSeriesDto> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鏇存柊缂栫爜 + /// </summary> + public async Task<bool> UpdateCode(long ID, string Code) + { + 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(() => + { + var bol = _service.UpdateTagName(ID, TagName); + return bol; + }); + } + + /// <summary> + /// 鏇存柊 UseStatus + /// </summary> + public async Task<bool> UpdateUseStatus(long ID, int UseStatus) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.UpdateUseStatus(ID, (Yw.Model.eUseStatus)UseStatus); + return bol; + }); + } + + #endregion Update + + #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; + }); + } + + //鍒犻櫎鎷撳睍(鍒犻櫎绯诲垪涓嬫墍鏈夊唴瀹�) + public bool DeleteEx(long ID) + { + if (ID > 0) + { + var bol = _service.DeleteEx(ID); + return bol; + } + return false; + } + + #endregion Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/03-localclient/PumpProduct/PumpGroup.cs b/BLL/HStation.BLL.Xhs.Core/03-localclient/PumpProduct/PumpGroup.cs new file mode 100644 index 0000000..8d9c7ba --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/03-localclient/PumpProduct/PumpGroup.cs @@ -0,0 +1,283 @@ +锘縰sing HStation.Xhs; +using Yw.Dto; + +namespace HStation.CAL.LocalClient +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public class PumpGroup : IPumpGroup + { + private readonly HStation.Service.PumpGroup _service = new(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public async Task<List<PumpGroupDto>> GetAll() + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetAll(); + var vm_list = list?.Select(x => new PumpGroupDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public async Task<PumpGroupDto> GetByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(ID); + return model == null ? null : new PumpGroupDto(model); + }); + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public async Task<List<PumpGroupDto>> GetByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByIds(Ids); + var vm_list = list?.Select(x => new PumpGroupDto(x)).ToList(); + return vm_list; + }); + } + + #endregion Query + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public async Task<long> Insert(AddPumpGroupDto input) + { + return await Task.Factory.StartNew(() => + { + var model = input.Adapt<AddPumpGroupDto, Model.PumpGroup>(); + model.SortCode = _service.GetMaxSortCode() + 1; + var id = _service.Insert(model); + return id; + }); + } + + /// <summary> + /// 鎵归噺鎻掑叆 + /// </summary> + public async Task<bool> Inserts(List<AddPumpGroupDto> inputList) + { + return await Task.Factory.StartNew(() => + { + var list = inputList.Select(x => x.Adapt<AddPumpGroupDto, Model.PumpGroup>()).ToList(); + list.ForEach(x => + { + x.SortCode = _service.GetMaxSortCode() + 1 + list.IndexOf(x); + }); + var bol = _service.Inserts(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔彃鍏� + /// </summary> + public async Task<bool> BulkInserts(List<AddPumpGroupDto> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion Insert + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + public async Task<bool> Update(UpdatePumpGroupDto 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.PumpGroup(model); + input.Adapt(rhs); + var bol = _service.Update(rhs); + return bol; + }); + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public async Task<bool> Updates(List<UpdatePumpGroupDto> inputList) + { + return await Task.Factory.StartNew(() => + { + if (inputList == null || inputList.Count < 1) + { + return false; + } + var list = inputList.Select(x => x.Adapt<UpdatePumpGroupDto, Model.PumpGroup>()).ToList(); + var bol = _service.Updates(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔洿鏂� + /// </summary> + public async Task<bool> BulkUpdates(List<UpdatePumpGroupDto> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鏇存柊缂栫爜 + /// </summary> + public async Task<bool> UpdateCode(long ID, string Code) + { + 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(() => + { + var bol = _service.UpdateTagName(ID, TagName); + return bol; + }); + } + + #endregion Update + + #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; + }); + } + + /// <summary> + /// 鍒犻櫎鎷撳睍 + /// </summary> + /// <param name="ID"></param> + /// <returns></returns> + public bool DeleteEx(long ID) + { + if (ID > 0) + { + var bol = _service.DeleteEx(ID); + return bol; + } + return false; + } + + #endregion Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/03-localclient/PumpProduct/PumpGroupAndMainMap.cs b/BLL/HStation.BLL.Xhs.Core/03-localclient/PumpProduct/PumpGroupAndMainMap.cs new file mode 100644 index 0000000..dddfc83 --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/03-localclient/PumpProduct/PumpGroupAndMainMap.cs @@ -0,0 +1,247 @@ +锘縰sing HStation.Xhs; +using Yw.Dto; + +namespace HStation.CAL.LocalClient +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public class PumpGroupAndMainMap : IPumpGroupAndMainMap + { + private readonly HStation.Service.PumpGroupAndMainMap _service = new(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public async Task<List<PumpGroupAndMainMapDto>> GetAll() + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetAll(); + var vm_list = list?.Select(x => new PumpGroupAndMainMapDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public async Task<PumpGroupAndMainMapDto> GetByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(ID); + return model == null ? null : new PumpGroupAndMainMapDto(model); + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public List<long> GetByGroupID(long ID) + { + var model = Service.PumpGroupAndMainMap.GetMainIDByGroupID(ID); + return model; + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public async Task<List<PumpGroupAndMainMapDto>> GetByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByIds(Ids); + var vm_list = list?.Select(x => new PumpGroupAndMainMapDto(x)).ToList(); + return vm_list; + }); + } + + #endregion Query + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public async Task<long> Insert(AddPumpGroupAndMainMapDto input) + { + return await Task.Factory.StartNew(() => + { + var model = input.Adapt<AddPumpGroupAndMainMapDto, Model.PumpGroupAndMainMap>(); + var id = _service.Insert(model); + return id; + }); + } + + /// <summary> + /// 鎵归噺鎻掑叆 + /// </summary> + public async Task<bool> Inserts(List<AddPumpGroupAndMainMapDto> inputList) + { + return await Task.Factory.StartNew(() => + { + var list = inputList.Select(x => x.Adapt<AddPumpGroupAndMainMapDto, Model.PumpGroupAndMainMap>()).ToList(); + var bol = _service.Inserts(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔彃鍏� + /// </summary> + public async Task<bool> BulkInserts(List<AddPumpGroupAndMainMapDto> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion Insert + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + public async Task<bool> Update(UpdatePumpGroupAndMainMapDto 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.PumpGroupAndMainMap(model); + input.Adapt(rhs); + var bol = _service.Update(rhs); + return bol; + }); + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public async Task<bool> Updates(List<UpdatePumpGroupAndMainMapDto> inputList) + { + return await Task.Factory.StartNew(() => + { + if (inputList == null || inputList.Count < 1) + { + return false; + } + var list = inputList.Select(x => x.Adapt<UpdatePumpGroupAndMainMapDto, Model.PumpGroupAndMainMap>()).ToList(); + var bol = _service.Updates(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔洿鏂� + /// </summary> + public async Task<bool> BulkUpdates(List<UpdatePumpGroupAndMainMapDto> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鏇存柊缂栫爜 + /// </summary> + public async Task<bool> UpdateCode(long ID, string Code) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <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(() => + { + var bol = _service.UpdateTagName(ID, TagName); + return bol; + }); + } + + #endregion Update + + #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 Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/03-localclient/PumpProduct/PumpMain.cs b/BLL/HStation.BLL.Xhs.Core/03-localclient/PumpProduct/PumpMain.cs new file mode 100644 index 0000000..5f195f2 --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/03-localclient/PumpProduct/PumpMain.cs @@ -0,0 +1,315 @@ +锘縰sing HStation.Xhs; +using Yw.Dto; + +namespace HStation.CAL.LocalClient +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public class PumpMain : IPumpMain + { + private readonly HStation.Service.PumpMain _service = new(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public async Task<List<PumpMainDto>> GetAll() + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetAll(); + var vm_list = list?.Select(x => new PumpMainDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public async Task<PumpMainDto> GetByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(ID); + return model == null ? null : new PumpMainDto(model); + }); + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public async Task<List<PumpMainDto>> GetByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByIds(Ids); + var vm_list = list?.Select(x => new PumpMainDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 绯诲垪ID 鑾峰彇 + /// </summary> + public async Task<List<PumpMainDto>> GetByPumpSeriesID(long ID) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByPumpSeriesID(ID); + var vm_list = list?.Select(x => new PumpMainDto(x)).ToList(); + return vm_list; + }); + } + + #endregion Query + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public async Task<long> Insert(AddPumpMainDto input) + { + return await Task.Factory.StartNew(() => + { + var model = input.Adapt<AddPumpMainDto, Model.PumpMain>(); + model.SortCode = _service.GetMaxSortCode() + 1; + var id = _service.Insert(model); + return id; + }); + } + + /// <summary> + /// 鎻掑叆鎷撳睍(鎻掑叆鍨嬪彿鍜屾槧灏勮〃) + /// </summary> + public async Task<long> InsertEx(AddPumpMainDto input, AddPumpGroupAndMainMapDto mainmap, AddPumpPartMainDto part, List<AddPumpPropContentDto> content, AddPumpMainAndPartMapDto partmap) + { + return await Task.Factory.StartNew(() => + { + var mainmodel = input.Adapt<AddPumpMainDto, Model.PumpMain>(); + var mainmapmodel = mainmap.Adapt<AddPumpGroupAndMainMapDto, Model.PumpGroupAndMainMap>(); + mainmodel.SortCode = _service.GetMaxSortCode() + 1; + var partmodel = part.Adapt<AddPumpPartMainDto, Model.PumpPartMain>(); + var contentlist = content.Select(x => x.Adapt<AddPumpPropContentDto, Model.PumpPropContent>()).ToList(); + var partmapmodel = partmap.Adapt<AddPumpMainAndPartMapDto, Model.PumpMainAndPartMap>(); + var id = _service.InsertEx(mainmodel, mainmapmodel, partmodel, contentlist, partmapmodel); + return id; + }); + } + + /// <summary> + /// 鎵归噺鎻掑叆 + /// </summary> + public async Task<bool> Inserts(List<AddPumpMainDto> inputList) + { + return await Task.Factory.StartNew(() => + { + var list = inputList.Select(x => x.Adapt<AddPumpMainDto, Model.PumpMain>()).ToList(); + list.ForEach(x => + { + x.SortCode = _service.GetMaxSortCode() + 1 + list.IndexOf(x); + }); + var bol = _service.Inserts(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔彃鍏� + /// </summary> + public async Task<bool> BulkInserts(List<AddPumpMainDto> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion Insert + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + public async Task<bool> Update(UpdatePumpMainDto 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.PumpMain(model); + input.Adapt(rhs); + var bol = _service.Update(rhs); + return bol; + }); + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public async Task<bool> Updates(List<UpdatePumpMainDto> inputList) + { + return await Task.Factory.StartNew(() => + { + if (inputList == null || inputList.Count < 1) + { + return false; + } + var list = inputList.Select(x => x.Adapt<UpdatePumpMainDto, Model.PumpMain>()).ToList(); + var bol = _service.Updates(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔洿鏂� + /// </summary> + public async Task<bool> BulkUpdates(List<UpdatePumpMainDto> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鏇存柊缂栫爜 + /// </summary> + public async Task<bool> UpdateCode(long ID, string Code) + { + 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(() => + { + var bol = _service.UpdateTagName(ID, TagName); + return bol; + }); + } + + #endregion Update + + #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> + /// 閫氳繃绯诲垪 ID 鍒犻櫎 鑷韩鍙妋ap鏄犲皠琛ㄤ腑ID + /// </summary> + public async Task<bool> DeleteMapByMainID(long ID) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.DeleteByMainIDEx(ID); + if (!bol) + { + return false; + } + 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 Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/03-localclient/PumpProduct/PumpSeries.cs b/BLL/HStation.BLL.Xhs.Core/03-localclient/PumpProduct/PumpSeries.cs new file mode 100644 index 0000000..8d8b88c --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/03-localclient/PumpProduct/PumpSeries.cs @@ -0,0 +1,291 @@ +锘縰sing HStation.Xhs; +using Yw.Dto; + +namespace HStation.CAL.LocalClient +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public class PumpSeries : IPumpSeries + { + private readonly HStation.Service.PumpSeries _service = new(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public async Task<List<PumpSeriesDto>> GetAll() + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetAll(); + var vm_list = list?.Select(x => new PumpSeriesDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public async Task<PumpSeriesDto> GetByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(ID); + return model == null ? null : new PumpSeriesDto(model); + }); + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public async Task<List<PumpSeriesDto>> GetByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByIds(Ids); + var vm_list = list?.Select(x => new PumpSeriesDto(x)).ToList(); + return vm_list; + }); + } + + #endregion Query + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public async Task<long> Insert(AddPumpSeriesDto input) + { + return await Task.Factory.StartNew(() => + { + var model = input.Adapt<AddPumpSeriesDto, Model.PumpSeries>(); + model.SortCode = _service.GetMaxSortCode() + 1; + var id = _service.Insert(model); + return id; + }); + } + + /// <summary> + /// 鎵归噺鎻掑叆 + /// </summary> + public async Task<bool> Inserts(List<AddPumpSeriesDto> inputList) + { + return await Task.Factory.StartNew(() => + { + var list = inputList.Select(x => x.Adapt<AddPumpSeriesDto, Model.PumpSeries>()).ToList(); + list.ForEach(x => + { + x.SortCode = _service.GetMaxSortCode() + 1 + list.IndexOf(x); + }); + var bol = _service.Inserts(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔彃鍏� + /// </summary> + public async Task<bool> BulkInserts(List<AddPumpSeriesDto> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion Insert + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + public async Task<bool> Update(UpdatePumpSeriesDto 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.PumpSeries(model); + input.Adapt(rhs); + var bol = _service.Update(rhs); + return bol; + }); + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public async Task<bool> Updates(List<UpdatePumpSeriesDto> inputList) + { + return await Task.Factory.StartNew(() => + { + if (inputList == null || inputList.Count < 1) + { + return false; + } + var list = inputList.Select(x => x.Adapt<UpdatePumpSeriesDto, Model.PumpSeries>()).ToList(); + var bol = _service.Updates(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔洿鏂� + /// </summary> + public async Task<bool> BulkUpdates(List<UpdatePumpSeriesDto> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鏇存柊缂栫爜 + /// </summary> + public async Task<bool> UpdateCode(long ID, string Code) + { + 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(() => + { + var bol = _service.UpdateTagName(ID, TagName); + return bol; + }); + } + + /// <summary> + /// 鏇存柊 UseStatus + /// </summary> + public async Task<bool> UpdateUseStatus(long ID, int UseStatus) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.UpdateUseStatus(ID, (Yw.Model.eUseStatus)UseStatus); + return bol; + }); + } + + #endregion Update + + #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; + }); + } + + //鍒犻櫎鎷撳睍(鍒犻櫎绯诲垪涓嬫墍鏈夊唴瀹�) + public bool DeleteEx(long ID) + { + if (ID > 0) + { + var bol = _service.DeleteEx(ID); + return bol; + } + return false; + } + + #endregion Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/03-localclient/PumpProject/XhsProject.cs b/BLL/HStation.BLL.Xhs.Core/03-localclient/PumpProject/XhsProject.cs new file mode 100644 index 0000000..b2ee939 --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/03-localclient/PumpProject/XhsProject.cs @@ -0,0 +1,313 @@ +锘縰sing HStation.Xhs; +using Yw.Dto; + +namespace HStation.CAL.LocalClient +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public class XhsProject : IXhsProject + { + private readonly HStation.Service.XhsProject _service = new(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public async Task<List<XhsProjectDto>> GetAll() + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetAll(); + var vm_list = list?.Select(x => new XhsProjectDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public async Task<XhsProjectDto> GetByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(ID); + return model == null ? null : new XhsProjectDto(model); + }); + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public async Task<List<XhsProjectDto>> GetByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByIds(Ids); + var vm_list = list?.Select(x => new XhsProjectDto(x)).ToList(); + return vm_list; + }); + } + + #endregion Query + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public async Task<long> Insert(AddXhsProjectInput input) + { + return await Task.Factory.StartNew(() => + { + var model = input.Adapt<AddXhsProjectInput, Model.XhsProject>(); + model.SortCode = _service.GetMaxSortCode() + 1; + var id = _service.Insert(model); + return id; + }); + } + + /// <summary> + /// 鎵归噺鎻掑叆 + /// </summary> + public async Task<bool> Inserts(List<AddXhsProjectInput> inputList) + { + return await Task.Factory.StartNew(() => + { + var list = inputList.Select(x => x.Adapt<AddXhsProjectInput, Model.XhsProject>()).ToList(); + list.ForEach(x => + { + x.SortCode = _service.GetMaxSortCode() + 1 + list.IndexOf(x); + }); + var bol = _service.Inserts(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔彃鍏� + /// </summary> + public async Task<bool> BulkInserts(List<AddXhsProjectInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion Insert + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + public async Task<bool> Update(UpdateXhsProjectInput 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.XhsProject(model); + input.Adapt(rhs); + var bol = _service.Update(rhs); + return bol; + }); + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public async Task<bool> Updates(List<UpdateXhsProjectInput> inputList) + { + return await Task.Factory.StartNew(() => + { + if (inputList == null || inputList.Count < 1) + { + return false; + } + var list = inputList.Select(x => x.Adapt<UpdateXhsProjectInput, Model.XhsProject>()).ToList(); + var bol = _service.Updates(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔洿鏂� + /// </summary> + public async Task<bool> BulkUpdates(List<UpdateXhsProjectInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鏇存柊缂栫爜 + /// </summary> + public async Task<bool> UpdateCode(long ID, string Code) + { + 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(() => + { + var bol = _service.UpdateTagName(ID, TagName); + return bol; + }); + } + + /// <summary> + /// 鏇存柊 UseStatus + /// </summary> + public async Task<bool> UpdateUseStatus(long ID, int UseStatus) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.UpdateUseStatus(ID, (Yw.Model.eUseStatus)UseStatus); + return bol; + }); + } + + #endregion Update + + #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; + }); + } + + public Task<long> InsertEx(AddXhsProjectInput projectInput, AddXhsProjectItemInput itemInput, AddXhsProjectItemModelInput modelInput, AddXhsProjectItemModelMapInput MapInput) + { + return Task.Factory.StartNew(() => + { + var project = projectInput.Adapt<AddXhsProjectInput, Model.XhsProject>(); + var item = itemInput.Adapt<AddXhsProjectItemInput, Model.XhsProjectItem>(); + var model = modelInput.Adapt<AddXhsProjectItemModelInput, Model.XhsProjectItemModel>(); + var map = MapInput.Adapt<AddXhsProjectItemModelMapInput, Model.XhsProjectItemModelMap>(); + var bol = _service.InsertsEx(project, item, model, map); + return bol; + }); + } + + public Task<bool> DeleteEx(long ID) + { + return Task.Factory.StartNew(() => + { + var bol = _service.DeleteEx(ID); + return bol; + }); + } + + public Task<bool> UpdateEx(UpdateXhsProjectInput projectInput, UpdateXhsProjectItemInput itemInput) + { + return Task.Factory.StartNew(() => + { + var project = projectInput.Adapt<UpdateXhsProjectInput, Model.XhsProject>(); + var item = itemInput.Adapt<UpdateXhsProjectItemInput, Model.XhsProjectItem>(); + var bol = _service.UpdateEx(project, item); + return bol; + }); + } + + #endregion Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/03-localclient/PumpProject/XhsProjectItem.cs b/BLL/HStation.BLL.Xhs.Core/03-localclient/PumpProject/XhsProjectItem.cs new file mode 100644 index 0000000..339e6f9 --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/03-localclient/PumpProject/XhsProjectItem.cs @@ -0,0 +1,289 @@ +锘縰sing HStation.Xhs; + +namespace HStation.CAL.LocalClient +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public class XhsProjectItem : IXhsProjectItem + { + private readonly HStation.Service.XhsProjectItem _service = new(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public async Task<List<XhsProjectItemDto>> GetAll() + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetAll(); + var vm_list = list?.Select(x => new XhsProjectItemDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public async Task<XhsProjectItemDto> GetByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(ID); + return model == null ? null : new XhsProjectItemDto(model); + }); + } + + /// <summary> + /// 閫氳繃 椤圭洰ID 鑾峰彇 + /// </summary> + public async Task<XhsProjectItemDto> GetByPrjID(long ID) + { + var all = await GetAll(); + var model = all.Where(x => x.ProjectID == ID).FirstOrDefault(); + return model == null ? null : model; + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public async Task<List<XhsProjectItemDto>> GetByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByIds(Ids); + var vm_list = list?.Select(x => new XhsProjectItemDto(x)).ToList(); + return vm_list; + }); + } + + #endregion Query + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public async Task<long> Insert(AddXhsProjectItemInput input) + { + return await Task.Factory.StartNew(() => + { + var model = input.Adapt<AddXhsProjectItemInput, Model.XhsProjectItem>(); + model.SortCode = _service.GetMaxSortCode() + 1; + var id = _service.Insert(model); + return id; + }); + } + + /// <summary> + /// 鎵归噺鎻掑叆 + /// </summary> + public async Task<bool> Inserts(List<AddXhsProjectItemInput> inputList) + { + return await Task.Factory.StartNew(() => + { + var list = inputList.Select(x => x.Adapt<AddXhsProjectItemInput, Model.XhsProjectItem>()).ToList(); + list.ForEach(x => + { + x.SortCode = _service.GetMaxSortCode() + 1 + list.IndexOf(x); + }); + var bol = _service.Inserts(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔彃鍏� + /// </summary> + public async Task<bool> BulkInserts(List<AddXhsProjectItemInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion Insert + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + public async Task<bool> Update(UpdateXhsProjectItemInput 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.XhsProjectItem(model); + input.Adapt(rhs); + var bol = _service.Update(rhs); + return bol; + }); + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public async Task<bool> Updates(List<UpdateXhsProjectItemInput> inputList) + { + return await Task.Factory.StartNew(() => + { + if (inputList == null || inputList.Count < 1) + { + return false; + } + var list = inputList.Select(x => x.Adapt<UpdateXhsProjectItemInput, Model.XhsProjectItem>()).ToList(); + var bol = _service.Updates(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔洿鏂� + /// </summary> + public async Task<bool> BulkUpdates(List<UpdateXhsProjectItemInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鏇存柊缂栫爜 + /// </summary> + public async Task<bool> UpdateCode(long ID, string Code) + { + 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(() => + { + var bol = _service.UpdateTagName(ID, TagName); + return bol; + }); + } + + /// <summary> + /// 鏇存柊 UseStatus + /// </summary> + public async Task<bool> UpdateUseStatus(long ID, int UseStatus) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.UpdateUseStatus(ID, (Yw.Model.eUseStatus)UseStatus); + return bol; + }); + } + + #endregion Update + + #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 Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/03-localclient/PumpProject/XhsProjectItemModel.cs b/BLL/HStation.BLL.Xhs.Core/03-localclient/PumpProject/XhsProjectItemModel.cs new file mode 100644 index 0000000..2f28579 --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/03-localclient/PumpProject/XhsProjectItemModel.cs @@ -0,0 +1,289 @@ +锘縰sing HStation.Xhs; + +namespace HStation.CAL.LocalClient +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public class XhsProjectItemModel : IXhsProjectItemModel + { + private readonly HStation.Service.XhsProjectItemModel _service = new(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public async Task<List<XhsProjectItemModelDto>> GetAll() + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetAll(); + var vm_list = list?.Select(x => new XhsProjectItemModelDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public async Task<XhsProjectItemModelDto> GetByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(ID); + return model == null ? null : new XhsProjectItemModelDto(model); + }); + } + + public async Task<List<XhsProjectItemModelDto>> GetByPrjID(long ID) + { + var alllist = await GetAll(); + if (alllist != null || alllist.Count > 0) + { + return alllist.Where(x => x.ProjectID == ID).ToList(); + } + return null; + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public async Task<List<XhsProjectItemModelDto>> GetByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByIds(Ids); + var vm_list = list?.Select(x => new XhsProjectItemModelDto(x)).ToList(); + return vm_list; + }); + } + + #endregion Query + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public async Task<long> Insert(AddXhsProjectItemModelInput input) + { + return await Task.Factory.StartNew(() => + { + var model = input.Adapt<AddXhsProjectItemModelInput, Model.XhsProjectItemModel>(); + model.SortCode = _service.GetMaxSortCode() + 1; + var id = _service.Insert(model); + return id; + }); + } + + /// <summary> + /// 鎵归噺鎻掑叆 + /// </summary> + public async Task<bool> Inserts(List<AddXhsProjectItemModelInput> inputList) + { + return await Task.Factory.StartNew(() => + { + var list = inputList.Select(x => x.Adapt<AddXhsProjectItemModelInput, Model.XhsProjectItemModel>()).ToList(); + list.ForEach(x => + { + x.SortCode = _service.GetMaxSortCode() + 1 + list.IndexOf(x); + }); + var bol = _service.Inserts(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔彃鍏� + /// </summary> + public async Task<bool> BulkInserts(List<AddXhsProjectItemModelInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion Insert + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + public async Task<bool> Update(UpdateXhsProjectItemModelInput 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.XhsProjectItemModel(model); + input.Adapt(rhs); + var bol = _service.Update(rhs); + return bol; + }); + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public async Task<bool> Updates(List<UpdateXhsProjectItemModelInput> inputList) + { + return await Task.Factory.StartNew(() => + { + if (inputList == null || inputList.Count < 1) + { + return false; + } + var list = inputList.Select(x => x.Adapt<UpdateXhsProjectItemModelInput, Model.XhsProjectItemModel>()).ToList(); + var bol = _service.Updates(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔洿鏂� + /// </summary> + public async Task<bool> BulkUpdates(List<UpdateXhsProjectItemModelInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鏇存柊缂栫爜 + /// </summary> + public async Task<bool> UpdateCode(long ID, string Code) + { + 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(() => + { + var bol = _service.UpdateTagName(ID, TagName); + return bol; + }); + } + + /// <summary> + /// 鏇存柊 UseStatus + /// </summary> + public async Task<bool> UpdateUseStatus(long ID, int UseStatus) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.UpdateUseStatus(ID, (Yw.Model.eUseStatus)UseStatus); + return bol; + }); + } + + #endregion Update + + #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 Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/03-localclient/PumpProject/XhsProjectItemModelMap.cs b/BLL/HStation.BLL.Xhs.Core/03-localclient/PumpProject/XhsProjectItemModelMap.cs new file mode 100644 index 0000000..2e54218 --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/03-localclient/PumpProject/XhsProjectItemModelMap.cs @@ -0,0 +1,225 @@ +锘縰sing HStation.Xhs; + +namespace HStation.CAL.LocalClient +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public class XhsProjectItemModelMap : IXhsProjectItemModelMap + { + private readonly HStation.Service.XhsProjectItemModelMap _service = new(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public async Task<List<XhsProjectItemModelMapDto>> GetAll() + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetAll(); + var vm_list = list?.Select(x => new XhsProjectItemModelMapDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public async Task<XhsProjectItemModelMapDto> GetByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(ID); + return model == null ? null : new XhsProjectItemModelMapDto(model); + }); + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public async Task<List<XhsProjectItemModelMapDto>> GetByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByIds(Ids); + var vm_list = list?.Select(x => new XhsProjectItemModelMapDto(x)).ToList(); + return vm_list; + }); + } + + #endregion Query + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public async Task<long> Insert(AddXhsProjectItemModelMapInput input) + { + return await Task.Factory.StartNew(() => + { + var model = input.Adapt<AddXhsProjectItemModelMapInput, Model.XhsProjectItemModelMap>(); + var id = _service.Insert(model); + return id; + }); + } + + /// <summary> + /// 鎵归噺鎻掑叆 + /// </summary> + public async Task<bool> Inserts(List<AddXhsProjectItemModelMapInput> inputList) + { + return await Task.Factory.StartNew(() => + { + var list = inputList.Select(x => x.Adapt<AddXhsProjectItemModelMapInput, Model.XhsProjectItemModelMap>()).ToList(); + var bol = _service.Inserts(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔彃鍏� + /// </summary> + public async Task<bool> BulkInserts(List<AddXhsProjectItemModelMapInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion Insert + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + public async Task<bool> Update(UpdateXhsProjectItemModelMapInput 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.XhsProjectItemModelMap(model); + input.Adapt(rhs); + var bol = _service.Update(rhs); + return bol; + }); + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public async Task<bool> Updates(List<UpdateXhsProjectItemModelMapInput> inputList) + { + return await Task.Factory.StartNew(() => + { + if (inputList == null || inputList.Count < 1) + { + return false; + } + var list = inputList.Select(x => x.Adapt<UpdateXhsProjectItemModelMapInput, Model.XhsProjectItemModelMap>()).ToList(); + var bol = _service.Updates(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔洿鏂� + /// </summary> + public async Task<bool> BulkUpdates(List<UpdateXhsProjectItemModelMapInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鏇存柊缂栫爜 + /// </summary> + public async Task<bool> UpdateCode(long ID, string Code) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <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> + /// 鏇存柊 UseStatus + /// </summary> + public async Task<bool> UpdateUseStatus(long ID, int UseStatus) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.UpdateUseStatus(ID, (Yw.Model.eUseStatus)UseStatus); + return bol; + }); + } + + #endregion Update + + #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 Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/03-localclient/XhsProject.cs b/BLL/HStation.BLL.Xhs.Core/03-localclient/XhsProject.cs new file mode 100644 index 0000000..b2ee939 --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/03-localclient/XhsProject.cs @@ -0,0 +1,313 @@ +锘縰sing HStation.Xhs; +using Yw.Dto; + +namespace HStation.CAL.LocalClient +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public class XhsProject : IXhsProject + { + private readonly HStation.Service.XhsProject _service = new(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public async Task<List<XhsProjectDto>> GetAll() + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetAll(); + var vm_list = list?.Select(x => new XhsProjectDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public async Task<XhsProjectDto> GetByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(ID); + return model == null ? null : new XhsProjectDto(model); + }); + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public async Task<List<XhsProjectDto>> GetByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByIds(Ids); + var vm_list = list?.Select(x => new XhsProjectDto(x)).ToList(); + return vm_list; + }); + } + + #endregion Query + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public async Task<long> Insert(AddXhsProjectInput input) + { + return await Task.Factory.StartNew(() => + { + var model = input.Adapt<AddXhsProjectInput, Model.XhsProject>(); + model.SortCode = _service.GetMaxSortCode() + 1; + var id = _service.Insert(model); + return id; + }); + } + + /// <summary> + /// 鎵归噺鎻掑叆 + /// </summary> + public async Task<bool> Inserts(List<AddXhsProjectInput> inputList) + { + return await Task.Factory.StartNew(() => + { + var list = inputList.Select(x => x.Adapt<AddXhsProjectInput, Model.XhsProject>()).ToList(); + list.ForEach(x => + { + x.SortCode = _service.GetMaxSortCode() + 1 + list.IndexOf(x); + }); + var bol = _service.Inserts(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔彃鍏� + /// </summary> + public async Task<bool> BulkInserts(List<AddXhsProjectInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion Insert + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + public async Task<bool> Update(UpdateXhsProjectInput 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.XhsProject(model); + input.Adapt(rhs); + var bol = _service.Update(rhs); + return bol; + }); + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public async Task<bool> Updates(List<UpdateXhsProjectInput> inputList) + { + return await Task.Factory.StartNew(() => + { + if (inputList == null || inputList.Count < 1) + { + return false; + } + var list = inputList.Select(x => x.Adapt<UpdateXhsProjectInput, Model.XhsProject>()).ToList(); + var bol = _service.Updates(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔洿鏂� + /// </summary> + public async Task<bool> BulkUpdates(List<UpdateXhsProjectInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鏇存柊缂栫爜 + /// </summary> + public async Task<bool> UpdateCode(long ID, string Code) + { + 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(() => + { + var bol = _service.UpdateTagName(ID, TagName); + return bol; + }); + } + + /// <summary> + /// 鏇存柊 UseStatus + /// </summary> + public async Task<bool> UpdateUseStatus(long ID, int UseStatus) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.UpdateUseStatus(ID, (Yw.Model.eUseStatus)UseStatus); + return bol; + }); + } + + #endregion Update + + #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; + }); + } + + public Task<long> InsertEx(AddXhsProjectInput projectInput, AddXhsProjectItemInput itemInput, AddXhsProjectItemModelInput modelInput, AddXhsProjectItemModelMapInput MapInput) + { + return Task.Factory.StartNew(() => + { + var project = projectInput.Adapt<AddXhsProjectInput, Model.XhsProject>(); + var item = itemInput.Adapt<AddXhsProjectItemInput, Model.XhsProjectItem>(); + var model = modelInput.Adapt<AddXhsProjectItemModelInput, Model.XhsProjectItemModel>(); + var map = MapInput.Adapt<AddXhsProjectItemModelMapInput, Model.XhsProjectItemModelMap>(); + var bol = _service.InsertsEx(project, item, model, map); + return bol; + }); + } + + public Task<bool> DeleteEx(long ID) + { + return Task.Factory.StartNew(() => + { + var bol = _service.DeleteEx(ID); + return bol; + }); + } + + public Task<bool> UpdateEx(UpdateXhsProjectInput projectInput, UpdateXhsProjectItemInput itemInput) + { + return Task.Factory.StartNew(() => + { + var project = projectInput.Adapt<UpdateXhsProjectInput, Model.XhsProject>(); + var item = itemInput.Adapt<UpdateXhsProjectItemInput, Model.XhsProjectItem>(); + var bol = _service.UpdateEx(project, item); + return bol; + }); + } + + #endregion Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/03-localclient/XhsProjectItem.cs b/BLL/HStation.BLL.Xhs.Core/03-localclient/XhsProjectItem.cs new file mode 100644 index 0000000..339e6f9 --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/03-localclient/XhsProjectItem.cs @@ -0,0 +1,289 @@ +锘縰sing HStation.Xhs; + +namespace HStation.CAL.LocalClient +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public class XhsProjectItem : IXhsProjectItem + { + private readonly HStation.Service.XhsProjectItem _service = new(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public async Task<List<XhsProjectItemDto>> GetAll() + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetAll(); + var vm_list = list?.Select(x => new XhsProjectItemDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public async Task<XhsProjectItemDto> GetByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(ID); + return model == null ? null : new XhsProjectItemDto(model); + }); + } + + /// <summary> + /// 閫氳繃 椤圭洰ID 鑾峰彇 + /// </summary> + public async Task<XhsProjectItemDto> GetByPrjID(long ID) + { + var all = await GetAll(); + var model = all.Where(x => x.ProjectID == ID).FirstOrDefault(); + return model == null ? null : model; + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public async Task<List<XhsProjectItemDto>> GetByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByIds(Ids); + var vm_list = list?.Select(x => new XhsProjectItemDto(x)).ToList(); + return vm_list; + }); + } + + #endregion Query + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public async Task<long> Insert(AddXhsProjectItemInput input) + { + return await Task.Factory.StartNew(() => + { + var model = input.Adapt<AddXhsProjectItemInput, Model.XhsProjectItem>(); + model.SortCode = _service.GetMaxSortCode() + 1; + var id = _service.Insert(model); + return id; + }); + } + + /// <summary> + /// 鎵归噺鎻掑叆 + /// </summary> + public async Task<bool> Inserts(List<AddXhsProjectItemInput> inputList) + { + return await Task.Factory.StartNew(() => + { + var list = inputList.Select(x => x.Adapt<AddXhsProjectItemInput, Model.XhsProjectItem>()).ToList(); + list.ForEach(x => + { + x.SortCode = _service.GetMaxSortCode() + 1 + list.IndexOf(x); + }); + var bol = _service.Inserts(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔彃鍏� + /// </summary> + public async Task<bool> BulkInserts(List<AddXhsProjectItemInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion Insert + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + public async Task<bool> Update(UpdateXhsProjectItemInput 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.XhsProjectItem(model); + input.Adapt(rhs); + var bol = _service.Update(rhs); + return bol; + }); + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public async Task<bool> Updates(List<UpdateXhsProjectItemInput> inputList) + { + return await Task.Factory.StartNew(() => + { + if (inputList == null || inputList.Count < 1) + { + return false; + } + var list = inputList.Select(x => x.Adapt<UpdateXhsProjectItemInput, Model.XhsProjectItem>()).ToList(); + var bol = _service.Updates(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔洿鏂� + /// </summary> + public async Task<bool> BulkUpdates(List<UpdateXhsProjectItemInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鏇存柊缂栫爜 + /// </summary> + public async Task<bool> UpdateCode(long ID, string Code) + { + 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(() => + { + var bol = _service.UpdateTagName(ID, TagName); + return bol; + }); + } + + /// <summary> + /// 鏇存柊 UseStatus + /// </summary> + public async Task<bool> UpdateUseStatus(long ID, int UseStatus) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.UpdateUseStatus(ID, (Yw.Model.eUseStatus)UseStatus); + return bol; + }); + } + + #endregion Update + + #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 Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/03-localclient/XhsProjectItemModel.cs b/BLL/HStation.BLL.Xhs.Core/03-localclient/XhsProjectItemModel.cs new file mode 100644 index 0000000..2f28579 --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/03-localclient/XhsProjectItemModel.cs @@ -0,0 +1,289 @@ +锘縰sing HStation.Xhs; + +namespace HStation.CAL.LocalClient +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public class XhsProjectItemModel : IXhsProjectItemModel + { + private readonly HStation.Service.XhsProjectItemModel _service = new(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public async Task<List<XhsProjectItemModelDto>> GetAll() + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetAll(); + var vm_list = list?.Select(x => new XhsProjectItemModelDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public async Task<XhsProjectItemModelDto> GetByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(ID); + return model == null ? null : new XhsProjectItemModelDto(model); + }); + } + + public async Task<List<XhsProjectItemModelDto>> GetByPrjID(long ID) + { + var alllist = await GetAll(); + if (alllist != null || alllist.Count > 0) + { + return alllist.Where(x => x.ProjectID == ID).ToList(); + } + return null; + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public async Task<List<XhsProjectItemModelDto>> GetByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByIds(Ids); + var vm_list = list?.Select(x => new XhsProjectItemModelDto(x)).ToList(); + return vm_list; + }); + } + + #endregion Query + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public async Task<long> Insert(AddXhsProjectItemModelInput input) + { + return await Task.Factory.StartNew(() => + { + var model = input.Adapt<AddXhsProjectItemModelInput, Model.XhsProjectItemModel>(); + model.SortCode = _service.GetMaxSortCode() + 1; + var id = _service.Insert(model); + return id; + }); + } + + /// <summary> + /// 鎵归噺鎻掑叆 + /// </summary> + public async Task<bool> Inserts(List<AddXhsProjectItemModelInput> inputList) + { + return await Task.Factory.StartNew(() => + { + var list = inputList.Select(x => x.Adapt<AddXhsProjectItemModelInput, Model.XhsProjectItemModel>()).ToList(); + list.ForEach(x => + { + x.SortCode = _service.GetMaxSortCode() + 1 + list.IndexOf(x); + }); + var bol = _service.Inserts(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔彃鍏� + /// </summary> + public async Task<bool> BulkInserts(List<AddXhsProjectItemModelInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion Insert + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + public async Task<bool> Update(UpdateXhsProjectItemModelInput 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.XhsProjectItemModel(model); + input.Adapt(rhs); + var bol = _service.Update(rhs); + return bol; + }); + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public async Task<bool> Updates(List<UpdateXhsProjectItemModelInput> inputList) + { + return await Task.Factory.StartNew(() => + { + if (inputList == null || inputList.Count < 1) + { + return false; + } + var list = inputList.Select(x => x.Adapt<UpdateXhsProjectItemModelInput, Model.XhsProjectItemModel>()).ToList(); + var bol = _service.Updates(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔洿鏂� + /// </summary> + public async Task<bool> BulkUpdates(List<UpdateXhsProjectItemModelInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鏇存柊缂栫爜 + /// </summary> + public async Task<bool> UpdateCode(long ID, string Code) + { + 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(() => + { + var bol = _service.UpdateTagName(ID, TagName); + return bol; + }); + } + + /// <summary> + /// 鏇存柊 UseStatus + /// </summary> + public async Task<bool> UpdateUseStatus(long ID, int UseStatus) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.UpdateUseStatus(ID, (Yw.Model.eUseStatus)UseStatus); + return bol; + }); + } + + #endregion Update + + #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 Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/03-localclient/XhsProjectItemModelMap.cs b/BLL/HStation.BLL.Xhs.Core/03-localclient/XhsProjectItemModelMap.cs new file mode 100644 index 0000000..2e54218 --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/03-localclient/XhsProjectItemModelMap.cs @@ -0,0 +1,225 @@ +锘縰sing HStation.Xhs; + +namespace HStation.CAL.LocalClient +{ + /// <summary> + /// 鎶ヨ绛夌骇 + /// </summary> + public class XhsProjectItemModelMap : IXhsProjectItemModelMap + { + private readonly HStation.Service.XhsProjectItemModelMap _service = new(); + + #region Query + + /// <summary> + /// 鑾峰彇鎵�鏈� + /// </summary> + public async Task<List<XhsProjectItemModelMapDto>> GetAll() + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetAll(); + var vm_list = list?.Select(x => new XhsProjectItemModelMapDto(x)).ToList(); + return vm_list; + }); + } + + /// <summary> + /// 閫氳繃 ID 鑾峰彇 + /// </summary> + public async Task<XhsProjectItemModelMapDto> GetByID(long ID) + { + return await Task.Factory.StartNew(() => + { + var model = _service.GetByID(ID); + return model == null ? null : new XhsProjectItemModelMapDto(model); + }); + } + + /// <summary> + /// 閫氳繃 Ids 鑾峰彇 + /// </summary> + public async Task<List<XhsProjectItemModelMapDto>> GetByIds(List<long> Ids) + { + return await Task.Factory.StartNew(() => + { + var list = _service.GetByIds(Ids); + var vm_list = list?.Select(x => new XhsProjectItemModelMapDto(x)).ToList(); + return vm_list; + }); + } + + #endregion Query + + #region Insert + + /// <summary> + /// 鎻掑叆涓�鏉� + /// </summary> + public async Task<long> Insert(AddXhsProjectItemModelMapInput input) + { + return await Task.Factory.StartNew(() => + { + var model = input.Adapt<AddXhsProjectItemModelMapInput, Model.XhsProjectItemModelMap>(); + var id = _service.Insert(model); + return id; + }); + } + + /// <summary> + /// 鎵归噺鎻掑叆 + /// </summary> + public async Task<bool> Inserts(List<AddXhsProjectItemModelMapInput> inputList) + { + return await Task.Factory.StartNew(() => + { + var list = inputList.Select(x => x.Adapt<AddXhsProjectItemModelMapInput, Model.XhsProjectItemModelMap>()).ToList(); + var bol = _service.Inserts(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔彃鍏� + /// </summary> + public async Task<bool> BulkInserts(List<AddXhsProjectItemModelMapInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + #endregion Insert + + #region Update + + /// <summary> + /// 鏇存柊涓�鏉� + /// </summary> + public async Task<bool> Update(UpdateXhsProjectItemModelMapInput 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.XhsProjectItemModelMap(model); + input.Adapt(rhs); + var bol = _service.Update(rhs); + return bol; + }); + } + + /// <summary> + /// 鎵归噺鏇存柊 + /// </summary> + public async Task<bool> Updates(List<UpdateXhsProjectItemModelMapInput> inputList) + { + return await Task.Factory.StartNew(() => + { + if (inputList == null || inputList.Count < 1) + { + return false; + } + var list = inputList.Select(x => x.Adapt<UpdateXhsProjectItemModelMapInput, Model.XhsProjectItemModelMap>()).ToList(); + var bol = _service.Updates(list); + return bol; + }); + } + + /// <summary> + /// 澶ф壒閲忔洿鏂� + /// </summary> + public async Task<bool> BulkUpdates(List<UpdateXhsProjectItemModelMapInput> list) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <summary> + /// 鏇存柊缂栫爜 + /// </summary> + public async Task<bool> UpdateCode(long ID, string Code) + { + return await Task.Factory.StartNew(() => + { + return false; + }); + } + + /// <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> + /// 鏇存柊 UseStatus + /// </summary> + public async Task<bool> UpdateUseStatus(long ID, int UseStatus) + { + return await Task.Factory.StartNew(() => + { + var bol = _service.UpdateUseStatus(ID, (Yw.Model.eUseStatus)UseStatus); + return bol; + }); + } + + #endregion Update + + #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 Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/04-bll/01-ProjectItem/01-project/XhsProject.cs b/BLL/HStation.BLL.Xhs.Core/04-bll/01-ProjectItem/01-project/XhsProject.cs new file mode 100644 index 0000000..226b89e --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/04-bll/01-ProjectItem/01-project/XhsProject.cs @@ -0,0 +1,188 @@ +锘縰sing HStation.CAL; +using Yw.DAL.Basic; + +namespace HStation.BLL +{ + /// <summary> + /// + /// </summary> + public class XhsProject : IXhsProject + { + private readonly HStation.CAL.IXhsProject _cal = CALCreateHelper.CreateCAL<HStation.CAL.IXhsProject>(); + + #region Query + + /// <summary> + /// + /// </summary> + public async Task<List<XhsProjectDto>> GetAll() + { + return await _cal.GetAll(); + } + + /// <summary> + /// + /// </summary> + public async Task<XhsProjectDto> GetByID(long ID) + { + return await _cal.GetByID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<List<XhsProjectDto>> GetByIds(List<long> Ids) + { + return await _cal.GetByIds(Ids); + } + + #endregion Query + + #region Insert + + /// <summary> + /// + /// </summary> + public async Task<long> Insert(AddXhsProjectInput model) + { + return await _cal.Insert(model); + } + + public async Task<long> InsertEx(AddXhsProjectInput projectInput, AddXhsProjectItemInput itemInput, AddXhsProjectItemModelInput modelInput, AddXhsProjectItemModelMapInput MapInput) + { + return await _cal.InsertEx(projectInput, itemInput, modelInput, MapInput); + } + + public async Task<bool> DeleteEx(long ID) + { + return await _cal.DeleteEx(ID); + } + + public async Task<bool> UpdateEx(UpdateXhsProjectInput projectInput, UpdateXhsProjectItemInput itemInput) + { + return await _cal.UpdateEx(projectInput, itemInput); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Inserts(List<AddXhsProjectInput> list) + { + return await _cal.Inserts(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkInserts(List<AddXhsProjectInput> list) + { + return await _cal.BulkInserts(list); + } + + #endregion Insert + + #region Update + + /// <summary> + /// + /// </summary> + public async Task<bool> Update(UpdateXhsProjectInput model) + { + return await _cal.Update(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Updates(List<UpdateXhsProjectInput> list) + { + return await _cal.Updates(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkUpdates(List<UpdateXhsProjectInput> list) + { + return await _cal.BulkUpdates(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> UpdateSortCode(long ID, int SortCode) + { + return await _cal.UpdateSortCode(ID, SortCode); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> UpdateSorter(List<UpdateSortCodeInput> Sorters) + { + return await _cal.UpdateSorter(Sorters); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateParas(long ID, Dictionary<string, string> Paras) + { + return _cal.UpdateParas(ID, Paras); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateFlags(long ID, List<string> Flags) + { + return _cal.UpdateFlags(ID, Flags); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateTagName(long ID, string TagName) + { + return _cal.UpdateTagName(ID, TagName); + } + + #endregion Update + + #region Delete + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByID(long ID) + { + return await _cal.DeleteByID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByIds(List<long> Ids) + { + return await _cal.DeleteByIds(Ids); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteAll() + { + return await _cal.DeleteAll(); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateUseStatus(long ID, int UseStatus) + { + return _cal.UpdateUseStatus(ID, UseStatus); + } + + #endregion Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/04-bll/01-ProjectItem/02-projectItem/XhsProjectItem.cs b/BLL/HStation.BLL.Xhs.Core/04-bll/01-ProjectItem/02-projectItem/XhsProjectItem.cs new file mode 100644 index 0000000..14bad92 --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/04-bll/01-ProjectItem/02-projectItem/XhsProjectItem.cs @@ -0,0 +1,180 @@ +锘縰sing HStation.CAL; + +namespace HStation.BLL +{ + /// <summary> + /// + /// </summary> + public class XhsProjectItem : IXhsProjectItem + { + private readonly HStation.CAL.IXhsProjectItem _cal = CALCreateHelper.CreateCAL<HStation.CAL.IXhsProjectItem>(); + + #region Query + + /// <summary> + /// + /// </summary> + public async Task<List<XhsProjectItemDto>> GetAll() + { + return await _cal.GetAll(); + } + + /// <summary> + /// + /// </summary> + public async Task<XhsProjectItemDto> GetByID(long ID) + { + return await _cal.GetByID(ID); + } + + /// <summary> + ///鏍规嵁椤圭洰id鏌ヨ + /// </summary> + public async Task<XhsProjectItemDto> GetByPrjID(long ID) + { + return await _cal.GetByPrjID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<List<XhsProjectItemDto>> GetByIds(List<long> Ids) + { + return await _cal.GetByIds(Ids); + } + + #endregion Query + + #region Insert + + /// <summary> + /// + /// </summary> + public async Task<long> Insert(AddXhsProjectItemInput model) + { + return await _cal.Insert(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Inserts(List<AddXhsProjectItemInput> list) + { + return await _cal.Inserts(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkInserts(List<AddXhsProjectItemInput> list) + { + return await _cal.BulkInserts(list); + } + + #endregion Insert + + #region Update + + /// <summary> + /// + /// </summary> + public async Task<bool> Update(UpdateXhsProjectItemInput model) + { + return await _cal.Update(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Updates(List<UpdateXhsProjectItemInput> list) + { + return await _cal.Updates(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkUpdates(List<UpdateXhsProjectItemInput> list) + { + return await _cal.BulkUpdates(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> UpdateSortCode(long ID, int SortCode) + { + return await _cal.UpdateSortCode(ID, SortCode); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> UpdateSorter(List<UpdateSortCodeInput> Sorters) + { + return await _cal.UpdateSorter(Sorters); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateParas(long ID, Dictionary<string, string> Paras) + { + return _cal.UpdateParas(ID, Paras); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateFlags(long ID, List<string> Flags) + { + return _cal.UpdateFlags(ID, Flags); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateTagName(long ID, string TagName) + { + return _cal.UpdateTagName(ID, TagName); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateUseStatus(long ID, int UseStatus) + { + return _cal.UpdateUseStatus(ID, UseStatus); + } + + #endregion Update + + #region Delete + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByID(long ID) + { + return await _cal.DeleteByID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByIds(List<long> Ids) + { + return await _cal.DeleteByIds(Ids); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteAll() + { + return await _cal.DeleteAll(); + } + + #endregion Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/04-bll/01-ProjectItem/03-projectItemModel/XhsProjectItemModel.cs b/BLL/HStation.BLL.Xhs.Core/04-bll/01-ProjectItem/03-projectItemModel/XhsProjectItemModel.cs new file mode 100644 index 0000000..42fa5f0 --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/04-bll/01-ProjectItem/03-projectItemModel/XhsProjectItemModel.cs @@ -0,0 +1,177 @@ +锘縰sing HStation.CAL; + +namespace HStation.BLL +{ + /// <summary> + /// + /// </summary> + public class XhsProjectItemModel : IXhsProjectItemModel + { + private readonly HStation.CAL.IXhsProjectItemModel _cal = CALCreateHelper.CreateCAL<HStation.CAL.IXhsProjectItemModel>(); + + #region Query + + /// <summary> + /// + /// </summary> + public async Task<List<XhsProjectItemModelDto>> GetAll() + { + return await _cal.GetAll(); + } + + /// <summary> + /// + /// </summary> + public async Task<XhsProjectItemModelDto> GetByID(long ID) + { + return await _cal.GetByID(ID); + } + + public async Task<List<XhsProjectItemModelDto>> GetByPrjID(long ID) + { + return await _cal.GetByPrjID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<List<XhsProjectItemModelDto>> GetByIds(List<long> Ids) + { + return await _cal.GetByIds(Ids); + } + + #endregion Query + + #region Insert + + /// <summary> + /// + /// </summary> + public async Task<long> Insert(AddXhsProjectItemModelInput model) + { + return await _cal.Insert(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Inserts(List<AddXhsProjectItemModelInput> list) + { + return await _cal.Inserts(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkInserts(List<AddXhsProjectItemModelInput> list) + { + return await _cal.BulkInserts(list); + } + + #endregion Insert + + #region Update + + /// <summary> + /// + /// </summary> + public async Task<bool> Update(UpdateXhsProjectItemModelInput model) + { + return await _cal.Update(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Updates(List<UpdateXhsProjectItemModelInput> list) + { + return await _cal.Updates(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkUpdates(List<UpdateXhsProjectItemModelInput> list) + { + return await _cal.BulkUpdates(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> UpdateSortCode(long ID, int SortCode) + { + return await _cal.UpdateSortCode(ID, SortCode); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> UpdateSorter(List<UpdateSortCodeInput> Sorters) + { + return await _cal.UpdateSorter(Sorters); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateParas(long ID, Dictionary<string, string> Paras) + { + return _cal.UpdateParas(ID, Paras); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateFlags(long ID, List<string> Flags) + { + return _cal.UpdateFlags(ID, Flags); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateTagName(long ID, string TagName) + { + return _cal.UpdateTagName(ID, TagName); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateUseStatus(long ID, int UseStatus) + { + return _cal.UpdateUseStatus(ID, UseStatus); + } + + #endregion Update + + #region Delete + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByID(long ID) + { + return await _cal.DeleteByID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByIds(List<long> Ids) + { + return await _cal.DeleteByIds(Ids); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteAll() + { + return await _cal.DeleteAll(); + } + + #endregion Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/04-bll/01-ProjectItem/04-projectItemModelMap/XhsProjectItemModelMap.cs b/BLL/HStation.BLL.Xhs.Core/04-bll/01-ProjectItem/04-projectItemModelMap/XhsProjectItemModelMap.cs new file mode 100644 index 0000000..1f15461 --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/04-bll/01-ProjectItem/04-projectItemModelMap/XhsProjectItemModelMap.cs @@ -0,0 +1,132 @@ +锘縰sing HStation.CAL; + +namespace HStation.BLL +{ + /// <summary> + /// + /// </summary> + public class XhsProjectItemModelMap : IXhsProjectItemModelMap + { + private readonly HStation.CAL.IXhsProjectItemModelMap _cal = CALCreateHelper.CreateCAL<HStation.CAL.IXhsProjectItemModelMap>(); + + #region Query + + /// <summary> + /// + /// </summary> + public async Task<List<XhsProjectItemModelMapDto>> GetAll() + { + return await _cal.GetAll(); + } + + /// <summary> + /// + /// </summary> + public async Task<XhsProjectItemModelMapDto> GetByID(long ID) + { + return await _cal.GetByID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<List<XhsProjectItemModelMapDto>> GetByIds(List<long> Ids) + { + return await _cal.GetByIds(Ids); + } + + #endregion Query + + #region Insert + + /// <summary> + /// + /// </summary> + public async Task<long> Insert(AddXhsProjectItemModelMapInput model) + { + return await _cal.Insert(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Inserts(List<AddXhsProjectItemModelMapInput> list) + { + return await _cal.Inserts(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkInserts(List<AddXhsProjectItemModelMapInput> list) + { + return await _cal.BulkInserts(list); + } + + #endregion Insert + + #region Update + + /// <summary> + /// + /// </summary> + public async Task<bool> Update(UpdateXhsProjectItemModelMapInput model) + { + return await _cal.Update(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Updates(List<UpdateXhsProjectItemModelMapInput> list) + { + return await _cal.Updates(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkUpdates(List<UpdateXhsProjectItemModelMapInput> list) + { + return await _cal.BulkUpdates(list); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateUseStatus(long ID, int UseStatus) + { + return _cal.UpdateUseStatus(ID, UseStatus); + } + + #endregion Update + + #region Delete + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByID(long ID) + { + return await _cal.DeleteByID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByIds(List<long> Ids) + { + return await _cal.DeleteByIds(Ids); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteAll() + { + return await _cal.DeleteAll(); + } + + #endregion Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/04-bll/02-PumpProdcuct/01-PumpSeries/PumpSeries.cs b/BLL/HStation.BLL.Xhs.Core/04-bll/02-PumpProdcuct/01-PumpSeries/PumpSeries.cs new file mode 100644 index 0000000..a3fe656 --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/04-bll/02-PumpProdcuct/01-PumpSeries/PumpSeries.cs @@ -0,0 +1,183 @@ +锘縰sing HStation.CAL; +using HStation.DAL; +using Yw.CAL; +using Yw.DAL.Basic; + +namespace HStation.BLL +{ + /// <summary> + /// + /// </summary> + public class PumpSeries : CAL.IPumpSeries + { + private readonly HStation.CAL.IPumpSeries _cal = CALCreateHelper.CreateCAL<HStation.CAL.IPumpSeries>(); + + #region Query + + /// <summary> + /// + /// </summary> + public async Task<List<PumpSeriesDto>> GetAll() + { + return await _cal.GetAll(); + } + + /// <summary> + /// + /// </summary> + public async Task<PumpSeriesDto> GetByID(long ID) + { + return await _cal.GetByID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<List<PumpSeriesDto>> GetByIds(List<long> Ids) + { + return await _cal.GetByIds(Ids); + } + + #endregion Query + + #region Insert + + /// <summary> + /// + /// </summary> + public async Task<long> Insert(AddPumpSeriesDto model) + { + return await _cal.Insert(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Inserts(List<AddPumpSeriesDto> list) + { + return await _cal.Inserts(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkInserts(List<AddPumpSeriesDto> list) + { + return await _cal.BulkInserts(list); + } + + #endregion Insert + + #region Update + + /// <summary> + /// + /// </summary> + public async Task<bool> Update(UpdatePumpSeriesDto model) + { + return await _cal.Update(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Updates(List<UpdatePumpSeriesDto> list) + { + return await _cal.Updates(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkUpdates(List<UpdatePumpSeriesDto> list) + { + return await _cal.BulkUpdates(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> UpdateSortCode(long ID, int SortCode) + { + return await _cal.UpdateSortCode(ID, SortCode); + } + + public async Task<bool> UpdateSorter(List<UpdateSortCodeInput> Sorters) + { + return await _cal.UpdateSorter(Sorters); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateParas(long ID, Dictionary<string, string> Paras) + { + return _cal.UpdateParas(ID, Paras); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateFlags(long ID, List<string> Flags) + { + return _cal.UpdateFlags(ID, Flags); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateTagName(long ID, string TagName) + { + return _cal.UpdateTagName(ID, TagName); + } + + #endregion Update + + #region Delete + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByID(long ID) + { + return await _cal.DeleteByID(ID); + } + + /// <summary> + /// 鍒犻櫎鎷撳睍 + /// </summary> + /// <param name="ID"></param> + /// <returns></returns> + /// <exception cref="NotImplementedException"></exception> + public bool DeleteEx(long ID) + { + return _cal.DeleteEx(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByIds(List<long> Ids) + { + return await _cal.DeleteByIds(Ids); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteAll() + { + return await _cal.DeleteAll(); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateUseStatus(long ID, int UseStatus) + { + return _cal.UpdateUseStatus(ID, UseStatus); + } + + #endregion Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/04-bll/02-PumpProdcuct/02-PumpGroup/PumpGroup.cs b/BLL/HStation.BLL.Xhs.Core/04-bll/02-PumpProdcuct/02-PumpGroup/PumpGroup.cs new file mode 100644 index 0000000..6fa1e86 --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/04-bll/02-PumpProdcuct/02-PumpGroup/PumpGroup.cs @@ -0,0 +1,164 @@ +锘縩amespace HStation.BLL +{ + /// <summary> + /// + /// </summary> + public class PumpGroup : CAL.IPumpGroup + { + private readonly HStation.CAL.IPumpGroup _cal = CALCreateHelper.CreateCAL<HStation.CAL.IPumpGroup>(); + + #region Query + + /// <summary> + /// + /// </summary> + public async Task<List<PumpGroupDto>> GetAll() + { + return await _cal.GetAll(); + } + + /// <summary> + /// + /// </summary> + public async Task<PumpGroupDto> GetByID(long ID) + { + return await _cal.GetByID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<List<PumpGroupDto>> GetByIds(List<long> Ids) + { + return await _cal.GetByIds(Ids); + } + + #endregion Query + + #region Insert + + /// <summary> + /// + /// </summary> + public async Task<long> Insert(AddPumpGroupDto model) + { + return await _cal.Insert(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Inserts(List<AddPumpGroupDto> list) + { + return await _cal.Inserts(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkInserts(List<AddPumpGroupDto> list) + { + return await _cal.BulkInserts(list); + } + + #endregion Insert + + #region Update + + /// <summary> + /// + /// </summary> + public async Task<bool> Update(UpdatePumpGroupDto model) + { + return await _cal.Update(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Updates(List<UpdatePumpGroupDto> list) + { + return await _cal.Updates(list); + } + + public bool DeleteEx(long ID) + { + return _cal.DeleteEx(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkUpdates(List<UpdatePumpGroupDto> list) + { + return await _cal.BulkUpdates(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> UpdateSortCode(long ID, int SortCode) + { + return await _cal.UpdateSortCode(ID, SortCode); + } + + public async Task<bool> UpdateSorter(List<UpdateSortCodeInput> Sorters) + { + return await _cal.UpdateSorter(Sorters); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateParas(long ID, Dictionary<string, string> Paras) + { + return _cal.UpdateParas(ID, Paras); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateFlags(long ID, List<string> Flags) + { + return _cal.UpdateFlags(ID, Flags); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateTagName(long ID, string TagName) + { + return _cal.UpdateTagName(ID, TagName); + } + + #endregion Update + + #region Delete + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByID(long ID) + { + return await _cal.DeleteByID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByIds(List<long> Ids) + { + return await _cal.DeleteByIds(Ids); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteAll() + { + return await _cal.DeleteAll(); + } + + #endregion Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/04-bll/02-PumpProdcuct/03-PumpMain/PumpMain.cs b/BLL/HStation.BLL.Xhs.Core/04-bll/02-PumpProdcuct/03-PumpMain/PumpMain.cs new file mode 100644 index 0000000..b7fb9f8 --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/04-bll/02-PumpProdcuct/03-PumpMain/PumpMain.cs @@ -0,0 +1,184 @@ +锘縩amespace HStation.BLL +{ + /// <summary> + /// + /// </summary> + public class PumpMain : CAL.IPumpMain + { + private readonly HStation.CAL.IPumpMain _cal = CALCreateHelper.CreateCAL<HStation.CAL.IPumpMain>(); + + #region Query + + /// <summary> + /// + /// </summary> + public async Task<List<PumpMainDto>> GetAll() + { + return await _cal.GetAll(); + } + + /// <summary> + /// + /// </summary> + public async Task<PumpMainDto> GetByID(long ID) + { + return await _cal.GetByID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<List<PumpMainDto>> GetByIds(List<long> Ids) + { + return await _cal.GetByIds(Ids); + } + + #endregion Query + + #region Insert + + /// <summary> + /// + /// </summary> + public async Task<long> Insert(AddPumpMainDto model) + { + return await _cal.Insert(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Inserts(List<AddPumpMainDto> list) + { + return await _cal.Inserts(list); + } + + /// <summary> + /// 鎻掑叆鎷撳睍 + /// </summary> + /// <param name="input"></param> + /// <param name="map"></param> + /// <returns></returns> + /// <exception cref="NotImplementedException"></exception> + public async Task<long> InsertEx(AddPumpMainDto input, AddPumpGroupAndMainMapDto map) + { + return await _cal.InsertEx(input, map); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkInserts(List<AddPumpMainDto> list) + { + return await _cal.BulkInserts(list); + } + + #endregion Insert + + #region Update + + /// <summary> + /// + /// </summary> + public async Task<bool> Update(UpdatePumpMainDto model) + { + return await _cal.Update(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Updates(List<UpdatePumpMainDto> list) + { + return await _cal.Updates(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkUpdates(List<UpdatePumpMainDto> list) + { + return await _cal.BulkUpdates(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> UpdateSortCode(long ID, int SortCode) + { + return await _cal.UpdateSortCode(ID, SortCode); + } + + public async Task<bool> UpdateSorter(List<UpdateSortCodeInput> Sorters) + { + return await _cal.UpdateSorter(Sorters); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateParas(long ID, Dictionary<string, string> Paras) + { + return _cal.UpdateParas(ID, Paras); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateFlags(long ID, List<string> Flags) + { + return _cal.UpdateFlags(ID, Flags); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateTagName(long ID, string TagName) + { + return _cal.UpdateTagName(ID, TagName); + } + + #endregion Update + + #region Delete + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByID(long ID) + { + return await _cal.DeleteByID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByIds(List<long> Ids) + { + return await _cal.DeleteByIds(Ids); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteAll() + { + return await _cal.DeleteAll(); + } + + public async Task<List<PumpMainDto>> GetByPumpSeriesID(long ID) + { + return await _cal.GetByPumpSeriesID(ID); + } + + /// <summary> + ///閫氳繃鍨嬪彿ID鍒犻櫎Map涓搴旀暟鎹� + /// </summary> + public async Task<bool> DeleteMapByMainID(long ID) + { + return await _cal.DeleteMapByMainID(ID); + } + + #endregion Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/04-bll/02-PumpProdcuct/04-PumpGroupAndMainMap/PumpGroupAndMainMap.cs b/BLL/HStation.BLL.Xhs.Core/04-bll/02-PumpProdcuct/04-PumpGroupAndMainMap/PumpGroupAndMainMap.cs new file mode 100644 index 0000000..b2a28e1 --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/04-bll/02-PumpProdcuct/04-PumpGroupAndMainMap/PumpGroupAndMainMap.cs @@ -0,0 +1,152 @@ +锘縩amespace HStation.BLL +{ + /// <summary> + /// + /// </summary> + public class PumpGroupAndMainMap : CAL.IPumpGroupAndMainMap + { + private readonly HStation.CAL.IPumpGroupAndMainMap _cal = CALCreateHelper.CreateCAL<HStation.CAL.IPumpGroupAndMainMap>(); + + #region Query + + /// <summary> + /// + /// </summary> + public async Task<List<PumpGroupAndMainMapDto>> GetAll() + { + return await _cal.GetAll(); + } + + /// <summary> + /// + /// </summary> + public async Task<PumpGroupAndMainMapDto> GetByID(long ID) + { + return await _cal.GetByID(ID); + } + + //閫氳繃缁処d鏌ユ壘杩斿洖鍨嬪彿 ID + public List<long> GetByGroupID(long ID) + { + return _cal.GetByGroupID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<List<PumpGroupAndMainMapDto>> GetByIds(List<long> Ids) + { + return await _cal.GetByIds(Ids); + } + + #endregion Query + + #region Insert + + /// <summary> + /// + /// </summary> + public async Task<long> Insert(AddPumpGroupAndMainMapDto model) + { + return await _cal.Insert(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Inserts(List<AddPumpGroupAndMainMapDto> list) + { + return await _cal.Inserts(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkInserts(List<AddPumpGroupAndMainMapDto> list) + { + return await _cal.BulkInserts(list); + } + + #endregion Insert + + #region Update + + /// <summary> + /// + /// </summary> + public async Task<bool> Update(UpdatePumpGroupAndMainMapDto model) + { + return await _cal.Update(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Updates(List<UpdatePumpGroupAndMainMapDto> list) + { + return await _cal.Updates(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkUpdates(List<UpdatePumpGroupAndMainMapDto> list) + { + return await _cal.BulkUpdates(list); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateParas(long ID, Dictionary<string, string> Paras) + { + return _cal.UpdateParas(ID, Paras); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateFlags(long ID, List<string> Flags) + { + return _cal.UpdateFlags(ID, Flags); + } + + /// <summary> + /// + /// </summary> + public Task<bool> UpdateTagName(long ID, string TagName) + { + return _cal.UpdateTagName(ID, TagName); + } + + #endregion Update + + #region Delete + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByID(long ID) + { + return await _cal.DeleteByID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByIds(List<long> Ids) + { + return await _cal.DeleteByIds(Ids); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteAll() + { + return await _cal.DeleteAll(); + } + + #endregion Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/04-bll/02-PumpProdcuct/05-PumpPartMain/PumpPartMain.cs b/BLL/HStation.BLL.Xhs.Core/04-bll/02-PumpProdcuct/05-PumpPartMain/PumpPartMain.cs new file mode 100644 index 0000000..81bc07f --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/04-bll/02-PumpProdcuct/05-PumpPartMain/PumpPartMain.cs @@ -0,0 +1,122 @@ +锘縩amespace HStation.BLL +{ + /// <summary> + /// + /// </summary> + public class PumpPartMain : CAL.IPumpPartMain + { + private readonly HStation.CAL.IPumpPartMain _cal = CALCreateHelper.CreateCAL<HStation.CAL.IPumpPartMain>(); + + #region Query + + /// <summary> + /// + /// </summary> + public async Task<List<PumpPartMainDto>> GetAll() + { + return await _cal.GetAll(); + } + + /// <summary> + /// + /// </summary> + public async Task<PumpPartMainDto> GetByID(long ID) + { + return await _cal.GetByID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<List<PumpPartMainDto>> GetByIds(List<long> Ids) + { + return await _cal.GetByIds(Ids); + } + + #endregion Query + + #region Insert + + /// <summary> + /// + /// </summary> + public async Task<long> Insert(AddPumpPartMainDto model) + { + return await _cal.Insert(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Inserts(List<AddPumpPartMainDto> list) + { + return await _cal.Inserts(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkInserts(List<AddPumpPartMainDto> list) + { + return await _cal.BulkInserts(list); + } + + #endregion Insert + + #region Update + + /// <summary> + /// + /// </summary> + public async Task<bool> Update(UpdatePumpPartMainDto model) + { + return await _cal.Update(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Updates(List<UpdatePumpPartMainDto> list) + { + return await _cal.Updates(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkUpdates(List<UpdatePumpPartMainDto> list) + { + return await _cal.BulkUpdates(list); + } + + #endregion Update + + #region Delete + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByID(long ID) + { + return await _cal.DeleteByID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByIds(List<long> Ids) + { + return await _cal.DeleteByIds(Ids); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteAll() + { + return await _cal.DeleteAll(); + } + + #endregion Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/04-bll/02-PumpProdcuct/06-PumpPropContent/PumpPartPropContent.cs b/BLL/HStation.BLL.Xhs.Core/04-bll/02-PumpProdcuct/06-PumpPropContent/PumpPartPropContent.cs new file mode 100644 index 0000000..c7590b6 --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/04-bll/02-PumpProdcuct/06-PumpPropContent/PumpPartPropContent.cs @@ -0,0 +1,122 @@ +锘縩amespace HStation.BLL +{ + /// <summary> + /// + /// </summary> + public class PumpPartPropContent : CAL.IPumpPartPropContent + { + private readonly HStation.CAL.IPumpPartPropContent _cal = CALCreateHelper.CreateCAL<HStation.CAL.IPumpPartPropContent>(); + + #region Query + + /// <summary> + /// + /// </summary> + public async Task<List<PumpPropContentDto>> GetAll() + { + return await _cal.GetAll(); + } + + /// <summary> + /// + /// </summary> + public async Task<PumpPropContentDto> GetByID(long ID) + { + return await _cal.GetByID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<List<PumpPropContentDto>> GetByIds(List<long> Ids) + { + return await _cal.GetByIds(Ids); + } + + #endregion Query + + #region Insert + + /// <summary> + /// + /// </summary> + public async Task<long> Insert(AddPumpPropContentDto model) + { + return await _cal.Insert(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Inserts(List<AddPumpPropContentDto> list) + { + return await _cal.Inserts(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkInserts(List<AddPumpPropContentDto> list) + { + return await _cal.BulkInserts(list); + } + + #endregion Insert + + #region Update + + /// <summary> + /// + /// </summary> + public async Task<bool> Update(UpdatePumpPropContentDto model) + { + return await _cal.Update(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Updates(List<UpdatePumpPropContentDto> list) + { + return await _cal.Updates(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkUpdates(List<UpdatePumpPropContentDto> list) + { + return await _cal.BulkUpdates(list); + } + + #endregion Update + + #region Delete + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByID(long ID) + { + return await _cal.DeleteByID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByIds(List<long> Ids) + { + return await _cal.DeleteByIds(Ids); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteAll() + { + return await _cal.DeleteAll(); + } + + #endregion Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/04-bll/02-PumpProdcuct/07-PumpMainAndPartMap/PumpPartPropContent.cs b/BLL/HStation.BLL.Xhs.Core/04-bll/02-PumpProdcuct/07-PumpMainAndPartMap/PumpPartPropContent.cs new file mode 100644 index 0000000..b3e8c11 --- /dev/null +++ b/BLL/HStation.BLL.Xhs.Core/04-bll/02-PumpProdcuct/07-PumpMainAndPartMap/PumpPartPropContent.cs @@ -0,0 +1,122 @@ +锘縩amespace HStation.BLL +{ + /// <summary> + /// + /// </summary> + public class PumpMainAndPartMap : CAL.IPumpMainAndPartMap + { + private readonly HStation.CAL.IPumpMainAndPartMap _cal = CALCreateHelper.CreateCAL<HStation.CAL.IPumpMainAndPartMap>(); + + #region Query + + /// <summary> + /// + /// </summary> + public async Task<List<PumpMainAndPartMapDto>> GetAll() + { + return await _cal.GetAll(); + } + + /// <summary> + /// + /// </summary> + public async Task<PumpMainAndPartMapDto> GetByID(long ID) + { + return await _cal.GetByID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<List<PumpMainAndPartMapDto>> GetByIds(List<long> Ids) + { + return await _cal.GetByIds(Ids); + } + + #endregion Query + + #region Insert + + /// <summary> + /// + /// </summary> + public async Task<long> Insert(AddPumpMainAndPartMapDto model) + { + return await _cal.Insert(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Inserts(List<AddPumpMainAndPartMapDto> list) + { + return await _cal.Inserts(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkInserts(List<AddPumpMainAndPartMapDto> list) + { + return await _cal.BulkInserts(list); + } + + #endregion Insert + + #region Update + + /// <summary> + /// + /// </summary> + public async Task<bool> Update(UpdatePumpMainAndPartMapDto model) + { + return await _cal.Update(model); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Updates(List<UpdatePumpMainAndPartMapDto> list) + { + return await _cal.Updates(list); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> BulkUpdates(List<UpdatePumpMainAndPartMapDto> list) + { + return await _cal.BulkUpdates(list); + } + + #endregion Update + + #region Delete + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByID(long ID) + { + return await _cal.DeleteByID(ID); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteByIds(List<long> Ids) + { + return await _cal.DeleteByIds(Ids); + } + + /// <summary> + /// + /// </summary> + public async Task<bool> DeleteAll() + { + return await _cal.DeleteAll(); + } + + #endregion Delete + } +} \ No newline at end of file diff --git a/BLL/HStation.BLL.Xhs.Core/HStation.BLL.Xhs.Core.csproj b/BLL/HStation.BLL.Xhs.Core/HStation.BLL.Xhs.Core.csproj index 23d35c3..a53f73b 100644 --- a/BLL/HStation.BLL.Xhs.Core/HStation.BLL.Xhs.Core.csproj +++ b/BLL/HStation.BLL.Xhs.Core/HStation.BLL.Xhs.Core.csproj @@ -8,6 +8,18 @@ </PropertyGroup> <ItemGroup> + <Compile Remove="03-localclient\PumpProduct\**" /> + <Compile Remove="03-localclient\PumpProject\**" /> + <Compile Remove="04-bll\01-ProjectItem\**" /> + <EmbeddedResource Remove="03-localclient\PumpProduct\**" /> + <EmbeddedResource Remove="03-localclient\PumpProject\**" /> + <EmbeddedResource Remove="04-bll\01-ProjectItem\**" /> + <None Remove="03-localclient\PumpProduct\**" /> + <None Remove="03-localclient\PumpProject\**" /> + <None Remove="04-bll\01-ProjectItem\**" /> + </ItemGroup> + + <ItemGroup> <ProjectReference Include="..\..\Dto\HStation.Dto.Xhs.Core\HStation.Dto.Xhs.Core.csproj" /> <ProjectReference Include="..\HStation.BLL.Core\HStation.BLL.Core.csproj" /> </ItemGroup> diff --git a/Desktop/HStation.DeskTop.Xhs.Main/GlobalUsing.cs b/Desktop/HStation.DeskTop.Xhs.Main/GlobalUsing.cs new file mode 100644 index 0000000..41d98a6 --- /dev/null +++ b/Desktop/HStation.DeskTop.Xhs.Main/GlobalUsing.cs @@ -0,0 +1 @@ +锘縢lobal using Yw.WinFrmUI; \ No newline at end of file diff --git a/Desktop/HStation.DeskTop.Xhs.Main/GuideMain.cs b/Desktop/HStation.DeskTop.Xhs.Main/GuideMain.cs index 79a6b8f..9cd9d6e 100644 --- a/Desktop/HStation.DeskTop.Xhs.Main/GuideMain.cs +++ b/Desktop/HStation.DeskTop.Xhs.Main/GuideMain.cs @@ -12,6 +12,7 @@ using System.IO; using System.Linq; using System.Windows.Forms; +using Yw.WinFrmUI; namespace HStation.Desktop { @@ -160,16 +161,16 @@ /// </summary> private void barBtnProject_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { - var guid = new SurfaceGuid() + var guid = new PageGuid() { Function = "椤圭洰绠$悊", - Modular = eModular.Basic + Modular = "" }; if (!IsExistPage(guid, true)) { var page = new XhsProjectMainPanel(); page.PageTitle.Caption = guid.Function; - page.SurfaceGuid = guid; + page.PageGuid = guid; CreatePage(page, guid); } } @@ -179,16 +180,16 @@ /// </summary> private void barBtnPumpManage_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { - var guid = new SurfaceGuid() + var guid = new PageGuid() { Function = "娉电鐞�", - Modular = eModular.Basic + Modular = "" }; if (!IsExistPage(guid, true)) { var page = new PumpProductMainPanel(); page.PageTitle.Caption = guid.Function; - page.SurfaceGuid = guid; + page.PageGuid = guid; CreatePage(page, guid); } } @@ -198,16 +199,16 @@ /// </summary> private void barButtonTypeManage_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { - var guid = new SurfaceGuid() + var guid = new PageGuid() { Function = "绫诲瀷绠$悊", - Modular = eModular.Basic + Modular = "" }; if (!IsExistPage(guid, true)) { var page = new SysTypeManageMainPanel(); page.PageTitle.Caption = guid.Function; - page.SurfaceGuid = guid; + page.PageGuid = guid; CreatePage(page, guid); } } @@ -217,16 +218,16 @@ /// </summary> private void BtnCatlogManage_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { - var guid = new SurfaceGuid() + var guid = new PageGuid() { Function = "鍒嗙被绠$悊", - Modular = eModular.Basic + Modular = "" }; if (!IsExistPage(guid, true)) { var page = new SysCatalogManageMainPanel(); page.PageTitle.Caption = guid.Function; - page.SurfaceGuid = guid; + page.PageGuid = guid; CreatePage(page, guid); } } @@ -236,16 +237,16 @@ /// </summary> private void BtnPropManage_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { - var guid = new SurfaceGuid() + var guid = new PageGuid() { Function = "灞炴�х鐞�", - Modular = eModular.Basic + Modular = "" }; if (!IsExistPage(guid, true)) { var page = new SysPropManageMainPanel(); page.PageTitle.Caption = guid.Function; - page.SurfaceGuid = guid; + page.PageGuid = guid; CreatePage(page, guid); } } @@ -335,7 +336,7 @@ } //鏄惁瀛樺湪Page - private bool IsExistPage(WinFrmUI.SurfaceGuid sguid, bool isActivateDoc) + private bool IsExistPage(PageGuid sguid, bool isActivateDoc) { if (sguid == null) return false; @@ -346,9 +347,9 @@ { if (doc.Tag != null) { - if (doc.Tag is WinFrmUI.SurfaceGuid) + if (doc.Tag is PageGuid) { - if ((doc.Tag as WinFrmUI.SurfaceGuid).ToString() == sguid.ToString()) + if ((doc.Tag as PageGuid).ToString() == sguid.ToString()) { if (isActivateDoc) this.tabbedView1.Controller.Activate(doc); @@ -363,19 +364,19 @@ } //鏇存柊鏁版嵁 - private void RefreshPageData(WinFrmUI.SurfaceGuid sguid) + private void RefreshPageData(PageGuid sguid) { if (sguid == null) return; if (this.tabbedView1.Documents != null && this.tabbedView1.Documents.Count > 0) { - var doc = this.tabbedView1.Documents.ToList().Find(x => x.Tag != null && x.Tag is WinFrmUI.SurfaceGuid && (x.Tag as WinFrmUI.SurfaceGuid).ToString() == sguid.ToString()); + var doc = this.tabbedView1.Documents.ToList().Find(x => x.Tag != null && x.Tag is PageGuid && (x.Tag as PageGuid).ToString() == sguid.ToString()); if (doc != null) { - if (doc.Control is WinFrmUI.DocumentPage page) + if (doc.Control is DocumentPage page) { - page.RefreshDataSource(); + page.RefreshData(); } return; } @@ -383,21 +384,21 @@ } //鏇存柊PageTitle - private void UpdatePageTitle(WinFrmUI.SurfaceGuid sguid, WinFrmUI.PageTitle title) + private void UpdatePageTitle(PageGuid sguid, PageTitle title) { if (sguid == null || title == null) return; if (this.tabbedView1.Documents != null && this.tabbedView1.Documents.Count > 0) { - var doc = this.tabbedView1.Documents.ToList().Find(x => x.Tag != null && x.Tag is WinFrmUI.SurfaceGuid && (x.Tag as WinFrmUI.SurfaceGuid).ToString() == sguid.ToString()); + var doc = this.tabbedView1.Documents.ToList().Find(x => x.Tag != null && x.Tag is PageGuid && (x.Tag as PageGuid).ToString() == sguid.ToString()); if (doc != null) { doc.Caption = title.Caption; doc.ImageOptions.Image = title.HeaderImage; doc.ImageOptions.SvgImage = title.HeaderSvgImage; doc.ImageOptions.SvgImageSize = title.SvgImageSize; - if (doc.Control is WinFrmUI.DocumentPage page) + if (doc.Control is DocumentPage page) { page.PageTitle = title; } @@ -407,11 +408,11 @@ } //鍒涘缓Page - private bool CreatePage(WinFrmUI.DocumentPage page, WinFrmUI.SurfaceGuid sguid) + private bool CreatePage(DocumentPage page, PageGuid sguid) { if (page == null || sguid == null) return false; - page.SurfaceGuid = sguid; + page.PageGuid = sguid; page.Dock = DockStyle.Fill; page.IsExistPageEvent += IsExistPage; page.CreatePageEvent += CreatePage; @@ -434,7 +435,7 @@ } else { - doc.Caption = page.SurfaceGuid?.Function; + doc.Caption = page.PageGuid?.Function; } doc.Tag = sguid; this.tabbedView1.EndUpdate(); @@ -446,21 +447,21 @@ } //鍏抽棴Page - private void ClosePage(WinFrmUI.SurfaceGuid sguid) + private void ClosePage(PageGuid sguid) { if (this.tabbedView1.Documents != null && this.tabbedView1.Documents.Count > 0) { - var doc = this.tabbedView1.Documents.ToList().Find(x => x.Tag != null && x.Tag is WinFrmUI.SurfaceGuid && (x.Tag as WinFrmUI.SurfaceGuid).ToString() == sguid.ToString()); + var doc = this.tabbedView1.Documents.ToList().Find(x => x.Tag != null && x.Tag is PageGuid && (x.Tag as PageGuid).ToString() == sguid.ToString()); if (doc != null) { - var page = doc.Control as WinFrmUI.DocumentPage; + var page = doc.Control as DocumentPage; this.tabbedView1.Controller.Close(doc);//浼氳Е鍙戞鍦ㄥ叧闂拰鍏抽棴浜嬩欢 } } } //鏌ユ壘page - private WinFrmUI.DocumentPage FindPage(WinFrmUI.SurfaceGuid sguid, bool isActiveDoc) + private DocumentPage FindPage(PageGuid sguid, bool isActiveDoc) { if (sguid == null) return default; @@ -473,7 +474,7 @@ { if (isActiveDoc) this.tabbedView1.Controller.Activate(doc); - if (doc.Control is WinFrmUI.DocumentPage page) + if (doc.Control is DocumentPage page) { return page; } @@ -491,16 +492,16 @@ private void GuideMain_Load(object sender, EventArgs e) { - var guid = new SurfaceGuid() + var guid = new PageGuid() { Function = "椤圭洰鎬昏", - Modular = eModular.Basic + Modular = "" }; if (!IsExistPage(guid, true)) { var page = new HomePageMainPanel(); page.PageTitle.Caption = guid.Function; - page.SurfaceGuid = guid; + page.PageGuid = guid; CreatePage(page, guid); } } diff --git a/Desktop/HStation.DeskTop.Xhs.Main/HStation.Desktop.Xhs.Main.csproj b/Desktop/HStation.DeskTop.Xhs.Main/HStation.Desktop.Xhs.Main.csproj index 91e4ce9..5c5fab4 100644 --- a/Desktop/HStation.DeskTop.Xhs.Main/HStation.Desktop.Xhs.Main.csproj +++ b/Desktop/HStation.DeskTop.Xhs.Main/HStation.Desktop.Xhs.Main.csproj @@ -14,10 +14,10 @@ <ItemGroup> <ProjectReference Include="..\..\Service\HStation.Service.Xhs.Core\HStation.Service.Xhs.Core.csproj" /> + <ProjectReference Include="..\..\WinFrmUI\HStation.WinFrmUI.Assets.Core\HStation.WinFrmUI.Assets.Core.csproj" /> <ProjectReference Include="..\..\WinFrmUI\HStation.WinFrmUI.Basic\HStation.WinFrmUI.Basic.csproj" /> <ProjectReference Include="..\..\WinFrmUI\HStation.WinFrmUI.Xhs.Core\HStation.WinFrmUI.Xhs.Core.csproj" /> <ProjectReference Include="..\..\WinFrmUI\HStation.WinFrmUI.Xhs.Curve\HStation.WinFrmUI.Xhs.Curve.csproj" /> - <ProjectReference Include="..\..\WinFrmUI\HStation.WinFrmUI.Xhs.Project\HStation.WinFrmUI.Xhs.PumpProduct.csproj" /> </ItemGroup> <ItemGroup> diff --git a/Desktop/HStation.DeskTop.Xhs.Main/Program.cs b/Desktop/HStation.DeskTop.Xhs.Main/Program.cs index cc76756..c6d5175 100644 --- a/Desktop/HStation.DeskTop.Xhs.Main/Program.cs +++ b/Desktop/HStation.DeskTop.Xhs.Main/Program.cs @@ -63,7 +63,7 @@ var loginHelper = new LoginHelper(); if (!loginHelper.Login()) return; - var databaseHelper = new HStation.DAL.DbFirstHelper(); + var databaseHelper = new HStation.Xhs.DAL.DbFirstHelper(); var result = databaseHelper.Initial(out string msg); Application.Run(new GuideMain()); } diff --git a/HStation.BLL.Assets.Core/HStation.BLL.Assets.Core.csproj b/HStation.BLL.Assets.Core/HStation.BLL.Assets.Core.csproj new file mode 100644 index 0000000..132c02c --- /dev/null +++ b/HStation.BLL.Assets.Core/HStation.BLL.Assets.Core.csproj @@ -0,0 +1,9 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <TargetFramework>net6.0</TargetFramework> + <ImplicitUsings>enable</ImplicitUsings> + <Nullable>enable</Nullable> + </PropertyGroup> + +</Project> diff --git a/HStation.Dto.Assets.Core/00-PumpProduct/01-PumpSeries/AddPumpSeriesDto.cs b/HStation.Dto.Assets.Core/00-PumpProduct/01-PumpSeries/AddPumpSeriesDto.cs new file mode 100644 index 0000000..5a0658c --- /dev/null +++ b/HStation.Dto.Assets.Core/00-PumpProduct/01-PumpSeries/AddPumpSeriesDto.cs @@ -0,0 +1,50 @@ +锘縩amespace HStation.Dto.Assets +{ + public class AddPumpSeriesDto + { + /// <summary> + /// 鍚嶇О + /// </summary> + public string Name { get; set; } + + /// <summary> + /// 鎵�灞炵被鍒獻D + /// </summary> + public long CatalogID { 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 UseStatus { get; set; } + + /// <summary> + /// 鎺掑簭鐮� + /// </summary> + public int SortCode { get; set; } + + /// <summary> + /// 鐢垫満棰戠巼 + /// </summary> + public string MotorFrequency { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/HStation.Dto.Assets.Core/00-PumpProduct/01-PumpSeries/PumpSeriesDto.cs b/HStation.Dto.Assets.Core/00-PumpProduct/01-PumpSeries/PumpSeriesDto.cs new file mode 100644 index 0000000..37c317a --- /dev/null +++ b/HStation.Dto.Assets.Core/00-PumpProduct/01-PumpSeries/PumpSeriesDto.cs @@ -0,0 +1,74 @@ +锘縰sing Yw.Model; + +namespace HStation.Dto.Assets +{ + public class PumpSeriesDto + { + public PumpSeriesDto() + { + } + + public PumpSeriesDto(Model.PumpSeries rhs) + { + this.ID = rhs.ID; + this.Name = rhs.Name; + this.Paras = rhs.Paras; + this.CatalogID = rhs.CatalogID; + this.Flags = rhs.Flags; + this.TagName = rhs.TagName; + this.UseStatus = rhs.UseStatus; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + } + + /// <summary> + /// id + /// </summary> + public long ID { get; set; } + + /// <summary> + /// 鎵�灞炵被鍒獻D + /// </summary> + public long CatalogID { 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 eUseStatus UseStatus { get; set; } + + /// <summary> + /// 鎺掑簭鐮� + /// </summary> + public int SortCode { get; set; } + + /// <summary> + /// 鐢垫満棰戠巼 + /// </summary> + public string MotorFrequency { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/HStation.Dto.Assets.Core/00-PumpProduct/01-PumpSeries/UpdatePumpSeriesDto.cs b/HStation.Dto.Assets.Core/00-PumpProduct/01-PumpSeries/UpdatePumpSeriesDto.cs new file mode 100644 index 0000000..3e2e18f --- /dev/null +++ b/HStation.Dto.Assets.Core/00-PumpProduct/01-PumpSeries/UpdatePumpSeriesDto.cs @@ -0,0 +1,58 @@ +锘縰sing System.ComponentModel.DataAnnotations; + +namespace HStation.Dto.Assets +{ + public class UpdatePumpSeriesDto + { + /// <summary> + /// id + /// </summary> + [Required, Range(1, long.MaxValue, ErrorMessage = "ID 蹇呴』澶т簬0")] + public long ID { get; set; } + + /// <summary> + /// 鎵�灞炵被鍒獻D + /// </summary> + public long CatalogID { 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 UseStatus { get; set; } + + /// <summary> + /// 鎺掑簭鐮� + /// </summary> + public int SortCode { get; set; } + + /// <summary> + /// 鐢垫満棰戠巼 + /// </summary> + public string motorfrequency { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/HStation.Dto.Assets.Core/00-PumpProduct/02-PumpGroup/AddPumpGroupDto.cs b/HStation.Dto.Assets.Core/00-PumpProduct/02-PumpGroup/AddPumpGroupDto.cs new file mode 100644 index 0000000..b0a1076 --- /dev/null +++ b/HStation.Dto.Assets.Core/00-PumpProduct/02-PumpGroup/AddPumpGroupDto.cs @@ -0,0 +1,40 @@ +锘縩amespace HStation.Dto.Assets +{ + public class AddPumpGroupDto + { + /// <summary> + /// 娉电郴鍒桰D + /// </summary> + public long PumpSeriesID { get; set; } + + /// <summary> + /// 鍚嶇О + /// </summary> + public string Name { get; set; } + + /// <summary> + /// 鍙傛暟 + /// </summary> + public string Paras { get; set; } + + /// <summary> + /// 鏍囩 + /// </summary> + public 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/HStation.Dto.Assets.Core/00-PumpProduct/02-PumpGroup/PumpGroupDto.cs b/HStation.Dto.Assets.Core/00-PumpProduct/02-PumpGroup/PumpGroupDto.cs new file mode 100644 index 0000000..0ee32f7 --- /dev/null +++ b/HStation.Dto.Assets.Core/00-PumpProduct/02-PumpGroup/PumpGroupDto.cs @@ -0,0 +1,62 @@ +锘縰sing Yw.Model; + +namespace HStation.Dto.Assets +{ + public class PumpGroupDto + { + public PumpGroupDto() + { + } + + public PumpGroupDto(Model.PumpGroup rhs) + { + this.ID = rhs.ID; + this.Paras = rhs.Paras; + this.Name = rhs.Name; + this.PumpSeriesID = rhs.PumpSeriesID; + this.TagName = rhs.TagName; + this.SortCode = rhs.SortCode; + this.Description = rhs.Description; + } + + /// <summary> + /// id + /// </summary> + public long ID { get; set; } + + /// <summary> + /// 娉电郴鍒桰D + /// </summary> + public long PumpSeriesID { 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/HStation.Dto.Assets.Core/00-PumpProduct/02-PumpGroup/UpdatePumpGroupDto.cs b/HStation.Dto.Assets.Core/00-PumpProduct/02-PumpGroup/UpdatePumpGroupDto.cs new file mode 100644 index 0000000..b87a72b --- /dev/null +++ b/HStation.Dto.Assets.Core/00-PumpProduct/02-PumpGroup/UpdatePumpGroupDto.cs @@ -0,0 +1,48 @@ +锘縰sing System.ComponentModel.DataAnnotations; + +namespace HStation.Dto.Assets +{ + public class UpdatePumpGroupDto + { + /// <summary> + /// id + /// </summary> + [Required, Range(1, long.MaxValue, ErrorMessage = "ID 蹇呴』澶т簬0")] + public long ID { get; set; } + + /// <summary> + /// 娉电郴鍒桰D + /// </summary> + public long PumpSeriesID { get; set; } + + /// <summary> + /// 鍚嶇О + /// </summary> + public string Name { get; set; } + + /// <summary> + /// 鍙傛暟 + /// </summary> + public string Paras { get; set; } + + /// <summary> + /// 鏍囩 + /// </summary> + public 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/HStation.Dto.Assets.Core/00-PumpProduct/03-PumpMain/AddPumpMainDto.cs b/HStation.Dto.Assets.Core/00-PumpProduct/03-PumpMain/AddPumpMainDto.cs new file mode 100644 index 0000000..a4968fa --- /dev/null +++ b/HStation.Dto.Assets.Core/00-PumpProduct/03-PumpMain/AddPumpMainDto.cs @@ -0,0 +1,75 @@ +锘縩amespace HStation.Dto.Assets +{ + public class AddPumpMainDto + { + /// <summary> + /// 鍚嶇О + /// </summary> + public string Name { get; set; } + + /// <summary> + /// 娉电郴鍒桰D + /// </summary> + public long PumpSeriesID { 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 double RatedSpeed { get; set; } + + /// <summary> + /// 棰濆畾娴侀噺 + /// </summary> + public double RatedFlow { get; set; } + + /// <summary> + /// 棰濆畾鎵▼ + /// </summary> + public double RatedHead { get; set; } + + /// <summary> + /// 棰濆畾鏁堢巼 + /// </summary> + public double RatedEfficiency { get; set; } + + /// <summary> + /// 棰濆畾鍔熺巼 + /// </summary> + public double RatedPower { get; set; } + + /// <summary> + /// 姘旇殌 + /// </summary> + public double Erosion { get; set; } + + /// <summary> + /// 鍙惰疆澶栧緞 + /// </summary> + public double D2 { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/01-entity/PumpMain.cs b/HStation.Dto.Assets.Core/00-PumpProduct/03-PumpMain/PumpMainDto.cs similarity index 72% copy from Service/HStation.Service.Xhs.PumpProduct.Core/01-entity/PumpMain.cs copy to HStation.Dto.Assets.Core/00-PumpProduct/03-PumpMain/PumpMainDto.cs index 02c26cf..9e64132 100644 --- a/Service/HStation.Service.Xhs.PumpProduct.Core/01-entity/PumpMain.cs +++ b/HStation.Dto.Assets.Core/00-PumpProduct/03-PumpMain/PumpMainDto.cs @@ -1,42 +1,35 @@ -锘縰sing SqlSugar; -using Yw.Entity; +锘縰sing Yw.Model; -namespace HStation.Entity +namespace HStation.Dto.Assets { - /// <summary> - /// 涓氬姟绔� - /// </summary> - [SysType("xhs-pumpmain")] - [SugarTable("xhs-pumpmain")] - public class PumpMain : BaseEntity, IParas, IFlags, ITagName, ISorter, System.ICloneable + public class PumpMainDto { - /// <summary> - /// - /// </summary> - public PumpMain() - { } + public PumpMainDto() + { + } - /// <summary> - /// - /// </summary> - public PumpMain(PumpMain rhs) : base(rhs) + public PumpMainDto(Model.PumpMain rhs) { this.ID = rhs.ID; this.PumpSeriesID = rhs.PumpSeriesID; - this.Name = rhs.Name; - this.Paras = rhs.Paras; - this.RatedEfficiency = rhs.RatedEfficiency; this.RatedPower = rhs.RatedPower; + this.RatedEfficiency = rhs.RatedEfficiency; this.Erosion = rhs.Erosion; this.D2 = rhs.D2; - this.Flags = rhs.Flags; + this.Paras = rhs.Paras; + this.Name = rhs.Name; this.TagName = rhs.TagName; - this.RatedSpeed = rhs.RatedSpeed; - this.RatedHead = rhs.RatedHead; - this.RatedFlow = rhs.RatedFlow; this.SortCode = rhs.SortCode; + this.RatedSpeed = rhs.RatedSpeed; + this.RatedFlow = rhs.RatedFlow; + this.RatedHead = rhs.RatedHead; this.Description = rhs.Description; } + + /// <summary> + /// id + /// </summary> + public long ID { get; set; } /// <summary> /// 娉电郴鍒桰D @@ -51,12 +44,12 @@ /// <summary> /// 鍙傛暟 /// </summary> - public string Paras { get; set; } + public Dictionary<string, string> Paras { get; set; } /// <summary> /// 鏍囩 /// </summary> - public string Flags { get; set; } + public List<string> Flags { get; set; } /// <summary> /// 鏍囧織 @@ -107,18 +100,5 @@ /// 璇存槑 /// </summary> public string Description { get; set; } - - /// <summary> - /// - /// </summary> - public PumpMain Clone() - { - return (PumpMain)this.MemberwiseClone(); - } - - object ICloneable.Clone() - { - return this.MemberwiseClone(); - } } } \ No newline at end of file diff --git a/HStation.Dto.Assets.Core/00-PumpProduct/03-PumpMain/UpdatePumpMainDto.cs b/HStation.Dto.Assets.Core/00-PumpProduct/03-PumpMain/UpdatePumpMainDto.cs new file mode 100644 index 0000000..fa966a5 --- /dev/null +++ b/HStation.Dto.Assets.Core/00-PumpProduct/03-PumpMain/UpdatePumpMainDto.cs @@ -0,0 +1,83 @@ +锘縰sing System.ComponentModel.DataAnnotations; + +namespace HStation.Dto.Assets +{ + public class UpdatePumpMainDto + { + /// <summary> + /// id + /// </summary> + [Required, Range(1, long.MaxValue, ErrorMessage = "ID 蹇呴』澶т簬0")] + public long ID { get; set; } + + /// <summary> + /// 娉电郴鍒桰D + /// </summary> + public long PumpSeriesID { 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 double RatedSpeed { get; set; } + + /// <summary> + /// 棰濆畾娴侀噺 + /// </summary> + public double RatedFlow { get; set; } + + /// <summary> + /// 棰濆畾鎵▼ + /// </summary> + public double RatedHead { get; set; } + + /// <summary> + /// 棰濆畾鏁堢巼 + /// </summary> + public double RatedEfficiency { get; set; } + + /// <summary> + /// 棰濆畾鍔熺巼 + /// </summary> + public double RatedPower { get; set; } + + /// <summary> + /// 姘旇殌 + /// </summary> + public double Erosion { get; set; } + + /// <summary> + /// 鍙惰疆澶栧緞 + /// </summary> + public double D2 { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/HStation.Dto.Assets.Core/00-PumpProduct/04-PumpMaping/AddPumpMainDto.cs b/HStation.Dto.Assets.Core/00-PumpProduct/04-PumpMaping/AddPumpMainDto.cs new file mode 100644 index 0000000..30f4e55 --- /dev/null +++ b/HStation.Dto.Assets.Core/00-PumpProduct/04-PumpMaping/AddPumpMainDto.cs @@ -0,0 +1,35 @@ +锘縩amespace HStation.Dto.Assets +{ + public class AddPumpGroupAndMainMapDto + { + /// <summary> + /// 娉电粍ID + /// </summary> + public long PumpGroupID { get; set; } + + /// <summary> + /// 娉靛瀷鍙稩D + /// </summary> + public long PumpMainID { get; set; } + + /// <summary> + /// 鍙傛暟 + /// </summary> + public string Paras { get; set; } + + /// <summary> + /// 鏍囩 + /// </summary> + public 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/HStation.Dto.Assets.Core/00-PumpProduct/04-PumpMaping/PumpMainDto.cs b/HStation.Dto.Assets.Core/00-PumpProduct/04-PumpMaping/PumpMainDto.cs new file mode 100644 index 0000000..84c09d0 --- /dev/null +++ b/HStation.Dto.Assets.Core/00-PumpProduct/04-PumpMaping/PumpMainDto.cs @@ -0,0 +1,57 @@ +锘縰sing Yw.Model; + +namespace HStation.Dto.Assets +{ + public class PumpGroupAndMainMapDto + { + public PumpGroupAndMainMapDto() + { + } + + public PumpGroupAndMainMapDto(Model.PumpGroupAndMainMap rhs) + { + this.ID = rhs.ID; + this.PumpGroupID = rhs.PumpGroupID; + this.PumpMainID = rhs.PumpMainID; + this.Flags = rhs.Flags; + this.Paras = rhs.Paras; + this.TagName = rhs.TagName; + this.Description = rhs.Description; + } + + /// <summary> + /// id + /// </summary> + public long ID { get; set; } + + /// <summary> + /// 娉电粍ID + /// </summary> + public long PumpGroupID { get; set; } + + /// <summary> + /// 娉靛瀷鍙稩D + /// </summary> + public long PumpMainID { 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/HStation.Dto.Assets.Core/00-PumpProduct/04-PumpMaping/UpdatePumpMainDto.cs b/HStation.Dto.Assets.Core/00-PumpProduct/04-PumpMaping/UpdatePumpMainDto.cs new file mode 100644 index 0000000..6f4e34a --- /dev/null +++ b/HStation.Dto.Assets.Core/00-PumpProduct/04-PumpMaping/UpdatePumpMainDto.cs @@ -0,0 +1,43 @@ +锘縰sing System.ComponentModel.DataAnnotations; + +namespace HStation.Dto.Assets +{ + public class UpdatePumpGroupAndMainMapDto + { + /// <summary> + /// id + /// </summary> + [Required, Range(1, long.MaxValue, ErrorMessage = "ID 蹇呴』澶т簬0")] + public long ID { get; set; } + + /// <summary> + /// 娉电粍ID + /// </summary> + public long PumpGroupID { get; set; } + + /// <summary> + /// 娉靛瀷鍙稩D + /// </summary> + public long PumpMainID { get; set; } + + /// <summary> + /// 鍙傛暟 + /// </summary> + public string Paras { get; set; } + + /// <summary> + /// 鏍囩 + /// </summary> + public 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/HStation.Dto.Assets.Core/00-PumpProduct/05-PumpPartMain/AddPumpPartMainDto.cs b/HStation.Dto.Assets.Core/00-PumpProduct/05-PumpPartMain/AddPumpPartMainDto.cs new file mode 100644 index 0000000..d01285a --- /dev/null +++ b/HStation.Dto.Assets.Core/00-PumpProduct/05-PumpPartMain/AddPumpPartMainDto.cs @@ -0,0 +1,25 @@ +锘縩amespace HStation.Dto.Assets +{ + public class AddPumpPartMainDto + { + /// <summary> + /// 娉电郴鍒桰D + /// </summary> + public long SeriesID { get; set; } + + /// <summary> + /// 浜у搧缂栧彿 + /// </summary> + public string NO { get; set; } + + /// <summary> + /// 浜у搧鍚嶇О + /// </summary> + public string Name { get; set; } + + /// <summary> + /// 浜у搧鍥惧彿 + /// </summary> + public string Code { get; set; } + } +} \ No newline at end of file diff --git a/HStation.Dto.Assets.Core/00-PumpProduct/05-PumpPartMain/PumpPartMainDto.cs b/HStation.Dto.Assets.Core/00-PumpProduct/05-PumpPartMain/PumpPartMainDto.cs new file mode 100644 index 0000000..2708272 --- /dev/null +++ b/HStation.Dto.Assets.Core/00-PumpProduct/05-PumpPartMain/PumpPartMainDto.cs @@ -0,0 +1,45 @@ +锘縰sing Yw.Model; + +namespace HStation.Dto.Assets +{ + public class PumpPartMainDto + { + public PumpPartMainDto() + { + } + + public PumpPartMainDto(Model.PumpPartMain rhs) + { + this.ID = rhs.ID; + this.Name = rhs.Name; + this.SeriesID = rhs.SeriesID; + this.Code = rhs.Code; + this.NO = rhs.NO; + } + + /// <summary> + /// ID + /// </summary> + public long ID { get; set; } + + /// <summary> + /// 娉电郴鍒桰D + /// </summary> + public long SeriesID { get; set; } + + /// <summary> + /// 浜у搧缂栧彿 + /// </summary> + public string NO { get; set; } + + /// <summary> + /// 浜у搧鍚嶇О + /// </summary> + public string Name { get; set; } + + /// <summary> + /// 浜у搧鍥惧彿 + /// </summary> + public string Code { get; set; } + } +} \ No newline at end of file diff --git a/HStation.Dto.Assets.Core/00-PumpProduct/05-PumpPartMain/UpdatePumpPartMainDto.cs b/HStation.Dto.Assets.Core/00-PumpProduct/05-PumpPartMain/UpdatePumpPartMainDto.cs new file mode 100644 index 0000000..a376195 --- /dev/null +++ b/HStation.Dto.Assets.Core/00-PumpProduct/05-PumpPartMain/UpdatePumpPartMainDto.cs @@ -0,0 +1,33 @@ +锘縰sing System.ComponentModel.DataAnnotations; + +namespace HStation.Dto.Assets +{ + public class UpdatePumpPartMainDto + { + /// <summary> + /// id + /// </summary> + [Required, Range(1, long.MaxValue, ErrorMessage = "ID 蹇呴』澶т簬0")] + public long ID { get; set; } + + /// <summary> + /// 娉电郴鍒桰D + /// </summary> + public long SeriesID { get; set; } + + /// <summary> + /// 浜у搧缂栧彿 + /// </summary> + public string NO { get; set; } + + /// <summary> + /// 浜у搧鍚嶇О + /// </summary> + public string Name { get; set; } + + /// <summary> + /// 浜у搧鍥惧彿 + /// </summary> + public string Code { get; set; } + } +} \ No newline at end of file diff --git a/HStation.Dto.Assets.Core/00-PumpProduct/06-PumpPropContent/AddPumpPropContentDto.cs b/HStation.Dto.Assets.Core/00-PumpProduct/06-PumpPropContent/AddPumpPropContentDto.cs new file mode 100644 index 0000000..b8aa8b5 --- /dev/null +++ b/HStation.Dto.Assets.Core/00-PumpProduct/06-PumpPropContent/AddPumpPropContentDto.cs @@ -0,0 +1,30 @@ +锘縩amespace HStation.Dto.Assets +{ + public class AddPumpPropContentDto + { + /// <summary> + /// 娉电郴鍒桰D + /// </summary> + public long SeriesID { get; set; } + + /// <summary> + /// 娉靛瀷鍙稩D + /// </summary> + public long MainID { get; set; } + + /// <summary> + /// 娉典骇鍝両D + /// </summary> + public long PartID { get; set; } + + /// <summary> + /// 灞炴�D + /// </summary> + public long PropID { get; set; } + + /// <summary> + /// 灞炴�у�� + /// </summary> + public string PropValue { get; set; } + } +} \ No newline at end of file diff --git a/HStation.Dto.Assets.Core/00-PumpProduct/06-PumpPropContent/PumpPropContentDto.cs b/HStation.Dto.Assets.Core/00-PumpProduct/06-PumpPropContent/PumpPropContentDto.cs new file mode 100644 index 0000000..bd5713b --- /dev/null +++ b/HStation.Dto.Assets.Core/00-PumpProduct/06-PumpPropContent/PumpPropContentDto.cs @@ -0,0 +1,50 @@ +锘縰sing Yw.Model; + +namespace HStation.Dto.Assets +{ + public class PumpPropContentDto + { + public PumpPropContentDto() + { + } + + public PumpPropContentDto(Model.PumpPropContent rhs) + { + this.ID = rhs.ID; + this.SeriesID = rhs.SeriesID; + this.PropID = rhs.PropID; + this.PartID = rhs.PartID; + this.PropValue = rhs.PropValue; + } + + /// <summary> + /// ID + /// </summary> + public long ID { get; set; } + + /// <summary> + /// 娉电郴鍒桰D + /// </summary> + public long SeriesID { get; set; } + + /// <summary> + /// 娉靛瀷鍙稩D + /// </summary> + public long MainID { get; set; } + + /// <summary> + /// 娉典骇鍝両D + /// </summary> + public long PartID { get; set; } + + /// <summary> + /// 灞炴�D + /// </summary> + public long PropID { get; set; } + + /// <summary> + /// 灞炴�у�� + /// </summary> + public string PropValue { get; set; } + } +} \ No newline at end of file diff --git a/HStation.Dto.Assets.Core/00-PumpProduct/06-PumpPropContent/UpdatePumpPropContentDto.cs b/HStation.Dto.Assets.Core/00-PumpProduct/06-PumpPropContent/UpdatePumpPropContentDto.cs new file mode 100644 index 0000000..714a271 --- /dev/null +++ b/HStation.Dto.Assets.Core/00-PumpProduct/06-PumpPropContent/UpdatePumpPropContentDto.cs @@ -0,0 +1,38 @@ +锘縰sing System.ComponentModel.DataAnnotations; + +namespace HStation.Dto.Assets +{ + public class UpdatePumpPropContentDto + { + /// <summary> + /// id + /// </summary> + [Required, Range(1, long.MaxValue, ErrorMessage = "ID 蹇呴』澶т簬0")] + public long ID { get; set; } + + /// <summary> + /// 娉电郴鍒桰D + /// </summary> + public long SeriesID { get; set; } + + /// <summary> + /// 娉靛瀷鍙稩D + /// </summary> + public long MainID { get; set; } + + /// <summary> + /// 娉典骇鍝両D + /// </summary> + public long PartID { get; set; } + + /// <summary> + /// 灞炴�D + /// </summary> + public long PropID { get; set; } + + /// <summary> + /// 灞炴�у�� + /// </summary> + public string PropValue { get; set; } + } +} \ No newline at end of file diff --git a/HStation.Dto.Assets.Core/00-PumpProduct/07-PumpMainAndPartMap/AddPumpMainAndPartMapDto.cs b/HStation.Dto.Assets.Core/00-PumpProduct/07-PumpMainAndPartMap/AddPumpMainAndPartMapDto.cs new file mode 100644 index 0000000..a446ea3 --- /dev/null +++ b/HStation.Dto.Assets.Core/00-PumpProduct/07-PumpMainAndPartMap/AddPumpMainAndPartMapDto.cs @@ -0,0 +1,20 @@ +锘縩amespace HStation.Dto.Assets +{ + public class AddPumpMainAndPartMapDto + { + /// <summary> + /// 娉电郴鍒桰D + /// </summary> + public long SeriesID { get; set; } + + /// <summary> + /// 娉靛瀷鍙稩D + /// </summary> + public long PumpID { get; set; } + + /// <summary> + /// 娉典骇鍝両D + /// </summary> + public long PumpPartID { get; set; } + } +} \ No newline at end of file diff --git a/HStation.Dto.Assets.Core/00-PumpProduct/07-PumpMainAndPartMap/PumpMainAndPartMapDto.cs b/HStation.Dto.Assets.Core/00-PumpProduct/07-PumpMainAndPartMap/PumpMainAndPartMapDto.cs new file mode 100644 index 0000000..ca551a3 --- /dev/null +++ b/HStation.Dto.Assets.Core/00-PumpProduct/07-PumpMainAndPartMap/PumpMainAndPartMapDto.cs @@ -0,0 +1,38 @@ +锘縰sing Yw.Model; + +namespace HStation.Dto.Assets +{ + public class PumpMainAndPartMapDto + { + public PumpMainAndPartMapDto() + { + } + + public PumpMainAndPartMapDto(Model.PumpMainAndPartMap rhs) + { + this.PumpPartID = rhs.PumpPartID; + this.PumpID = rhs.PumpID; + this.ID = rhs.ID; + } + + /// <summary> + /// ID + /// </summary> + public long ID { get; set; } + + /// <summary> + /// 娉电郴鍒桰D + /// </summary> + public long SeriesID { get; set; } + + /// <summary> + /// 娉靛瀷鍙稩D + /// </summary> + public long PumpID { get; set; } + + /// <summary> + /// 娉典骇鍝両D + /// </summary> + public long PumpPartID { get; set; } + } +} \ No newline at end of file diff --git a/HStation.Dto.Assets.Core/00-PumpProduct/07-PumpMainAndPartMap/UpdatePumpMainAndPartMapDto.cs b/HStation.Dto.Assets.Core/00-PumpProduct/07-PumpMainAndPartMap/UpdatePumpMainAndPartMapDto.cs new file mode 100644 index 0000000..62b4e6a --- /dev/null +++ b/HStation.Dto.Assets.Core/00-PumpProduct/07-PumpMainAndPartMap/UpdatePumpMainAndPartMapDto.cs @@ -0,0 +1,28 @@ +锘縰sing System.ComponentModel.DataAnnotations; + +namespace HStation.Dto.Assets +{ + public class UpdatePumpMainAndPartMapDto + { + /// <summary> + /// id + /// </summary> + [Required, Range(1, long.MaxValue, ErrorMessage = "ID 蹇呴』澶т簬0")] + public long ID { get; set; } + + /// <summary> + /// 娉电郴鍒桰D + /// </summary> + public long SeriesID { get; set; } + + /// <summary> + /// 娉靛瀷鍙稩D + /// </summary> + public long PumpID { get; set; } + + /// <summary> + /// 娉典骇鍝両D + /// </summary> + public long PumpPartID { get; set; } + } +} \ No newline at end of file diff --git a/HStation.Dto.Assets.Core/HStation.Dto.Assets.Core.csproj b/HStation.Dto.Assets.Core/HStation.Dto.Assets.Core.csproj new file mode 100644 index 0000000..6d13701 --- /dev/null +++ b/HStation.Dto.Assets.Core/HStation.Dto.Assets.Core.csproj @@ -0,0 +1,13 @@ +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <TargetFramework>net6.0</TargetFramework> + <ImplicitUsings>enable</ImplicitUsings> + <Nullable>enable</Nullable> + </PropertyGroup> + + <ItemGroup> + <ProjectReference Include="..\Model\HStation.Model.Assets.Core\HStation.Model.Assets.Core.csproj" /> + </ItemGroup> + +</Project> diff --git a/HStation.Xhs.Desktop.sln b/HStation.Xhs.Desktop.sln index 41dd3eb..d73bdb4 100644 --- a/HStation.Xhs.Desktop.sln +++ b/HStation.Xhs.Desktop.sln @@ -7,8 +7,6 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WinFrmUI", "WinFrmUI", "{D5B088B2-E69E-4B43-838B-080B9F012077}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HStation.WinFrmUI.Xhs.PumpProduct", "WinFrmUI\HStation.WinFrmUI.Xhs.Project\HStation.WinFrmUI.Xhs.PumpProduct.csproj", "{6AFCD45E-FA7A-490A-8ACC-5C89589290A7}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "BLL", "BLL", "{6FA135ED-89EF-474B-B502-FEA300F613A5}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WebApi", "WebApi", "{2AE8DD9B-A07B-44C4-B5C4-A9D98C49D633}" @@ -18,8 +16,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Service", "Service", "{67608112-BE07-493C-8240-E084CF461482}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HStation.Desktop.Xhs.Main", "Desktop\HStation.DeskTop.Xhs.Main\HStation.Desktop.Xhs.Main.csproj", "{34AADE5B-82C4-495E-939C-3D5618603C3C}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Setting", "Setting", "{00D75422-0508-4383-A558-AF5B7CB4AA7E}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Application", "Application", "{9BF8F95D-754D-4410-9421-B8C003342D6E}" EndProject @@ -41,21 +37,31 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Model", "Model", "{435C0A58-EE2A-4DDD-A8D8-48DD384B5210}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HStation.Model.Xhs.PumpProduct", "Model\HStation.Model.Xhs.PumpProduct\HStation.Model.Xhs.PumpProduct.csproj", "{E5C71A5C-6E4E-4112-8235-DAB973E3A0FB}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HStation.Model.Xhs.Project", "Model\HStation.Model.Xhs.Project\HStation.Model.Xhs.Project.csproj", "{6046AC77-595C-49B6-90E1-B4DE3877E11C}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HStation.Model.Core", "Model\HStation.Model.Core\HStation.Model.Core.csproj", "{BD5A6F12-4274-4334-9AD9-736138D41439}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HStation.Service.Xhs.Project", "Service\HStation.Service.Xhs.Project.Core\HStation.Service.Xhs.Project.csproj", "{DA7418A4-7ABA-48C0-B7D8-4C5642BE53C1}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HStation.Service.Xhs.PumpProduct", "Service\HStation.Service.Xhs.PumpProduct.Core\HStation.Service.Xhs.PumpProduct.csproj", "{37571FD9-E0AC-4AA3-AD53-9E8A539390D6}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HStation.Service.Xhs.Core", "Service\HStation.Service.Xhs.Core\HStation.Service.Xhs.Core.csproj", "{62C9B772-A274-4E04-A206-50E6505614D3}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yw.WinFrmUI.Map.Core", "WinFrmUI\Yw.WinFrmUI.Map.Core\Yw.WinFrmUI.Map.Core.csproj", "{62405CA1-35EB-4DBE-AD07-C16952808C9A}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Yw.WinFrmUI.Core", "WinFrmUI\Yw.WinFrmUI.Core\Yw.WinFrmUI.Core.csproj", "{B1F602CA-C4A9-4E2B-B9E7-69D582EC1E67}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HStation.Dto.Assets.Core", "HStation.Dto.Assets.Core\HStation.Dto.Assets.Core.csproj", "{CC714B08-1A0E-4E77-A426-7EEE20196D56}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HStation.Model.Assets.Core", "Model\HStation.Model.Assets.Core\HStation.Model.Assets.Core.csproj", "{96F88498-9FDD-4BE9-AD1C-EB33BB561287}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HStation.Service.Assets.Core", "Service\HStation.Service.Assets.Core\HStation.Service.Assets.Core.csproj", "{92B34B7D-FA77-4D0A-8F6D-88553755535A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HStation.WinFrmUI.Assets.Core", "WinFrmUI\HStation.WinFrmUI.Assets.Core\HStation.WinFrmUI.Assets.Core.csproj", "{D5DCB342-78DA-4B6E-99B1-08312C6F7077}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HStation.Application.Core", "Application\HStation.Application.Core\HStation.Application.Core.csproj", "{5F2D3DA8-9200-4D84-BB4E-5C6A1E2A91BC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HStation.BLL.Core", "BLL\HStation.BLL.Core\HStation.BLL.Core.csproj", "{60F22831-1504-4258-8CF5-71EEE6D4CE7B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HStation.BLL.Assets.Core", "HStation.BLL.Assets.Core\HStation.BLL.Assets.Core.csproj", "{53136FB6-3FFB-48A1-93C1-07B2282C7694}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -67,10 +73,6 @@ {08383FA3-9EDC-42BD-AABB-383E584DDD83}.Debug|Any CPU.Build.0 = Debug|Any CPU {08383FA3-9EDC-42BD-AABB-383E584DDD83}.Release|Any CPU.ActiveCfg = Release|Any CPU {08383FA3-9EDC-42BD-AABB-383E584DDD83}.Release|Any CPU.Build.0 = Release|Any CPU - {6AFCD45E-FA7A-490A-8ACC-5C89589290A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6AFCD45E-FA7A-490A-8ACC-5C89589290A7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6AFCD45E-FA7A-490A-8ACC-5C89589290A7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6AFCD45E-FA7A-490A-8ACC-5C89589290A7}.Release|Any CPU.Build.0 = Release|Any CPU {34AADE5B-82C4-495E-939C-3D5618603C3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {34AADE5B-82C4-495E-939C-3D5618603C3C}.Debug|Any CPU.Build.0 = Debug|Any CPU {34AADE5B-82C4-495E-939C-3D5618603C3C}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -107,10 +109,6 @@ {2B355DD2-D6A5-4C64-AB17-64A6AEBB6EEC}.Debug|Any CPU.Build.0 = Debug|Any CPU {2B355DD2-D6A5-4C64-AB17-64A6AEBB6EEC}.Release|Any CPU.ActiveCfg = Release|Any CPU {2B355DD2-D6A5-4C64-AB17-64A6AEBB6EEC}.Release|Any CPU.Build.0 = Release|Any CPU - {E5C71A5C-6E4E-4112-8235-DAB973E3A0FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E5C71A5C-6E4E-4112-8235-DAB973E3A0FB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E5C71A5C-6E4E-4112-8235-DAB973E3A0FB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E5C71A5C-6E4E-4112-8235-DAB973E3A0FB}.Release|Any CPU.Build.0 = Release|Any CPU {6046AC77-595C-49B6-90E1-B4DE3877E11C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6046AC77-595C-49B6-90E1-B4DE3877E11C}.Debug|Any CPU.Build.0 = Debug|Any CPU {6046AC77-595C-49B6-90E1-B4DE3877E11C}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -123,10 +121,6 @@ {DA7418A4-7ABA-48C0-B7D8-4C5642BE53C1}.Debug|Any CPU.Build.0 = Debug|Any CPU {DA7418A4-7ABA-48C0-B7D8-4C5642BE53C1}.Release|Any CPU.ActiveCfg = Release|Any CPU {DA7418A4-7ABA-48C0-B7D8-4C5642BE53C1}.Release|Any CPU.Build.0 = Release|Any CPU - {37571FD9-E0AC-4AA3-AD53-9E8A539390D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {37571FD9-E0AC-4AA3-AD53-9E8A539390D6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {37571FD9-E0AC-4AA3-AD53-9E8A539390D6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {37571FD9-E0AC-4AA3-AD53-9E8A539390D6}.Release|Any CPU.Build.0 = Release|Any CPU {62C9B772-A274-4E04-A206-50E6505614D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {62C9B772-A274-4E04-A206-50E6505614D3}.Debug|Any CPU.Build.0 = Debug|Any CPU {62C9B772-A274-4E04-A206-50E6505614D3}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -139,13 +133,40 @@ {B1F602CA-C4A9-4E2B-B9E7-69D582EC1E67}.Debug|Any CPU.Build.0 = Debug|Any CPU {B1F602CA-C4A9-4E2B-B9E7-69D582EC1E67}.Release|Any CPU.ActiveCfg = Release|Any CPU {B1F602CA-C4A9-4E2B-B9E7-69D582EC1E67}.Release|Any CPU.Build.0 = Release|Any CPU + {CC714B08-1A0E-4E77-A426-7EEE20196D56}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CC714B08-1A0E-4E77-A426-7EEE20196D56}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CC714B08-1A0E-4E77-A426-7EEE20196D56}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CC714B08-1A0E-4E77-A426-7EEE20196D56}.Release|Any CPU.Build.0 = Release|Any CPU + {96F88498-9FDD-4BE9-AD1C-EB33BB561287}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {96F88498-9FDD-4BE9-AD1C-EB33BB561287}.Debug|Any CPU.Build.0 = Debug|Any CPU + {96F88498-9FDD-4BE9-AD1C-EB33BB561287}.Release|Any CPU.ActiveCfg = Release|Any CPU + {96F88498-9FDD-4BE9-AD1C-EB33BB561287}.Release|Any CPU.Build.0 = Release|Any CPU + {92B34B7D-FA77-4D0A-8F6D-88553755535A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {92B34B7D-FA77-4D0A-8F6D-88553755535A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {92B34B7D-FA77-4D0A-8F6D-88553755535A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {92B34B7D-FA77-4D0A-8F6D-88553755535A}.Release|Any CPU.Build.0 = Release|Any CPU + {D5DCB342-78DA-4B6E-99B1-08312C6F7077}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D5DCB342-78DA-4B6E-99B1-08312C6F7077}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D5DCB342-78DA-4B6E-99B1-08312C6F7077}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D5DCB342-78DA-4B6E-99B1-08312C6F7077}.Release|Any CPU.Build.0 = Release|Any CPU + {5F2D3DA8-9200-4D84-BB4E-5C6A1E2A91BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5F2D3DA8-9200-4D84-BB4E-5C6A1E2A91BC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5F2D3DA8-9200-4D84-BB4E-5C6A1E2A91BC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5F2D3DA8-9200-4D84-BB4E-5C6A1E2A91BC}.Release|Any CPU.Build.0 = Release|Any CPU + {60F22831-1504-4258-8CF5-71EEE6D4CE7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {60F22831-1504-4258-8CF5-71EEE6D4CE7B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {60F22831-1504-4258-8CF5-71EEE6D4CE7B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {60F22831-1504-4258-8CF5-71EEE6D4CE7B}.Release|Any CPU.Build.0 = Release|Any CPU + {53136FB6-3FFB-48A1-93C1-07B2282C7694}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {53136FB6-3FFB-48A1-93C1-07B2282C7694}.Debug|Any CPU.Build.0 = Debug|Any CPU + {53136FB6-3FFB-48A1-93C1-07B2282C7694}.Release|Any CPU.ActiveCfg = Release|Any CPU + {53136FB6-3FFB-48A1-93C1-07B2282C7694}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {08383FA3-9EDC-42BD-AABB-383E584DDD83} = {D5B088B2-E69E-4B43-838B-080B9F012077} - {6AFCD45E-FA7A-490A-8ACC-5C89589290A7} = {D5B088B2-E69E-4B43-838B-080B9F012077} {D28ACE98-C7FC-48E7-AB21-2AE2BE797AC8} = {9BF8F95D-754D-4410-9421-B8C003342D6E} {E692C0F6-2627-4E05-89A5-705462B3751B} = {6FA135ED-89EF-474B-B502-FEA300F613A5} {AC84FDBE-787C-4B95-82A2-C852A905CEA4} = {60068812-89D4-4DAB-A41B-0334B8D76A0B} @@ -154,14 +175,19 @@ {435871C0-4F2F-4D7D-824D-8E7D53C88756} = {D5B088B2-E69E-4B43-838B-080B9F012077} {2DFEFAC8-58AC-443D-8FCD-EF7EA9DFBB2F} = {D5B088B2-E69E-4B43-838B-080B9F012077} {2B355DD2-D6A5-4C64-AB17-64A6AEBB6EEC} = {D5B088B2-E69E-4B43-838B-080B9F012077} - {E5C71A5C-6E4E-4112-8235-DAB973E3A0FB} = {435C0A58-EE2A-4DDD-A8D8-48DD384B5210} {6046AC77-595C-49B6-90E1-B4DE3877E11C} = {435C0A58-EE2A-4DDD-A8D8-48DD384B5210} {BD5A6F12-4274-4334-9AD9-736138D41439} = {435C0A58-EE2A-4DDD-A8D8-48DD384B5210} {DA7418A4-7ABA-48C0-B7D8-4C5642BE53C1} = {67608112-BE07-493C-8240-E084CF461482} - {37571FD9-E0AC-4AA3-AD53-9E8A539390D6} = {67608112-BE07-493C-8240-E084CF461482} {62C9B772-A274-4E04-A206-50E6505614D3} = {67608112-BE07-493C-8240-E084CF461482} {62405CA1-35EB-4DBE-AD07-C16952808C9A} = {D5B088B2-E69E-4B43-838B-080B9F012077} {B1F602CA-C4A9-4E2B-B9E7-69D582EC1E67} = {D5B088B2-E69E-4B43-838B-080B9F012077} + {CC714B08-1A0E-4E77-A426-7EEE20196D56} = {60068812-89D4-4DAB-A41B-0334B8D76A0B} + {96F88498-9FDD-4BE9-AD1C-EB33BB561287} = {435C0A58-EE2A-4DDD-A8D8-48DD384B5210} + {92B34B7D-FA77-4D0A-8F6D-88553755535A} = {67608112-BE07-493C-8240-E084CF461482} + {D5DCB342-78DA-4B6E-99B1-08312C6F7077} = {D5B088B2-E69E-4B43-838B-080B9F012077} + {5F2D3DA8-9200-4D84-BB4E-5C6A1E2A91BC} = {9BF8F95D-754D-4410-9421-B8C003342D6E} + {60F22831-1504-4258-8CF5-71EEE6D4CE7B} = {6FA135ED-89EF-474B-B502-FEA300F613A5} + {53136FB6-3FFB-48A1-93C1-07B2282C7694} = {6FA135ED-89EF-474B-B502-FEA300F613A5} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {E02989A8-9B6F-43E5-AACA-790328215089} diff --git a/Model/HStation.Model.Xhs.PumpProduct/00-PumpProduct/PumpGroup.cs b/Model/HStation.Model.Assets.Core/00-PumpProduct/PumpGroup.cs similarity index 100% rename from Model/HStation.Model.Xhs.PumpProduct/00-PumpProduct/PumpGroup.cs rename to Model/HStation.Model.Assets.Core/00-PumpProduct/PumpGroup.cs diff --git a/Model/HStation.Model.Xhs.PumpProduct/00-PumpProduct/PumpGroupAndMainMap.cs b/Model/HStation.Model.Assets.Core/00-PumpProduct/PumpGroupAndMainMap.cs similarity index 100% rename from Model/HStation.Model.Xhs.PumpProduct/00-PumpProduct/PumpGroupAndMainMap.cs rename to Model/HStation.Model.Assets.Core/00-PumpProduct/PumpGroupAndMainMap.cs diff --git a/Model/HStation.Model.Xhs.PumpProduct/00-PumpProduct/PumpMain.cs b/Model/HStation.Model.Assets.Core/00-PumpProduct/PumpMain.cs similarity index 100% rename from Model/HStation.Model.Xhs.PumpProduct/00-PumpProduct/PumpMain.cs rename to Model/HStation.Model.Assets.Core/00-PumpProduct/PumpMain.cs diff --git a/Model/HStation.Model.Xhs.PumpProduct/00-PumpProduct/PumpMainAndPartMap.cs b/Model/HStation.Model.Assets.Core/00-PumpProduct/PumpMainAndPartMap.cs similarity index 100% rename from Model/HStation.Model.Xhs.PumpProduct/00-PumpProduct/PumpMainAndPartMap.cs rename to Model/HStation.Model.Assets.Core/00-PumpProduct/PumpMainAndPartMap.cs diff --git a/Model/HStation.Model.Xhs.PumpProduct/00-PumpProduct/PumpPartMain.cs b/Model/HStation.Model.Assets.Core/00-PumpProduct/PumpPartMain.cs similarity index 100% rename from Model/HStation.Model.Xhs.PumpProduct/00-PumpProduct/PumpPartMain.cs rename to Model/HStation.Model.Assets.Core/00-PumpProduct/PumpPartMain.cs diff --git a/Model/HStation.Model.Xhs.PumpProduct/00-PumpProduct/PumpPropContent.cs b/Model/HStation.Model.Assets.Core/00-PumpProduct/PumpPropContent.cs similarity index 100% rename from Model/HStation.Model.Xhs.PumpProduct/00-PumpProduct/PumpPropContent.cs rename to Model/HStation.Model.Assets.Core/00-PumpProduct/PumpPropContent.cs diff --git a/Model/HStation.Model.Xhs.PumpProduct/00-PumpProduct/PumpSeries.cs b/Model/HStation.Model.Assets.Core/00-PumpProduct/PumpSeries.cs similarity index 100% rename from Model/HStation.Model.Xhs.PumpProduct/00-PumpProduct/PumpSeries.cs rename to Model/HStation.Model.Assets.Core/00-PumpProduct/PumpSeries.cs diff --git a/Model/HStation.Model.Xhs.PumpProduct/GlobalUsings.cs b/Model/HStation.Model.Assets.Core/GlobalUsings.cs similarity index 100% rename from Model/HStation.Model.Xhs.PumpProduct/GlobalUsings.cs rename to Model/HStation.Model.Assets.Core/GlobalUsings.cs diff --git a/Model/HStation.Model.Xhs.PumpProduct/HStation.Model.Xhs.PumpProduct.csproj b/Model/HStation.Model.Assets.Core/HStation.Model.Assets.Core.csproj similarity index 100% rename from Model/HStation.Model.Xhs.PumpProduct/HStation.Model.Xhs.PumpProduct.csproj rename to Model/HStation.Model.Assets.Core/HStation.Model.Assets.Core.csproj diff --git a/Model/HStation.Model.Xhs.Project/HStation.Model.Xhs.Project.csproj b/Model/HStation.Model.Xhs.Project/HStation.Model.Xhs.Project.csproj index c1ce7eb..60db212 100644 --- a/Model/HStation.Model.Xhs.Project/HStation.Model.Xhs.Project.csproj +++ b/Model/HStation.Model.Xhs.Project/HStation.Model.Xhs.Project.csproj @@ -7,6 +7,10 @@ </PropertyGroup> <ItemGroup> + <Compile Remove="00-ProjectModel\XhsProject.cs" /> + </ItemGroup> + + <ItemGroup> <Content Remove="E:\nuget\packages\yw.service.basic.core\3.1.2\contentFiles\any\net6.0\paras_basic_settings.json" /> </ItemGroup> diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/00-core/ConfigHelper.cs b/Service/HStation.Service.Assets.Core/00-core/ConfigHelper.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/00-core/ConfigHelper.cs rename to Service/HStation.Service.Assets.Core/00-core/ConfigHelper.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/00-core/DataType.cs b/Service/HStation.Service.Assets.Core/00-core/DataType.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/00-core/DataType.cs rename to Service/HStation.Service.Assets.Core/00-core/DataType.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/00-core/Flags.cs b/Service/HStation.Service.Assets.Core/00-core/Flags.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/00-core/Flags.cs rename to Service/HStation.Service.Assets.Core/00-core/Flags.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/00-core/MemoryCacheKey.cs b/Service/HStation.Service.Assets.Core/00-core/MemoryCacheKey.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/00-core/MemoryCacheKey.cs rename to Service/HStation.Service.Assets.Core/00-core/MemoryCacheKey.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/00-core/Prop.cs b/Service/HStation.Service.Assets.Core/00-core/Prop.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/00-core/Prop.cs rename to Service/HStation.Service.Assets.Core/00-core/Prop.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/01-entity/PumpGroup.cs b/Service/HStation.Service.Assets.Core/01-entity/PumpGroup.cs similarity index 96% rename from Service/HStation.Service.Xhs.PumpProduct.Core/01-entity/PumpGroup.cs rename to Service/HStation.Service.Assets.Core/01-entity/PumpGroup.cs index 6e52b4d..90782f4 100644 --- a/Service/HStation.Service.Xhs.PumpProduct.Core/01-entity/PumpGroup.cs +++ b/Service/HStation.Service.Assets.Core/01-entity/PumpGroup.cs @@ -6,8 +6,8 @@ /// <summary> /// 涓氬姟绔� /// </summary> - [SysType("xhs-pumpgroup")] - [SugarTable("xhs-pumpgroup")] + [SysType("xhs_pumpgroup")] + [SugarTable("xhs_pumpgroup")] public class PumpGroup : BaseEntity, IParas, IFlags, ITagName, ISorter, System.ICloneable { /// <summary> diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/01-entity/PumpGroupAndMainMap.cs b/Service/HStation.Service.Assets.Core/01-entity/PumpGroupAndMainMap.cs similarity index 96% rename from Service/HStation.Service.Xhs.PumpProduct.Core/01-entity/PumpGroupAndMainMap.cs rename to Service/HStation.Service.Assets.Core/01-entity/PumpGroupAndMainMap.cs index d959a10..01d0d6d 100644 --- a/Service/HStation.Service.Xhs.PumpProduct.Core/01-entity/PumpGroupAndMainMap.cs +++ b/Service/HStation.Service.Assets.Core/01-entity/PumpGroupAndMainMap.cs @@ -6,8 +6,8 @@ /// <summary> /// 涓氬姟绔� /// </summary> - [SysType("xhs-pumpmap")] - [SugarTable("xhs-pumpmap")] + [SysType("xhs_pumpmap")] + [SugarTable("xhs_pumpmap")] public class PumpGroupAndMainMap : BaseEntity, IParas, IFlags, ITagName, System.ICloneable { /// <summary> diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/01-entity/PumpMain.cs b/Service/HStation.Service.Assets.Core/01-entity/PumpMain.cs similarity index 97% rename from Service/HStation.Service.Xhs.PumpProduct.Core/01-entity/PumpMain.cs rename to Service/HStation.Service.Assets.Core/01-entity/PumpMain.cs index 02c26cf..c0d0016 100644 --- a/Service/HStation.Service.Xhs.PumpProduct.Core/01-entity/PumpMain.cs +++ b/Service/HStation.Service.Assets.Core/01-entity/PumpMain.cs @@ -6,8 +6,8 @@ /// <summary> /// 涓氬姟绔� /// </summary> - [SysType("xhs-pumpmain")] - [SugarTable("xhs-pumpmain")] + [SysType("xhs_pumpmain")] + [SugarTable("xhs_pumpmain")] public class PumpMain : BaseEntity, IParas, IFlags, ITagName, ISorter, System.ICloneable { /// <summary> diff --git a/Service/HStation.Service.Assets.Core/01-entity/PumpMainAndPartMap.cs b/Service/HStation.Service.Assets.Core/01-entity/PumpMainAndPartMap.cs new file mode 100644 index 0000000..b804447 --- /dev/null +++ b/Service/HStation.Service.Assets.Core/01-entity/PumpMainAndPartMap.cs @@ -0,0 +1,44 @@ +锘縰sing SqlSugar; +using Yw.Entity; + +namespace HStation.Entity +{ + /// <summary> + /// 娉典骇鍝佹槧灏� + /// </summary> + [SysType("xhs_pumpmainandpartmap")] + [SugarTable("xhs_pumpmainandpartmap")] + public class PumpMainAndPartMap : BaseEntity, System.ICloneable + { + public PumpMainAndPartMap() + { } + + /// <summary> + /// 娉电郴鍒桰D + /// </summary> + public long SeriesID { get; set; } + + /// <summary> + /// 娉靛瀷鍙稩D + /// </summary> + public long PumpID { get; set; } + + /// <summary> + /// 娉典骇鍝両D + /// </summary> + public long PumpPartID { get; set; } + + /// <summary> + /// + /// </summary> + public PumpMain Clone() + { + return (PumpMain)this.MemberwiseClone(); + } + + object ICloneable.Clone() + { + return this.MemberwiseClone(); + } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/01-entity/PumpPartMain.cs b/Service/HStation.Service.Assets.Core/01-entity/PumpPartMain.cs similarity index 92% rename from Service/HStation.Service.Xhs.PumpProduct.Core/01-entity/PumpPartMain.cs rename to Service/HStation.Service.Assets.Core/01-entity/PumpPartMain.cs index 493426d..8ac7f8d 100644 --- a/Service/HStation.Service.Xhs.PumpProduct.Core/01-entity/PumpPartMain.cs +++ b/Service/HStation.Service.Assets.Core/01-entity/PumpPartMain.cs @@ -6,8 +6,8 @@ /// <summary> /// 娉典骇鍝� /// </summary> - [SysType("xhs-pumpartmain")] - [SugarTable("xhs-pumpartmain")] + [SysType("xhs_pumpartmain")] + [SugarTable("xhs_pumpartmain")] public class PumpPartMain : BaseEntity, System.ICloneable { public PumpPartMain() diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/01-entity/PumpPropContent.cs b/Service/HStation.Service.Assets.Core/01-entity/PumpPropContent.cs similarity index 92% rename from Service/HStation.Service.Xhs.PumpProduct.Core/01-entity/PumpPropContent.cs rename to Service/HStation.Service.Assets.Core/01-entity/PumpPropContent.cs index 201d865..e0e3a46 100644 --- a/Service/HStation.Service.Xhs.PumpProduct.Core/01-entity/PumpPropContent.cs +++ b/Service/HStation.Service.Assets.Core/01-entity/PumpPropContent.cs @@ -6,8 +6,8 @@ /// <summary> /// 娉靛睘鎬у�� /// </summary> - [SysType("xhs-pumppropcontent")] - [SugarTable("xhs-pumppropcontent")] + [SysType("xhs_pumppropcontent")] + [SugarTable("xhs_pumppropcontent")] public class PumpPropContent : BaseEntity, System.ICloneable { public PumpPropContent() diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/01-entity/PumpSeries.cs b/Service/HStation.Service.Assets.Core/01-entity/PumpSeries.cs similarity index 96% rename from Service/HStation.Service.Xhs.PumpProduct.Core/01-entity/PumpSeries.cs rename to Service/HStation.Service.Assets.Core/01-entity/PumpSeries.cs index c6dcef4..2a022bb 100644 --- a/Service/HStation.Service.Xhs.PumpProduct.Core/01-entity/PumpSeries.cs +++ b/Service/HStation.Service.Assets.Core/01-entity/PumpSeries.cs @@ -6,8 +6,8 @@ /// <summary> /// 涓氬姟绔� /// </summary> - [SysType("xhs-pumpseries")] - [SugarTable("xhs-pumpseries")] + [SysType("xhs_pumpseries")] + [SugarTable("xhs_pumpseries")] public class PumpSeries : BaseEntity, IParas, IFlags, ITagName, ISorter, IUseStatus, System.ICloneable { /// <summary> diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/02-dal/01-interface/IPumpGroup.cs b/Service/HStation.Service.Assets.Core/02-dal/01-interface/IPumpGroup.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/02-dal/01-interface/IPumpGroup.cs rename to Service/HStation.Service.Assets.Core/02-dal/01-interface/IPumpGroup.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/02-dal/01-interface/IPumpGroupAndMainMap.cs b/Service/HStation.Service.Assets.Core/02-dal/01-interface/IPumpGroupAndMainMap.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/02-dal/01-interface/IPumpGroupAndMainMap.cs rename to Service/HStation.Service.Assets.Core/02-dal/01-interface/IPumpGroupAndMainMap.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/02-dal/01-interface/IPumpMain.cs b/Service/HStation.Service.Assets.Core/02-dal/01-interface/IPumpMain.cs similarity index 72% rename from Service/HStation.Service.Xhs.PumpProduct.Core/02-dal/01-interface/IPumpMain.cs rename to Service/HStation.Service.Assets.Core/02-dal/01-interface/IPumpMain.cs index 9cbe2f8..2e2842a 100644 --- a/Service/HStation.Service.Xhs.PumpProduct.Core/02-dal/01-interface/IPumpMain.cs +++ b/Service/HStation.Service.Assets.Core/02-dal/01-interface/IPumpMain.cs @@ -12,7 +12,7 @@ /// </summary> public interface IPumpMain : IBaseDAL<Entity.PumpMain>, IUpdateParas, IUpdateFlags, IUpdateTagName, IUpdateSorter { - long InsertsEx(Entity.PumpMain pumpMain, Entity.PumpGroupAndMainMap pumpGroupAndMainMap); + long InsertsEx(Entity.PumpMain pumpMain, Entity.PumpGroupAndMainMap pumpGroupAndMainMap, Entity.PumpPartMain pumpPartMain, List<Entity.PumpPropContent> pumpPropContent, Entity.PumpMainAndPartMap pumpMainAndPartMap); bool DeleteEx(long ID); } diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/02-dal/01-interface/IPumpMainAndPartMap.cs b/Service/HStation.Service.Assets.Core/02-dal/01-interface/IPumpMainAndPartMap.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/02-dal/01-interface/IPumpMainAndPartMap.cs rename to Service/HStation.Service.Assets.Core/02-dal/01-interface/IPumpMainAndPartMap.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/02-dal/01-interface/IPumpPartMain.cs b/Service/HStation.Service.Assets.Core/02-dal/01-interface/IPumpPartMain.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/02-dal/01-interface/IPumpPartMain.cs rename to Service/HStation.Service.Assets.Core/02-dal/01-interface/IPumpPartMain.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/02-dal/01-interface/IPumpPropContent.cs b/Service/HStation.Service.Assets.Core/02-dal/01-interface/IPumpPropContent.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/02-dal/01-interface/IPumpPropContent.cs rename to Service/HStation.Service.Assets.Core/02-dal/01-interface/IPumpPropContent.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/02-dal/01-interface/IPumpSeries.cs b/Service/HStation.Service.Assets.Core/02-dal/01-interface/IPumpSeries.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/02-dal/01-interface/IPumpSeries.cs rename to Service/HStation.Service.Assets.Core/02-dal/01-interface/IPumpSeries.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/02-dal/02-postgresql/PumpGroup.cs b/Service/HStation.Service.Assets.Core/02-dal/02-postgresql/PumpGroup.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/02-dal/02-postgresql/PumpGroup.cs rename to Service/HStation.Service.Assets.Core/02-dal/02-postgresql/PumpGroup.cs diff --git a/Service/HStation.Service.Assets.Core/02-dal/02-postgresql/PumpMain.cs b/Service/HStation.Service.Assets.Core/02-dal/02-postgresql/PumpMain.cs new file mode 100644 index 0000000..55c5201 --- /dev/null +++ b/Service/HStation.Service.Assets.Core/02-dal/02-postgresql/PumpMain.cs @@ -0,0 +1,145 @@ +锘縰sing HStation.Entity; +using log4net.ObjectRenderer; +using Yw.DAL.PostgreSql; + +namespace HStation.DAL.PostgreSql +{ + /// <summary> + /// + /// </summary> + public partial class PumpMain : BaseDAL_Paras_Flags_TagName_Sorter<Entity.PumpMain>, IPumpMain + { + /// <summary> + /// + /// </summary> + public override ConnectionConfig ConnectionConfig + { + get { return Xhs.ConfigHelper.PostgreSqlConnectionConfig; } + } + + //鎻掑叆鎷撳睍 + public long InsertsEx(Entity.PumpMain pumpMain, Entity.PumpGroupAndMainMap pumpGroupAndMainMap, PumpPartMain pumpPartMain, List<PumpPropContent> pumpPropContent, PumpMainAndPartMap pumpMainAndPartMap) + { + if (pumpMain == null) + { + return default; + } + using (var db = new SqlSugarClient(ConnectionConfig)) + { + try + { + db.BeginTran(); + var result = db.Insertable(pumpMain).ExecuteReturnSnowflakeId(); + if (result < 0) + { + db.RollbackTran(); + return default; + } + else + { + if (pumpGroupAndMainMap != null) + { + pumpGroupAndMainMap.PumpMainID = result; + var mapresult = db.Insertable(pumpGroupAndMainMap).ExecuteReturnSnowflakeId(); + if (mapresult < 0) + { + db.RollbackTran(); + return default; + } + } + if (pumpPartMain != null) + { + var partmain = db.Insertable(pumpPartMain).ExecuteReturnSnowflakeId(); + if (partmain < 0) + { + db.RollbackTran(); + return default; + } + else + { + if (pumpMainAndPartMap != null) + { + pumpMainAndPartMap.PumpPartID = partmain; + pumpMainAndPartMap.PumpID = result; + var mainandpartmap = db.Insertable(pumpMainAndPartMap).ExecuteReturnSnowflakeId(); + if (mainandpartmap < 0) + { + db.RollbackTran(); + return default; + } + else + { + if (pumpPropContent != null) + { + foreach (var item in pumpPropContent) + { + item.PartID = partmain; + item.MainID = result; + } + var content = db.Insertable(pumpPropContent).ExecuteReturnSnowflakeId(); + if (content < 0) + { + db.RollbackTran(); + return default; + } + } + } + } + } + } + } + db.CommitTran(); + return result; + } + catch (Exception ex) + { + db.RollbackTran(); + throw; + } + } + } + + //鍒犻櫎鎷撳睍 + public bool DeleteEx(long ID) + { + if (ID <= 0) + { + return default; + } + using (var db = new SqlSugarClient(ConnectionConfig)) + { + try + { + db.BeginTran(); + var main = db.Queryable<Entity.PumpMain>().ToList().Find(x => x.ID == ID); + var result = db.Deleteable(main).ExecuteCommand() > 0; + if (!result) + { + db.RollbackTran(); + return default; + } + else + { + var map = db.Queryable<Entity.PumpGroupAndMainMap>().ToList().Find(x => x.PumpMainID == ID); + if (map != null) + { + var mapresult = db.Deleteable(map).ExecuteCommand() > 0; + if (!mapresult) + { + db.RollbackTran(); + return default; + } + } + } + db.CommitTran(); + return true; + } + catch (Exception ex) + { + db.RollbackTran(); + throw; + } + } + } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/02-dal/02-postgresql/PumpMapGroupAndMain.cs b/Service/HStation.Service.Assets.Core/02-dal/02-postgresql/PumpMapGroupAndMain.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/02-dal/02-postgresql/PumpMapGroupAndMain.cs rename to Service/HStation.Service.Assets.Core/02-dal/02-postgresql/PumpMapGroupAndMain.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/02-dal/02-postgresql/PumpSeries.cs b/Service/HStation.Service.Assets.Core/02-dal/02-postgresql/PumpSeries.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/02-dal/02-postgresql/PumpSeries.cs rename to Service/HStation.Service.Assets.Core/02-dal/02-postgresql/PumpSeries.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/02-settings/00-core/XhsFileHelper.cs b/Service/HStation.Service.Assets.Core/02-settings/00-core/XhsFileHelper.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/02-settings/00-core/XhsFileHelper.cs rename to Service/HStation.Service.Assets.Core/02-settings/00-core/XhsFileHelper.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/02-settings/00-core/XhsParasHelper.cs b/Service/HStation.Service.Assets.Core/02-settings/00-core/XhsParasHelper.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/02-settings/00-core/XhsParasHelper.cs rename to Service/HStation.Service.Assets.Core/02-settings/00-core/XhsParasHelper.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/02-settings/01-paras/00-core/Paras_Xhs.cs b/Service/HStation.Service.Assets.Core/02-settings/01-paras/00-core/Paras_Xhs.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/02-settings/01-paras/00-core/Paras_Xhs.cs rename to Service/HStation.Service.Assets.Core/02-settings/01-paras/00-core/Paras_Xhs.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/02-settings/01-paras/00-core/XhsParas.cs b/Service/HStation.Service.Assets.Core/02-settings/01-paras/00-core/XhsParas.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/02-settings/01-paras/00-core/XhsParas.cs rename to Service/HStation.Service.Assets.Core/02-settings/01-paras/00-core/XhsParas.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/02-settings/01-paras/01-database/Paras_Xhs_DataBase.cs b/Service/HStation.Service.Assets.Core/02-settings/01-paras/01-database/Paras_Xhs_DataBase.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/02-settings/01-paras/01-database/Paras_Xhs_DataBase.cs rename to Service/HStation.Service.Assets.Core/02-settings/01-paras/01-database/Paras_Xhs_DataBase.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/02-settings/01-paras/01-database/Paras_Xhs_DataBase_Factory.cs b/Service/HStation.Service.Assets.Core/02-settings/01-paras/01-database/Paras_Xhs_DataBase_Factory.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/02-settings/01-paras/01-database/Paras_Xhs_DataBase_Factory.cs rename to Service/HStation.Service.Assets.Core/02-settings/01-paras/01-database/Paras_Xhs_DataBase_Factory.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/02-settings/01-paras/01-database/Paras_Xhs_DataBase_PostgreSql.cs b/Service/HStation.Service.Assets.Core/02-settings/01-paras/01-database/Paras_Xhs_DataBase_PostgreSql.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/02-settings/01-paras/01-database/Paras_Xhs_DataBase_PostgreSql.cs rename to Service/HStation.Service.Assets.Core/02-settings/01-paras/01-database/Paras_Xhs_DataBase_PostgreSql.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/02-settings/01-paras/01-database/Paras_Xhs_DataBase_SQLite.cs b/Service/HStation.Service.Assets.Core/02-settings/01-paras/01-database/Paras_Xhs_DataBase_SQLite.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/02-settings/01-paras/01-database/Paras_Xhs_DataBase_SQLite.cs rename to Service/HStation.Service.Assets.Core/02-settings/01-paras/01-database/Paras_Xhs_DataBase_SQLite.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/02-settings/01-paras/02-cal/Paras_Xhs_CAL.cs b/Service/HStation.Service.Assets.Core/02-settings/01-paras/02-cal/Paras_Xhs_CAL.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/02-settings/01-paras/02-cal/Paras_Xhs_CAL.cs rename to Service/HStation.Service.Assets.Core/02-settings/01-paras/02-cal/Paras_Xhs_CAL.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/02-settings/01-paras/02-cal/Paras_Xhs_CAL_HttpClient.cs b/Service/HStation.Service.Assets.Core/02-settings/01-paras/02-cal/Paras_Xhs_CAL_HttpClient.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/02-settings/01-paras/02-cal/Paras_Xhs_CAL_HttpClient.cs rename to Service/HStation.Service.Assets.Core/02-settings/01-paras/02-cal/Paras_Xhs_CAL_HttpClient.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/02-settings/01-paras/02-cal/Paras_Xhs_CAL_LocalClient.cs b/Service/HStation.Service.Assets.Core/02-settings/01-paras/02-cal/Paras_Xhs_CAL_LocalClient.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/02-settings/01-paras/02-cal/Paras_Xhs_CAL_LocalClient.cs rename to Service/HStation.Service.Assets.Core/02-settings/01-paras/02-cal/Paras_Xhs_CAL_LocalClient.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/03-service/00-core/01-dal/DALCreateHelper.cs b/Service/HStation.Service.Assets.Core/03-service/00-core/01-dal/DALCreateHelper.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/03-service/00-core/01-dal/DALCreateHelper.cs rename to Service/HStation.Service.Assets.Core/03-service/00-core/01-dal/DALCreateHelper.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/03-service/00-core/02-cache/CacheHelper.cs b/Service/HStation.Service.Assets.Core/03-service/00-core/02-cache/CacheHelper.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/03-service/00-core/02-cache/CacheHelper.cs rename to Service/HStation.Service.Assets.Core/03-service/00-core/02-cache/CacheHelper.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/03-service/01-PumpSeries/Cache/PumpSeriesCacheHelper.cs b/Service/HStation.Service.Assets.Core/03-service/01-PumpSeries/Cache/PumpSeriesCacheHelper.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/03-service/01-PumpSeries/Cache/PumpSeriesCacheHelper.cs rename to Service/HStation.Service.Assets.Core/03-service/01-PumpSeries/Cache/PumpSeriesCacheHelper.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/03-service/01-PumpSeries/PumpSeries.cs b/Service/HStation.Service.Assets.Core/03-service/01-PumpSeries/PumpSeries.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/03-service/01-PumpSeries/PumpSeries.cs rename to Service/HStation.Service.Assets.Core/03-service/01-PumpSeries/PumpSeries.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/03-service/01-PumpSeries/PumpSeries_Instance.cs b/Service/HStation.Service.Assets.Core/03-service/01-PumpSeries/PumpSeries_Instance.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/03-service/01-PumpSeries/PumpSeries_Instance.cs rename to Service/HStation.Service.Assets.Core/03-service/01-PumpSeries/PumpSeries_Instance.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/03-service/02-PumpGroup/Cache/PumpGroupCacheHelper.cs b/Service/HStation.Service.Assets.Core/03-service/02-PumpGroup/Cache/PumpGroupCacheHelper.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/03-service/02-PumpGroup/Cache/PumpGroupCacheHelper.cs rename to Service/HStation.Service.Assets.Core/03-service/02-PumpGroup/Cache/PumpGroupCacheHelper.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/03-service/02-PumpGroup/PumpGroup.cs b/Service/HStation.Service.Assets.Core/03-service/02-PumpGroup/PumpGroup.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/03-service/02-PumpGroup/PumpGroup.cs rename to Service/HStation.Service.Assets.Core/03-service/02-PumpGroup/PumpGroup.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/03-service/02-PumpGroup/PumpGroup_Instance.cs b/Service/HStation.Service.Assets.Core/03-service/02-PumpGroup/PumpGroup_Instance.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/03-service/02-PumpGroup/PumpGroup_Instance.cs rename to Service/HStation.Service.Assets.Core/03-service/02-PumpGroup/PumpGroup_Instance.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/03-service/03-PumpMain/Cache/PumpMainCacheHelper.cs b/Service/HStation.Service.Assets.Core/03-service/03-PumpMain/Cache/PumpMainCacheHelper.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/03-service/03-PumpMain/Cache/PumpMainCacheHelper.cs rename to Service/HStation.Service.Assets.Core/03-service/03-PumpMain/Cache/PumpMainCacheHelper.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/03-service/03-PumpMain/PumpMain.cs b/Service/HStation.Service.Assets.Core/03-service/03-PumpMain/PumpMain.cs similarity index 91% rename from Service/HStation.Service.Xhs.PumpProduct.Core/03-service/03-PumpMain/PumpMain.cs rename to Service/HStation.Service.Assets.Core/03-service/03-PumpMain/PumpMain.cs index 4e134b8..37db49c 100644 --- a/Service/HStation.Service.Xhs.PumpProduct.Core/03-service/03-PumpMain/PumpMain.cs +++ b/Service/HStation.Service.Assets.Core/03-service/03-PumpMain/PumpMain.cs @@ -121,6 +121,18 @@ } /// <summary> + /// 閫氳繃 ID 鑾峰彇鎵�鏈変骇鍝� + /// </summary> + public List<Model.PumpPartMain> GetPartByID(long ID) + { + var all = GetAll(); + var allidlist = PumpMainAndPartMap.GetByPumpMainID(ID); + var partmain = new PumpPartMain(); + var allpart = partmain.GetByIds(allidlist); + return allpart; + } + + /// <summary> /// 閫氳繃 ID 鑾峰彇 /// </summary> public List<Model.PumpMain> GetByIds(List<long> Ids) @@ -185,20 +197,24 @@ /// <summary> /// 鎻掑叆鎷撳睍 /// </summary> - public long InsertEx(Model.PumpMain model, Model.PumpGroupAndMainMap map) + public long InsertEx(Model.PumpMain main, Model.PumpGroupAndMainMap map, Model.PumpPartMain part, List<Model.PumpPropContent> content, Model.PumpMainAndPartMap partmap) { - if (model == null) + if (main == null) { return default; } var dal = DALCreateHelper.CreateDAL<HStation.DAL.IPumpMain>(); - var main = Model2Entity(model); - var entity = PumpGroupAndMainMap.Model2Entity(map); - var id = dal.InsertsEx(main, entity); + var mainEntity = Model2Entity(main); + var groupMapEntity = PumpGroupAndMainMap.Model2Entity(map); + var partEntity = PumpPartMain.Model2Entity(part); + var contentEntity = PumpPropContent.Model2Entities(content); + var partmapEntity = PumpMainAndPartMap.Model2Entity(partmap); + var id = dal.InsertsEx(mainEntity, groupMapEntity, partEntity, contentEntity, partmapEntity); if (id > 0) { UpdateCache(id); PumpGroupAndMainMap.UpdateCacheByMainID(id); + // PumpPartMain.Entity2Model } return id; } diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/03-service/03-PumpMain/PumpMain_Instance.cs b/Service/HStation.Service.Assets.Core/03-service/03-PumpMain/PumpMain_Instance.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/03-service/03-PumpMain/PumpMain_Instance.cs rename to Service/HStation.Service.Assets.Core/03-service/03-PumpMain/PumpMain_Instance.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/03-service/04-PumpGroupAndMainMap/Cache/PumpGroupAndMainMapCacheHelper.cs b/Service/HStation.Service.Assets.Core/03-service/04-PumpGroupAndMainMap/Cache/PumpGroupAndMainMapCacheHelper.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/03-service/04-PumpGroupAndMainMap/Cache/PumpGroupAndMainMapCacheHelper.cs rename to Service/HStation.Service.Assets.Core/03-service/04-PumpGroupAndMainMap/Cache/PumpGroupAndMainMapCacheHelper.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/03-service/04-PumpGroupAndMainMap/PumpMaping.cs b/Service/HStation.Service.Assets.Core/03-service/04-PumpGroupAndMainMap/PumpMaping.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/03-service/04-PumpGroupAndMainMap/PumpMaping.cs rename to Service/HStation.Service.Assets.Core/03-service/04-PumpGroupAndMainMap/PumpMaping.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/03-service/04-PumpGroupAndMainMap/PumpMaping_Instance.cs b/Service/HStation.Service.Assets.Core/03-service/04-PumpGroupAndMainMap/PumpMaping_Instance.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/03-service/04-PumpGroupAndMainMap/PumpMaping_Instance.cs rename to Service/HStation.Service.Assets.Core/03-service/04-PumpGroupAndMainMap/PumpMaping_Instance.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/03-service/05-PumpPartMain/Cache/PumpPartMainCacheHelper.cs b/Service/HStation.Service.Assets.Core/03-service/05-PumpPartMain/Cache/PumpPartMainCacheHelper.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/03-service/05-PumpPartMain/Cache/PumpPartMainCacheHelper.cs rename to Service/HStation.Service.Assets.Core/03-service/05-PumpPartMain/Cache/PumpPartMainCacheHelper.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/03-service/05-PumpPartMain/PumpPartMain.cs b/Service/HStation.Service.Assets.Core/03-service/05-PumpPartMain/PumpPartMain.cs similarity index 95% rename from Service/HStation.Service.Xhs.PumpProduct.Core/03-service/05-PumpPartMain/PumpPartMain.cs rename to Service/HStation.Service.Assets.Core/03-service/05-PumpPartMain/PumpPartMain.cs index 283c91e..4791afb 100644 --- a/Service/HStation.Service.Xhs.PumpProduct.Core/03-service/05-PumpPartMain/PumpPartMain.cs +++ b/Service/HStation.Service.Assets.Core/03-service/05-PumpPartMain/PumpPartMain.cs @@ -72,15 +72,6 @@ PumpSeriesCacheHelper.Trigger(); } - //閫氳繃缁処D绉婚櫎缂撳瓨 - public static void RemoveCacheByGroupID(long ID) - { - var all = GetCache(); - var maplist = PumpGroupAndMainMap.GetMainIDByGroupID(ID); - all.RemoveAll(item => maplist.Any(mapItem => mapItem == item.ID)); - PumpSeriesCacheHelper.Trigger(); - } - /// <summary> /// 鍙戝竷缂撳瓨 /// </summary> @@ -121,7 +112,7 @@ return default; } var all = GetAll(); - return all; + return Ids.Select(x => all.Find(y => y.ID == x)).ToList().Where(x => x != null).ToList(); } #endregion Query @@ -308,8 +299,6 @@ } #endregion Update - - #region Delete diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/03-service/05-PumpPartMain/PumpPartMain_Instance.cs b/Service/HStation.Service.Assets.Core/03-service/05-PumpPartMain/PumpPartMain_Instance.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/03-service/05-PumpPartMain/PumpPartMain_Instance.cs rename to Service/HStation.Service.Assets.Core/03-service/05-PumpPartMain/PumpPartMain_Instance.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/03-service/06-PumpPropContent/Cache/PumpPropContentCacheHelper.cs b/Service/HStation.Service.Assets.Core/03-service/06-PumpPropContent/Cache/PumpPropContentCacheHelper.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/03-service/06-PumpPropContent/Cache/PumpPropContentCacheHelper.cs rename to Service/HStation.Service.Assets.Core/03-service/06-PumpPropContent/Cache/PumpPropContentCacheHelper.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/03-service/06-PumpPropContent/PumpPropContent.cs b/Service/HStation.Service.Assets.Core/03-service/06-PumpPropContent/PumpPropContent.cs similarity index 95% rename from Service/HStation.Service.Xhs.PumpProduct.Core/03-service/06-PumpPropContent/PumpPropContent.cs rename to Service/HStation.Service.Assets.Core/03-service/06-PumpPropContent/PumpPropContent.cs index a19ab9c..f6947cd 100644 --- a/Service/HStation.Service.Xhs.PumpProduct.Core/03-service/06-PumpPropContent/PumpPropContent.cs +++ b/Service/HStation.Service.Assets.Core/03-service/06-PumpPropContent/PumpPropContent.cs @@ -124,6 +124,19 @@ return all; } + /// <summary> + /// 閫氳繃PropID 鑾峰彇 + /// </summary> + public List<Model.PumpPropContent> GetByPropID(List<long> Ids) + { + if (Ids == null || Ids.Count < 1) + { + return default; + } + var all = GetAll(); + return Ids.Select(x => all.Find(y => y.PropID == x)).ToList(); + } + #endregion Query #region Insert diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/03-service/06-PumpPropContent/PumpPropContent_Instance.cs b/Service/HStation.Service.Assets.Core/03-service/06-PumpPropContent/PumpPropContent_Instance.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/03-service/06-PumpPropContent/PumpPropContent_Instance.cs rename to Service/HStation.Service.Assets.Core/03-service/06-PumpPropContent/PumpPropContent_Instance.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/03-service/07-PumpMainAndPartMap/Cache/PumpMainAndPartMapCacheHelper.cs b/Service/HStation.Service.Assets.Core/03-service/07-PumpMainAndPartMap/Cache/PumpMainAndPartMapCacheHelper.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/03-service/07-PumpMainAndPartMap/Cache/PumpMainAndPartMapCacheHelper.cs rename to Service/HStation.Service.Assets.Core/03-service/07-PumpMainAndPartMap/Cache/PumpMainAndPartMapCacheHelper.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/03-service/07-PumpMainAndPartMap/PumpMainAndPartMap.cs b/Service/HStation.Service.Assets.Core/03-service/07-PumpMainAndPartMap/PumpMainAndPartMap.cs similarity index 95% rename from Service/HStation.Service.Xhs.PumpProduct.Core/03-service/07-PumpMainAndPartMap/PumpMainAndPartMap.cs rename to Service/HStation.Service.Assets.Core/03-service/07-PumpMainAndPartMap/PumpMainAndPartMap.cs index 3fbdfd7..4b1ce0f 100644 --- a/Service/HStation.Service.Xhs.PumpProduct.Core/03-service/07-PumpMainAndPartMap/PumpMainAndPartMap.cs +++ b/Service/HStation.Service.Assets.Core/03-service/07-PumpMainAndPartMap/PumpMainAndPartMap.cs @@ -124,6 +124,19 @@ return all; } + /// <summary> + /// 閫氳繃娉靛瀷鍙稩D鑾峰彇浜у搧ID + /// </summary> + public static List<long> GetByPumpMainID(long ID) + { + if (ID < 0) + { + return default; + } + var all = GetCache(); + return all.Where(x => x.PumpID == ID).Select(x => x.PumpPartID).ToList(); + } + #endregion Query #region Insert diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/03-service/07-PumpMainAndPartMap/PumpMainAndPartMap_Instance.cs b/Service/HStation.Service.Assets.Core/03-service/07-PumpMainAndPartMap/PumpMainAndPartMap_Instance.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/03-service/07-PumpMainAndPartMap/PumpMainAndPartMap_Instance.cs rename to Service/HStation.Service.Assets.Core/03-service/07-PumpMainAndPartMap/PumpMainAndPartMap_Instance.cs diff --git a/Service/HStation.Service.Assets.Core/DbFirstHelper.cs b/Service/HStation.Service.Assets.Core/DbFirstHelper.cs new file mode 100644 index 0000000..58272a1 --- /dev/null +++ b/Service/HStation.Service.Assets.Core/DbFirstHelper.cs @@ -0,0 +1,98 @@ +锘縰sing SqlSugar; + +namespace HStation.Xhs.DAL +{ + /// <summary> + /// + /// </summary> + public class DbFirstHelper + { + public static ConnectionConfig ConnectionConfig + { + get { return Xhs.ConfigHelper.PostgreSqlConnectionConfig; } + } + + /// <summary> + /// 鍒濆鍖� + /// </summary> + public bool Initial(out string msg) + { + msg = string.Empty; + try + { + #region 鍩虹妯″潡 + + var basicConnectConfig = ConnectionConfig; + if (basicConnectConfig == null) + { + msg = "杩炴帴閰嶇疆鍒濆鍖栧け璐�"; + return false; + } + basicConnectConfig.ConfigureExternalServices = new ConfigureExternalServices() + { + EntityService = (property, column) => + { + //闄や富閿鍏朵粬鍒楅兘鍙┖ + if (!column.IsPrimarykey) + { + column.IsNullable = true; + } + if (column.DataType == StaticConfig.CodeFirst_BigString) + { + column.DataType = "character varying"; + } + } + }; + + var basicTypeList = new List<Type>(); + //鍩虹妯″潡 + + basicTypeList.Add(typeof(Yw.Entity.SysModule)); + basicTypeList.Add(typeof(Yw.Entity.SysType)); + basicTypeList.Add(typeof(Yw.Entity.SysCatalog)); + basicTypeList.Add(typeof(Yw.Entity.SysPropGroup)); + basicTypeList.Add(typeof(Yw.Entity.SysProp)); + basicTypeList.Add(typeof(Yw.Entity.SysPropMapping)); + basicTypeList.Add(typeof(Yw.Entity.SysPropChoice)); + basicTypeList.Add(typeof(Yw.Entity.SysPropValue)); + basicTypeList.Add(typeof(Yw.Entity.SysPropValuePure)); + basicTypeList.Add(typeof(Entity.PumpPartMain)); + basicTypeList.Add(typeof(Entity.PumpPropContent)); + basicTypeList.Add(typeof(Entity.PumpMainAndPartMap)); + basicTypeList.Add(typeof(Entity.PumpMain)); + basicTypeList.Add(typeof(Entity.PumpGroup)); + basicTypeList.Add(typeof(Entity.PumpGroupAndMainMap)); + basicTypeList.Add(typeof(Entity.PumpSeries)); + + // basicTypeList.Add(typeof(Yw.Entity.SysCatalogOrg)); + + //绯荤粺灞炴�� + + if (basicTypeList.Count > 0) + { + using (var db = new SqlSugarClient(basicConnectConfig)) + { + //璁剧疆瀛楃涓查粯璁ら暱搴� + //db.CodeFirst.SetStringDefaultLength(250); + //db.CodeFirst.SetStringDefaultLength(int.MaxValue); + //寤哄簱锛氬鏋滀笉瀛樺湪鍒涘缓鏁版嵁搴撳瓨鍦ㄤ笉浼氶噸澶嶅垱寤� createdb;娉ㄦ剰 锛歄racle鍜屼釜鍒浗浜у簱闇�涓嶆敮鎸佽鏂规硶锛岄渶瑕佹墜鍔ㄥ缓搴� + db.DbMaintenance.CreateDatabase(); + db.CodeFirst.InitTables + ( + basicTypeList.ToArray() + ); + } + } + + #endregion 鍩虹妯″潡 + + return true; + } + catch (Exception ex) + { + msg = ex.Message; + return false; + } + } + } +} \ No newline at end of file diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/GlobalUsings.cs b/Service/HStation.Service.Assets.Core/GlobalUsings.cs similarity index 100% rename from Service/HStation.Service.Xhs.PumpProduct.Core/GlobalUsings.cs rename to Service/HStation.Service.Assets.Core/GlobalUsings.cs diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/HStation.Service.Xhs.PumpProduct.csproj b/Service/HStation.Service.Assets.Core/HStation.Service.Assets.Core.csproj similarity index 87% rename from Service/HStation.Service.Xhs.PumpProduct.Core/HStation.Service.Xhs.PumpProduct.csproj rename to Service/HStation.Service.Assets.Core/HStation.Service.Assets.Core.csproj index 14b8262..7d30017 100644 --- a/Service/HStation.Service.Xhs.PumpProduct.Core/HStation.Service.Xhs.PumpProduct.csproj +++ b/Service/HStation.Service.Assets.Core/HStation.Service.Assets.Core.csproj @@ -21,8 +21,8 @@ </ItemGroup> <ItemGroup> + <ProjectReference Include="..\..\Model\HStation.Model.Assets.Core\HStation.Model.Assets.Core.csproj" /> <ProjectReference Include="..\..\Model\HStation.Model.Core\HStation.Model.Core.csproj" /> - <ProjectReference Include="..\..\Model\HStation.Model.Xhs.PumpProduct\HStation.Model.Xhs.PumpProduct.csproj" /> <ProjectReference Include="..\HStation.Service.Xhs.Core\HStation.Service.Xhs.Core.csproj" /> </ItemGroup> diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/01-entity/PumpMainAndPartMap.cs b/Service/HStation.Service.Xhs.PumpProduct.Core/01-entity/PumpMainAndPartMap.cs deleted file mode 100644 index c31ebec..0000000 --- a/Service/HStation.Service.Xhs.PumpProduct.Core/01-entity/PumpMainAndPartMap.cs +++ /dev/null @@ -1,64 +0,0 @@ -锘縰sing SqlSugar; -using Yw.Entity; - -namespace HStation.Entity -{ - /// <summary> - /// 娉典骇鍝佹槧灏� - /// </summary> - [SysType("xhs-pumpmainandpartmap")] - [SugarTable("xhs-pumpmainandpartmap")] - public class PumpMainAndPartMap : BaseEntity, IParas, IFlags, ITagName, System.ICloneable - { - public PumpMainAndPartMap() - { } - - /// <summary> - /// 娉电郴鍒桰D - /// </summary> - public long SeriesID { get; set; } - - /// <summary> - /// 娉靛瀷鍙稩D - /// </summary> - public long PumpID { get; set; } - - /// <summary> - /// 娉典骇鍝両D - /// </summary> - public long PumpPartID { get; set; } - - /// <summary> - /// 鍙傛暟 - /// </summary> - public string Paras { get; set; } - - /// <summary> - /// 鏍囩 - /// </summary> - public string Flags { get; set; } - - /// <summary> - /// 鏍囧織 - /// </summary> - public string TagName { get; set; } - - /// <summary> - /// 璇存槑 - /// </summary> - public string Description { get; set; } - - /// <summary> - /// - /// </summary> - public PumpMain Clone() - { - return (PumpMain)this.MemberwiseClone(); - } - - object ICloneable.Clone() - { - return this.MemberwiseClone(); - } - } -} \ No newline at end of file diff --git a/Service/HStation.Service.Xhs.PumpProduct.Core/02-dal/02-postgresql/PumpMain.cs b/Service/HStation.Service.Xhs.PumpProduct.Core/02-dal/02-postgresql/PumpMain.cs deleted file mode 100644 index 8f3ab79..0000000 --- a/Service/HStation.Service.Xhs.PumpProduct.Core/02-dal/02-postgresql/PumpMain.cs +++ /dev/null @@ -1,104 +0,0 @@ -锘縰sing log4net.ObjectRenderer; -using Yw.DAL.PostgreSql; - -namespace HStation.DAL.PostgreSql -{ - /// <summary> - /// - /// </summary> - public partial class PumpMain : BaseDAL_Paras_Flags_TagName_Sorter<Entity.PumpMain>, IPumpMain - { - /// <summary> - /// - /// </summary> - public override ConnectionConfig ConnectionConfig - { - get { return Xhs.ConfigHelper.PostgreSqlConnectionConfig; } - } - - //鎻掑叆鎷撳睍 - public long InsertsEx(Entity.PumpMain pumpMain, Entity.PumpGroupAndMainMap pumpGroupAndMainMap) - { - if (pumpMain == null) - { - return default; - } - using (var db = new SqlSugarClient(ConnectionConfig)) - { - try - { - db.BeginTran(); - var result = db.Insertable(pumpMain).ExecuteReturnSnowflakeId(); - if (result < 0) - { - db.RollbackTran(); - return default; - } - else - { - if (pumpGroupAndMainMap != null) - { - pumpGroupAndMainMap.PumpMainID = result; - var mapresult = db.Insertable(pumpGroupAndMainMap).ExecuteReturnSnowflakeId(); - if (mapresult < 0) - { - db.RollbackTran(); - return default; - } - } - db.CommitTran(); - return result; - } - } - catch (Exception ex) - { - db.RollbackTran(); - throw; - } - } - } - - //鍒犻櫎鎷撳睍 - public bool DeleteEx(long ID) - { - if (ID <= 0) - { - return default; - } - using (var db = new SqlSugarClient(ConnectionConfig)) - { - try - { - db.BeginTran(); - var main = db.Queryable<Entity.PumpMain>().ToList().Find(x => x.ID == ID); - var result = db.Deleteable(main).ExecuteCommand() > 0; - if (!result) - { - db.RollbackTran(); - return default; - } - else - { - var map = db.Queryable<Entity.PumpGroupAndMainMap>().ToList().Find(x => x.PumpMainID == ID); - if (map != null) - { - var mapresult = db.Deleteable(map).ExecuteCommand() > 0; - if (!mapresult) - { - db.RollbackTran(); - return default; - } - } - } - db.CommitTran(); - return true; - } - catch (Exception ex) - { - db.RollbackTran(); - throw; - } - } - } - } -} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/00-ViewModel/PropGroupChoiceViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/00-ViewModel/PropGroupChoiceViewModel.cs similarity index 86% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/00-ViewModel/PropGroupChoiceViewModel.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/00-ViewModel/PropGroupChoiceViewModel.cs index b32be00..c8bd8a8 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/00-ViewModel/PropGroupChoiceViewModel.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/00-ViewModel/PropGroupChoiceViewModel.cs @@ -2,6 +2,7 @@ { public class PropGroupChoiceViewModel { + public long ID { get; set; } public string PropGroupName { get; set; } public string PropName { get; set; } public string Value { get; set; } diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/00-ViewModel/PumpMainViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/00-ViewModel/PumpMainViewModel.cs similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/00-ViewModel/PumpMainViewModel.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/00-ViewModel/PumpMainViewModel.cs diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/00-ViewModel/TreelistViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/00-ViewModel/TreelistViewModel.cs similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/00-ViewModel/TreelistViewModel.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/00-ViewModel/TreelistViewModel.cs diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/AddPumpProductGroupDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/AddPumpProductGroupDlg.Designer.cs similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/AddPumpProductGroupDlg.Designer.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/AddPumpProductGroupDlg.Designer.cs diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/AddPumpProductGroupDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/AddPumpProductGroupDlg.cs similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/AddPumpProductGroupDlg.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/AddPumpProductGroupDlg.cs diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/AddPumpProductGroupDlg.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/AddPumpProductGroupDlg.resx similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/AddPumpProductGroupDlg.resx rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/AddPumpProductGroupDlg.resx diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/AddPumpProductMainDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/AddPumpProductMainDlg.Designer.cs similarity index 74% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/AddPumpProductMainDlg.Designer.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/AddPumpProductMainDlg.Designer.cs index 5eb4511..89cf40c 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/AddPumpProductMainDlg.Designer.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/AddPumpProductMainDlg.Designer.cs @@ -49,30 +49,38 @@ TextEditRatedFlow = new DevExpress.XtraEditors.TextEdit(); TextEditRatedSpeed = new DevExpress.XtraEditors.TextEdit(); TextEditCatalog = new DevExpress.XtraEditors.ImageComboBoxEdit(); + TextEditProductName = new DevExpress.XtraEditors.TextEdit(); + TextEditProductNO = new DevExpress.XtraEditors.TextEdit(); + TextEditProductCode = new DevExpress.XtraEditors.TextEdit(); Root = new DevExpress.XtraLayout.LayoutControlGroup(); - layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem(); - layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem(); tabbedControlGroup1 = new DevExpress.XtraLayout.TabbedControlGroup(); - layoutControlGroup2 = new DevExpress.XtraLayout.LayoutControlGroup(); - layoutControlItem14 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlGroup5 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem25 = new DevExpress.XtraLayout.LayoutControlItem(); + r = new DevExpress.XtraLayout.EmptySpaceItem(); + layoutControlItem28 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem29 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlGroup1 = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlGroup2 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem14 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem16 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); layoutControlItem13 = new DevExpress.XtraLayout.LayoutControlItem(); imageComboBoxEdit1 = new DevExpress.XtraEditors.ImageComboBoxEdit(); layoutControlItem15 = new DevExpress.XtraLayout.LayoutControlItem(); imageComboBoxEdit2 = new DevExpress.XtraEditors.ImageComboBoxEdit(); - layoutControlItem16 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem17 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem18 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem19 = new DevExpress.XtraLayout.LayoutControlItem(); @@ -81,6 +89,11 @@ layoutControlItem22 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem23 = new DevExpress.XtraLayout.LayoutControlItem(); layoutControlItem24 = new DevExpress.XtraLayout.LayoutControlItem(); + tabbedControlGroup2 = new DevExpress.XtraLayout.TabbedControlGroup(); + layoutControlGroup3 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem26 = new DevExpress.XtraLayout.LayoutControlItem(); + layoutControlGroup4 = new DevExpress.XtraLayout.LayoutControlGroup(); + layoutControlItem27 = new DevExpress.XtraLayout.LayoutControlItem(); ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); layoutControl1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)gridControl1).BeginInit(); @@ -97,30 +110,38 @@ ((System.ComponentModel.ISupportInitialize)TextEditRatedFlow.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)TextEditRatedSpeed.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)TextEditCatalog.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)TextEditProductName.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)TextEditProductNO.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)TextEditProductCode.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem3).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem4).BeginInit(); ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem8).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem7).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem6).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem9).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem10).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem11).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem12).BeginInit(); ((System.ComponentModel.ISupportInitialize)tabbedControlGroup1).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlGroup2).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem14).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup5).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem25).BeginInit(); + ((System.ComponentModel.ISupportInitialize)r).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem28).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem29).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlGroup1).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem5).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup2).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem14).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem6).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem16).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit(); ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem13).BeginInit(); ((System.ComponentModel.ISupportInitialize)imageComboBoxEdit1.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem15).BeginInit(); ((System.ComponentModel.ISupportInitialize)imageComboBoxEdit2.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem16).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem17).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem18).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem19).BeginInit(); @@ -129,6 +150,11 @@ ((System.ComponentModel.ISupportInitialize)layoutControlItem22).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem23).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem24).BeginInit(); + ((System.ComponentModel.ISupportInitialize)tabbedControlGroup2).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup3).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem26).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup4).BeginInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem27).BeginInit(); SuspendLayout(); // // layoutControl1 @@ -147,9 +173,13 @@ layoutControl1.Controls.Add(TextEditRatedFlow); layoutControl1.Controls.Add(TextEditRatedSpeed); layoutControl1.Controls.Add(TextEditCatalog); + layoutControl1.Controls.Add(TextEditProductName); + layoutControl1.Controls.Add(TextEditProductNO); + layoutControl1.Controls.Add(TextEditProductCode); layoutControl1.Dock = DockStyle.Fill; layoutControl1.Location = new Point(0, 0); layoutControl1.Name = "layoutControl1"; + layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(971, 225, 650, 400); layoutControl1.Root = Root; layoutControl1.Size = new Size(681, 482); layoutControl1.TabIndex = 0; @@ -158,11 +188,11 @@ // gridControl1 // gridControl1.DataSource = propGroupChoiceViewModelBindingSource; - gridControl1.Location = new Point(20, 188); + gridControl1.Location = new Point(20, 212); gridControl1.MainView = gridView1; gridControl1.Name = "gridControl1"; - gridControl1.Size = new Size(641, 248); - gridControl1.TabIndex = 11; + gridControl1.Size = new Size(641, 224); + gridControl1.TabIndex = 1; gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { gridView1 }); // // propGroupChoiceViewModelBindingSource @@ -193,9 +223,10 @@ // colPropName.AppearanceCell.Options.UseTextOptions = true; colPropName.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; - colPropName.Caption = "灞炴��"; + colPropName.Caption = "灞炴�у悕"; colPropName.FieldName = "PropName"; colPropName.Name = "colPropName"; + colPropName.OptionsColumn.AllowEdit = false; colPropName.Visible = true; colPropName.VisibleIndex = 1; // @@ -218,7 +249,7 @@ BtnOk.Name = "BtnOk"; BtnOk.Size = new Size(122, 22); BtnOk.StyleController = layoutControl1; - BtnOk.TabIndex = 12; + BtnOk.TabIndex = 15; BtnOk.Text = "瀹屾垚"; BtnOk.Click += BtnOk_ClickAsync; // @@ -231,28 +262,28 @@ simpleButton1.Name = "simpleButton1"; simpleButton1.Size = new Size(121, 22); simpleButton1.StyleController = layoutControl1; - simpleButton1.TabIndex = 13; + simpleButton1.TabIndex = 16; simpleButton1.Text = "鍙栨秷"; // // TextEditName // TextEditName.Location = new Point(79, 8); TextEditName.Name = "TextEditName"; - TextEditName.Size = new Size(231, 20); + TextEditName.Size = new Size(594, 20); TextEditName.StyleController = layoutControl1; TextEditName.TabIndex = 0; // // DescriptionTextEdit // - DescriptionTextEdit.Location = new Point(91, 188); + DescriptionTextEdit.Location = new Point(91, 212); DescriptionTextEdit.Name = "DescriptionTextEdit"; - DescriptionTextEdit.Size = new Size(570, 248); + DescriptionTextEdit.Size = new Size(570, 224); DescriptionTextEdit.StyleController = layoutControl1; DescriptionTextEdit.TabIndex = 1; // // TextEditErosion // - TextEditErosion.Location = new Point(385, 56); + TextEditErosion.Location = new Point(385, 80); TextEditErosion.Name = "TextEditErosion"; TextEditErosion.Size = new Size(288, 20); TextEditErosion.StyleController = layoutControl1; @@ -260,7 +291,7 @@ // // TextEditRatedPower // - TextEditRatedPower.Location = new Point(385, 32); + TextEditRatedPower.Location = new Point(385, 56); TextEditRatedPower.Name = "TextEditRatedPower"; TextEditRatedPower.Size = new Size(288, 20); TextEditRatedPower.StyleController = layoutControl1; @@ -268,15 +299,15 @@ // // TextEditRatedeffciency // - TextEditRatedeffciency.Location = new Point(385, 8); + TextEditRatedeffciency.Location = new Point(79, 32); TextEditRatedeffciency.Name = "TextEditRatedeffciency"; - TextEditRatedeffciency.Size = new Size(288, 20); + TextEditRatedeffciency.Size = new Size(594, 20); TextEditRatedeffciency.StyleController = layoutControl1; TextEditRatedeffciency.TabIndex = 2; // // TextEditD2 // - TextEditD2.Location = new Point(385, 80); + TextEditD2.Location = new Point(385, 104); TextEditD2.Name = "TextEditD2"; TextEditD2.Size = new Size(288, 20); TextEditD2.StyleController = layoutControl1; @@ -284,7 +315,7 @@ // // TextEditTagName // - TextEditTagName.Location = new Point(79, 104); + TextEditTagName.Location = new Point(79, 128); TextEditTagName.Name = "TextEditTagName"; TextEditTagName.Size = new Size(594, 20); TextEditTagName.StyleController = layoutControl1; @@ -292,7 +323,7 @@ // // TextEditRatedHead // - TextEditRatedHead.Location = new Point(79, 80); + TextEditRatedHead.Location = new Point(79, 104); TextEditRatedHead.Name = "TextEditRatedHead"; TextEditRatedHead.Size = new Size(231, 20); TextEditRatedHead.StyleController = layoutControl1; @@ -300,7 +331,7 @@ // // TextEditRatedFlow // - TextEditRatedFlow.Location = new Point(79, 32); + TextEditRatedFlow.Location = new Point(79, 56); TextEditRatedFlow.Name = "TextEditRatedFlow"; TextEditRatedFlow.Size = new Size(231, 20); TextEditRatedFlow.StyleController = layoutControl1; @@ -308,7 +339,7 @@ // // TextEditRatedSpeed // - TextEditRatedSpeed.Location = new Point(79, 56); + TextEditRatedSpeed.Location = new Point(79, 80); TextEditRatedSpeed.Name = "TextEditRatedSpeed"; TextEditRatedSpeed.Size = new Size(231, 20); TextEditRatedSpeed.StyleController = layoutControl1; @@ -316,13 +347,37 @@ // // TextEditCatalog // - TextEditCatalog.Location = new Point(79, 128); + TextEditCatalog.Location = new Point(79, 152); TextEditCatalog.Name = "TextEditCatalog"; TextEditCatalog.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); TextEditCatalog.Size = new Size(594, 20); TextEditCatalog.StyleController = layoutControl1; - TextEditCatalog.TabIndex = 9; + TextEditCatalog.TabIndex = 10; TextEditCatalog.SelectedValueChanged += TextEditCatalog_SelectedValueChanged; + // + // TextEditProductName + // + TextEditProductName.Location = new Point(91, 212); + TextEditProductName.Name = "TextEditProductName"; + TextEditProductName.Size = new Size(570, 20); + TextEditProductName.StyleController = layoutControl1; + TextEditProductName.TabIndex = 12; + // + // TextEditProductNO + // + TextEditProductNO.Location = new Point(91, 236); + TextEditProductNO.Name = "TextEditProductNO"; + TextEditProductNO.Size = new Size(570, 20); + TextEditProductNO.StyleController = layoutControl1; + TextEditProductNO.TabIndex = 13; + // + // TextEditProductCode + // + TextEditProductCode.Location = new Point(91, 260); + TextEditProductCode.Name = "TextEditProductCode"; + TextEditProductCode.Size = new Size(570, 20); + TextEditProductCode.StyleController = layoutControl1; + TextEditProductCode.TabIndex = 14; // // Root // @@ -330,27 +385,17 @@ Root.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; Root.GroupBordersVisible = false; - Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, layoutControlItem2, layoutControlItem3, layoutControlItem4, emptySpaceItem1, layoutControlItem8, layoutControlItem7, layoutControlItem9, layoutControlItem10, layoutControlItem11, layoutControlItem12, tabbedControlGroup1, layoutControlItem6, layoutControlItem16 }); + Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem2, layoutControlItem3, layoutControlItem4, emptySpaceItem1, layoutControlItem8, layoutControlItem7, layoutControlItem9, layoutControlItem10, layoutControlItem11, layoutControlItem12, tabbedControlGroup1, layoutControlItem6, layoutControlItem16, layoutControlItem1 }); Root.Name = "Root"; Root.Padding = new DevExpress.XtraLayout.Utils.Padding(6, 6, 6, 6); Root.Size = new Size(681, 482); Root.TextVisible = false; // - // layoutControlItem1 - // - layoutControlItem1.AllowHtmlStringInCaption = true; - layoutControlItem1.Control = TextEditName; - layoutControlItem1.Location = new Point(0, 0); - layoutControlItem1.Name = "layoutControlItem1"; - layoutControlItem1.Size = new Size(306, 24); - layoutControlItem1.Text = "<color=red>*</color>鍚嶇О:"; - layoutControlItem1.TextSize = new Size(59, 14); - // // layoutControlItem2 // layoutControlItem2.AllowHtmlStringInCaption = true; layoutControlItem2.Control = TextEditRatedSpeed; - layoutControlItem2.Location = new Point(0, 48); + layoutControlItem2.Location = new Point(0, 72); layoutControlItem2.Name = "layoutControlItem2"; layoutControlItem2.Size = new Size(306, 24); layoutControlItem2.Text = "<color=red>*</color>棰濆畾杞��:"; @@ -360,7 +405,7 @@ // layoutControlItem3.AllowHtmlStringInCaption = true; layoutControlItem3.Control = TextEditRatedFlow; - layoutControlItem3.Location = new Point(0, 24); + layoutControlItem3.Location = new Point(0, 48); layoutControlItem3.Name = "layoutControlItem3"; layoutControlItem3.Size = new Size(306, 24); layoutControlItem3.Text = "<color=red>*</color>棰濆畾娴侀噺:"; @@ -396,34 +441,25 @@ // layoutControlItem7.AllowHtmlStringInCaption = true; layoutControlItem7.Control = TextEditRatedHead; - layoutControlItem7.Location = new Point(0, 72); + layoutControlItem7.Location = new Point(0, 96); layoutControlItem7.Name = "layoutControlItem7"; layoutControlItem7.Size = new Size(306, 24); layoutControlItem7.Text = "<color=red>*</color>棰濆畾鎵▼:"; layoutControlItem7.TextSize = new Size(59, 14); // - // layoutControlItem6 - // - layoutControlItem6.Control = TextEditTagName; - layoutControlItem6.Location = new Point(0, 96); - layoutControlItem6.Name = "layoutControlItem6"; - layoutControlItem6.Size = new Size(669, 24); - layoutControlItem6.Text = "鏍囩鍚嶇О:"; - layoutControlItem6.TextSize = new Size(59, 14); - // // layoutControlItem9 // layoutControlItem9.Control = TextEditRatedeffciency; - layoutControlItem9.Location = new Point(306, 0); + layoutControlItem9.Location = new Point(0, 24); layoutControlItem9.Name = "layoutControlItem9"; - layoutControlItem9.Size = new Size(363, 24); + layoutControlItem9.Size = new Size(669, 24); layoutControlItem9.Text = "棰濆畾鏁堢巼:"; layoutControlItem9.TextSize = new Size(59, 14); // // layoutControlItem10 // layoutControlItem10.Control = TextEditRatedPower; - layoutControlItem10.Location = new Point(306, 24); + layoutControlItem10.Location = new Point(306, 48); layoutControlItem10.Name = "layoutControlItem10"; layoutControlItem10.Size = new Size(363, 24); layoutControlItem10.Text = "棰濆畾鍔熺巼:"; @@ -432,7 +468,7 @@ // layoutControlItem11 // layoutControlItem11.Control = TextEditErosion; - layoutControlItem11.Location = new Point(306, 48); + layoutControlItem11.Location = new Point(306, 72); layoutControlItem11.Name = "layoutControlItem11"; layoutControlItem11.Size = new Size(363, 24); layoutControlItem11.Text = "姘旇殌:"; @@ -441,7 +477,7 @@ // layoutControlItem12 // layoutControlItem12.Control = TextEditD2; - layoutControlItem12.Location = new Point(306, 72); + layoutControlItem12.Location = new Point(306, 96); layoutControlItem12.Name = "layoutControlItem12"; layoutControlItem12.Size = new Size(363, 24); layoutControlItem12.Text = "鍙惰疆澶栧緞:"; @@ -449,19 +485,79 @@ // // tabbedControlGroup1 // - tabbedControlGroup1.Location = new Point(0, 144); + tabbedControlGroup1.Location = new Point(0, 168); tabbedControlGroup1.Name = "tabbedControlGroup1"; tabbedControlGroup1.SelectedTabPage = layoutControlGroup2; - tabbedControlGroup1.Size = new Size(669, 300); - tabbedControlGroup1.TabPages.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlGroup1, layoutControlGroup2 }); + tabbedControlGroup1.Size = new Size(669, 276); + tabbedControlGroup1.TabPages.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlGroup1, layoutControlGroup2, layoutControlGroup5 }); tabbedControlGroup1.Text = "璇存槑"; + // + // layoutControlGroup5 + // + layoutControlGroup5.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem25, r, layoutControlItem28, layoutControlItem29 }); + layoutControlGroup5.Location = new Point(0, 0); + layoutControlGroup5.Name = "layoutControlGroup5"; + layoutControlGroup5.Size = new Size(645, 228); + layoutControlGroup5.Text = "浜у搧"; + // + // layoutControlItem25 + // + layoutControlItem25.Control = TextEditProductName; + layoutControlItem25.Location = new Point(0, 0); + layoutControlItem25.Name = "layoutControlItem25"; + layoutControlItem25.Size = new Size(645, 24); + layoutControlItem25.Text = "浜у搧鍚嶇О:"; + layoutControlItem25.TextSize = new Size(59, 14); + // + // r + // + r.AllowHotTrack = false; + r.Location = new Point(0, 72); + r.Name = "r"; + r.Size = new Size(645, 156); + r.TextSize = new Size(0, 0); + // + // layoutControlItem28 + // + layoutControlItem28.Control = TextEditProductNO; + layoutControlItem28.Location = new Point(0, 24); + layoutControlItem28.Name = "layoutControlItem28"; + layoutControlItem28.Size = new Size(645, 24); + layoutControlItem28.Text = "浜у搧缂栧彿:"; + layoutControlItem28.TextSize = new Size(59, 14); + // + // layoutControlItem29 + // + layoutControlItem29.Control = TextEditProductCode; + layoutControlItem29.Location = new Point(0, 48); + layoutControlItem29.Name = "layoutControlItem29"; + layoutControlItem29.Size = new Size(645, 24); + layoutControlItem29.Text = "浜у搧鍥惧彿:"; + layoutControlItem29.TextSize = new Size(59, 14); + // + // layoutControlGroup1 + // + layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem5 }); + layoutControlGroup1.Location = new Point(0, 0); + layoutControlGroup1.Name = "layoutControlGroup1"; + layoutControlGroup1.Size = new Size(645, 228); + layoutControlGroup1.Text = "璇存槑"; + // + // layoutControlItem5 + // + layoutControlItem5.Control = DescriptionTextEdit; + layoutControlItem5.Location = new Point(0, 0); + layoutControlItem5.Name = "layoutControlItem5"; + layoutControlItem5.Size = new Size(645, 228); + layoutControlItem5.Text = "璇存槑:"; + layoutControlItem5.TextSize = new Size(59, 14); // // layoutControlGroup2 // layoutControlGroup2.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem14 }); layoutControlGroup2.Location = new Point(0, 0); layoutControlGroup2.Name = "layoutControlGroup2"; - layoutControlGroup2.Size = new Size(645, 252); + layoutControlGroup2.Size = new Size(645, 228); layoutControlGroup2.Text = "灞炴��"; layoutControlGroup2.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; // @@ -470,26 +566,37 @@ layoutControlItem14.Control = gridControl1; layoutControlItem14.Location = new Point(0, 0); layoutControlItem14.Name = "layoutControlItem14"; - layoutControlItem14.Size = new Size(645, 252); + layoutControlItem14.Size = new Size(645, 228); layoutControlItem14.TextSize = new Size(0, 0); layoutControlItem14.TextVisible = false; // - // layoutControlGroup1 + // layoutControlItem6 // - layoutControlGroup1.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem5 }); - layoutControlGroup1.Location = new Point(0, 0); - layoutControlGroup1.Name = "layoutControlGroup1"; - layoutControlGroup1.Size = new Size(645, 252); - layoutControlGroup1.Text = "璇存槑"; + layoutControlItem6.Control = TextEditTagName; + layoutControlItem6.Location = new Point(0, 120); + layoutControlItem6.Name = "layoutControlItem6"; + layoutControlItem6.Size = new Size(669, 24); + layoutControlItem6.Text = "鏍囩鍚嶇О:"; + layoutControlItem6.TextSize = new Size(59, 14); // - // layoutControlItem5 + // layoutControlItem16 // - layoutControlItem5.Control = DescriptionTextEdit; - layoutControlItem5.Location = new Point(0, 0); - layoutControlItem5.Name = "layoutControlItem5"; - layoutControlItem5.Size = new Size(645, 252); - layoutControlItem5.Text = "璇存槑:"; - layoutControlItem5.TextSize = new Size(59, 14); + layoutControlItem16.Control = TextEditCatalog; + layoutControlItem16.Location = new Point(0, 144); + layoutControlItem16.Name = "layoutControlItem16"; + layoutControlItem16.Size = new Size(669, 24); + layoutControlItem16.Text = "閫夋嫨鍒嗙被"; + layoutControlItem16.TextSize = new Size(59, 14); + // + // layoutControlItem1 + // + layoutControlItem1.AllowHtmlStringInCaption = true; + layoutControlItem1.Control = TextEditName; + layoutControlItem1.Location = new Point(0, 0); + layoutControlItem1.Name = "layoutControlItem1"; + layoutControlItem1.Size = new Size(669, 24); + layoutControlItem1.Text = "<color=red>*</color>鍚嶇О:"; + layoutControlItem1.TextSize = new Size(59, 14); // // dxErrorProvider1 // @@ -504,8 +611,13 @@ layoutControlItem13.Text = "閫夋嫨鍒嗙被"; layoutControlItem13.TextSize = new Size(52, 14); // - - // + // imageComboBoxEdit1 + // + imageComboBoxEdit1.Location = new Point(0, 0); + imageComboBoxEdit1.Name = "imageComboBoxEdit1"; + imageComboBoxEdit1.Size = new Size(100, 20); + imageComboBoxEdit1.TabIndex = 0; + // // layoutControlItem15 // layoutControlItem15.Control = imageComboBoxEdit2; @@ -515,16 +627,12 @@ layoutControlItem15.Text = "閫夋嫨鍒嗙被"; layoutControlItem15.TextSize = new Size(52, 14); // - + // imageComboBoxEdit2 // - // layoutControlItem16 - // - layoutControlItem16.Control = TextEditCatalog; - layoutControlItem16.Location = new Point(0, 120); - layoutControlItem16.Name = "layoutControlItem16"; - layoutControlItem16.Size = new Size(669, 24); - layoutControlItem16.Text = "閫夋嫨鍒嗙被"; - layoutControlItem16.TextSize = new Size(59, 14); + imageComboBoxEdit2.Location = new Point(0, 0); + imageComboBoxEdit2.Name = "imageComboBoxEdit2"; + imageComboBoxEdit2.Size = new Size(100, 20); + imageComboBoxEdit2.TabIndex = 0; // // layoutControlItem17 // @@ -598,6 +706,50 @@ layoutControlItem24.Text = "閫夋嫨鍒嗙被"; layoutControlItem24.TextSize = new Size(59, 14); // + // tabbedControlGroup2 + // + tabbedControlGroup2.Location = new Point(0, 354); + tabbedControlGroup2.Name = "tabbedControlGroup1"; + tabbedControlGroup2.SelectedTabPage = layoutControlGroup3; + tabbedControlGroup2.Size = new Size(669, 90); + tabbedControlGroup2.TabPages.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlGroup4, layoutControlGroup3 }); + tabbedControlGroup2.Text = "璇存槑"; + // + // layoutControlGroup3 + // + layoutControlGroup3.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem26 }); + layoutControlGroup3.Location = new Point(0, 0); + layoutControlGroup3.Name = "layoutControlGroup2"; + layoutControlGroup3.Size = new Size(645, 42); + layoutControlGroup3.Text = "灞炴��"; + layoutControlGroup3.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; + // + // layoutControlItem26 + // + layoutControlItem26.Control = gridControl1; + layoutControlItem26.Location = new Point(0, 0); + layoutControlItem26.Name = "layoutControlItem14"; + layoutControlItem26.Size = new Size(645, 42); + layoutControlItem26.TextSize = new Size(0, 0); + layoutControlItem26.TextVisible = false; + // + // layoutControlGroup4 + // + layoutControlGroup4.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem27 }); + layoutControlGroup4.Location = new Point(0, 0); + layoutControlGroup4.Name = "layoutControlGroup1"; + layoutControlGroup4.Size = new Size(645, 42); + layoutControlGroup4.Text = "璇存槑"; + // + // layoutControlItem27 + // + layoutControlItem27.Control = DescriptionTextEdit; + layoutControlItem27.Location = new Point(0, 0); + layoutControlItem27.Name = "layoutControlItem5"; + layoutControlItem27.Size = new Size(645, 42); + layoutControlItem27.Text = "璇存槑:"; + layoutControlItem27.TextSize = new Size(59, 14); + // // AddPumpProductMainDlg // AutoScaleDimensions = new SizeF(7F, 14F); @@ -623,30 +775,38 @@ ((System.ComponentModel.ISupportInitialize)TextEditRatedFlow.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)TextEditRatedSpeed.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)TextEditCatalog.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)TextEditProductName.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)TextEditProductNO.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)TextEditProductCode.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)Root).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem3).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem4).EndInit(); ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem8).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem7).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem6).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem9).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem10).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem11).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem12).EndInit(); ((System.ComponentModel.ISupportInitialize)tabbedControlGroup1).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlGroup2).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem14).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup5).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem25).EndInit(); + ((System.ComponentModel.ISupportInitialize)r).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem28).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem29).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlGroup1).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem5).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup2).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem14).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem6).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem16).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem13).EndInit(); ((System.ComponentModel.ISupportInitialize)imageComboBoxEdit1.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem15).EndInit(); ((System.ComponentModel.ISupportInitialize)imageComboBoxEdit2.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem16).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem17).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem18).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem19).EndInit(); @@ -655,6 +815,11 @@ ((System.ComponentModel.ISupportInitialize)layoutControlItem22).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem23).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem24).EndInit(); + ((System.ComponentModel.ISupportInitialize)tabbedControlGroup2).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup3).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem26).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlGroup4).EndInit(); + ((System.ComponentModel.ISupportInitialize)layoutControlItem27).EndInit(); ResumeLayout(false); } @@ -663,7 +828,6 @@ private DevExpress.XtraLayout.LayoutControl layoutControl1; private DevExpress.XtraEditors.TextEdit TextEditName; private DevExpress.XtraLayout.LayoutControlGroup Root; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; private DevExpress.XtraEditors.MemoEdit DescriptionTextEdit; private DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider dxErrorProvider1; private DevExpress.XtraEditors.SimpleButton BtnOk; @@ -716,5 +880,19 @@ private DevExpress.XtraLayout.LayoutControlItem layoutControlItem22; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem23; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem24; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private DevExpress.XtraLayout.TabbedControlGroup tabbedControlGroup2; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup3; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem26; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup4; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem27; + private DevExpress.XtraEditors.TextEdit TextEditProductName; + private DevExpress.XtraEditors.TextEdit TextEditProductNO; + private DevExpress.XtraEditors.TextEdit TextEditProductCode; + private DevExpress.XtraLayout.LayoutControlGroup layoutControlGroup5; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem25; + private DevExpress.XtraLayout.EmptySpaceItem r; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem28; + private DevExpress.XtraLayout.LayoutControlItem layoutControlItem29; } } \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/AddPumpProductMainDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/AddPumpProductMainDlg.cs similarity index 68% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/AddPumpProductMainDlg.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/AddPumpProductMainDlg.cs index f6534e4..019fc5f 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/AddPumpProductMainDlg.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/AddPumpProductMainDlg.cs @@ -1,4 +1,5 @@ -锘縰sing DevExpress.XtraEditors.Controls; +锘縰sing DevExpress.Mvvm.Native; +using DevExpress.XtraEditors.Controls; using HStation.Dto; using System.Windows.Forms; using static System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel; @@ -13,17 +14,28 @@ } private Yw.BLL.SysCatalog _bll = null; + private List<PropGroupChoiceViewModel> _proplist = null; - private AddPumpMainDto model = null; + private AddPumpMainDto _PumpMain = null; //娉靛瀷鍙� + + private AddPumpPartMainDto _PumpPart = null; //娉典骇鍝� + + private List<AddPumpPropContentDto> _PumpPropContent = null; //娉靛睘鎬� + + private AddPumpMainAndPartMapDto _PumpMainAndPartMap = null; //娉靛瀷鍙峰拰浜у搧鏄犲皠 public async void SetBindingData(long ID) { var pumpseries = await new BLL.PumpSeries().GetByID(ID); if (pumpseries != null) { - model = new AddPumpMainDto(); - model.PumpSeriesID = pumpseries.ID; + _PumpMain = new AddPumpMainDto(); + _PumpPart = new AddPumpPartMainDto(); + _PumpMainAndPartMap = new AddPumpMainAndPartMapDto(); + _PumpMainAndPartMap.SeriesID = pumpseries.ID; + _PumpMain.PumpSeriesID = pumpseries.ID; + _PumpPart.SeriesID = pumpseries.ID; _bll = new Yw.BLL.SysCatalog(); var alllist = await _bll.GetAll(); foreach (var item in alllist) @@ -38,7 +50,7 @@ } } - public event Func<AddPumpMainDto, Task<bool>> ReloadDataEvent = null; + public event Func<AddPumpMainDto, AddPumpPartMainDto, List<AddPumpPropContentDto>, AddPumpMainAndPartMapDto, Task<bool>> ReloadDataEvent = null; //鏁版嵁楠岃瘉 private bool Valid() @@ -72,31 +84,39 @@ { if (!(Valid())) return; - model.Name = TextEditName.Text.Trim(); - model.TagName = TextEditTagName.Text.Trim(); + _PumpMain.Name = TextEditName.Text.Trim(); + _PumpMain.TagName = TextEditTagName.Text.Trim(); double ratedFlow; double.TryParse(TextEditRatedFlow.Text.Trim(), out ratedFlow); - model.RatedFlow = ratedFlow; + _PumpMain.RatedFlow = ratedFlow; double ratedHead; double.TryParse(TextEditRatedHead.Text.Trim(), out ratedHead); - model.RatedHead = ratedHead; + _PumpMain.RatedHead = ratedHead; double ratedSpeed; double.TryParse(TextEditRatedSpeed.Text.Trim(), out ratedSpeed); - model.RatedSpeed = ratedSpeed; - model.Description = DescriptionTextEdit.Text.Trim(); + _PumpMain.RatedSpeed = ratedSpeed; + _PumpMain.Description = DescriptionTextEdit.Text.Trim(); double d2; double.TryParse(TextEditD2.Text.Trim(), out d2); - model.D2 = d2; + _PumpMain.D2 = d2; double erosion; double.TryParse(TextEditErosion.Text.Trim(), out erosion); - model.Erosion = erosion; + _PumpMain.Erosion = erosion; double ratedPower; double.TryParse(TextEditRatedPower.Text.Trim(), out ratedPower); - model.RatedPower = ratedPower; + _PumpMain.RatedPower = ratedPower; double ratedEfficiency; double.TryParse(TextEditRatedeffciency.Text.Trim(), out ratedEfficiency); - model.RatedEfficiency = ratedEfficiency; - if (await this.ReloadDataEvent.Invoke(model)) + _PumpMain.RatedEfficiency = ratedEfficiency; + _PumpPart.Name = TextEditProductName.Text; + _PumpPart.NO = TextEditProductNO.Text; + _PumpPart.Code = TextEditProductCode.Text; + _PumpPropContent = new List<AddPumpPropContentDto>(); + foreach (var item in _proplist) + { + _PumpPropContent.Add(new AddPumpPropContentDto { PropID = item.ID, PropValue = item.Value, SeriesID = _PumpPart.SeriesID }); + } + if (await this.ReloadDataEvent.Invoke(_PumpMain, _PumpPart, _PumpPropContent, _PumpMainAndPartMap)) { MessageBoxHelper.ShowSuccess("娣诲姞鎴愬姛!"); } @@ -111,6 +131,7 @@ //鍒嗙被閫夋嫨鍙樻崲 private async void TextEditCatalog_SelectedValueChanged(object sender, EventArgs e) { + this.gridView1.Columns["PropGroupName"].Group(); this.layoutControlGroup2.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always; this.tabbedControlGroup1.SelectedTabPage = layoutControlGroup2; _proplist.Clear(); @@ -129,7 +150,7 @@ { foreach (var prop in item.PropList) { - _proplist.Add(new PropGroupChoiceViewModel() { PropGroupName = item.Name, PropName = prop.Name }); + _proplist.Add(new PropGroupChoiceViewModel() { PropGroupName = item.Name, PropName = prop.Name, ID = prop.ID }); } } this.propGroupChoiceViewModelBindingSource.ResetBindings(false); diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/AddPumpProductMainDlg.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/AddPumpProductMainDlg.resx similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/AddPumpProductMainDlg.resx rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/AddPumpProductMainDlg.resx diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/AddPumpProductSeriesDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/AddPumpProductSeriesDlg.Designer.cs similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/AddPumpProductSeriesDlg.Designer.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/AddPumpProductSeriesDlg.Designer.cs diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/AddPumpProductSeriesDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/AddPumpProductSeriesDlg.cs similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/AddPumpProductSeriesDlg.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/AddPumpProductSeriesDlg.cs diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/AddPumpProductSeriesDlg.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/AddPumpProductSeriesDlg.resx similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/AddPumpProductSeriesDlg.resx rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/AddPumpProductSeriesDlg.resx diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/EditPumpProductGroupDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/EditPumpProductGroupDlg.Designer.cs similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/EditPumpProductGroupDlg.Designer.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/EditPumpProductGroupDlg.Designer.cs diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/EditPumpProductGroupDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/EditPumpProductGroupDlg.cs similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/EditPumpProductGroupDlg.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/EditPumpProductGroupDlg.cs diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/EditPumpProductGroupDlg.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/EditPumpProductGroupDlg.resx similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/EditPumpProductGroupDlg.resx rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/EditPumpProductGroupDlg.resx diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/EditPumpProductMainDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/EditPumpProductMainDlg.Designer.cs similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/EditPumpProductMainDlg.Designer.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/EditPumpProductMainDlg.Designer.cs diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/EditPumpProductMainDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/EditPumpProductMainDlg.cs similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/EditPumpProductMainDlg.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/EditPumpProductMainDlg.cs diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/EditPumpProductMainDlg.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/EditPumpProductMainDlg.resx similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/EditPumpProductMainDlg.resx rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/EditPumpProductMainDlg.resx diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/EditPumpProductSeriesDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/EditPumpProductSeriesDlg.Designer.cs similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/EditPumpProductSeriesDlg.Designer.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/EditPumpProductSeriesDlg.Designer.cs diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/EditPumpProductSeriesDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/EditPumpProductSeriesDlg.cs similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/EditPumpProductSeriesDlg.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/EditPumpProductSeriesDlg.cs diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/EditPumpProductSeriesDlg.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/EditPumpProductSeriesDlg.resx similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/EditPumpProductSeriesDlg.resx rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/EditPumpProductSeriesDlg.resx diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/PumpPartDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/PumpPartDlg.Designer.cs new file mode 100644 index 0000000..ecfc570 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/PumpPartDlg.Designer.cs @@ -0,0 +1,38 @@ +锘縩amespace HStation.WinFrmUI.Xhs.PumpProduct +{ + partial class PumpPartDlg + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Text = "PumpPartDlg"; + } + + #endregion + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/PumpPartDlg.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/PumpPartDlg.cs new file mode 100644 index 0000000..39c7868 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/PumpPartDlg.cs @@ -0,0 +1,31 @@ +锘縰sing HStation.BLL; + +namespace HStation.WinFrmUI.Xhs.PumpProduct +{ + public partial class PumpPartDlg : DevExpress.XtraEditors.XtraForm + { + public PumpPartDlg() + { + InitializeComponent(); + } + + private PumpPartMain _allBindingList = null; + + public void SetBindingData(long ID) + { + } + + //宸︿晶鏍戝彸鍑昏彍鍗曚簨浠� + private void treeList1_MouseUp(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Right) + { + if (this..GetCurrentViewModel(_allBindingList) != null) + { + Point screenPoint = Cursor.Position; + popupPump.ShowPopup(screenPoint); + } + } + } + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/00-DocumentPage/MainForm.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/PumpPartDlg.resx similarity index 100% copy from WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/00-DocumentPage/MainForm.resx copy to WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/PumpPartDlg.resx diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/PumpProductMainPanel.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/PumpProductMainPanel.Designer.cs similarity index 94% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/PumpProductMainPanel.Designer.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/PumpProductMainPanel.Designer.cs index 6e6469c..8c44dbf 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/PumpProductMainPanel.Designer.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/PumpProductMainPanel.Designer.cs @@ -36,6 +36,7 @@ BtnEdit = new DevExpress.XtraBars.BarButtonItem(); BtnDelete = new DevExpress.XtraBars.BarButtonItem(); barBtnEditPumpCurve = new DevExpress.XtraBars.BarButtonItem(); + BarBtnAddPartMain = new DevExpress.XtraBars.BarButtonItem(); ribbonPage1 = new DevExpress.XtraBars.Ribbon.RibbonPage(); ribbonPageGroup1 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); dockManager1 = new DevExpress.XtraBars.Docking.DockManager(components); @@ -59,6 +60,7 @@ layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); Root = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); + popupPump = new DevExpress.XtraBars.PopupMenu(components); ((System.ComponentModel.ISupportInitialize)ribbonControl1).BeginInit(); ((System.ComponentModel.ISupportInitialize)dockManager1).BeginInit(); dockPanel1.SuspendLayout(); @@ -70,6 +72,7 @@ layoutControl1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem1).BeginInit(); + ((System.ComponentModel.ISupportInitialize)popupPump).BeginInit(); SuspendLayout(); // // ribbonControl1 @@ -77,9 +80,9 @@ ribbonControl1.DrawGroupsBorderMode = DevExpress.Utils.DefaultBoolean.False; ribbonControl1.ExpandCollapseItem.Id = 0; ribbonControl1.ItemPanelStyle = DevExpress.XtraBars.Ribbon.RibbonItemPanelStyle.Classic; - ribbonControl1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { ribbonControl1.ExpandCollapseItem, BtnAdd, BtnEdit, BtnDelete, barBtnEditPumpCurve }); + ribbonControl1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { ribbonControl1.ExpandCollapseItem, BtnAdd, BtnEdit, BtnDelete, barBtnEditPumpCurve, BarBtnAddPartMain }); ribbonControl1.Location = new Point(0, 0); - ribbonControl1.MaxItemId = 14; + ribbonControl1.MaxItemId = 22; ribbonControl1.Name = "ribbonControl1"; ribbonControl1.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] { ribbonPage1 }); ribbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.False; @@ -120,6 +123,13 @@ barBtnEditPumpCurve.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnEditPumpCurve.ImageOptions.SvgImage"); barBtnEditPumpCurve.Name = "barBtnEditPumpCurve"; barBtnEditPumpCurve.ItemClick += barBtnEditPumpCurve_ItemClickAsync; + // + // BarBtnAddPartMain + // + BarBtnAddPartMain.Caption = "娣诲姞浜у搧"; + BarBtnAddPartMain.Id = 16; + BarBtnAddPartMain.Name = "BarBtnAddPartMain"; + BarBtnAddPartMain.ItemClick += BarBtnAddPartMain_ItemClick; // // ribbonPage1 // @@ -194,6 +204,7 @@ gridView1.GridControl = gridControl1; gridView1.Name = "gridView1"; gridView1.OptionsView.ShowGroupPanel = false; + gridView1.MouseUp += gridView1_MouseUp; // // colName // @@ -333,6 +344,12 @@ layoutControlItem1.TextSize = new Size(0, 0); layoutControlItem1.TextVisible = false; // + // popupPump + // + popupPump.ItemLinks.Add(BarBtnAddPartMain); + popupPump.Name = "popupPump"; + popupPump.Ribbon = ribbonControl1; + // // PumpProductMainPanel // AutoScaleDimensions = new SizeF(7F, 14F); @@ -353,6 +370,7 @@ layoutControl1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)Root).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem1).EndInit(); + ((System.ComponentModel.ISupportInitialize)popupPump).EndInit(); ResumeLayout(false); PerformLayout(); } @@ -387,5 +405,7 @@ private DevExpress.XtraGrid.Columns.GridColumn colRatedEfficiency; private DevExpress.XtraGrid.Columns.GridColumn colRatedPower; private DevExpress.XtraGrid.Columns.GridColumn colRatedSpeed; + private DevExpress.XtraBars.PopupMenu popupPump; + private DevExpress.XtraBars.BarButtonItem BarBtnAddPartMain; } } diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/PumpProductMainPanel.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/PumpProductMainPanel.cs similarity index 89% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/PumpProductMainPanel.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/PumpProductMainPanel.cs index c43810d..3c72958 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/PumpProductMainPanel.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/PumpProductMainPanel.cs @@ -1,4 +1,5 @@ -锘縰sing HStation.BLL; +锘縰sing DevExpress.XtraRichEdit.Import.Html; +using HStation.BLL; using HStation.Dto; using Mapster; using SQLitePCL; @@ -86,9 +87,9 @@ map.PumpGroupID = groupid; } dlg.SetBindingData(id); - dlg.ReloadDataEvent += async (rhs) => + dlg.ReloadDataEvent += async (main, part, content, mainmap) => { - var id = await _bll.InsertEx(rhs, map); + var id = await _bll.InsertEx(main, map, part, content, mainmap); if (id > 0) { var model = await _bll.GetByID(id); @@ -169,12 +170,25 @@ var model = await _bll.GetByID(currentVm.ID); if (model != null) { - /* var page = new ModelManageCtrl(model); + /* var page = new ModelManageCtrl(_PumpMain); page.PageTitle.Caption = guid.Function; page.SurfaceGuid = guid; CreatePage(page, guid);*/ } } } + + //琛ㄦ牸鍙冲嚮鑿滃崟 + private void gridView1_MouseUp(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Right) + { + if (this.gridView1.GetCurrentViewModel(_allBindingList) != null) + { + Point screenPoint = Cursor.Position; + popupPump.ShowPopup(screenPoint); + } + } + } } } \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/PumpProductMainPanel.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/PumpProductMainPanel.resx similarity index 98% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/PumpProductMainPanel.resx rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/PumpProductMainPanel.resx index 4a96a33..e850b1b 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/PumpProductMainPanel.resx +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/PumpProductMainPanel.resx @@ -224,4 +224,7 @@ <metadata name="currentViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>161, 17</value> </metadata> + <metadata name="popupPump.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>406, 17</value> + </metadata> </root> \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/PumpProductSeriesTreeListCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/PumpProductSeriesTreeListCtrl.cs similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/PumpProductSeriesTreeListCtrl.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/PumpProductSeriesTreeListCtrl.cs diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/PumpProductSeriesTreeListCtrl.designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/PumpProductSeriesTreeListCtrl.designer.cs similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/PumpProductSeriesTreeListCtrl.designer.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/PumpProductSeriesTreeListCtrl.designer.cs diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/PumpProductSeriesTreeListCtrl.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/PumpProductSeriesTreeListCtrl.resx similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/00-PumpProductManage/PumpProductSeriesTreeListCtrl.resx rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/00-PumpProductManage/PumpProductSeriesTreeListCtrl.resx diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/00-DocumentPage/DocumentPage.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/00-DocumentPage/DocumentPage.cs similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/00-DocumentPage/DocumentPage.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/00-DocumentPage/DocumentPage.cs diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/00-DocumentPage/DocumentPage.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/00-DocumentPage/DocumentPage.resx similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/00-DocumentPage/DocumentPage.resx rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/00-DocumentPage/DocumentPage.resx diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/00-DocumentPage/MainForm.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/00-DocumentPage/MainForm.cs similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/00-DocumentPage/MainForm.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/00-DocumentPage/MainForm.cs diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/00-DocumentPage/MainForm.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/00-DocumentPage/MainForm.resx similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/00-DocumentPage/MainForm.resx rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/00-DocumentPage/MainForm.resx diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/00-DocumentPage/ObjectType.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/00-DocumentPage/ObjectType.cs similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/00-DocumentPage/ObjectType.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/00-DocumentPage/ObjectType.cs diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/00-DocumentPage/PageDataSync.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/00-DocumentPage/PageDataSync.cs similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/00-DocumentPage/PageDataSync.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/00-DocumentPage/PageDataSync.cs diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/00-DocumentPage/PageFunctionItem.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/00-DocumentPage/PageFunctionItem.cs similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/00-DocumentPage/PageFunctionItem.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/00-DocumentPage/PageFunctionItem.cs diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/00-DocumentPage/PageMenu.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/00-DocumentPage/PageMenu.cs similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/00-DocumentPage/PageMenu.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/00-DocumentPage/PageMenu.cs diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/00-DocumentPage/PageTitle.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/00-DocumentPage/PageTitle.cs similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/00-DocumentPage/PageTitle.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/00-DocumentPage/PageTitle.cs diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/00-DocumentPage/SurfaceGuid.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/00-DocumentPage/SurfaceGuid.cs similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/00-DocumentPage/SurfaceGuid.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/00-DocumentPage/SurfaceGuid.cs diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/00-DocumentPage/ePageDataOperation.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/00-DocumentPage/ePageDataOperation.cs similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/00-DocumentPage/ePageDataOperation.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/00-DocumentPage/ePageDataOperation.cs diff --git "a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/BandGridViewExtend.cs" "b/WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/BandGridViewExtend.cs" similarity index 100% rename from "WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/BandGridViewExtend.cs" rename to "WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/BandGridViewExtend.cs" diff --git "a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/ButtonEditExtend.cs" "b/WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/ButtonEditExtend.cs" similarity index 100% rename from "WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/ButtonEditExtend.cs" rename to "WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/ButtonEditExtend.cs" diff --git "a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/ClassUpdateVailDataHelper.cs" "b/WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/ClassUpdateVailDataHelper.cs" similarity index 100% rename from "WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/ClassUpdateVailDataHelper.cs" rename to "WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/ClassUpdateVailDataHelper.cs" diff --git "a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/ControlExtend.cs" "b/WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/ControlExtend.cs" similarity index 100% rename from "WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/ControlExtend.cs" rename to "WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/ControlExtend.cs" diff --git "a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/ControlNavigatorExtend.cs" "b/WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/ControlNavigatorExtend.cs" similarity index 100% rename from "WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/ControlNavigatorExtend.cs" rename to "WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/ControlNavigatorExtend.cs" diff --git "a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/DateEditExtend.cs" "b/WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/DateEditExtend.cs" similarity index 100% rename from "WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/DateEditExtend.cs" rename to "WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/DateEditExtend.cs" diff --git "a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/DevHelper.cs" "b/WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/DevHelper.cs" similarity index 100% rename from "WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/DevHelper.cs" rename to "WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/DevHelper.cs" diff --git "a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/ExtensionsDev.cs" "b/WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/ExtensionsDev.cs" similarity index 100% rename from "WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/ExtensionsDev.cs" rename to "WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/ExtensionsDev.cs" diff --git "a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/FormExtend.cs" "b/WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/FormExtend.cs" similarity index 100% rename from "WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/FormExtend.cs" rename to "WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/FormExtend.cs" diff --git "a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/GridContorlExtend.cs" "b/WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/GridContorlExtend.cs" similarity index 100% rename from "WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/GridContorlExtend.cs" rename to "WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/GridContorlExtend.cs" diff --git "a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/GridViewExtend.cs" "b/WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/GridViewExtend.cs" similarity index 100% rename from "WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/GridViewExtend.cs" rename to "WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/GridViewExtend.cs" diff --git "a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/ImageExtend.cs" "b/WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/ImageExtend.cs" similarity index 100% rename from "WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/ImageExtend.cs" rename to "WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/ImageExtend.cs" diff --git "a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/LayoutControlExtensions.cs" "b/WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/LayoutControlExtensions.cs" similarity index 100% rename from "WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/LayoutControlExtensions.cs" rename to "WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/LayoutControlExtensions.cs" diff --git "a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/ListBoxControlExtend.cs" "b/WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/ListBoxControlExtend.cs" similarity index 100% rename from "WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/ListBoxControlExtend.cs" rename to "WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/ListBoxControlExtend.cs" diff --git "a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/LookUpEditExtend.cs" "b/WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/LookUpEditExtend.cs" similarity index 100% rename from "WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/LookUpEditExtend.cs" rename to "WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/LookUpEditExtend.cs" diff --git "a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/MessageBoxShow.cs" "b/WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/MessageBoxShow.cs" similarity index 100% rename from "WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/MessageBoxShow.cs" rename to "WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/MessageBoxShow.cs" diff --git "a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/RibbonControlExtend.cs" "b/WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/RibbonControlExtend.cs" similarity index 100% rename from "WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/RibbonControlExtend.cs" rename to "WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/RibbonControlExtend.cs" diff --git "a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/SearchLookUpEditExtend.cs" "b/WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/SearchLookUpEditExtend.cs" similarity index 100% rename from "WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/SearchLookUpEditExtend.cs" rename to "WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/SearchLookUpEditExtend.cs" diff --git "a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/TextEditExtend.cs" "b/WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/TextEditExtend.cs" similarity index 100% rename from "WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/TextEditExtend.cs" rename to "WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/TextEditExtend.cs" diff --git "a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/TileControlExtensions.cs" "b/WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/TileControlExtensions.cs" similarity index 100% rename from "WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/TileControlExtensions.cs" rename to "WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/TileControlExtensions.cs" diff --git "a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/TilePeekItemsExtensions.cs" "b/WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/TilePeekItemsExtensions.cs" similarity index 100% rename from "WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/TilePeekItemsExtensions.cs" rename to "WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/TilePeekItemsExtensions.cs" diff --git "a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/TokenEditExtend.cs" "b/WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/TokenEditExtend.cs" similarity index 100% rename from "WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/TokenEditExtend.cs" rename to "WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/TokenEditExtend.cs" diff --git "a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/TreeListExtend.cs" "b/WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/TreeListExtend.cs" similarity index 100% rename from "WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/TreeListExtend.cs" rename to "WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/TreeListExtend.cs" diff --git "a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/XtraChartHelper.cs" "b/WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/XtraChartHelper.cs" similarity index 100% rename from "WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/XtraChartHelper.cs" rename to "WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/XtraChartHelper.cs" diff --git "a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/XtraFormExtend.cs" "b/WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/XtraFormExtend.cs" similarity index 100% rename from "WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/01-\346\211\251\345\261\225\347\261\273/XtraFormExtend.cs" rename to "WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/01-\346\211\251\345\261\225\347\261\273/XtraFormExtend.cs" diff --git "a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/02-\346\217\220\347\244\272\345\274\271\347\252\227/MessageBoxHelper.cs" "b/WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/02-\346\217\220\347\244\272\345\274\271\347\252\227/MessageBoxHelper.cs" similarity index 100% rename from "WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/02-\346\217\220\347\244\272\345\274\271\347\252\227/MessageBoxHelper.cs" rename to "WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/02-\346\217\220\347\244\272\345\274\271\347\252\227/MessageBoxHelper.cs" diff --git "a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/03-\346\226\207\344\273\266\345\270\256\345\212\251\347\261\273/DataTabelToList.cs" "b/WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/03-\346\226\207\344\273\266\345\270\256\345\212\251\347\261\273/DataTabelToList.cs" similarity index 100% rename from "WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/03-\346\226\207\344\273\266\345\270\256\345\212\251\347\261\273/DataTabelToList.cs" rename to "WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/03-\346\226\207\344\273\266\345\270\256\345\212\251\347\261\273/DataTabelToList.cs" diff --git "a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/03-\346\226\207\344\273\266\345\270\256\345\212\251\347\261\273/ExcelSaveFilePathHelper.cs" "b/WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/03-\346\226\207\344\273\266\345\270\256\345\212\251\347\261\273/ExcelSaveFilePathHelper.cs" similarity index 100% rename from "WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/03-\346\226\207\344\273\266\345\270\256\345\212\251\347\261\273/ExcelSaveFilePathHelper.cs" rename to "WinFrmUI/HStation.WinFrmUI.Assets.Core/02-UICore/03-\346\226\207\344\273\266\345\270\256\345\212\251\347\261\273/ExcelSaveFilePathHelper.cs" diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/GlobalUsing.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/GlobalUsing.cs new file mode 100644 index 0000000..41d98a6 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/GlobalUsing.cs @@ -0,0 +1 @@ +锘縢lobal using Yw.WinFrmUI; \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/HStation.WinFrmUI.Xhs.PumpProduct.csproj b/WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj similarity index 93% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/HStation.WinFrmUI.Xhs.PumpProduct.csproj rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj index 27b0282..4c7bf23 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/HStation.WinFrmUI.Xhs.PumpProduct.csproj +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj @@ -21,7 +21,6 @@ <ItemGroup> <ProjectReference Include="..\..\BLL\HStation.BLL.Xhs.Core\HStation.BLL.Xhs.Core.csproj" /> - <ProjectReference Include="..\..\Model\HStation.Model.Xhs.PumpProduct\HStation.Model.Xhs.PumpProduct.csproj" /> <ProjectReference Include="..\HStation.WinFrmUI.Basic\HStation.WinFrmUI.Basic.csproj" /> <ProjectReference Include="..\Hstation.WinFrmUI.Core\HStation.WinFrmUI.Core.csproj" /> </ItemGroup> diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/HStation.WinFrmUI.Xhs.PumpProduct.csproj.user b/WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj.user similarity index 92% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/HStation.WinFrmUI.Xhs.PumpProduct.csproj.user rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj.user index 8ce8164..186845f 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/HStation.WinFrmUI.Xhs.PumpProduct.csproj.user +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/HStation.WinFrmUI.Assets.Core.csproj.user @@ -2,6 +2,12 @@ <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup /> <ItemGroup> + <Compile Update="00-PumpProductManage\PumpPartDlg.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Update="00-PumpProductManage\PumpProductMainPanel.cs"> + <SubType>UserControl</SubType> + </Compile> <Compile Update="00-PumpProductManage\PumpProductSeriesTreeListCtrl.cs"> <SubType>UserControl</SubType> </Compile> @@ -28,9 +34,6 @@ </Compile> <Compile Update="00-PumpProductManage\EditPumpProductSeriesDlg.cs"> <SubType>Form</SubType> - </Compile> - <Compile Update="00-PumpProductManage\PumpProductMainPanel.cs"> - <SubType>UserControl</SubType> </Compile> </ItemGroup> </Project> \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/Properties/DataSources/CurrentViewModel.datasource b/WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/CurrentViewModel.datasource similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/Properties/DataSources/CurrentViewModel.datasource rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/CurrentViewModel.datasource diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/Properties/DataSources/HStation.WinFrmUI.Xhs.CatlogViewModel.datasource b/WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/HStation.WinFrmUI.Xhs.CatlogViewModel.datasource similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/Properties/DataSources/HStation.WinFrmUI.Xhs.CatlogViewModel.datasource rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/HStation.WinFrmUI.Xhs.CatlogViewModel.datasource diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/Properties/DataSources/HStation.WinFrmUI.Xhs.ModuleViewModel.datasource b/WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/HStation.WinFrmUI.Xhs.ModuleViewModel.datasource similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/Properties/DataSources/HStation.WinFrmUI.Xhs.ModuleViewModel.datasource rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/HStation.WinFrmUI.Xhs.ModuleViewModel.datasource diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/Properties/DataSources/HStation.WinFrmUI.Xhs.PropGroupTreeListViewModel.datasource b/WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/HStation.WinFrmUI.Xhs.PropGroupTreeListViewModel.datasource similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/Properties/DataSources/HStation.WinFrmUI.Xhs.PropGroupTreeListViewModel.datasource rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/HStation.WinFrmUI.Xhs.PropGroupTreeListViewModel.datasource diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/Properties/DataSources/HStation.WinFrmUI.Xhs.PropGroupViewModel.datasource b/WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/HStation.WinFrmUI.Xhs.PropGroupViewModel.datasource similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/Properties/DataSources/HStation.WinFrmUI.Xhs.PropGroupViewModel.datasource rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/HStation.WinFrmUI.Xhs.PropGroupViewModel.datasource diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/Properties/DataSources/HStation.WinFrmUI.Xhs.PropViewModel.datasource b/WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/HStation.WinFrmUI.Xhs.PropViewModel.datasource similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/Properties/DataSources/HStation.WinFrmUI.Xhs.PropViewModel.datasource rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/HStation.WinFrmUI.Xhs.PropViewModel.datasource diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/Properties/DataSources/ProjectModelViewModel.datasource b/WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/ProjectModelViewModel.datasource similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/Properties/DataSources/ProjectModelViewModel.datasource rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/ProjectModelViewModel.datasource diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/Properties/DataSources/ProjectViewModel.datasource b/WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/ProjectViewModel.datasource similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/Properties/DataSources/ProjectViewModel.datasource rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/ProjectViewModel.datasource diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/Properties/DataSources/PropGroupChoiceViewModel.datasource b/WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/PropGroupChoiceViewModel.datasource similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/Properties/DataSources/PropGroupChoiceViewModel.datasource rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/PropGroupChoiceViewModel.datasource diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/Properties/DataSources/TypeViewModel.datasource b/WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/TypeViewModel.datasource similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/Properties/DataSources/TypeViewModel.datasource rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/DataSources/TypeViewModel.datasource diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/Properties/Resources.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/Resources.Designer.cs similarity index 95% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/Properties/Resources.Designer.cs rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/Resources.Designer.cs index 94393fc..1e42b5e 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/Properties/Resources.Designer.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/Resources.Designer.cs @@ -8,7 +8,7 @@ // </auto-generated> //------------------------------------------------------------------------------ -namespace HStation.WinFrmUI.Xhs.PumpProduct.Properties { +namespace HStation.WinFrmUI.Assets.Core.Properties { using System; @@ -39,7 +39,7 @@ internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HStation.WinFrmUI.Xhs.PumpProduct.Properties.Resources", typeof(Resources).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HStation.WinFrmUI.Assets.Core.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/Properties/Resources.resx b/WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/Resources.resx similarity index 100% rename from WinFrmUI/HStation.WinFrmUI.Xhs.Project/Properties/Resources.resx rename to WinFrmUI/HStation.WinFrmUI.Assets.Core/Properties/Resources.resx diff --git a/WinFrmUI/HStation.WinFrmUI.Basic/GlobalUsing.cs b/WinFrmUI/HStation.WinFrmUI.Basic/GlobalUsing.cs new file mode 100644 index 0000000..41d98a6 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Basic/GlobalUsing.cs @@ -0,0 +1 @@ +锘縢lobal using Yw.WinFrmUI; \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Basic/HStation.WinFrmUI.Basic.csproj.user b/WinFrmUI/HStation.WinFrmUI.Basic/HStation.WinFrmUI.Basic.csproj.user index b54fffb..8327ce3 100644 --- a/WinFrmUI/HStation.WinFrmUI.Basic/HStation.WinFrmUI.Basic.csproj.user +++ b/WinFrmUI/HStation.WinFrmUI.Basic/HStation.WinFrmUI.Basic.csproj.user @@ -26,12 +26,12 @@ <Compile Update="01-SysCatalogManage\EditSysCatlaogDlg.cs"> <SubType>Form</SubType> </Compile> - <Compile Update="01-SysCatalogManage\SysCatalogManageMainPanel.cs"> - <SubType>UserControl</SubType> - </Compile> <Compile Update="01-SysCatalogManage\SetSysPropForCatalogDlg.cs"> <SubType>Form</SubType> </Compile> + <Compile Update="01-SysCatalogManage\SysCatalogManageMainPanel.cs"> + <SubType>UserControl</SubType> + </Compile> <Compile Update="01-SysCatalogManage\SysTypeTreeListCtrl.cs"> <SubType>UserControl</SubType> </Compile> diff --git "a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/02-\346\217\220\347\244\272\345\274\271\347\252\227/MessageBoxHelper.cs" "b/WinFrmUI/HStation.WinFrmUI.Core/00-UICore/00-\346\217\220\347\244\272\345\274\271\347\252\227/MessageBoxHelper.cs" similarity index 100% copy from "WinFrmUI/HStation.WinFrmUI.Xhs.Project/02-UICore/02-\346\217\220\347\244\272\345\274\271\347\252\227/MessageBoxHelper.cs" copy to "WinFrmUI/HStation.WinFrmUI.Core/00-UICore/00-\346\217\220\347\244\272\345\274\271\347\252\227/MessageBoxHelper.cs" diff --git "a/WinFrmUI/HStation.WinFrmUI.Core/00-UICore/04-\347\224\250\346\210\267\347\231\273\351\231\206\347\261\273/LoginUser.cs" "b/WinFrmUI/HStation.WinFrmUI.Core/00-UICore/01-\347\224\250\346\210\267\347\231\273\351\231\206\347\261\273/LoginUser.cs" similarity index 100% rename from "WinFrmUI/HStation.WinFrmUI.Core/00-UICore/04-\347\224\250\346\210\267\347\231\273\351\231\206\347\261\273/LoginUser.cs" rename to "WinFrmUI/HStation.WinFrmUI.Core/00-UICore/01-\347\224\250\346\210\267\347\231\273\351\231\206\347\261\273/LoginUser.cs" diff --git "a/WinFrmUI/HStation.WinFrmUI.Core/00-UICore/01-\347\224\250\346\210\267\347\231\273\351\231\206\347\261\273/gloabparas.cs" "b/WinFrmUI/HStation.WinFrmUI.Core/00-UICore/01-\347\224\250\346\210\267\347\231\273\351\231\206\347\261\273/gloabparas.cs" new file mode 100644 index 0000000..0db7c9d --- /dev/null +++ "b/WinFrmUI/HStation.WinFrmUI.Core/00-UICore/01-\347\224\250\346\210\267\347\231\273\351\231\206\347\261\273/gloabparas.cs" @@ -0,0 +1,108 @@ +锘縰sing Yw.Dto; + +namespace HStation +{ + /// <summary> + /// 鐧诲綍鐢ㄦ埛 + /// </summary> + public class gloabparas + { + private static gloabparas _loginUser; + + public gloabparas() + { + } + + public gloabparas(UserLoginOutput rhs) + { + _loginUser = new gloabparas(); + _loginUser.CreateUserID = rhs.User.ID; + _loginUser.LoginName = rhs.User.Name; + } + + /// <summary> + /// 鐢ㄦ埛鏍囪瘑 + /// </summary> + public long ID { get; set; } + + /// <summary> + /// 瀹㈡埛鏍囪瘑 + /// </summary> + public long CorpID { get; set; } + + /// <summary> + /// 鍒涘缓鐢ㄦ埛鏍囪瘑 + /// </summary> + public long CreateUserID { get; set; } + + /// <summary> + /// 鍏崇郴绫诲瀷 + /// </summary> + public string RelatedType { get; set; } + + /// <summary> + /// 鍏崇郴鏍囪瘑 + /// </summary> + public long RelatedID { get; set; } + + /// <summary> + /// 鏄惁涓虹鐞嗗憳 + /// </summary> + public bool IsAdmin { get; set; } + + /// <summary> + /// 鐧诲綍鍚嶇О + /// </summary> + public string LoginName { get; set; } + + /// <summary> + /// 鐪熷疄鍚嶇О + /// </summary> + public string RealName { get; set; } + + /// <summary> + /// 鎵嬫満鍙风爜 + /// </summary> + public string Mobile { get; set; } + + /// <summary> + /// QQ + /// </summary> + public string QQ { get; set; } + + /// <summary> + /// 鐢靛瓙閭欢 + /// </summary> + public string EMail { get; set; } + + /// <summary> + /// 鏍囩鍚嶇О + /// </summary> + public string TagName { get; set; } + + /// <summary> + /// 鐧诲綍鍥剧墖 + /// </summary> + public string LoginImg { get; set; } + + /// <summary> + /// 浣跨敤鐘舵�� + /// </summary> + public int UseStatus { get; set; } + + /// <summary> + /// 澶囨敞 + /// </summary> + /// + public string Description { get; set; } + + public static gloabparas GetInstance() + { + if (_loginUser != null) + { + return _loginUser; + } + return new gloabparas(); + } + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Core/GlobalUsing.cs b/WinFrmUI/HStation.WinFrmUI.Core/GlobalUsing.cs new file mode 100644 index 0000000..41d98a6 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Core/GlobalUsing.cs @@ -0,0 +1 @@ +锘縢lobal using Yw.WinFrmUI; \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Core/HStation.WinFrmUI.Core.csproj.user b/WinFrmUI/HStation.WinFrmUI.Core/HStation.WinFrmUI.Core.csproj.user new file mode 100644 index 0000000..88a5509 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Core/HStation.WinFrmUI.Core.csproj.user @@ -0,0 +1,4 @@ +锘�<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup /> +</Project> \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-HomePageMainPanel/AddXhsProjectDlg.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-HomePageMainPanel/AddXhsProjectDlg.cs index 98239b2..e758b0b 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-HomePageMainPanel/AddXhsProjectDlg.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-HomePageMainPanel/AddXhsProjectDlg.cs @@ -104,7 +104,7 @@ { if (!this.projectUserControl1.Valid()) return; - var login = LoginUser.GetInstance(); + var login = gloabparas.GetInstance(); var proresult = this.projectUserControl1.GetData(_AddXhsProjectInput); proresult.Address = this.textEditAddress.Text.Trim(); proresult.CreateUserID = login.CreateUserID; diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Curve/GlobalUsing.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Curve/GlobalUsing.cs new file mode 100644 index 0000000..41d98a6 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Curve/GlobalUsing.cs @@ -0,0 +1 @@ +锘縢lobal using Yw.WinFrmUI; \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Curve/HStation.WinFrmUI.Xhs.Curve.csproj b/WinFrmUI/HStation.WinFrmUI.Xhs.Curve/HStation.WinFrmUI.Xhs.Curve.csproj index f969340..71728aa 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Curve/HStation.WinFrmUI.Xhs.Curve.csproj +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Curve/HStation.WinFrmUI.Xhs.Curve.csproj @@ -18,9 +18,7 @@ <Compile Update="XhsProjectUserControl.cs"> <SubType>UserControl</SubType> </Compile> - <Compile Update="XhsPumpCurveMainPanel.cs"> - <SubType>UserControl</SubType> - </Compile> + <Compile Update="XhsPumpCurveMainPanel.cs" /> </ItemGroup> </Project> diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Curve/HStation.WinFrmUI.Xhs.Curve.csproj.user b/WinFrmUI/HStation.WinFrmUI.Xhs.Curve/HStation.WinFrmUI.Xhs.Curve.csproj.user index b5309f2..1ee8e85 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Curve/HStation.WinFrmUI.Xhs.Curve.csproj.user +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Curve/HStation.WinFrmUI.Xhs.Curve.csproj.user @@ -1,5 +1,9 @@ 锘�<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup /> - <ItemGroup /> + <ItemGroup> + <Compile Update="XhsPumpCurveMainPanel.cs"> + <SubType>UserControl</SubType> + </Compile> + </ItemGroup> </Project> \ No newline at end of file diff --git "a/WinFrmUI/Hstation.WinFrmUI.Core/00-UICore/02-\346\217\220\347\244\272\345\274\271\347\252\227/MessageBoxHelper.cs" "b/WinFrmUI/Hstation.WinFrmUI.Core/00-UICore/02-\346\217\220\347\244\272\345\274\271\347\252\227/MessageBoxHelper.cs" deleted file mode 100644 index 52e00f9..0000000 --- "a/WinFrmUI/Hstation.WinFrmUI.Core/00-UICore/02-\346\217\220\347\244\272\345\274\271\347\252\227/MessageBoxHelper.cs" +++ /dev/null @@ -1,91 +0,0 @@ -锘縰sing DevExpress.XtraEditors; - -namespace HStation.WinFrmUI -{ - public class MessageBoxHelper - { - /// <summary> - /// 閿欒淇℃伅寮圭獥 - /// </summary> - /// <param name="message"></param>鏄剧ず淇℃伅 - /// <param name="caption"></param>宸︿笂瑙掓樉绀轰俊鎭� - /// <param name="buttons"></param>闇�瑕佹樉绀烘寜閽� - /// <returns></returns> - public static DialogResult ShowError(string message, string caption = "閿欒", MessageBoxButtons buttons = MessageBoxButtons.OK, MessageBoxDefaultButton defaultButton = MessageBoxDefaultButton.Button1) - { - return XtraMessageBox.Show(message, caption, buttons, MessageBoxIcon.Error); - } - - /// <summary> - /// 鎴愬姛淇℃伅寮圭獥 - /// </summary> - /// <param name="message"></param>鏄剧ず淇℃伅 - /// <param name="caption"></param>宸︿笂瑙掓樉绀轰俊鎭� - /// <param name="buttons"></param>闇�瑕佹樉绀烘寜閽� - /// <returns></returns> - public static DialogResult ShowSuccess(string message, string caption = "鎴愬姛", MessageBoxButtons buttons = MessageBoxButtons.OK, MessageBoxDefaultButton defaultButton = MessageBoxDefaultButton.Button1) - { - return XtraMessageBox.Show(message, caption, buttons, MessageBoxIcon.Information, defaultButton); - } - - /// <summary> - /// 涓嶆樉绀烘寜閽脊绐�(鍙樉绀烘枃瀛�) - /// </summary> - /// <param name="message"></param>鏄剧ず淇℃伅 - /// <param name="caption"></param>宸︿笂瑙掓樉绀轰俊鎭� - /// <param name="buttons"></param>闇�瑕佹樉绀烘寜閽� - /// <returns></returns> - public static DialogResult ShowMessage(string message, string caption = "鎴愬姛") - { - return XtraMessageBox.Show(message, caption); - } - - /// <summary> - /// 璀﹀憡淇℃伅寮圭獥 - /// </summary> - /// <param name="message"></param>鏄剧ず淇℃伅 - /// <param name="caption"></param>宸︿笂瑙掓樉绀轰俊鎭� - /// <param name="buttons"></param>闇�瑕佹樉绀烘寜閽� - /// <returns></returns> - public static DialogResult ShowWarning(string message, string caption = "璀﹀憡", MessageBoxButtons buttons = MessageBoxButtons.OK, MessageBoxDefaultButton defaultButton = MessageBoxDefaultButton.Button1) - { - return XtraMessageBox.Show(message, caption, buttons, MessageBoxIcon.Warning, defaultButton); - } - - /// <summary> - /// 鏅�氫俊鎭脊绐� - /// </summary> - /// <param name="message"></param>鏄剧ず淇℃伅 - /// <param name="caption"></param>宸︿笂瑙掓樉绀轰俊鎭� - /// <param name="buttons"></param>闇�瑕佹樉绀烘寜閽� - /// <returns></returns> - public static DialogResult ShowInfo(string message, string caption = "鎻愮ず", MessageBoxButtons buttons = MessageBoxButtons.OK, MessageBoxDefaultButton defaultButton = MessageBoxDefaultButton.Button1) - { - return XtraMessageBox.Show(message, caption, buttons, MessageBoxIcon.Information, defaultButton); - } - - /// <summary> - /// 寮圭獥鏄惁鐐瑰嚮纭畾 - /// </summary> - /// <param name="message"></param>鏄剧ず淇℃伅 - /// <param name="caption"></param>宸︿笂瑙掓樉绀轰俊鎭� - /// <param name="buttons"></param>闇�瑕佹樉绀烘寜閽� - /// <returns></returns> - public static bool IsClickOk(string message, string caption = "璇㈤棶", MessageBoxButtons buttons = MessageBoxButtons.OKCancel, MessageBoxDefaultButton defaultButton = MessageBoxDefaultButton.Button1) - { - return XtraMessageBox.Show(message, caption, buttons, MessageBoxIcon.Question) != DialogResult.OK; - } - - /// <summary> - /// 寮圭獥鏄惁鐐瑰嚮鍙栨秷 - /// </summary> - /// <param name="message"></param>鏄剧ず淇℃伅 - /// <param name="caption"></param>宸︿笂瑙掓樉绀轰俊鎭� - /// <param name="buttons"></param>闇�瑕佹樉绀烘寜閽� - /// <returns></returns> - public static bool IsClickCancel(string message, string caption = "璇㈤棶", MessageBoxButtons buttons = MessageBoxButtons.OKCancel, MessageBoxDefaultButton defaultButton = MessageBoxDefaultButton.Button1) - { - return XtraMessageBox.Show(message, caption, buttons, MessageBoxIcon.Question) != DialogResult.Cancel; - } - } -} \ No newline at end of file diff --git a/WinFrmUI/Hstation.WinFrmUI.Core/Hstation.WinFrmUI.Core.csproj b/WinFrmUI/Hstation.WinFrmUI.Core/Hstation.WinFrmUI.Core.csproj index d79ddb8..8bd2a95 100644 --- a/WinFrmUI/Hstation.WinFrmUI.Core/Hstation.WinFrmUI.Core.csproj +++ b/WinFrmUI/Hstation.WinFrmUI.Core/Hstation.WinFrmUI.Core.csproj @@ -7,8 +7,18 @@ </PropertyGroup> <ItemGroup> - <Compile Remove="00-UICore\01-鎵╁睍绫籠TilePeekItemsExtensions.cs" /> - <Compile Remove="00-UICore\01-鎵╁睍绫籠XtraChartHelper.cs" /> + <Compile Remove="00-UICore\00-DocumentPage\**" /> + <Compile Remove="00-UICore\01-鎵╁睍绫籠**" /> + <Compile Remove="00-UICore\03-鏂囦欢甯姪绫籠**" /> + <EmbeddedResource Remove="00-UICore\00-DocumentPage\**" /> + <EmbeddedResource Remove="00-UICore\01-鎵╁睍绫籠**" /> + <EmbeddedResource Remove="00-UICore\03-鏂囦欢甯姪绫籠**" /> + <None Remove="00-UICore\00-DocumentPage\**" /> + <None Remove="00-UICore\01-鎵╁睍绫籠**" /> + <None Remove="00-UICore\03-鏂囦欢甯姪绫籠**" /> + <Page Remove="00-UICore\00-DocumentPage\**" /> + <Page Remove="00-UICore\01-鎵╁睍绫籠**" /> + <Page Remove="00-UICore\03-鏂囦欢甯姪绫籠**" /> </ItemGroup> <ItemGroup> @@ -17,12 +27,10 @@ </ItemGroup> <ItemGroup> - <Compile Update="00-UICore\00-DocumentPage\DocumentPage.cs"> - <SubType>UserControl</SubType> - </Compile> - <Compile Update="00-UICore\00-DocumentPage\MainForm.cs"> - <SubType>Form</SubType> - </Compile> + <ProjectReference Include="..\Yw.WinFrmUI.Core\Yw.WinFrmUI.Core.csproj" /> + </ItemGroup> + + <ItemGroup> <Compile Update="Lib\Resource1.Designer.cs"> <DesignTime>True</DesignTime> <AutoGen>True</AutoGen> diff --git a/WinFrmUI/Yw.WinFrmUI.Core/06-document/DocumentPage.cs b/WinFrmUI/Yw.WinFrmUI.Core/06-document/DocumentPage.cs index 253675a..824a480 100644 --- a/WinFrmUI/Yw.WinFrmUI.Core/06-document/DocumentPage.cs +++ b/WinFrmUI/Yw.WinFrmUI.Core/06-document/DocumentPage.cs @@ -6,7 +6,7 @@ public partial class DocumentPage : DevExpress.XtraEditors.XtraUserControl { /// <summary> - /// + /// /// </summary> public DocumentPage() { @@ -15,13 +15,12 @@ } /// <summary> - /// + /// /// </summary> public DocumentPage(PageGuid pguid) : this() { this.PageGuid = pguid; } - /// <summary> /// 鏍规嵁瀛楃涓插垽鏂璂ocument鏄惁瀛樺湪锛� @@ -118,6 +117,11 @@ public event Action<PageGuid> ClosePageEvent; /// <summary> + /// 閲嶇疆鎵�鏈塒age浜嬩欢 + /// </summary> + public event Action ResetAllPagesEvent; + + /// <summary> /// 鍏抽棴page /// </summary> /// <param name="sguid"></param> @@ -125,7 +129,6 @@ { this.ClosePageEvent?.Invoke(sguid); } - /// <summary> /// 澶撮儴閮ㄥ垎 @@ -142,7 +145,11 @@ /// </summary> public virtual void InitialDataSource() { + } + protected void ResetAllPages() + { + this.ResetAllPagesEvent?.Invoke(); } /// <summary> @@ -150,7 +157,6 @@ /// </summary> public virtual void RefreshData() { - } /// <summary> @@ -158,7 +164,6 @@ /// </summary> public virtual void Close() { - } /// <summary> @@ -170,11 +175,18 @@ } /// <summary> + /// 鏄惁鍏佽鍏抽棴 + /// </summary> + public virtual bool AllowClose() + { + return true; + } + + /// <summary> /// 娉ㄥ唽浜嬩欢 /// </summary> public virtual void RegistEvents() { - } /// <summary> @@ -182,10 +194,6 @@ /// </summary> public virtual void UnRegistEvents() { - } - - - } -} +} \ No newline at end of file -- Gitblit v1.9.3