| | |
| | | EndProject |
| | | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demo.Model", "src\Model\Demo.Model\Demo.Model.csproj", "{F79642D8-3172-4655-9FA8-C20151591048}" |
| | | EndProject |
| | | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demo.DynamicForm", "src\BLL\Demo.DynamicForm\Demo.DynamicForm.csproj", "{D227B701-E3B7-432C-951B-5F396B82B1F3}" |
| | | EndProject |
| | | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demo.ListView", "src\BLL\Demo.ListView\Demo.ListView.csproj", "{6060A6F0-F708-4AA4-8B58-EF21661E634C}" |
| | | EndProject |
| | | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demo.SysReportView", "src\BLL\Demo.SysReportView\Demo.SysReportView.csproj", "{48248035-7240-44D1-AB24-533FB01774D1}" |
| | |
| | | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "UI", "UI", "{2D428206-511A-4C87-8A60-4535B238A03E}" |
| | | EndProject |
| | | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demo.BLL", "src\BLL\Demo.BLL\Demo.BLL.csproj", "{C13E0C61-B1C8-45DD-96F6-3C7DD573C6E4}" |
| | | EndProject |
| | | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demo.Utility", "src\BLL\Demo.Utility\Demo.Utility.csproj", "{0AF059FC-D287-42C4-8835-133C3D96243A}" |
| | | EndProject |
| | | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demo.DynamicForm", "src\BLL\Demo.DynamicForm\Demo.DynamicForm.csproj", "{E2975D07-F28A-417E-8225-19281A7A62BD}" |
| | | EndProject |
| | | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demo.TimedTaskPlugIn", "src\BLL\Demo.TimedTaskPlugIn\Demo.TimedTaskPlugIn.csproj", "{3B5437EE-F19C-4B69-90A4-88866841337B}" |
| | | EndProject |
| | | Global |
| | | GlobalSection(SolutionConfigurationPlatforms) = preSolution |
| | |
| | | {F79642D8-3172-4655-9FA8-C20151591048}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {F79642D8-3172-4655-9FA8-C20151591048}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {F79642D8-3172-4655-9FA8-C20151591048}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {D227B701-E3B7-432C-951B-5F396B82B1F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {D227B701-E3B7-432C-951B-5F396B82B1F3}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {D227B701-E3B7-432C-951B-5F396B82B1F3}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {D227B701-E3B7-432C-951B-5F396B82B1F3}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {6060A6F0-F708-4AA4-8B58-EF21661E634C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {6060A6F0-F708-4AA4-8B58-EF21661E634C}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {6060A6F0-F708-4AA4-8B58-EF21661E634C}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | |
| | | {C13E0C61-B1C8-45DD-96F6-3C7DD573C6E4}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {C13E0C61-B1C8-45DD-96F6-3C7DD573C6E4}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {C13E0C61-B1C8-45DD-96F6-3C7DD573C6E4}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {0AF059FC-D287-42C4-8835-133C3D96243A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {0AF059FC-D287-42C4-8835-133C3D96243A}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {0AF059FC-D287-42C4-8835-133C3D96243A}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {0AF059FC-D287-42C4-8835-133C3D96243A}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {E2975D07-F28A-417E-8225-19281A7A62BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {E2975D07-F28A-417E-8225-19281A7A62BD}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {E2975D07-F28A-417E-8225-19281A7A62BD}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {E2975D07-F28A-417E-8225-19281A7A62BD}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | {3B5437EE-F19C-4B69-90A4-88866841337B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
| | | {3B5437EE-F19C-4B69-90A4-88866841337B}.Debug|Any CPU.Build.0 = Debug|Any CPU |
| | | {3B5437EE-F19C-4B69-90A4-88866841337B}.Release|Any CPU.ActiveCfg = Release|Any CPU |
| | | {3B5437EE-F19C-4B69-90A4-88866841337B}.Release|Any CPU.Build.0 = Release|Any CPU |
| | | EndGlobalSection |
| | | GlobalSection(SolutionProperties) = preSolution |
| | | HideSolutionNode = FALSE |
| | |
| | | {1BD45CA7-DE27-452F-B0AE-AA95AB2B4286} = {9D051344-E998-4524-867F-3E2F2421D19F} |
| | | {1B850AD6-24F3-483D-9469-16FA46C15F39} = {9D051344-E998-4524-867F-3E2F2421D19F} |
| | | {F79642D8-3172-4655-9FA8-C20151591048} = {F9BB78F7-A52D-4B34-9B67-8DD862A4943C} |
| | | {D227B701-E3B7-432C-951B-5F396B82B1F3} = {2D428206-511A-4C87-8A60-4535B238A03E} |
| | | {6060A6F0-F708-4AA4-8B58-EF21661E634C} = {2D428206-511A-4C87-8A60-4535B238A03E} |
| | | {48248035-7240-44D1-AB24-533FB01774D1} = {2D428206-511A-4C87-8A60-4535B238A03E} |
| | | {8354EB8E-5CF9-47FE-B6AA-566F1A829A01} = {2D428206-511A-4C87-8A60-4535B238A03E} |
| | |
| | | {45D78DAF-CF2E-47D6-A404-76E3B36EEDFF} = {2D428206-511A-4C87-8A60-4535B238A03E} |
| | | {D63F2411-B567-4F8E-B0EA-7DDD2BC9394F} = {2D428206-511A-4C87-8A60-4535B238A03E} |
| | | {C13E0C61-B1C8-45DD-96F6-3C7DD573C6E4} = {31C70F5D-03A8-485B-B4A9-F8D29552DA00} |
| | | {0AF059FC-D287-42C4-8835-133C3D96243A} = {2D428206-511A-4C87-8A60-4535B238A03E} |
| | | {E2975D07-F28A-417E-8225-19281A7A62BD} = {2D428206-511A-4C87-8A60-4535B238A03E} |
| | | {3B5437EE-F19C-4B69-90A4-88866841337B} = {2D428206-511A-4C87-8A60-4535B238A03E} |
| | | EndGlobalSection |
| | | GlobalSection(ExtensibilityGlobals) = postSolution |
| | | SolutionGuid = {92FECC0D-B61B-466C-9421-AAECA846220B} |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8" ?> |
| | | <configuration> |
| | | <appSettings> |
| | | <add key="DbId" value="5f9258a311401c"></add> |
| | | <add key="UserName" value="Administrator"></add> |
| | | <add key="PassWord" value="888888"></add> |
| | | <add key="KDApiUrl" value="http://localhost/K3Cloud/"></add> |
| | | </appSettings> |
| | | </configuration> |
| | |
| | | <DefineConstants>DEBUG;TRACE</DefineConstants> |
| | | <ErrorReport>prompt</ErrorReport> |
| | | <WarningLevel>4</WarningLevel> |
| | | <PlatformTarget>x64</PlatformTarget> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
| | | <DebugType>pdbonly</DebugType> |
| | |
| | | <WarningLevel>4</WarningLevel> |
| | | </PropertyGroup> |
| | | <ItemGroup> |
| | | <Reference Include="BouncyCastle.Crypto, Version=1.8.6.0, Culture=neutral, PublicKeyToken=0e99375e54769942, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\Portable.BouncyCastle.1.8.6\lib\net40\BouncyCastle.Crypto.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="ICSharpCode.SharpZipLib, Version=1.2.0.246, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\SharpZipLib.1.2.0\lib\net45\ICSharpCode.SharpZipLib.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="K3Cloud.Extend, Version=0.0.80.5, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\K3Cloud.Extend.dll</HintPath> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.2.3\lib\net452\K3Cloud.Extend.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.dll</HintPath> |
| | | <Reference Include="Kingdee.BOS, Version=7.2.904.6, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.2.3\lib\net452\Kingdee.BOS.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.App, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.App.dll</HintPath> |
| | | <Reference Include="Kingdee.BOS.App, Version=7.2.904.6, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.2.3\lib\net452\Kingdee.BOS.App.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.App.Core, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.App.Core.dll</HintPath> |
| | | <Reference Include="Kingdee.BOS.App.Core, Version=7.2.904.6, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.2.3\lib\net452\Kingdee.BOS.App.Core.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.Business.PlugIn, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.Business.PlugIn.dll</HintPath> |
| | | <Reference Include="Kingdee.BOS.Business.PlugIn, Version=7.2.904.6, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.2.3\lib\net452\Kingdee.BOS.Business.PlugIn.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.BusinessEntity, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.BusinessEntity.dll</HintPath> |
| | | <Reference Include="Kingdee.BOS.BusinessEntity, Version=7.2.904.6, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.2.3\lib\net452\Kingdee.BOS.BusinessEntity.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.Contracts, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.Contracts.dll</HintPath> |
| | | <Reference Include="Kingdee.BOS.Contracts, Version=7.2.904.6, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.2.3\lib\net452\Kingdee.BOS.Contracts.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.Core, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.Core.dll</HintPath> |
| | | <Reference Include="Kingdee.BOS.Core, Version=7.2.904.6, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.2.3\lib\net452\Kingdee.BOS.Core.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.DataEntity, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.DataEntity.dll</HintPath> |
| | | <Reference Include="Kingdee.BOS.DataEntity, Version=7.2.904.6, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.2.3\lib\net452\Kingdee.BOS.DataEntity.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.MpWeiXin, Version=7.0.104.1, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.MpWeiXin.dll</HintPath> |
| | | <Reference Include="Kingdee.BOS.FileConvert.Core, Version=7.2.904.6, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.2.3\lib\net452\Kingdee.BOS.FileConvert.Core.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.QyWeiXin, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.QyWeiXin.dll</HintPath> |
| | | <Reference Include="Kingdee.BOS.FileServer.App.Core, Version=7.2.904.6, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.2.3\lib\net452\Kingdee.BOS.FileServer.App.Core.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.ServiceFacade.KDServiceClient, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.ServiceFacade.KDServiceClient.dll</HintPath> |
| | | <Reference Include="Kingdee.BOS.FileServer.Core, Version=7.2.904.6, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.2.3\lib\net452\Kingdee.BOS.FileServer.Core.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.ServiceFacade.KDServiceClientFx, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.ServiceFacade.KDServiceClientFx.dll</HintPath> |
| | | <Reference Include="Kingdee.BOS.FileServer.ProxyService, Version=7.2.904.6, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.2.3\lib\net452\Kingdee.BOS.FileServer.ProxyService.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.ServiceFacade.KDServiceFx, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.ServiceFacade.KDServiceFx.dll</HintPath> |
| | | <Reference Include="Kingdee.BOS.Mobile, Version=7.2.904.6, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.2.3\lib\net452\Kingdee.BOS.Mobile.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.ServiceHelper, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.ServiceHelper.dll</HintPath> |
| | | <Reference Include="Kingdee.BOS.Model, Version=7.2.904.6, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.2.3\lib\net452\Kingdee.BOS.Model.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.Web, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.Web.dll</HintPath> |
| | | <Reference Include="Kingdee.BOS.ServiceFacade.KDServiceClient, Version=7.2.904.6, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.2.3\lib\net452\Kingdee.BOS.ServiceFacade.KDServiceClient.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.Web.HTML, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.Web.HTML.dll</HintPath> |
| | | <Reference Include="Kingdee.BOS.ServiceFacade.KDServiceClientFx, Version=7.2.904.6, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.2.3\lib\net452\Kingdee.BOS.ServiceFacade.KDServiceClientFx.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.WeiXin.Core, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.WeiXin.Core.dll</HintPath> |
| | | <Reference Include="Kingdee.BOS.ServiceFacade.KDServiceFx, Version=7.2.904.6, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.2.3\lib\net452\Kingdee.BOS.ServiceFacade.KDServiceFx.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.WinForm.KDS20Lib, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.WinForm.KDS20Lib.dll</HintPath> |
| | | <Reference Include="Kingdee.BOS.ServiceHelper, Version=7.2.904.6, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.2.3\lib\net452\Kingdee.BOS.ServiceHelper.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.K3.Core, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.K3.Core.dll</HintPath> |
| | | <Reference Include="Kingdee.BOS.Web, Version=7.2.904.6, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.2.3\lib\net452\Kingdee.BOS.Web.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.K3.SCM.App, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.K3.SCM.App.dll</HintPath> |
| | | <Reference Include="Kingdee.BOS.Web.Core, Version=7.5.1658.5, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.2.3\lib\net452\Kingdee.BOS.Web.Core.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.K3.SCM.App.Stock.Report, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.K3.SCM.App.Stock.Report.dll</HintPath> |
| | | <Reference Include="Kingdee.BOS.WebApi.Client, Version=7.3.1150.7, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.WebApi.7.3.2.3\lib\net452\Kingdee.BOS.WebApi.Client.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.K3.SCM.App.Stock.ServicePlugIn, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.K3.SCM.App.Stock.ServicePlugIn.dll</HintPath> |
| | | <Reference Include="Kingdee.BOS.WebApi.ServicesStub, Version=7.3.1150.7, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.WebApi.7.3.2.3\lib\net452\Kingdee.BOS.WebApi.ServicesStub.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.K3.SCM.Business.DynamicForm, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.K3.SCM.Business.DynamicForm.dll</HintPath> |
| | | <Reference Include="Kingdee.BOS.WinForm.KDS20Lib, Version=7.0.104.1, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.2.3\lib\net452\Kingdee.BOS.WinForm.KDS20Lib.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.K3.SCM.Common.BusinessEntity, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.K3.SCM.Common.BusinessEntity.dll</HintPath> |
| | | <Reference Include="Kingdee.K3.Core, Version=7.2.904.6, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.2.3\lib\net452\Kingdee.K3.Core.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.K3.SCM.Credit.Business.PlugIn, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.K3.SCM.Credit.Business.PlugIn.dll</HintPath> |
| | | <Reference Include="Kingdee.K3.Mobile.Business.PlugIn, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.2.3\lib\net452\Kingdee.K3.Mobile.Business.PlugIn.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.K3.SCM.ServiceHelper, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.K3.SCM.ServiceHelper.dll</HintPath> |
| | | <Reference Include="Kingdee.K3.Mobile.SCM.Business.PlugIn, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.2.3\lib\net452\Kingdee.K3.Mobile.SCM.Business.PlugIn.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.K3.SCM.App, Version=7.2.904.6, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.2.3\lib\net452\Kingdee.K3.SCM.App.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.K3.SCM.App.Stock.Report, Version=7.2.904.6, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.2.3\lib\net452\Kingdee.K3.SCM.App.Stock.Report.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.K3.SCM.App.Stock.ServicePlugIn, Version=7.2.904.6, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.2.3\lib\net452\Kingdee.K3.SCM.App.Stock.ServicePlugIn.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.K3.SCM.Business.DynamicForm, Version=7.2.904.6, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.2.3\lib\net452\Kingdee.K3.SCM.Business.DynamicForm.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.K3.SCM.Common.BusinessEntity, Version=7.2.904.6, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.2.3\lib\net452\Kingdee.K3.SCM.Common.BusinessEntity.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.K3.SCM.Credit.Business.PlugIn, Version=7.2.904.6, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.2.3\lib\net452\Kingdee.K3.SCM.Credit.Business.PlugIn.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.K3.SCM.Mobile.Business.PlugIn, Version=7.2.904.6, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.2.3\lib\net452\Kingdee.K3.SCM.Mobile.Business.PlugIn.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.K3.SCM.Mobile.ServiceHelper, Version=7.2.904.6, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.2.3\lib\net452\Kingdee.K3.SCM.Mobile.ServiceHelper.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.K3.SCM.ServiceHelper, Version=7.2.904.6, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.2.3\lib\net452\Kingdee.K3.SCM.ServiceHelper.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\log4net.1.2.10\lib\2.0\log4net.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Microsoft.Office.Interop.Excel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"> |
| | | <HintPath>..\..\..\packages\Microsoft.Office.Interop.Excel.12.0.4518.1014\lib\net20\Microsoft.Office.Interop.Excel.dll</HintPath> |
| | | <EmbedInteropTypes>True</EmbedInteropTypes> |
| | | </Reference> |
| | | <Reference Include="Newtonsoft.Json, Version=4.0.0.0, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Newtonsoft.Json.1.0.0\lib\Newtonsoft.Json.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="NPOI, Version=2.4.1.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL"> |
| | | <SpecificVersion>False</SpecificVersion> |
| | | <HintPath>..\..\..\..\..\办公\K3Cloud\WebSite\bin\NPOI.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="NPOI.OOXML, Version=2.4.1.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL"> |
| | | <SpecificVersion>False</SpecificVersion> |
| | | <HintPath>..\..\..\..\..\办公\K3Cloud\WebSite\bin\NPOI.OOXML.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="NPOI.OpenXml4Net, Version=2.4.1.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL"> |
| | | <SpecificVersion>False</SpecificVersion> |
| | | <HintPath>..\..\..\..\..\办公\K3Cloud\WebSite\bin\NPOI.OpenXml4Net.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="NPOI.OpenXmlFormats, Version=2.4.1.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL"> |
| | | <SpecificVersion>False</SpecificVersion> |
| | | <HintPath>..\..\..\..\..\办公\K3Cloud\WebSite\bin\NPOI.OpenXmlFormats.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="PresentationFramework" /> |
| | | <Reference Include="System" /> |
| | | <Reference Include="System.Core" /> |
| | | <Reference Include="System.Web" /> |
| | | <Reference Include="System.Xml.Linq" /> |
| | | <Reference Include="System.Data.DataSetExtensions" /> |
| | | <Reference Include="Microsoft.CSharp" /> |
| | | <Reference Include="System.Data" /> |
| | | <Reference Include="System.Net.Http" /> |
| | | <Reference Include="System.Xml" /> |
| | | <Reference Include="ZD.Cloud.Logger, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Logger.1.1.0\lib\net40\ZD.Cloud.Logger.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="ZD.Cloud.WebApi, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.WebApi.7.3.2.3\lib\net452\ZD.Cloud.WebApi.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="ZD.Share, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Share.1.0.0\lib\net452\ZD.Share.dll</HintPath> |
| | | </Reference> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <Compile Include="PRD\ProCompleteAnalysisMateriel.cs" /> |
| | | <Compile Include="PRD\ProCompleteAnalysisDetails.cs" /> |
| | | <Compile Include="PRD\Pro_ScDayImport.cs" /> |
| | | <Compile Include="PRD\Pro_WorkBillPlatform.cs" /> |
| | | <Compile Include="PRD\Pro_WorkBillPlatImport.cs" /> |
| | | <Compile Include="Properties\AssemblyInfo.cs" /> |
| | | <Compile Include="SCM\SAL_SaleOrder.cs" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <None Include="app.config" /> |
| | | <None Include="Config\kdapi.config" /> |
| | | <None Include="packages.config" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | |
| | | <Project>{1BD45CA7-DE27-452F-B0AE-AA95AB2B4286}</Project> |
| | | <Name>Demo.DAL</Name> |
| | | </ProjectReference> |
| | | <ProjectReference Include="..\..\Model\Demo.Model\Demo.Model.csproj"> |
| | | <Project>{F79642D8-3172-4655-9FA8-C20151591048}</Project> |
| | | <Name>Demo.Model</Name> |
| | | </ProjectReference> |
| | | <ProjectReference Include="..\Demo.BLL\Demo.BLL.csproj"> |
| | | <Project>{C13E0C61-B1C8-45DD-96F6-3C7DD573C6E4}</Project> |
| | | <Name>Demo.BLL</Name> |
| | | </ProjectReference> |
| | | <ProjectReference Include="..\Demo.TimedTaskPlugIn\Demo.TimedTaskPlugIn.csproj"> |
| | | <Project>{3B5437EE-F19C-4B69-90A4-88866841337B}</Project> |
| | | <Name>Demo.TimedTaskPlugIn</Name> |
| | | </ProjectReference> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <WCFMetadata Include="Connected Services\" /> |
| | | </ItemGroup> |
| | | <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
| | | </Project> |
New file |
| | |
| | | using Kingdee.BOS.App.Data; |
| | | using Kingdee.BOS.Core.DynamicForm; |
| | | using Kingdee.BOS.Core.DynamicForm.PlugIn; |
| | | using Kingdee.BOS.Core.DynamicForm.PlugIn.Args; |
| | | using Kingdee.BOS.Core.Metadata.EntityElement; |
| | | using Kingdee.BOS.Orm.DataEntity; |
| | | using Kingdee.BOS.Util; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Data; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using Kingdee.BOS.ServiceHelper; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace Demo.BillView |
| | | { |
| | | [Description("齐套分析列表功能")] |
| | | [HotUpdate] |
| | | public class ProCompleteAnalysisDetail : AbstractDynamicFormPlugIn |
| | | { |
| | | bool did = false; |
| | | public override void OnLoad(EventArgs e) |
| | | { |
| | | base.OnLoad(e); |
| | | |
| | | if (this.View.OpenParameter.GetCustomParameter("FHMainICMOInterID") == null) |
| | | { |
| | | SearchList(); |
| | | } |
| | | else |
| | | { |
| | | if (did) |
| | | return; |
| | | |
| | | string FHMainICMOInterIDr = this.View.OpenParameter.GetCustomParameter("FHMainICMOInterID").ToString();//主生产订单主内码 |
| | | string FHMainICMOEntryID = this.View.OpenParameter.GetCustomParameter("FHMainICMOEntryID").ToString();// 主生产订单子内码 |
| | | string FHICMOInterID = this.View.OpenParameter.GetCustomParameter("FHICMOInterID").ToString();//日计划订单主内码 |
| | | //string FMatrailId_Id = this.View.OpenParameter.GetCustomParameter("FMatrailId_Id").ToString(); |
| | | |
| | | //string FBillNo = this.View.OpenParameter.GetCustomParameter("FBillNo").ToString(); |
| | | string sql = string.Format(@"/*dialect*/select * from JIT_MOMaterReadysBill where FHMainICMOInterIDr ='{0}' and FHMainICMOEntryID ='{1}' and FHICMOInterID='{2}' ", FHMainICMOInterIDr, FHMainICMOEntryID, FHICMOInterID); |
| | | DataTable dt = DBServiceHelper.ExecuteDataSet(this.Context, sql).Tables[0]; |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | | for (int i = 0; i < dt.Rows.Count; i++) |
| | | { |
| | | /* |
| | | 计划发料数量 = 计划总数量 * 单位用料 |
| | | 齐套数量 = 齐套数 * 单位用料(考虑分层级* 父级) |
| | | 缺料数量 = 1 - 2 |
| | | 是否齐套 = 缺料 < 0 ? |
| | | */ |
| | | decimal FPlanIssueCount = Convert.ToDecimal(dt.Rows[i]["FSumPlanCount"]) * Convert.ToDecimal(dt.Rows[i]["FUNITDOSAGE"]);//计划发料数量 |
| | | decimal FCompleteCount = Convert.ToDecimal(dt.Rows[i]["FCompleteCount"]) * Convert.ToDecimal(dt.Rows[i]["FUNITDOSAGE"]);//齐套数量 |
| | | decimal FLackCount = FPlanIssueCount - FCompleteCount;//缺料数量 |
| | | this.Model.CreateNewEntryRow("FEntity"); |
| | | this.Model.SetValue("FSEQ", i + 1, i);//序号 |
| | | this.Model.SetValue("FMateralDetailId", dt.Rows[i]["FHMATERID"], i); |
| | | this.Model.SetValue("FPlanIssueCount", FPlanIssueCount, i);//计划发料数量 |
| | | this.Model.SetValue("FCompleteCount", FCompleteCount, i);//齐套数量 |
| | | this.Model.SetValue("FLackCount", FLackCount, i);//缺料数量 |
| | | this.Model.SetValue("FPassableCount", dt.Rows[i]["FHLeftQty"].ToString(), i);//可用数量 |
| | | this.Model.SetValue("FMateralCount", dt.Rows[i]["FHLeftQty"].ToString(), i);//物料数量 |
| | | this.Model.SetValue("FCompleteDetailStatus", FLackCount > 0 ? "未齐套" : "齐套", i);//是否齐套 |
| | | this.Model.SetValue("FHMainICMOInterIDr", dt.Rows[i]["FHMainICMOInterIDr"].ToString(), i);//生产订单内码 |
| | | this.Model.SetValue("FPRDBillNo", dt.Rows[i]["FPRDBillNo"].ToString(), i);//生产订单内码 |
| | | } |
| | | } |
| | | |
| | | did = true; |
| | | } |
| | | } |
| | | |
| | | |
| | | public override void BarItemClick(BarItemClickEventArgs e) |
| | | { |
| | | base.BarItemClick(e); |
| | | if (e.BarItemKey.ToUpper() == "TBFILTER") |
| | | { |
| | | SearchList(); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 行双击 跳出齐套分析明细列表 |
| | | /// </summary> |
| | | /// <param name="e"></param> |
| | | public override void EntityRowDoubleClick(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.EntityRowClickEventArgs e) |
| | | { |
| | | var m = e.Row; |
| | | var n = e.Key; |
| | | base.EntityRowClick(e); |
| | | DynamicFormShowParameter formPa = new DynamicFormShowParameter(); |
| | | formPa.FormId = "paez_CompleteAnalysisMateriel"; |
| | | |
| | | /* jsonModel.Add("FHMainICMOInterID", FMainInterID);//主生产订单主内码 |
| | | jsonModel.Add("FHMainICMOEntryID", FMainEntryID);//主生产订单子内码 |
| | | jsonModel.Add("FHICMOInterID", FDayPlanWorkID);//日计划订单主内码 |
| | | current["FMatrailId_Id"].ToString(), current["FHMainSourceInterID"].ToString(), current["FHMainSourceEntryID"].ToString(), current["FDayPlanWorkID"].ToString()) |
| | | |
| | | */ |
| | | |
| | | formPa.CustomParams.Add("FHMainICMOInterIDr", Convert.ToString(this.View.Model.GetValue("FHMainICMOInterIDr", e.Row).ToString())); |
| | | this.View.ShowForm(formPa); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 查询事件 |
| | | /// </summary> |
| | | public void SearchList() |
| | | { |
| | | string sqlwhere = " where 1=1"; |
| | | string sql = @" |
| | | /*dialect*/ |
| | | select * from ( |
| | | select FSumPlanCount*FUNITDOSAGE as FPlanIssueCountS,FCompleteCount*FUNITDOSAGE FCompleteCountS,(FSumPlanCount-FCompleteCount)*FUNITDOSAGE FLackCountS,case when FSumPlanCount>FCompleteCount then '未齐套' else '齐套' end CompleteStatus, |
| | | t2.FBillNo PRDBillNo, |
| | | t1.* from JIT_MOMaterReadysBill T1 |
| | | JOIN T_PRD_MO t2 on t1.FHMainICMOInterIDr=t2.FID |
| | | )AS T |
| | | "; |
| | | |
| | | //物料 |
| | | if ((this.Model.GetValue("FMateralId") as DynamicObject) != null) |
| | | { |
| | | string FMateralId = (this.Model.GetValue("FMateralId") as DynamicObject)["Id"].ToString(); |
| | | if (!string.IsNullOrEmpty(FMateralId)) |
| | | sqlwhere += $" and FHMATERID='{FMateralId}'"; |
| | | } |
| | | |
| | | //齐套 |
| | | string FCompleteStatus = Convert.ToString(this.Model.GetValue("FCompleteStatus")); |
| | | if (!string.IsNullOrEmpty(FCompleteStatus)) |
| | | sqlwhere += $" and CompleteStatus='{FCompleteStatus}'"; |
| | | |
| | | //生产订单号 |
| | | string PRDBillNo = Convert.ToString(this.Model.GetValue("FScOrderNo")); |
| | | if (!string.IsNullOrEmpty(PRDBillNo)) |
| | | sqlwhere += $" and PRDBillNo='{PRDBillNo}'"; |
| | | |
| | | sql += sqlwhere; |
| | | DataTable dt = DBServiceHelper.ExecuteDataSet(this.Context, sql).Tables[0]; |
| | | this.Model.DeleteEntryData("FEntity"); |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | | for (int i = 0; i < dt.Rows.Count; i++) |
| | | { |
| | | decimal FPlanIssueCount = Convert.ToDecimal(dt.Rows[i]["FSumPlanCount"]) * Convert.ToDecimal(dt.Rows[i]["FUNITDOSAGE"]);//计划发料数量 |
| | | decimal FCompleteCount = Convert.ToDecimal(dt.Rows[i]["FCompleteCount"]) * Convert.ToDecimal(dt.Rows[i]["FUNITDOSAGE"]);//齐套数量 |
| | | decimal FLackCount = FPlanIssueCount - FCompleteCount;//缺料数量 |
| | | this.Model.CreateNewEntryRow("FEntity"); |
| | | this.Model.SetValue("FSEQ", i + 1, i);//序号 |
| | | this.Model.SetValue("FMateralDetailId", dt.Rows[i]["FHMATERID"], i); |
| | | this.Model.SetValue("FPlanIssueCount", dt.Rows[i]["FPlanIssueCountS"], i);//计划发料数量 |
| | | this.Model.SetValue("FCompleteCount", dt.Rows[i]["FCompleteCountS"], i);//齐套数量 |
| | | this.Model.SetValue("FLackCount", dt.Rows[i]["FLackCountS"], i);//缺料数量 |
| | | this.Model.SetValue("FPassableCount", dt.Rows[i]["FHLeftQty"].ToString(), i);//可用数量 |
| | | this.Model.SetValue("FMateralCount", dt.Rows[i]["FHLeftQty"].ToString(), i);//物料数量 |
| | | this.Model.SetValue("FCompleteDetailStatus", dt.Rows[i]["CompleteStatus"].ToString(), i);//是否齐套 |
| | | this.Model.SetValue("FHMainICMOInterIDr", dt.Rows[i]["FHMainICMOInterIDr"].ToString(), i);//生产订单内码 |
| | | this.Model.SetValue("FPRDBillNo", dt.Rows[i]["FPRDBillNo"].ToString(), i);//生产订单内码 |
| | | } |
| | | } |
| | | this.View.UpdateView(); |
| | | |
| | | did = true; |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | using Kingdee.BOS.App.Data; |
| | | using Kingdee.BOS.Core.DynamicForm; |
| | | using Kingdee.BOS.Core.DynamicForm.PlugIn; |
| | | using Kingdee.BOS.Core.Metadata.EntityElement; |
| | | using Kingdee.BOS.Orm.DataEntity; |
| | | using Kingdee.BOS.Util; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Data; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace Demo.BillView |
| | | { |
| | | [Description("齐套分析物料明细")] |
| | | [HotUpdate] |
| | | public class ProCompleteAnalysisMateriel : AbstractDynamicFormPlugIn |
| | | { |
| | | public override void OnLoad(EventArgs e) |
| | | { |
| | | base.OnLoad(e); |
| | | |
| | | string FHMainICMOInterIDr = this.View.OpenParameter.GetCustomParameter("FHMainICMOInterIDr").ToString();//主生产订单主内码 |
| | | //string FBillNo = this.View.OpenParameter.GetCustomParameter("FBillNo").ToString(); |
| | | string sql = string.Format(@"/*dialect*/select a.*,b.FBILLNO FBILLNOs from JIT_MOMaterReadysBill a |
| | | left join T_PRD_MO b on a.FHMainICMOInterIDr=b.FID |
| | | where FHMainICMOInterIDr ='{0}' ", FHMainICMOInterIDr); |
| | | DataTable dt = DBUtils.ExecuteDataSet(this.Context, sql).Tables[0]; |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | | for (int i = 0; i < dt.Rows.Count; i++) |
| | | { |
| | | /* |
| | | 计划发料数量 = 计划总数量 * 单位用料 |
| | | 齐套数量 = 齐套数 * 单位用料(考虑分层级* 父级) |
| | | 缺料数量 = 1 - 2 |
| | | 是否齐套 = 缺料 < 0 ? |
| | | */ |
| | | decimal FPlanIssueCount = Convert.ToDecimal(dt.Rows[i]["FSumPlanCount"]) * Convert.ToDecimal(dt.Rows[i]["FUNITDOSAGE"]);//计划发料数量 |
| | | decimal FCompleteCount = Convert.ToDecimal(dt.Rows[i]["FCompleteCount"]) * Convert.ToDecimal(dt.Rows[i]["FUNITDOSAGE"]);//齐套数量 |
| | | |
| | | decimal FLackCount = FPlanIssueCount - FCompleteCount;//缺料数量 |
| | | this.Model.CreateNewEntryRow("FEntity"); |
| | | this.Model.SetValue("FSEQ", i + 1, i);//序号 |
| | | this.Model.SetValue("FMateralDetailId", dt.Rows[i]["FHMATERID"], i); |
| | | this.Model.SetValue("FScOrderNoDetail", dt.Rows[i]["FBILLNOs"], i);//生产订单号 |
| | | this.Model.SetValue("FOccupyCount", FCompleteCount, i);// |
| | | this.Model.SetValue("FCurrentCount", dt.Rows[i]["FHStockQty"], i);//当前库存情况 |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | using Kingdee.BOS.Core.DynamicForm.PlugIn; |
| | | using Kingdee.BOS.Core.DynamicForm.PlugIn.Args; |
| | | using Kingdee.BOS.Core.Metadata.EntityElement; |
| | | using Kingdee.BOS.JSON; |
| | | using Kingdee.BOS.Orm.DataEntity; |
| | | using Kingdee.BOS.ServiceHelper.Excel; |
| | | using Kingdee.BOS.Util; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Data; |
| | | using Newtonsoft.Json.Linq; |
| | | using Kingdee.BOS.WebApi.Client; |
| | | using ZD.Cloud.WebApi; |
| | | using Kingdee.BOS.Core; |
| | | using Kingdee.BOS.Core.DynamicForm; |
| | | using Kingdee.BOS.KDThread; |
| | | using Kingdee.BOS.ServiceHelper; |
| | | using Demo.TimedTaskPlugIn.PRD; |
| | | using ZD.Cloud.Logger; |
| | | |
| | | namespace Demo.BillView.PRD |
| | | { |
| | | |
| | | [Description("生产日计划导入")] |
| | | [HotUpdate] |
| | | public class Pro_ScDayImport : AbstractDynamicFormPlugIn |
| | | { |
| | | |
| | | |
| | | |
| | | private string fileFullPath = string.Empty; |
| | | |
| | | //public override void BarItemClick(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.BarItemClickEventArgs e) |
| | | //{ |
| | | // base.BarItemClick(e); |
| | | // if (e.BarItemKey.ToUpper().Equals("TBIMPORT")) |
| | | // { |
| | | // } |
| | | |
| | | // if (e.BarItemKey.ToUpper().Equals("TBWJSC")) |
| | | // { |
| | | // //Control updateControl = this.View.GetControl("fileFullPath"); |
| | | // //// 上传地址 |
| | | // //string uploadUrl = "FileUpLoadServices/FileService.svc/upload2attachment/"; |
| | | // //updateControl.SetCustomPropertyValue("ExtandUrl", uploadUrl); |
| | | // //// 下载地址 |
| | | // //string downloadUrl = "FileUpLoadServices/download.aspx"; |
| | | // //updateControl.SetCustomPropertyValue("ExDownLoadUrl", downloadUrl); |
| | | |
| | | // ImportData(fileFullPath); |
| | | // } |
| | | |
| | | //} |
| | | |
| | | |
| | | public override void AfterBarItemClick(AfterBarItemClickEventArgs e) |
| | | { |
| | | base.AfterBarItemClick(e); |
| | | if (e.BarItemKey.ToUpper().Equals("TBIMPORT")) |
| | | { |
| | | ImportData(); |
| | | } |
| | | |
| | | if (e.BarItemKey.ToUpper().Equals("TBWJSC")) |
| | | { |
| | | //Control updateControl = this.View.GetControl("fileFullPath"); |
| | | //// 上传地址 |
| | | //string uploadUrl = "FileUpLoadServices/FileService.svc/upload2attachment/"; |
| | | //updateControl.SetCustomPropertyValue("ExtandUrl", uploadUrl); |
| | | //// 下载地址 |
| | | //string downloadUrl = "FileUpLoadServices/download.aspx"; |
| | | //updateControl.SetCustomPropertyValue("ExDownLoadUrl", downloadUrl); |
| | | |
| | | ImportDataSC(fileFullPath); |
| | | } |
| | | } |
| | | public override void CustomEvents(CustomEventsArgs e) |
| | | { |
| | | //触发事件是上传文件有变化 |
| | | if (e.EventName.ToUpper() == "FILECHANGED") |
| | | { |
| | | JSONObject jSONObject = KDObjectConverter.DeserializeObject<JSONObject>(e.EventArgs); |
| | | if (jSONObject != null) |
| | | { |
| | | JSONArray jSONArray = new JSONArray(jSONObject["NewValue"].ToString()); |
| | | if (jSONArray.Count > 0) |
| | | { |
| | | //获取上传的文件名 |
| | | string text = (jSONArray[0] as Dictionary<string, object>)["ServerFileName"].ToString(); |
| | | //文件上传到服务端的临时目录 |
| | | string directory = "FileUpLoadServices\\UploadFiles"; |
| | | //文件的完整路径 |
| | | fileFullPath = PathUtils.GetPhysicalPath(directory, text); |
| | | } |
| | | } |
| | | } |
| | | base.CustomEvents(e); |
| | | } |
| | | private void ImportDataSC(string fileFullPath) |
| | | { |
| | | using (ExcelOperation helper = new ExcelOperation(this.View)) |
| | | { |
| | | if (!string.IsNullOrEmpty(fileFullPath)) |
| | | { |
| | | DataSet ds = helper.ReadFromFile(fileFullPath, 1); |
| | | DataTable dt = ds.Tables[0]; |
| | | |
| | | DateTime date = Convert.ToDateTime(this.Model.GetValue("F_Paez_Date")); |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | | //Entity entity = this.View.BillBusinessInfo.GetEntity("FEntity"); |
| | | //DynamicObjectCollection rows = this.Model.GetEntityDataObject(entity); |
| | | |
| | | |
| | | for (int i = 0; i < dt.Rows.Count; i++) |
| | | { |
| | | //DynamicObject row = new DynamicObject(entity.DynamicObjectType); |
| | | this.Model.CreateNewEntryRow("FEntity"); |
| | | this.Model.SetValue("FSEQ", i + 1, i); |
| | | this.Model.SetValue("FSalOrderNo", dt.Rows[i][0].ToString(), i); |
| | | this.Model.SetValue("FSCOrderNo", dt.Rows[i][1].ToString(), i); |
| | | this.Model.SetItemValueByNumber("FORGID", dt.Rows[i][2].ToString(), i); |
| | | this.Model.SetItemValueByNumber("FProductWorkShopId", dt.Rows[i][3].ToString(), i); |
| | | this.Model.SetItemValueByNumber("FResourcesId", dt.Rows[i][4].ToString(), i); |
| | | // this.Model.SetValue("FMatrailId", dt.Rows[i][5].ToString(), i); |
| | | this.Model.SetItemValueByNumber("FMatrailId", dt.Rows[i][5].ToString(), i); |
| | | this.Model.SetValue("FMatrailName", dt.Rows[i][6].ToString(), i); |
| | | this.Model.SetValue("FModel", dt.Rows[i][7].ToString(), i); |
| | | this.Model.SetValue("FUnit", dt.Rows[i][8].ToString(), i); |
| | | this.Model.SetValue("FBatch", dt.Rows[i][9].ToString(), i); |
| | | this.Model.SetValue("FSalOrderCount", dt.Rows[i][10].ToString(), i); |
| | | this.Model.SetValue("FProOrderCount", dt.Rows[i][11].ToString(), i); |
| | | this.Model.SetValue("FCompleteSetCount", dt.Rows[i][12].ToString(), i); |
| | | this.Model.SetValue("FDeliveryDate", GetDateTime(Convert.ToInt32(dt.Rows[i][13].ToString())), i); |
| | | this.Model.SetValue("FOrderLevel", dt.Rows[i][14].ToString(), i); |
| | | for (int j = 0; j <= 60; j++) |
| | | { |
| | | this.Model.SetValue("FT" + "" + j + "", dt.Rows[i][15 + j].ToString(), i); |
| | | } |
| | | |
| | | //entity.SeqDynamicProperty.SetValue(row, i + 1);//序号 |
| | | //row["FSalOrderNo"] = dt.Rows[i][0].ToString();//销售订单号 |
| | | //row["FSCOrderNo"] = dt.Rows[i][1].ToString();//生产订单号 |
| | | //row["FORGID"] = Convert.ToInt32(dt.Rows[i][2].ToString());//生产组织 |
| | | //row["FProductWorkShopId"] = Convert.ToInt32(dt.Rows[i][3].ToString());//生产车间 |
| | | //row["FResourcesId"] = Convert.ToInt32(dt.Rows[i][4].ToString());//生产资源 |
| | | //row["FMatrailId"] = dt.Rows[i][5].ToString(); //产品代码 |
| | | //row["FMatrailName"] = dt.Rows[i][6].ToString(); //产品名称 |
| | | //row["FModel"] = dt.Rows[i][7].ToString(); //规格型号 |
| | | //row["FUnit"] = dt.Rows[i][8].ToString(); //计量单位 |
| | | //row["FBatch"] = dt.Rows[i][9].ToString(); //批次号 |
| | | //row["FSalOrderCount"] = dt.Rows[i][10].ToString(); //销售订单数量 |
| | | //row["FProOrderCount"] = dt.Rows[i][11].ToString(); //生产订单数量 |
| | | //row["FCompleteSetCount"] = dt.Rows[i][12].ToString(); //总齐套数量 |
| | | //row["FDeliveryDate"] = GetDateTime(Convert.ToInt32(dt.Rows[i][13].ToString())); //交货日期 |
| | | //row["FOrderLevel"] = dt.Rows[i][14].ToString(); //订单等级 |
| | | //for (int j = 0; j <= 60; j++) |
| | | //{ |
| | | // row["FT" + "" + j + ""] = dt.Rows[i][15 + j].ToString(); |
| | | //} |
| | | //this.View.GetControl("FSalOrderNo").Text = "入库单号"; |
| | | //this.View.GetControl("FSCOrderNo").Text = "采购入库数量"; |
| | | // rows.Add(row); |
| | | } |
| | | } |
| | | |
| | | this.View.UpdateView(); |
| | | |
| | | for (int j = 0; j <= 60; j++) |
| | | { |
| | | this.View.GetControl("FT" + "" + j + "").Text = date.AddDays(j).ToShortDateString(); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | this.View.GetMainBarItem("TBWJSC").Enabled = false; //锁定按钮 |
| | | |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 时间戳Timestamp转换成日期 |
| | | /// </summary> |
| | | /// <param name="timeStamp"></param> |
| | | /// <returns></returns> |
| | | private DateTime GetDateTime(int timeStamp) |
| | | { |
| | | DateTime dtStart = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1)); |
| | | long lTime = ((long)timeStamp * 10000000); |
| | | TimeSpan toNow = new TimeSpan(lTime); |
| | | DateTime targetDt = dtStart.Add(toNow); |
| | | return targetDt; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 导入功能 |
| | | /// </summary> |
| | | private void ImportData() |
| | | { |
| | | try |
| | | { |
| | | string sql; |
| | | DateTime date = Convert.ToDateTime(this.Model.GetValue("F_Paez_Date")); |
| | | //获取单据体信息 |
| | | Entity entity = this.View.BillBusinessInfo.GetEntity("FEntity"); |
| | | //单据体信息转换为列表集合 |
| | | DynamicObjectCollection entityDataObjoct = this.View.Model.GetEntityDataObject(entity); |
| | | |
| | | foreach (DynamicObject current in entityDataObjoct) |
| | | { |
| | | if (string.IsNullOrEmpty(Convert.ToString(current["FSalOrderNo"])) || string.IsNullOrEmpty(Convert.ToString(current["FSCOrderNo"]))) |
| | | continue; |
| | | |
| | | //根据生产订单号和物料查询是否存在明细 |
| | | sql = string.Format(@"/*dialect*/SELECT T1.FBILLNO,T2.* FROM T_PRD_MO T1 |
| | | LEFT JOIN T_PRD_MOENTRY T2 ON T1.FID = T2.FID |
| | | WHERE T1.FBILLNO = '{0}' ", Convert.ToString(current["FSCOrderNo"])); |
| | | DataTable dt = new DataTable(); |
| | | dt = DBServiceHelper.ExecuteDataSet(Context, sql).Tables[0]; |
| | | |
| | | string FID = "";//FID 源单主内码 |
| | | string FENTRYID = "";//FENTRYID 源单子内码 |
| | | string FLOT = "";//FLOT 批次 |
| | | string FQTY = "";//FQTY 生产订单数量 |
| | | string FBILLNO = "";//FBILLNO 原单号 |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | | FID = dt.Rows[0]["FID"].ToString(); |
| | | FENTRYID = dt.Rows[0]["FENTRYID"].ToString(); |
| | | FLOT = dt.Rows[0]["FLOT"].ToString(); |
| | | FQTY = dt.Rows[0]["FQTY"].ToString(); |
| | | FBILLNO = dt.Rows[0]["FBILLNO"].ToString(); |
| | | } |
| | | |
| | | |
| | | JObject jsonRoot = new JObject(); |
| | | jsonRoot.Add("Creator", ""); |
| | | jsonRoot.Add("NeedUpDateFields", new JArray()); |
| | | jsonRoot.Add("NeedReturnFields", new JArray()); |
| | | jsonRoot.Add("IsDeleteEntry", "true"); |
| | | jsonRoot.Add("SubSystemId", ""); |
| | | jsonRoot.Add("IsVerifyBaseDataField", ""); |
| | | |
| | | JObject jsonModel = new JObject(); |
| | | jsonModel.Add("FPreparatDate", date.ToString());//编制日期 |
| | | jsonModel.Add("FSCOrderNo", current["FSCOrderNo"].ToString()); //生产订单号FSCOrderNo |
| | | jsonModel.Add("FHSeOrderBillNo", current["FSalOrderNo"].ToString());//销售订单号 |
| | | jsonModel.Add("FHOrderLev", current["FOrderLevel"].ToString());//订单等级 |
| | | jsonModel.Add("FSalOrderCount", current["FOrderLevel"].ToString());//销售订单数量 |
| | | jsonModel.Add("FHOrderCommitDate", current["FDeliveryDate"].ToString());//交货期HOrderCommitDate |
| | | //jsonModel.Add("FBatch", current["FBatch"].ToString());//批次 |
| | | jsonModel.Add("FBatch", FLOT);//批次 |
| | | jsonModel.Add("FHOrderNeedQty", FQTY);// 订单需求数量 |
| | | jsonModel.Add("FPrdBillNo", FBILLNO); ;//源单编号 |
| | | jsonModel.Add("FPRDMOMAINID", FID); ;//源单主内码 |
| | | jsonModel.Add("FPRDMOENTYID", FENTRYID); ;//源单子内码 |
| | | |
| | | |
| | | JObject jsonFHMaterID = new JObject(); |
| | | jsonFHMaterID.Add("FNumber", (current["FMatrailId"] as DynamicObject)["Number"].ToString()); |
| | | jsonModel.Add("FHMaterID", jsonFHMaterID);//FHMaterID 物料 |
| | | |
| | | JObject jsonFHPRDORGID = new JObject(); |
| | | jsonFHPRDORGID.Add("FNumber", (current["FORGID"] as DynamicObject)["Number"].ToString()); |
| | | jsonModel.Add("FHPRDORGID", jsonFHPRDORGID);//FHMaterID 生产组织 |
| | | |
| | | //JObject jsonFProductWorkShopId = new JObject(); |
| | | //jsonFProductWorkShopId.Add("FNumber", (current["FProductWorkShopId"] as DynamicObject)["Number"].ToString()); |
| | | //jsonModel.Add("FHWorkShopID", jsonFProductWorkShopId);//FHMaterID 生产车间 |
| | | |
| | | //JObject jsonFResourcesId = new JObject(); |
| | | //jsonFHMaterID.Add("FNumber", (current["FResourcesId"] as DynamicObject)["Number"].ToString()); |
| | | //jsonModel.Add("FHSourceID", jsonFResourcesId);//FHMaterID 生产资源 |
| | | |
| | | JArray Entry = new JArray(); |
| | | for (int i = 0; i <= 60; i++) |
| | | { |
| | | JObject jsonFPOOrderEntry = new JObject(); |
| | | |
| | | jsonFPOOrderEntry.Add("FHMasterDate", date.AddDays(i).ToShortDateString()); ;//主日期 |
| | | jsonFPOOrderEntry.Add("FHQty ", Convert.ToString(current["FT" + "" + i + ""])); ;//日计划数量 |
| | | jsonFPOOrderEntry.Add("FColumn", "FT" + "" + i + ""); ;//对应的列头 |
| | | //jsonFPOOrderEntry.Add("FHMainSourceBillType ", "生产订单"); ;//源单类型 |
| | | //jsonFPOOrderEntry.Add("FHMainSourceBillNo", FBILLNO); ;//源单编号 |
| | | //jsonFPOOrderEntry.Add("FHMainSourceInterID", FID); ;//源单主内码 |
| | | //jsonFPOOrderEntry.Add("FHMainSourceEntryID", FENTRYID); ;//源单子内码 |
| | | |
| | | Entry.Add(jsonFPOOrderEntry); |
| | | } |
| | | |
| | | jsonModel.Add("FEntity", Entry); |
| | | jsonRoot.Add("Model", jsonModel); |
| | | |
| | | |
| | | CloudClient cloudClient = new CloudClient("http://localhost/K3Cloud/"); |
| | | var result = cloudClient.Save("Paez_Sc_WorkBillAutoSortBill", jsonRoot.ToString()); |
| | | JObject saveObj = JObject.Parse(result); |
| | | string saveIsSuc = saveObj["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper(); |
| | | |
| | | if (saveIsSuc == "TRUE") |
| | | { |
| | | this.View.ShowMessage("导入成功"); |
| | | |
| | | } |
| | | else |
| | | { |
| | | this.View.ShowErrMessage("导入失败"); |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | |
| | | this.View.ShowErrMessage(ex.ToString()); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | using Kingdee.BOS.Core.Bill.PlugIn; |
| | | using Kingdee.BOS.Core.DynamicForm; |
| | | using Kingdee.BOS.Core.DynamicForm.PlugIn; |
| | | using Kingdee.BOS.Orm.DataEntity; |
| | | using Kingdee.BOS.Util; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace Demo.BillView.PRD |
| | | { |
| | | [Description("生产计划平台导入跳转插件")] |
| | | [HotUpdate] |
| | | public class Pro_WorkBillPlatImport : AbstractDynamicFormPlugIn |
| | | { |
| | | public override void BarItemClick(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.BarItemClickEventArgs e) |
| | | { |
| | | base.BarItemClick(e); |
| | | if (e.BarItemKey.Equals("btImport")) |
| | | { |
| | | DynamicFormShowParameter formPa = new DynamicFormShowParameter(); |
| | | formPa.FormId = "Paez_ScDayImport"; |
| | | this.View.ShowForm(formPa); |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | using Demo.Model.Model; |
| | | using Demo.Model.Model.PODemandPlan; |
| | | using K3Cloud.Extend.Utils; |
| | | using Kingdee.BOS.App.Data; |
| | | using Kingdee.BOS.Core; |
| | | using Kingdee.BOS.Core.Bill.PlugIn; |
| | | using Kingdee.BOS.Core.Const; |
| | | using Kingdee.BOS.Core.DynamicForm; |
| | | using Kingdee.BOS.Core.DynamicForm.PlugIn; |
| | | using Kingdee.BOS.Core.DynamicForm.PlugIn.Args; |
| | | using Kingdee.BOS.Core.DynamicForm.PlugIn.ControlModel; |
| | | using Kingdee.BOS.Core.Metadata; |
| | | using Kingdee.BOS.Core.Metadata.EntityElement; |
| | | using Kingdee.BOS.JSON; |
| | | using Kingdee.BOS.KDThread; |
| | | using Kingdee.BOS.Orm.DataEntity; |
| | | using Kingdee.BOS.ServiceHelper; |
| | | using Kingdee.BOS.ServiceHelper.FileServer; |
| | | using Kingdee.BOS.Util; |
| | | using Newtonsoft.Json.Linq; |
| | | using NPOI.HSSF.UserModel; |
| | | using NPOI.SS.Formula.Functions; |
| | | using NPOI.SS.UserModel; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Data; |
| | | using System.IO; |
| | | using System.Linq; |
| | | using System.Runtime.CompilerServices; |
| | | using System.Runtime.InteropServices; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.Web; |
| | | using System.Windows.Documents; |
| | | using ZD.Cloud.Logger; |
| | | using ZD.Cloud.WebApi; |
| | | using ZD.Share.Common; |
| | | |
| | | namespace Demo.DynamicForm.PRD |
| | | { |
| | | [Description("生产计划平台按钮功能")] |
| | | [HotUpdate] |
| | | public class Pro_WorkBillPlatform : AbstractDynamicFormPlugIn |
| | | { |
| | | string _OutServicePath = ""; |
| | | string PathName = "日计划导入模板.xlsx"; |
| | | List<PRD_Inventory> ListInventory; |
| | | |
| | | public override void BarItemClick(BarItemClickEventArgs e) |
| | | { |
| | | base.BarItemClick(e); |
| | | try |
| | | { |
| | | if (e.BarItemKey.ToUpper() == "BTEXPORT") |
| | | { |
| | | ExportExcel(); |
| | | //this.View.ShowMessage("测试啦"); |
| | | |
| | | |
| | | string path = PathUtils.GetServerPath(KeyConst.TEMPFILEPATH, PathName); |
| | | |
| | | DynamicFormShowParameter dynamicForm = new DynamicFormShowParameter(); |
| | | dynamicForm.FormId = "BOS_FileDownLoad"; |
| | | dynamicForm.OpenStyle.ShowType = ShowType.Modal; |
| | | dynamicForm.CustomParams.Add("IsExportData", "true"); |
| | | dynamicForm.CustomParams.Add("url", path); |
| | | |
| | | this.View.ShowForm(dynamicForm); |
| | | |
| | | |
| | | //ShowDownload(); |
| | | |
| | | } |
| | | |
| | | if (e.BarItemKey.ToUpper() == "TBSEARCH") |
| | | { |
| | | SearchList222(); |
| | | } |
| | | |
| | | if (e.BarItemKey.ToUpper() == "TBLOCK") |
| | | { |
| | | Lock(); |
| | | } |
| | | |
| | | if (e.BarItemKey.ToUpper() == "BTNSAVE") |
| | | { |
| | | Save(); |
| | | } |
| | | |
| | | if (e.BarItemKey.ToUpper() == "TBCOMPLETE") |
| | | { |
| | | COMPLETEMAIN(); |
| | | // COMPLETE(); |
| | | } |
| | | //提料计划 |
| | | if (e.BarItemKey.ToUpper() == "TBEXTRACTION") |
| | | { |
| | | Extraction3(); |
| | | } |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | this.View.ShowErrMessage(ex.Message.ToString()); |
| | | } |
| | | } |
| | | public override void EntryBarItemClick(BarItemClickEventArgs e) |
| | | { |
| | | base.EntryBarItemClick(e); |
| | | |
| | | if (e.BarItemKey.ToUpper() == "TBEDIT") |
| | | { |
| | | SearchList222(); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 行双击 跳出齐套分析明细列表 |
| | | /// </summary> |
| | | /// <param name="e"></param> |
| | | public override void EntityRowDoubleClick(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.EntityRowClickEventArgs e) |
| | | { |
| | | var m = e.Row; |
| | | var n = e.Key; |
| | | base.EntityRowClick(e); |
| | | DynamicFormShowParameter formPa = new DynamicFormShowParameter(); |
| | | formPa.FormId = "paez_CompleteAnalysisDetail"; |
| | | |
| | | /* jsonModel.Add("FHMainICMOInterID", FMainInterID);//主生产订单主内码 |
| | | jsonModel.Add("FHMainICMOEntryID", FMainEntryID);//主生产订单子内码 |
| | | jsonModel.Add("FHICMOInterID", FDayPlanWorkID);//日计划订单主内码 |
| | | current["FMatrailId_Id"].ToString(), current["FHMainSourceInterID"].ToString(), current["FHMainSourceEntryID"].ToString(), current["FDayPlanWorkID"].ToString()) |
| | | |
| | | */ |
| | | |
| | | formPa.CustomParams.Add("FHMainICMOInterID", Convert.ToString(this.View.Model.GetValue("FHMainSourceInterID", e.Row).ToString())); |
| | | formPa.CustomParams.Add("FHMainICMOEntryID", Convert.ToString(this.View.Model.GetValue("FHMainSourceEntryID", e.Row).ToString())); |
| | | formPa.CustomParams.Add("FHICMOInterID", Convert.ToString(this.View.Model.GetValue("FDayPlanWorkID", e.Row).ToString())); |
| | | formPa.CustomParams.Add("FMatrailId_Id", Convert.ToString((this.View.Model.GetValue("FMatrailId", e.Row) as DynamicObject)["Id"].ToString())); |
| | | this.View.ShowForm(formPa); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 导出数据到Excel |
| | | /// </summary> |
| | | public void ExportExcel() |
| | | { |
| | | string[] Title = new string[] {"销售订单号", "生产订单号", "生产组织", "生产车间", "生产资源", "产品代码", "产品名称", "规格型号", "计量单位", |
| | | "批次号","销售订单数量","生产订单数量","总齐套数量","交货日期","订单等级","T0","T1","T2","T3","T4","T5","T6","T7", |
| | | "T8","T9","T10","T11","T12","T13","T14","T15","T16","T17", |
| | | "T18","T19","T20","T21","T22","T23","T24","T25","T26","T27","T28","T29", |
| | | "T30","T31","T32","T33","T34","T35","T36","T37","T38","T39","T40","T41","T42", |
| | | "T43","T44","T45","T46","T47","T48","T49","T50","T51","T52","T53","T54","T55","T56","T57","T58","T59","T60"}; |
| | | |
| | | string sheetname = "日计划导入模板.xlsx"; |
| | | string file = ""; |
| | | file = @"D:\办公\K3Cloud\WebSite\TempfilePath\" + sheetname; |
| | | |
| | | //@"D:\办公\K3Cloud\WebSite\"; |
| | | //通过Directory类的CreateDirectory方法创建。 |
| | | string activeDir = AppDomain.CurrentDomain.BaseDirectory; |
| | | string newPath = System.IO.Path.Combine(activeDir, "TempfilePath"); |
| | | System.IO.Directory.CreateDirectory(newPath); |
| | | |
| | | file = newPath + "\\" + sheetname; |
| | | //Server.MapPath("/"); |
| | | DataTable dt = null; |
| | | HSSFWorkbook xssfworkbook = new HSSFWorkbook();//建立Excel2003对象 |
| | | HSSFSheet sheet = (HSSFSheet)xssfworkbook.CreateSheet(sheetname);//新建一个名称为sheetname的工作簿 |
| | | |
| | | |
| | | |
| | | //设置基本样式 |
| | | ICellStyle style = xssfworkbook.CreateCellStyle(); |
| | | style.WrapText = true; |
| | | IFont font = xssfworkbook.CreateFont(); |
| | | font.FontHeightInPoints = 9; |
| | | font.FontName = "Arial"; |
| | | style.SetFont(font); |
| | | |
| | | //设置统计样式 |
| | | ICellStyle style1 = xssfworkbook.CreateCellStyle(); |
| | | style1.WrapText = true; |
| | | IFont font1 = xssfworkbook.CreateFont(); |
| | | font1.FontHeightInPoints = 9; |
| | | font1.Boldweight = (short)NPOI.SS.UserModel.FontBoldWeight.Bold; |
| | | font1.FontName = "Arial"; |
| | | style1.SetFont(font1); |
| | | |
| | | //设置大类样式 |
| | | ICellStyle style2 = xssfworkbook.CreateCellStyle(); |
| | | style2.WrapText = true; |
| | | //style2.FillBackgroundColor = NPOI.HSSF.Util.HSSFColor.Gold.Index; |
| | | //style2.FillPattern = FillPattern.SolidForeground; |
| | | IFont font2 = xssfworkbook.CreateFont(); |
| | | font2.FontHeightInPoints = 9; |
| | | font2.Boldweight = (short)NPOI.SS.UserModel.FontBoldWeight.Bold; |
| | | font2.FontName = "Arial"; |
| | | style2.SetFont(font2); |
| | | |
| | | //设置列名 |
| | | HSSFRow row = (HSSFRow)sheet.CreateRow(0); |
| | | for (int i = 0; i < Title.Length; i++) |
| | | { |
| | | ICell cell = (ICell)row.CreateCell(i); |
| | | var rowName = Title[i]; |
| | | cell.SetCellValue(rowName); |
| | | cell.CellStyle = style; |
| | | } |
| | | |
| | | //单元格赋值 |
| | | //列宽自适应,只对英文和数字有效 |
| | | for (int i = 0; i <= Title.Length; i++) |
| | | { |
| | | sheet.AutoSizeColumn(i); |
| | | } |
| | | using (System.IO.Stream stream = System.IO.File.OpenWrite(file)) |
| | | { |
| | | xssfworkbook.Write(stream); |
| | | stream.Close(); |
| | | _OutServicePath = file; |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | private string _fileId = string.Empty; |
| | | /// <summary> |
| | | /// 弹出下载提示窗,下载文件至客户端本地。 |
| | | /// </summary> |
| | | public void ShowDownload() |
| | | { |
| | | |
| | | _fileId = "2000avbbb"; |
| | | string url = FileServerHelper.GetAppSiteOuterNetUrl(this.Context, HttpContext.Current.Request); |
| | | //fileId文件编码可由 T_BAS_ATTACHMENT 附件明细表查得,此处直接拿上面上传文件的编码来做示例。 |
| | | string fileurl = string.Format("{0}FileUpLoadServices/download.aspx?fileId={1}&token={2}", |
| | | url, _fileId, this.Context.UserToken); |
| | | |
| | | JSONObject jObject = new JSONObject(); |
| | | jObject.Put("url", HttpUtility.UrlEncode(fileurl)); |
| | | jObject.Put("title", "文件下载"); |
| | | jObject.Put("desc", "请点击打开附件:"); |
| | | jObject.Put("urltitle", "这是文件名"); |
| | | this.View.AddAction(JSAction.openUrlWindow, new JSONArray { jObject }); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 锁定 |
| | | /// </summary> |
| | | public void Lock() |
| | | { |
| | | int day = Convert.ToInt32(this.Model.GetValue("FLockDays")); |
| | | |
| | | string sqlwhere = " and 1=1"; |
| | | string FSalOrder = Convert.ToString((this.Model.GetValue("FSalOrder"))); |
| | | if (string.IsNullOrEmpty(FSalOrder)) |
| | | { |
| | | |
| | | } |
| | | else |
| | | sqlwhere += $" and FHSeOrderBillNo='{FSalOrder}'"; |
| | | |
| | | string sql = $"/*dialect*/update t1 set t1.FHLockedSub=1 from Sc_WorkBillSortBillSub t1 join Sc_WorkBillSortBillMain t2 on t1.FID = t2.FID where FHMASTERDATE between DATEADD(day,-1,getdate()) and DATEADD(day,{day - 1},getdate()) " + sqlwhere; |
| | | |
| | | int result = DBUtils.Execute(Context, sql); |
| | | if (result > 0) |
| | | { |
| | | SearchList222(); |
| | | this.View.ShowMessage("操作成功"); |
| | | } |
| | | else |
| | | this.View.ShowMessage("操作失败,联系管理员!"); |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 保存功能 |
| | | /// </summary> |
| | | public void Save() |
| | | { |
| | | |
| | | List<string> sqlList = new List<string>(); |
| | | string sql; |
| | | //获取单据体信息 |
| | | Entity entity = this.View.BillBusinessInfo.GetEntity("FEntity"); |
| | | //单据体信息转换为列表集合 |
| | | DynamicObjectCollection entityDataObjoct = this.View.Model.GetEntityDataObject(entity); |
| | | DateTime date = DateTime.Now; |
| | | |
| | | foreach (DynamicObject current in entityDataObjoct) |
| | | { |
| | | for (int i = 0; i <= 60; i++) |
| | | { |
| | | sql = $"/*dialect*/update t1 set FHQTY='{Convert.ToString(current["FT" + "" + i + ""])}' from Sc_WorkBillSortBillSub t1 join " + |
| | | $" Sc_WorkBillSortBillMain t2 on t1.FID = t2.FID where FHMASTERDATE='{date.AddDays(i).ToShortDateString()}' and t2.FID='{Convert.ToString(current["FDayPlanWorkID"])}'"; |
| | | sqlList.Add(sql); |
| | | } |
| | | |
| | | } |
| | | |
| | | int result = DBServiceHelper.ExecuteBatch(Context, sqlList); |
| | | if (result > 0) |
| | | { |
| | | this.View.ShowMessage("操作成功"); |
| | | SearchList222(); |
| | | } |
| | | else |
| | | this.View.ShowMessage("操作失败,联系管理员!"); |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 齐套分析 |
| | | /// </summary> |
| | | /// |
| | | private void COMPLETE() |
| | | { |
| | | |
| | | // 显示一个进度显示界面:显示一个不停滚动的模拟进度 |
| | | |
| | | // bUseTruePro参数:是否显示真实的进度。 |
| | | // bUseTruePro = false : |
| | | // 显示一个不停滚动的模拟进度,与实际处理进度没有关联。 |
| | | // 此方案优点:实际处理代码无需计算进度 |
| | | // 此方案缺点:进度不准确,且进度页面不会自动关闭。 |
| | | |
| | | |
| | | // bUseTruePro = true: 进度界面显示真实进度 |
| | | // 此方案优点:进度真实 |
| | | // 此方案缺点:需要在处理代码中,不断的更新真实进度,更新语句 |
| | | // this.View.Session["ProcessRateValue"] = 100; |
| | | // 特别说明,当进度更新到100时,进度界面会自动关闭 |
| | | // 本案例选用此方案 |
| | | var processForm = this.View.ShowProcessForm( |
| | | new Action<FormResult>(t => { }), |
| | | true, |
| | | "正在生成,请稍候..."); |
| | | |
| | | // 开启一个异步线程,处理引入功能 |
| | | // using Kingdee.BOS.KDThread; |
| | | MainWorker.QuequeTask(() => |
| | | { |
| | | try |
| | | { |
| | | // 需要捕获错误,以确保处理结束时,关闭进度滚动界面 |
| | | |
| | | // 引入功能实际处理函数 |
| | | this.COMPLETEMAIN(); |
| | | } |
| | | finally |
| | | { |
| | | // 确保标记进度已经到达100% |
| | | this.View.Session["ProcessRateValue"] = 100; |
| | | |
| | | // 引入完毕,关闭进度显示页面 |
| | | var processView = this.View.GetView(processForm.PageId); |
| | | if (processView != null) |
| | | { |
| | | processView.Close(); |
| | | this.View.SendDynamicFormAction(processView); |
| | | } |
| | | } |
| | | }, |
| | | (t) => { }); |
| | | } |
| | | public void COMPLETEMAIN() |
| | | { |
| | | //获取当前即时库存 |
| | | DataSet ds = DBServiceHelper.ExecuteDataSet(Context, " /*dialect*/ select DISTINCT FBASEQTY,FMATERIALID from T_STK_Inventory"); |
| | | ListInventory = ds.ToModelList<PRD_Inventory>(); |
| | | |
| | | //获取单据体信息 |
| | | Entity entity = this.View.BillBusinessInfo.GetEntity("FEntity"); |
| | | //单据体信息转换为列表集合 |
| | | DynamicObjectCollection entityDataObjoct = this.View.Model.GetEntityDataObject(entity); |
| | | EntryGrid grid = this.View.GetControl<EntryGrid>("FEntity"); |
| | | |
| | | if (entityDataObjoct.Count > 0) |
| | | { |
| | | int m = 0; |
| | | foreach (DynamicObject current in entityDataObjoct) |
| | | { |
| | | //计划总数量 |
| | | decimal SumPlan = 0; |
| | | for (int i = 0; i <= 60; i++) |
| | | { |
| | | SumPlan += Convert.ToDecimal(current["FT" + "" + i + ""]); |
| | | } |
| | | |
| | | double Sum = 100; |
| | | Sum = Convert.ToDouble(SumGetComplete(current["FMatrailId_Id"].ToString(), current["FHMainSourceInterID"].ToString(), current["FHMainSourceEntryID"].ToString(), current["FDayPlanWorkID"].ToString(), SumPlan)); |
| | | this.View.Model.SetValue("FCompleteSetCount", Sum, m); |
| | | this.View.UpdateView("FCompleteSetCount"); |
| | | //保存齐套数 |
| | | DBServiceHelper.Execute(Context, "/*dialect*/ update Sc_WorkBillSortBillMain set FCompleteCount='" + Sum + "',FPlanCount='" + SumPlan + "' where FID=" + current["FDayPlanWorkID"].ToString()); |
| | | for (int i = 0; i <= 60; i++) |
| | | { |
| | | this.View.GetFieldEditor("FT" + i.ToString(), m).Enabled = false; //单据体行锁定字段 |
| | | Sum = Sum - Convert.ToDouble(current["FT" + "" + i + ""]); |
| | | if (Sum >= 0) |
| | | { |
| | | |
| | | grid.SetForecolor("FT" + "" + i + "", "#00FF00", m); |
| | | } |
| | | else |
| | | { |
| | | grid.SetForecolor("FT" + "" + i + "", "#FF0000", m); |
| | | |
| | | } |
| | | |
| | | } |
| | | m++; |
| | | //grid = this.View.GetControl[EntryGrid]("FSaleOrderEntry")#需要设置的单据体标识Key |
| | | //grid.SetRowBackcolor("#FFFF00", 0)#设置整行背景颜色 |
| | | //grid.SetForecolor("FMaterialName", "#FF0000", 0)#需要设置字段标识Key[/code] |
| | | // grid.SetBackcolor("FT" + "" + i + "", "#FF0000", m); |
| | | |
| | | //this.View.Session["ProcessRateValue"] = Convert.ToInt32(this.View.Session["ProcessRateValue"]) + Convert.ToInt32(1 / entityDataObjoct.Count * 90); |
| | | |
| | | } |
| | | |
| | | } |
| | | else |
| | | { |
| | | this.View.ShowMessage("请先加载数据!"); |
| | | } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 计算最大齐套数量 |
| | | /// </summary> |
| | | /// <param name="FMATERIALID"> 物料Number</param> |
| | | /// <param name="FMainInterID"> 生产订单主码</param> |
| | | /// <param name="FMainEntryID"> 生产订单子码</param> |
| | | /// <param name="FDayPlanWorkID"> 日计划工单FID</param> |
| | | /// <param name="FDayPlanWorkID"> 计划总数量</param> |
| | | /// <returns></returns> |
| | | public string SumGetComplete(string FMATERIALID, string FMainInterID, string FMainEntryID, string FDayPlanWorkID, decimal SumPlan) |
| | | { |
| | | //FDayPlanWorkID日计划工单ID去删除现有的齐套分析数据 |
| | | DBServiceHelper.Execute(Context, "/*dialect*/delete JIT_MOMaterReadysBill where FHICMOInterID = '" + FDayPlanWorkID + "'"); |
| | | |
| | | #region 数据库直接算出所以需要数据字段 |
| | | /* |
| | | --生产用料清单列表 |
| | | SELECT T1.FID,T1.FBillNo,T1.FMOBillNO,T1.FMOEntrySeq,T1.FMoId,T1.FMaterialID,T1.FQty, |
| | | T2.FMATERIALID FMATERIALID2,T4.FNumber,T2.FNeedQty,t3.FBASEQTY,convert(decimal(18,3),FNeedQty/t1.FQty)UnitDosage, |
| | | floor(t3.FBASEQTY/convert(decimal(18,3),FNeedQty/t1.FQty)) SumGetComplete |
| | | FROM T_PRD_PPBOM T1 |
| | | LEFT JOIN (select FID,MAX(FENTRYID)FENTRYID,SUM(FNeedQty)FNeedQty,FMATERIALID from T_PRD_PPBOMENTRY where FMoId='100007' |
| | | group by FMATERIALID,FID ) T2 on T1.FID=t2.FID |
| | | LEFT JOIN T_STK_Inventory T3 on t2.FMATERIALID = t3.FMATERIALID |
| | | LEFT JOIN T_BD_MATERIAL T4 on T2.FMATERIALID=T4.FMATERIALID |
| | | where t1.FMoId='100007' and T1.FMaterialID='105771' |
| | | */ |
| | | #endregion |
| | | |
| | | string sql = string.Format(@" |
| | | /*dialect*/ |
| | | --生产用料清单列表 |
| | | SELECT T1.FID,T1.FBillNo,T1.FMOBillNO,T1.FMOEntrySeq,T1.FMoId,T1.FMaterialID,T1.FQty, |
| | | T2.FMATERIALID FMATERIALID2,T4.FNumber,T2.FNeedQty,isnull(t3.FBASEQTY,0)FBASEQTY |
| | | FROM T_PRD_PPBOM T1 |
| | | LEFT JOIN (select FID,MAX(FENTRYID)FENTRYID,SUM(FNeedQty)FNeedQty,FMATERIALID from T_PRD_PPBOMENTRY where FMoId='{0}' |
| | | group by FMATERIALID,FID ) T2 on T1.FID=t2.FID |
| | | LEFT JOIN T_STK_Inventory T3 on t2.FMATERIALID = t3.FMATERIALID |
| | | LEFT JOIN T_BD_MATERIAL T4 on T2.FMATERIALID=T4.FMATERIALID |
| | | where t1.FMoId='{0}' and T1.FMaterialID='{1}' |
| | | ", FMainInterID, FMATERIALID); |
| | | DataSet ds = DBServiceHelper.ExecuteDataSet(Context, sql); |
| | | var PpbomList = ds.ToModelList<PRD_PPBOM>(); |
| | | //当前最大齐套数 下层需求数量/父级需求数量=单位用料 |
| | | //var SumGetComplete = Math.Floor(PpbomList.Min(t => t.FBASEQTY / (t.FNeedQty / t.FQty))); |
| | | |
| | | //最大齐套数 |
| | | decimal SumGetComplete; |
| | | List<decimal> list = new List<decimal>(); |
| | | foreach (var t in PpbomList) |
| | | { |
| | | var ls = ListInventory.Where(c => c.FMATERIALID == t.FMATERIALID2).FirstOrDefault(); |
| | | if (ls == null) |
| | | continue; |
| | | SumGetComplete = Math.Floor(ls.FBASEQTY / (t.FNeedQty / t.FQty)); |
| | | list.Add(SumGetComplete); |
| | | } |
| | | SumGetComplete = list.Min(); |
| | | |
| | | if (SumGetComplete > SumPlan)//系统可生产最大齐套数大于计划需求量时,取计划 |
| | | SumGetComplete = SumPlan; |
| | | foreach (var item in PpbomList) |
| | | { |
| | | /* |
| | | 及时库存数量 = 系统现有库存 |
| | | 可用数量 = 及时库存数量 |
| | | 数量字段 = 齐套量 * 单位用料 |
| | | */ |
| | | decimal UnitDosage = item.FNeedQty / item.FQty; |
| | | var ls = ListInventory.Where(c => c.FMATERIALID == item.FMATERIALID2).FirstOrDefault(); |
| | | if (ls != null) |
| | | ls.FBASEQTY -= SumGetComplete * (UnitDosage); |
| | | // var _ls = ListInventory.Where(c => c.FMATERIALID == item.FMATERIALID2).DefaultIfEmpty(); |
| | | JObject jsonRoot = new JObject(); |
| | | jsonRoot.Add("Creator", ""); |
| | | jsonRoot.Add("NeedUpDateFields", new JArray()); |
| | | jsonRoot.Add("NeedReturnFields", new JArray()); |
| | | jsonRoot.Add("IsDeleteEntry", "true"); |
| | | jsonRoot.Add("SubSystemId", ""); |
| | | jsonRoot.Add("IsVerifyBaseDataField", ""); |
| | | JObject jsonModel = new JObject(); |
| | | jsonModel.Add("FHMainICMOInterIDr", FMainInterID);//主生产订单主内码 |
| | | jsonModel.Add("FHMainICMOEntryID", FMainEntryID);//主生产订单主内码 |
| | | |
| | | jsonModel.Add("FHICMOInterID", FDayPlanWorkID);//日计划订单主内码 |
| | | |
| | | JObject HMaterID = new JObject(); |
| | | HMaterID.Add("FNumber", item.FNumber); |
| | | jsonModel.Add("FHMaterID", HMaterID);//FHMaterID 物料 |
| | | |
| | | jsonModel.Add("FHStockQty", Convert.ToDecimal(item.FBASEQTY));//及时库存数量 |
| | | jsonModel.Add("FHUseQty", Convert.ToDecimal(SumGetComplete * (UnitDosage)));//数量 |
| | | jsonModel.Add("FHLeftQty", Convert.ToDecimal(item.FBASEQTY));//可用数量 |
| | | jsonModel.Add("FUnitDosage", Convert.ToDecimal(UnitDosage));//单位用量 . |
| | | |
| | | jsonModel.Add("FSumPlanCount", Convert.ToDecimal(SumPlan));//FSumPlanCount 计划总数量 |
| | | jsonModel.Add("FCompleteCount", Convert.ToDecimal(SumGetComplete));//FCompleteCount 齐套数量 |
| | | jsonModel.Add("FPRDBILLNO", item.FMOBillNO);//FPRDBILLNO 工单编号 |
| | | |
| | | jsonRoot.Add("Model", jsonModel); |
| | | |
| | | CloudClient cloudClient = new CloudClient("http://localhost/K3Cloud/"); |
| | | var result = cloudClient.Save("paez_CompleteAnalysisTemp", jsonRoot.ToString()); |
| | | JObject saveObj = JObject.Parse(result); |
| | | string saveIsSuc = saveObj["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper(); |
| | | |
| | | if (saveIsSuc != "TRUE") |
| | | { |
| | | this.View.ShowMessage("操作失败,联系管理员!"); |
| | | } |
| | | } |
| | | return SumGetComplete.ToString(); |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 查询 |
| | | /// </summary> |
| | | public void SearchList222() |
| | | { |
| | | string sqlwhere = " where 1=1"; |
| | | |
| | | if ((this.Model.GetValue("FProWorkShopId") as DynamicObject) != null) |
| | | { |
| | | string FProWorkShopId = (this.Model.GetValue("FProWorkShopId") as DynamicObject)["Id"].ToString(); |
| | | if (!string.IsNullOrEmpty(FProWorkShopId)) |
| | | sqlwhere += $" and FProductWorkShopId='{FProWorkShopId}'"; |
| | | } |
| | | //销售订单号 |
| | | string FSalOrder = Convert.ToString((this.Model.GetValue("FSalOrder"))); |
| | | if (string.IsNullOrEmpty(FSalOrder)) |
| | | { |
| | | |
| | | } |
| | | else |
| | | sqlwhere += $" and FHSeOrderBillNo='{FSalOrder}'"; |
| | | |
| | | //物料 |
| | | if ((this.Model.GetValue("FMatralId") as DynamicObject) != null) |
| | | { |
| | | string FMatralId = (this.Model.GetValue("FMatralId") as DynamicObject)["Number"].ToString(); |
| | | if (!string.IsNullOrEmpty(FMatralId)) |
| | | sqlwhere += $" and t3.FNumber='{FMatralId}'"; |
| | | } |
| | | //编制日期 |
| | | string FPreparatDate = Convert.ToString((this.Model.GetValue("FPreparatDate"))); |
| | | if (!string.IsNullOrEmpty(FPreparatDate)) |
| | | sqlwhere += $" and FPreparatDate='{FPreparatDate}'"; |
| | | |
| | | |
| | | try |
| | | { |
| | | string sql = @"/*dialect*/select t1.* from Sc_WorkBillSortBillMain t1 |
| | | left join T_BD_MATERIAL t3 on t1.FHMaterID=t3.FMATERIALID |
| | | " + sqlwhere; |
| | | DataTable dt = DBServiceHelper.ExecuteDataSet(Context, sql).Tables[0]; |
| | | DateTime DateNow = DateTime.Now;//获取当前日期 |
| | | this.Model.DeleteEntryData("FEntity"); |
| | | for (int i = 0; i < dt.Rows.Count; i++) |
| | | { |
| | | this.Model.CreateNewEntryRow("FEntity"); |
| | | this.Model.SetValue("FSEQ", i + 1, i);//序号 |
| | | this.Model.SetValue("FCompleteSetCount", "", i);//总齐套数量 |
| | | this.Model.SetValue("FProOrderCount", dt.Rows[i]["FHOrderNeedQty"].ToString(), i);//生产订单数量 |
| | | this.Model.SetValue("FSalOrderCount", dt.Rows[i]["FHSeOrderBillNo"].ToString(), i);//销售订单数量 |
| | | this.Model.SetValue("FBatch", dt.Rows[i]["FBatch"].ToString(), i);//批次号 |
| | | this.Model.SetValue("FUnit", dt.Rows[i]["FHUnitID"].ToString(), i);//计量单位 |
| | | this.Model.SetValue("FMatrailId", dt.Rows[i]["FHMaterID"].ToString(), i);//产品代码 |
| | | this.Model.SetValue("FORGID", dt.Rows[i]["FHPRDORGID"].ToString(), i);//生产组织 |
| | | this.Model.SetValue("FDeliverydate", dt.Rows[i]["FHOrderCommitDate"].ToString(), i);//交货日期 |
| | | this.Model.SetValue("FOrderLevel", dt.Rows[i]["FHOrderLev"].ToString(), i);//订单等级 |
| | | this.Model.SetValue("FSCOrderNo", dt.Rows[i]["FSCOrderNo"].ToString(), i);//生产订单号 |
| | | this.Model.SetValue("FSalOrderNo", dt.Rows[i]["FHSEORDERBILLNO"].ToString(), i);//销售订单号 |
| | | this.Model.SetValue("FBzDate", dt.Rows[i]["FPreparatDate"].ToString(), i);//编制日期 |
| | | this.Model.SetValue("FProOrderCount", dt.Rows[i]["FHOrderNeedQty"].ToString(), i);//生产订单数量 |
| | | this.Model.SetValue("FHMainSourceInterID", dt.Rows[i]["FPRDMOMAINID"].ToString(), i);//源单主内码FHMainSourceInterID |
| | | this.Model.SetValue("FHMainSourceEntryID", dt.Rows[i]["FPRDMOENTYID"].ToString(), i);//源单子内码FHMainSourceEntryID |
| | | this.Model.SetValue("FDayPlanWorkID", dt.Rows[i]["FID"].ToString(), i);//日计划工单FID |
| | | |
| | | sql = @"/*dialect*/SELECT * FROM Sc_WorkBillSortBillSub WHERE DATEDIFF(D,GETDATE(),FHMASTERDATE)>=0 and FID=" + dt.Rows[i]["FID"].ToString(); |
| | | DataTable _dt = DBServiceHelper.ExecuteDataSet(Context, sql).Tables[0]; |
| | | foreach (DataRow dr in _dt.Rows) |
| | | { |
| | | /* |
| | | this.Model.SetValue(dr["FColumn"].ToString(), dr["FHQTY"].ToString(), i);//日计划工单FID |
| | | if (dr["FHLockedSub"].ToString() == "1") |
| | | this.View.GetFieldEditor(dr["FColumn"].ToString(), i).Enabled = false; //单据体行锁定字段 |
| | | */ |
| | | DateTime start = Convert.ToDateTime(DateNow.ToShortDateString()); |
| | | DateTime end = Convert.ToDateTime(Convert.ToDateTime(dr["FHMASTERDATE"]).ToShortDateString()); |
| | | TimeSpan getDay = end.Subtract(start); |
| | | if (getDay.Days > 60) |
| | | continue; |
| | | this.Model.SetValue("FT" + getDay.Days.ToString(), dr["FHQTY"].ToString(), i);//日计划工单FID |
| | | if (dr["FHLockedSub"].ToString() == "1") |
| | | this.View.GetFieldEditor("FT" + getDay.Days.ToString(), i).Enabled = false; //单据体行锁定字段 |
| | | |
| | | } |
| | | |
| | | this.View.InvokeFieldUpdateService("FMatrailId", i);//调用数量值更新 |
| | | |
| | | } |
| | | this.View.UpdateView(); |
| | | for (int j = 0; j < dt.Rows.Count; j++) |
| | | { |
| | | sql = @"/*dialect*/SELECT * FROM Sc_WorkBillSortBillSub WHERE DATEDIFF(D,GETDATE(),FHMASTERDATE)>=0 and FID=" + dt.Rows[j]["FID"].ToString(); |
| | | DataTable _dt = DBServiceHelper.ExecuteDataSet(Context, sql).Tables[0]; |
| | | foreach (DataRow dr in _dt.Rows) |
| | | { |
| | | DateTime start = Convert.ToDateTime(DateNow.ToShortDateString()); |
| | | DateTime end = Convert.ToDateTime(Convert.ToDateTime(dr["FHMASTERDATE"]).ToShortDateString()); |
| | | TimeSpan getDay = end.Subtract(start); |
| | | if (getDay.Days > 60) |
| | | continue; |
| | | |
| | | if (dr["FHLockedSub"].ToString() == "1") |
| | | this.View.GetFieldEditor("FT" + getDay.Days.ToString(), j).Enabled = false; //单据体行锁定字段 |
| | | } |
| | | } |
| | | |
| | | for (int m = 0; m <= 60; m++) |
| | | { |
| | | this.View.GetControl("FT" + "" + m + "").Text = DateNow.AddDays(m).ToShortDateString(); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | this.View.ShowErrMessage(ex.Message.ToString()); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 提料计划 |
| | | /// </summary> |
| | | |
| | | public void Extraction2() |
| | | { |
| | | |
| | | //获取单据体信息 |
| | | Entity entity = this.View.BillBusinessInfo.GetEntity("FEntity"); |
| | | //单据体信息转换为列表集合 |
| | | DynamicObjectCollection entityDataObjoct = this.View.Model.GetEntityDataObject(entity); |
| | | EntryGrid grid = this.View.GetControl<EntryGrid>("FEntity"); |
| | | if (entityDataObjoct.Count == 0) |
| | | { |
| | | this.View.ShowMessage("请先加载数据!"); |
| | | } |
| | | else |
| | | { |
| | | foreach (DynamicObject current in entityDataObjoct) |
| | | { |
| | | |
| | | string FDayPlanWorkID = Convert.ToString(current["FDayPlanWorkID"]);//日工单ID |
| | | string FPRDMOMAINID = Convert.ToString(current["FHMainSourceInterID"]);//生产订单id |
| | | //是否有过齐套分析 找出齐套数量 日计划数量 |
| | | string sql = string.Format(@" |
| | | /*dialect*/ |
| | | SELECT T1.FID,FHMATERID,FHMASTERDATE,FHQTY,FCOMPLETECOUNT,FPRDMOMAINID,T2.FENTRYID,T1.FBILLNO FROM SC_WORKBILLSORTBILLMAIN T1 |
| | | JOIN SC_WORKBILLSORTBILLSUB T2 ON T1.FID=T2.FID |
| | | WHERE DATEDIFF(D,GETDATE(),FHMASTERDATE) >=0 |
| | | AND FPLANCOUNT>FCOMPLETECOUNT |
| | | AND T1.FID='{0}' AND FPRDMOMAINID='{1}' |
| | | ", FDayPlanWorkID, FPRDMOMAINID); |
| | | DataSet ds = DBServiceHelper.ExecuteDataSet(Context, sql); |
| | | DataTable dt = ds.Tables[0]; |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | | string FMATERIALID = dt.Rows[0]["FHMaterID"].ToString();//物料编码 |
| | | decimal FCompleteCount = Convert.ToDecimal(dt.Rows[0]["FCompleteCount"].ToString());//齐套数量 |
| | | |
| | | //按主物料查询子物料单位用料 最小采购 和 提前期 |
| | | sql = string.Format(@" |
| | | /*dialect*/ |
| | | SELECT FNeedQty,t5.FFIXLEADTIME,t5.FMAXPOQTY,t5.FMINPOQTY,t2.FMATERIALID,t3.FNumber FROM T_PRD_PPBOM T1 |
| | | LEFT JOIN(SELECT FID, MAX(FENTRYID) FENTRYID, SUM(convert(decimal(18, 2), FBASENUMERATOR / FBASEDENOMINATOR))FNeedQty, FMATERIALID from T_PRD_PPBOMENTRY where FMoId = '{0}' |
| | | group by FMATERIALID, FID) T2 on T1.FID = t2.FID |
| | | JOIN T_BD_MATERIAL T3 ON T2.FMATERIALID = t3.FMATERIALID |
| | | join t_BD_MaterialBase t4 on t3.FMATERIALID = t4.FMATERIALID |
| | | join t_BD_MaterialPlan t5 on t3.FMATERIALID = t5.FMATERIALID |
| | | WHERE T1.FMaterialID = '{1}' |
| | | AND FMoId = '{0}' |
| | | AND FERPCLSID=1 |
| | | ", FPRDMOMAINID, FMATERIALID); |
| | | DataTable _dt = DBServiceHelper.ExecuteDataSet(Context, sql).Tables[0]; |
| | | //根据bom去循环 |
| | | foreach (DataRow drDetail in _dt.Rows) |
| | | { |
| | | string DetailFmaterialID = drDetail["FNumber"].ToString();//子物料 |
| | | int FfixleadTime = Convert.ToInt32(drDetail["FFIXLEADTIME"].ToString());//提前天数 |
| | | decimal FminPoqty = Convert.ToDecimal(drDetail["FMINPOQTY"].ToString());//最小采购量 |
| | | decimal FNeedQty = Convert.ToDecimal(drDetail["FNeedQty"].ToString());//单位用料 |
| | | |
| | | //日计划数量(套数) |
| | | decimal FHQTY = 0; |
| | | foreach (DataRow dr in dt.Rows) |
| | | { |
| | | //日计划数量 |
| | | decimal DayFHQTY = Convert.ToDecimal(dr["FHQTY"].ToString()); |
| | | if (FCompleteCount >= DayFHQTY) |
| | | { |
| | | FCompleteCount -= DayFHQTY; |
| | | continue; |
| | | } |
| | | else if (FCompleteCount != 0) |
| | | { |
| | | FHQTY = DayFHQTY - FCompleteCount; |
| | | FCompleteCount = 0; |
| | | } |
| | | //提料计划日期 |
| | | DateTime FHDate; |
| | | //套数*单位用料是否满足最小需求量 |
| | | if (FHQTY * FNeedQty >= FminPoqty) |
| | | { |
| | | FHDate = Convert.ToDateTime(dr["FHMASTERDATE"]); |
| | | |
| | | JObject model = new JObject(); |
| | | model.Add("FHDate", FHDate.AddDays(-FfixleadTime)); |
| | | model.Add("FHRemark", "生产订单号:" + "测试呢呢"); |
| | | |
| | | JArray Fentity = new JArray(); |
| | | JObject FentityModel = new JObject(); |
| | | FentityModel.Add("FHMaterID", new JObject() { ["Fnumber"] = DetailFmaterialID });//物料 |
| | | FentityModel.Add("FHQty", FHQTY * FNeedQty);//数量 |
| | | FentityModel.Add("FHSourceInterID", dr["FID"].ToString());//日计划工单FID |
| | | FentityModel.Add("FHSourceEntryID", dr["FENTRYID"].ToString());//日计划工单FENTRYID |
| | | FentityModel.Add("FHSourceBillNo", dr["FBILLNO"].ToString());//日计划工单单号 |
| | | FentityModel.Add("FHSourceBillType", "");//日计划工单类型 |
| | | Fentity.Add(FentityModel); |
| | | |
| | | model.Add("FEntity", Fentity); |
| | | JObject jsonRoot = new JObject() |
| | | { |
| | | ["Creator"] = "", |
| | | ["NeedUpDateFields"] = new JArray(), |
| | | ["NeedReturnFields"] = new JArray(), |
| | | ["IsDeleteEntry"] = "false", |
| | | ["SubSystemId"] = "", |
| | | ["IsVerifyBaseDataField"] = "false", |
| | | ["Model"] = model |
| | | }; |
| | | |
| | | CloudClient cloudClient = new CloudClient("http://localhost/K3Cloud/"); |
| | | var result = cloudClient.Save("paez_PODemandPlan", jsonRoot.ToString()); |
| | | JObject saveObj = JObject.Parse(result); |
| | | string saveIsSuc = saveObj["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper(); |
| | | |
| | | if (saveIsSuc == "TRUE") |
| | | { |
| | | //清空值 |
| | | FHQTY = 0; |
| | | LogHelper.Info("单据日期:" + FHDate.AddDays(-FfixleadTime).ToString()); |
| | | } |
| | | else |
| | | { |
| | | LogHelper.Error(saveIsSuc); |
| | | |
| | | } |
| | | |
| | | } |
| | | else |
| | | { |
| | | FHQTY += DayFHQTY; |
| | | continue; |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | public void Extraction3() |
| | | { |
| | | //采购订单数据 |
| | | string sql = @"select t1.FID,t1.FBillNo,t2.FENTRYID,t1.FSUPPLIERID,t3.fnumber,t2.FMATERIALID,t2.FQTY from t_PUR_POOrder t1 |
| | | join t_PUR_POOrderEntry t2 on t1.FID = t2.FID |
| | | join t_BD_Supplier t3 on t1.FSUPPLIERID = t3.FSUPPLIERID"; |
| | | List<PurchaseInventory> PurchaseInventory = DBServiceHelper.ExecuteDataSet(Context, sql).ToModelList<PurchaseInventory>(); |
| | | |
| | | //获取单据体信息 |
| | | Entity entity = this.View.BillBusinessInfo.GetEntity("FEntity"); |
| | | //单据体信息转换为列表集合 |
| | | DynamicObjectCollection entityDataObjoct = this.View.Model.GetEntityDataObject(entity); |
| | | EntryGrid grid = this.View.GetControl<EntryGrid>("FEntity"); |
| | | string FDayPlanWorkID = "";//日工单ID |
| | | if (entityDataObjoct.Count == 0) |
| | | { |
| | | this.View.ShowMessage("请先加载数据!"); |
| | | return; |
| | | } |
| | | else |
| | | { |
| | | foreach (DynamicObject current in entityDataObjoct) |
| | | { |
| | | FDayPlanWorkID += Convert.ToString(current["FDayPlanWorkID"]) + ","; |
| | | } |
| | | } |
| | | |
| | | FDayPlanWorkID = FDayPlanWorkID.Substring(0, FDayPlanWorkID.Length - 1); |
| | | sql = string.Format(@" |
| | | /*dialect*/ |
| | | SELECT T1.FID,FHMATERID,FHMASTERDATE,FHQTY,FCOMPLETECOUNT,FPRDMOMAINID,T2.FENTRYID,T1.FBILLNO, FNeedQty,t5.FFIXLEADTIME,t5.FMAXPOQTY,t5.FMINPOQTY,t3.FMATERIALID,t6.FNumber,FHQTY*FNeedQty NeedQty FROM SC_WORKBILLSORTBILLMAIN T1 |
| | | JOIN SC_WORKBILLSORTBILLSUB T2 ON T1.FID=T2.FID |
| | | LEFT JOIN(SELECT FID, max(FMoId)FMoId,MAX(FENTRYID) FENTRYID, SUM(convert(decimal(18, 2), FBASENUMERATOR / FBASEDENOMINATOR))FNeedQty, FMATERIALID from T_PRD_PPBOMENTRY |
| | | group by FMATERIALID, FID) T3 on T1.FPRDMOMAINID = t3.FMoId |
| | | JOIN T_BD_MATERIAL T6 ON T3.FMATERIALID = T6.FMATERIALID |
| | | join t_BD_MaterialBase t4 on t3.FMATERIALID = t4.FMATERIALID |
| | | join t_BD_MaterialPlan t5 on t3.FMATERIALID = t5.FMATERIALID |
| | | WHERE DATEDIFF(D,GETDATE(),FHMASTERDATE) >=0 |
| | | AND FPLANCOUNT>FCOMPLETECOUNT |
| | | AND FERPCLSID=1 |
| | | AND T1.FID='{0}'", FDayPlanWorkID); |
| | | |
| | | DataSet ds = DBServiceHelper.ExecuteDataSet(Context, sql); |
| | | List<DayPlanPpbom> DayPlanPpbom = ds.ToModelList<DayPlanPpbom>(); |
| | | |
| | | List<string> MaterialIDList = DayPlanPpbom.Select(x => x.FMATERIALID).Distinct().ToList(); |
| | | |
| | | //提料计划数据集 |
| | | List<PODemandPlanTemp> PODemandPlanTemp = new List<PODemandPlanTemp>(); |
| | | foreach (string item in MaterialIDList) |
| | | { |
| | | List<DayPlanPpbom> _DayPlanPpbom = DayPlanPpbom.Where(x => x.FMATERIALID == item).ToList(); |
| | | |
| | | decimal FMINPOQTY = _DayPlanPpbom.FirstOrDefault().FMINPOQTY;//最小起订量 |
| | | decimal NeedQty = 0; |
| | | DateTime DATE = _DayPlanPpbom.FirstOrDefault().FHMASTERDATE; |
| | | int i = 1; |
| | | foreach (var _item in _DayPlanPpbom) |
| | | { |
| | | if (NeedQty == 0) |
| | | DATE = Convert.ToDateTime(_item.FHMASTERDATE); |
| | | |
| | | NeedQty += _item.NeedQty; |
| | | if (NeedQty >= FMINPOQTY) |
| | | { |
| | | List<PurchaseInventory> _PurchaseInventory = PurchaseInventory.Where(x => x.FMATERIALID == item && x.FQTY > 0).ToList(); |
| | | if (_PurchaseInventory.Count == 0) |
| | | continue; |
| | | |
| | | foreach (var Purchase in _PurchaseInventory) |
| | | { |
| | | if (Purchase.FQTY >= NeedQty) |
| | | { |
| | | PODemandPlanTemp.Add(new Demo.Model.Model.PODemandPlan.PODemandPlanTemp |
| | | { |
| | | FID = _item.FID, |
| | | FHMASTERDATE = DATE, |
| | | FQty = NeedQty, |
| | | FBILLNO = _item.FBILLNO, |
| | | FENTRYID = _item.FENTRYID, |
| | | FMATERIALID = _item.FMATERIALID, |
| | | FNumber = _item.FNumber, |
| | | |
| | | PurchseFID = Purchase.FID, |
| | | PurchseFentryID = Purchase.FENTRYID, |
| | | FSUPPLIERID = Purchase.FSUPPLIERID, |
| | | PurchseFNUMBER = Purchase.FNUMBER, |
| | | PurchseFBillNo = Purchase.FBillNo |
| | | |
| | | }); |
| | | //扣除当前行对应采购订单数量 |
| | | var ls = PurchaseInventory.Where(c => c.FENTRYID == Purchase.FENTRYID).FirstOrDefault(); |
| | | ls.FQTY -= NeedQty; |
| | | break; |
| | | } |
| | | else |
| | | { |
| | | PODemandPlanTemp.Add(new Demo.Model.Model.PODemandPlan.PODemandPlanTemp |
| | | { |
| | | FID = _item.FID, |
| | | FHMASTERDATE = DATE, |
| | | FQty = Purchase.FQTY, |
| | | FBILLNO = _item.FBILLNO, |
| | | FENTRYID = _item.FENTRYID, |
| | | FMATERIALID = _item.FMATERIALID, |
| | | FNumber = _item.FNumber, |
| | | |
| | | PurchseFID = Purchase.FID, |
| | | PurchseFentryID = Purchase.FENTRYID, |
| | | FSUPPLIERID = Purchase.FSUPPLIERID, |
| | | PurchseFNUMBER = Purchase.FNUMBER, |
| | | PurchseFBillNo = Purchase.FBillNo |
| | | |
| | | }); |
| | | NeedQty = NeedQty - Purchase.FQTY; |
| | | var ls = PurchaseInventory.Where(c => c.FENTRYID == Purchase.FENTRYID).FirstOrDefault(); |
| | | ls.FQTY = 0; |
| | | } |
| | | |
| | | } |
| | | NeedQty = 0; |
| | | } |
| | | //剩下不足时按最小采购批次生成 |
| | | else if (i == _DayPlanPpbom.Count) |
| | | { |
| | | NeedQty = FMINPOQTY; |
| | | List<PurchaseInventory> _PurchaseInventory = PurchaseInventory.Where(x => x.FMATERIALID == item && x.FQTY > 0).ToList(); |
| | | if (_PurchaseInventory.Count == 0) |
| | | continue; |
| | | |
| | | foreach (var Purchase in _PurchaseInventory) |
| | | { |
| | | if (Purchase.FQTY >= NeedQty) |
| | | { |
| | | PODemandPlanTemp.Add(new Demo.Model.Model.PODemandPlan.PODemandPlanTemp |
| | | { |
| | | FID = _item.FID, |
| | | FHMASTERDATE = DATE, |
| | | FQty = NeedQty, |
| | | FBILLNO = _item.FBILLNO, |
| | | FENTRYID = _item.FENTRYID, |
| | | FMATERIALID = _item.FMATERIALID, |
| | | FNumber = _item.FNumber, |
| | | |
| | | PurchseFID = Purchase.FID, |
| | | PurchseFentryID = Purchase.FENTRYID, |
| | | FSUPPLIERID = Purchase.FSUPPLIERID, |
| | | PurchseFNUMBER = Purchase.FNUMBER, |
| | | PurchseFBillNo = Purchase.FBillNo |
| | | |
| | | }); |
| | | //扣除当前行对应采购订单数量 |
| | | var ls = PurchaseInventory.Where(c => c.FENTRYID == Purchase.FENTRYID).FirstOrDefault(); |
| | | ls.FQTY -= NeedQty; |
| | | break; |
| | | } |
| | | else |
| | | { |
| | | PODemandPlanTemp.Add(new Demo.Model.Model.PODemandPlan.PODemandPlanTemp |
| | | { |
| | | FID = _item.FID, |
| | | FHMASTERDATE = DATE, |
| | | FQty = Purchase.FQTY, |
| | | FBILLNO = _item.FBILLNO, |
| | | FENTRYID = _item.FENTRYID, |
| | | FMATERIALID = _item.FMATERIALID, |
| | | FNumber = _item.FNumber, |
| | | |
| | | PurchseFID = Purchase.FID, |
| | | PurchseFentryID = Purchase.FENTRYID, |
| | | FSUPPLIERID = Purchase.FSUPPLIERID, |
| | | PurchseFNUMBER = Purchase.FNUMBER, |
| | | PurchseFBillNo = Purchase.FBillNo |
| | | |
| | | }); |
| | | NeedQty = NeedQty - Purchase.FQTY; |
| | | var ls = PurchaseInventory.Where(c => c.FENTRYID == Purchase.FENTRYID).FirstOrDefault(); |
| | | ls.FQTY = 0; |
| | | } |
| | | |
| | | } |
| | | NeedQty = 0; |
| | | } |
| | | i++; |
| | | } |
| | | } |
| | | |
| | | var PODemandPlanList = PODemandPlanTemp.GroupBy(p => new PODemandPlanTemp { PurchseFNUMBER = p.PurchseFNUMBER, FHMASTERDATE = p.FHMASTERDATE }).Select(x => new PODemandPlanTemp { PurchseFNUMBER = x.Key.PurchseFNUMBER, FHMASTERDATE = x.Key.FHMASTERDATE }).ToList(); |
| | | foreach (var item in PODemandPlanList) |
| | | { |
| | | DateTime date = item.FHMASTERDATE; |
| | | string PurchseFNUMBER = item.PurchseFNUMBER; |
| | | |
| | | JObject model = new JObject(); |
| | | model.Add("FHDate", date); |
| | | model.Add("FHRemark", "生产订单号:" + "测试呢呢"); |
| | | model.Add("FSupplierID", new JObject() { ["Fnumber"] = PurchseFNUMBER }); |
| | | JArray Fentity = new JArray(); |
| | | |
| | | List<PODemandPlanTemp> _PODemandPlanList = PODemandPlanTemp.Where(x => x.FHMASTERDATE == date && x.PurchseFNUMBER == PurchseFNUMBER).ToList(); |
| | | foreach (var _item in _PODemandPlanList) |
| | | { |
| | | JObject FentityModel = new JObject(); |
| | | FentityModel.Add("FHMaterID", new JObject() { ["Fnumber"] = _item.FNumber });//物料 |
| | | FentityModel.Add("FHQty", _item.FQty);//数量 |
| | | FentityModel.Add("FHSourceInterID", _item.FID);//日计划工单FID |
| | | FentityModel.Add("FHSourceEntryID", _item.FENTRYID);//日计划工单FENTRYID |
| | | FentityModel.Add("FHSourceBillNo", _item.FBILLNO);//日计划工单单号 |
| | | FentityModel.Add("FHSourceBillType", "");//日计划工单类型 |
| | | |
| | | FentityModel.Add("FHPOOrderInterID", _item.PurchseFID);// 采购订单内码:FHPOOrderInterID |
| | | FentityModel.Add("FHPOOrderEntryID", _item.PurchseFentryID); //采购订单子内码:FHPOOrderEntryID |
| | | FentityModel.Add("FHPOOrderBillNo", _item.PurchseFBillNo); //采购订单号:FHPOOrderBillNo |
| | | Fentity.Add(FentityModel); |
| | | } |
| | | model.Add("FEntity", Fentity); |
| | | JObject jsonRoot = new JObject() |
| | | { |
| | | ["Creator"] = "", |
| | | ["NeedUpDateFields"] = new JArray(), |
| | | ["NeedReturnFields"] = new JArray(), |
| | | ["IsDeleteEntry"] = "false", |
| | | ["SubSystemId"] = "", |
| | | ["IsVerifyBaseDataField"] = "false", |
| | | ["Model"] = model |
| | | }; |
| | | |
| | | CloudClient cloudClient = new CloudClient("http://localhost/K3Cloud/"); |
| | | var result = cloudClient.Save("paez_PODemandPlan", jsonRoot.ToString()); |
| | | JObject saveObj = JObject.Parse(result); |
| | | string saveIsSuc = saveObj["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper(); |
| | | |
| | | if (saveIsSuc == "TRUE") |
| | | { |
| | | } |
| | | else |
| | | { |
| | | LogHelper.Error(saveIsSuc); |
| | | |
| | | } |
| | | |
| | | } |
| | | this.View.ShowMessage("操作成功"); |
| | | // var PODemandPlanList22 = PODemandPlanTemp.GroupBy(p => new {p.FSUPPLIERID, p.FHMASTERDATE }).ToList(); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <configuration> |
| | | <runtime> |
| | | <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> |
| | | <dependentAssembly> |
| | | <assemblyIdentity name="BouncyCastle.Crypto" publicKeyToken="0e99375e54769942" culture="neutral" /> |
| | | <bindingRedirect oldVersion="0.0.0.0-1.8.6.0" newVersion="1.8.6.0" /> |
| | | </dependentAssembly> |
| | | <dependentAssembly> |
| | | <assemblyIdentity name="ICSharpCode.SharpZipLib" publicKeyToken="1b03e6acf1164f73" culture="neutral" /> |
| | | <bindingRedirect oldVersion="0.0.0.0-1.2.0.246" newVersion="1.2.0.246" /> |
| | | </dependentAssembly> |
| | | </assemblyBinding> |
| | | </runtime> |
| | | </configuration> |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <packages> |
| | | <package id="ZD.Cloud.Common" version="7.5.1.2" targetFramework="net472" /> |
| | | <package id="log4net" version="1.2.10" targetFramework="net472" /> |
| | | <package id="Microsoft.Office.Interop.Excel" version="12.0.4518.1014" targetFramework="net472" /> |
| | | <package id="NPOI" version="2.4.1" targetFramework="net472" /> |
| | | <package id="Portable.BouncyCastle" version="1.8.6" targetFramework="net472" /> |
| | | <package id="SharpZipLib" version="1.2.0" targetFramework="net472" /> |
| | | <package id="ZD.Cloud.Common" version="7.2.3" targetFramework="net472" /> |
| | | <package id="ZD.Cloud.Logger" version="1.1.0" targetFramework="net472" /> |
| | | <package id="ZD.Cloud.WebApi" version="7.3.2.3" targetFramework="net472" /> |
| | | <package id="ZD.Newtonsoft.Json" version="1.0.0" targetFramework="net472" /> |
| | | <package id="ZD.Share" version="1.0.0" targetFramework="net472" /> |
| | | </packages> |
| | |
| | | <PropertyGroup> |
| | | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
| | | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
| | | <ProjectGuid>{D227B701-E3B7-432C-951B-5F396B82B1F3}</ProjectGuid> |
| | | <ProjectGuid>{E2975D07-F28A-417E-8225-19281A7A62BD}</ProjectGuid> |
| | | <OutputType>Library</OutputType> |
| | | <AppDesignerFolder>Properties</AppDesignerFolder> |
| | | <RootNamespace>Demo.DynamicForm</RootNamespace> |
| | |
| | | <WarningLevel>4</WarningLevel> |
| | | </PropertyGroup> |
| | | <ItemGroup> |
| | | <Reference Include="K3Cloud.Extend, Version=0.0.80.5, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\K3Cloud.Extend.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.App, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.App.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.App.Core, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.App.Core.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.Business.PlugIn, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.Business.PlugIn.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.BusinessEntity, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.BusinessEntity.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.Contracts, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.Contracts.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.Core, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.Core.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.DataEntity, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.DataEntity.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.MpWeiXin, Version=7.0.104.1, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.MpWeiXin.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.QyWeiXin, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.QyWeiXin.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.ServiceFacade.KDServiceClient, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.ServiceFacade.KDServiceClient.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.ServiceFacade.KDServiceClientFx, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.ServiceFacade.KDServiceClientFx.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.ServiceFacade.KDServiceFx, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.ServiceFacade.KDServiceFx.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.ServiceHelper, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.ServiceHelper.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.Web, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.Web.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.Web.HTML, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.Web.HTML.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.WeiXin.Core, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.WeiXin.Core.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.WinForm.KDS20Lib, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.WinForm.KDS20Lib.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.K3.Core, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.K3.Core.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.K3.SCM.App, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.K3.SCM.App.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.K3.SCM.App.Stock.Report, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.K3.SCM.App.Stock.Report.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.K3.SCM.App.Stock.ServicePlugIn, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.K3.SCM.App.Stock.ServicePlugIn.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.K3.SCM.Business.DynamicForm, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.K3.SCM.Business.DynamicForm.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.K3.SCM.Common.BusinessEntity, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.K3.SCM.Common.BusinessEntity.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.K3.SCM.Credit.Business.PlugIn, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.K3.SCM.Credit.Business.PlugIn.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.K3.SCM.ServiceHelper, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.K3.SCM.ServiceHelper.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="System" /> |
| | | <Reference Include="System.Core" /> |
| | | <Reference Include="System.Xml.Linq" /> |
| | |
| | | <Reference Include="System.Xml" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <Compile Include="PRD\Pro_WorkBillPlatform.cs" /> |
| | | <Compile Include="Properties\AssemblyInfo.cs" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <None Include="packages.config" /> |
| | | <Folder Include="PRD\" /> |
| | | </ItemGroup> |
| | | <ItemGroup /> |
| | | <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
| | | </Project> |
| | |
| | | [assembly: ComVisible(false)] |
| | | |
| | | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID |
| | | [assembly: Guid("d227b701-e3b7-432c-951b-5f396b82b1f3")] |
| | | [assembly: Guid("e2975d07-f28a-417e-8225-19281a7a62bd")] |
| | | |
| | | // 程序集的版本信息由下列四个值组成: |
| | | // |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8" ?> |
| | | <configuration> |
| | | <appSettings> |
| | | <add key="DbId" value="5e8c33972fbb61"></add> |
| | | <add key="UserName" value="Administrator"></add> |
| | | <add key="PassWord" value="888888"></add> |
| | | <add key="KDApiUrl" value="http://localhost/K3Cloud/"></add> |
| | | </appSettings> |
| | | </configuration> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| | | <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> |
| | | <PropertyGroup> |
| | | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
| | | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
| | | <ProjectGuid>{3B5437EE-F19C-4B69-90A4-88866841337B}</ProjectGuid> |
| | | <OutputType>Library</OutputType> |
| | | <AppDesignerFolder>Properties</AppDesignerFolder> |
| | | <RootNamespace>Demo.TimedTaskPlugIn</RootNamespace> |
| | | <AssemblyName>Demo.TimedTaskPlugIn</AssemblyName> |
| | | <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> |
| | | <FileAlignment>512</FileAlignment> |
| | | <Deterministic>true</Deterministic> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
| | | <DebugSymbols>true</DebugSymbols> |
| | | <DebugType>full</DebugType> |
| | | <Optimize>false</Optimize> |
| | | <OutputPath>bin\Debug\</OutputPath> |
| | | <DefineConstants>DEBUG;TRACE</DefineConstants> |
| | | <ErrorReport>prompt</ErrorReport> |
| | | <WarningLevel>4</WarningLevel> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
| | | <DebugType>pdbonly</DebugType> |
| | | <Optimize>true</Optimize> |
| | | <OutputPath>bin\Release\</OutputPath> |
| | | <DefineConstants>TRACE</DefineConstants> |
| | | <ErrorReport>prompt</ErrorReport> |
| | | <WarningLevel>4</WarningLevel> |
| | | </PropertyGroup> |
| | | <ItemGroup> |
| | | <Reference Include="K3Cloud.Extend, Version=0.0.80.5, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\K3Cloud.Extend.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.App, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.App.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.App.Core, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.App.Core.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.Business.PlugIn, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.Business.PlugIn.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.BusinessEntity, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.BusinessEntity.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.Contracts, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.Contracts.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.Core, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.Core.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.DataEntity, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.DataEntity.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.MpWeiXin, Version=7.0.104.1, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.MpWeiXin.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.QyWeiXin, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.QyWeiXin.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.ServiceFacade.KDServiceClient, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.ServiceFacade.KDServiceClient.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.ServiceFacade.KDServiceClientFx, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.ServiceFacade.KDServiceClientFx.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.ServiceFacade.KDServiceFx, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.ServiceFacade.KDServiceFx.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.ServiceHelper, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.ServiceHelper.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.Web, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.Web.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.Web.HTML, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.Web.HTML.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.WebApi.Client, Version=7.3.1150.7, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.WebApi.7.3.2.3\lib\net452\Kingdee.BOS.WebApi.Client.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.WebApi.ServicesStub, Version=7.3.1150.7, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.WebApi.7.3.2.3\lib\net452\Kingdee.BOS.WebApi.ServicesStub.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.WeiXin.Core, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.WeiXin.Core.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.BOS.WinForm.KDS20Lib, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.BOS.WinForm.KDS20Lib.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.K3.Core, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.K3.Core.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.K3.SCM.App, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.K3.SCM.App.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.K3.SCM.App.Stock.Report, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.K3.SCM.App.Stock.Report.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.K3.SCM.App.Stock.ServicePlugIn, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.K3.SCM.App.Stock.ServicePlugIn.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.K3.SCM.Business.DynamicForm, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.K3.SCM.Business.DynamicForm.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.K3.SCM.Common.BusinessEntity, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.K3.SCM.Common.BusinessEntity.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.K3.SCM.Credit.Business.PlugIn, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.K3.SCM.Credit.Business.PlugIn.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Kingdee.K3.SCM.ServiceHelper, Version=7.5.1507.2, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Common.7.5.1.2\lib\net452\Kingdee.K3.SCM.ServiceHelper.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\log4net.1.2.10\lib\2.0\log4net.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="Newtonsoft.Json, Version=4.0.0.0, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Newtonsoft.Json.1.0.0\lib\Newtonsoft.Json.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="System" /> |
| | | <Reference Include="System.Core" /> |
| | | <Reference Include="System.Xml.Linq" /> |
| | | <Reference Include="System.Data.DataSetExtensions" /> |
| | | <Reference Include="Microsoft.CSharp" /> |
| | | <Reference Include="System.Data" /> |
| | | <Reference Include="System.Net.Http" /> |
| | | <Reference Include="System.Xml" /> |
| | | <Reference Include="ZD.Cloud.Logger, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.Logger.1.1.0\lib\net40\ZD.Cloud.Logger.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="ZD.Cloud.WebApi, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Cloud.WebApi.7.3.2.3\lib\net452\ZD.Cloud.WebApi.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="ZD.Share, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\ZD.Share.1.0.3\lib\net452\ZD.Share.dll</HintPath> |
| | | </Reference> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <Compile Include="PRD\DayPlanPPBomBillTimeTask.cs" /> |
| | | <Compile Include="Properties\AssemblyInfo.cs" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <None Include="Config\kdapi.config" /> |
| | | <None Include="packages.config" /> |
| | | </ItemGroup> |
| | | <ItemGroup /> |
| | | <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
| | | </Project> |
New file |
| | |
| | | using System.ComponentModel; |
| | | using Kingdee.BOS.Contracts; |
| | | using Kingdee.BOS; |
| | | using Kingdee.BOS.Core; |
| | | using Kingdee.BOS.ServiceHelper; |
| | | using System.Data; |
| | | using ZD.Cloud.Logger; |
| | | using Newtonsoft.Json.Linq; |
| | | using System; |
| | | using Kingdee.BOS.Util; |
| | | using System.Linq; |
| | | using ZD.Cloud.WebApi; |
| | | |
| | | namespace Demo.TimedTaskPlugIn.PRD |
| | | { |
| | | [Description("日计划用料清单执行计划")] |
| | | [HotUpdate] |
| | | public class DayPlanPPBomBillTimeTask : Kingdee.BOS.Contracts.IScheduleService |
| | | { |
| | | |
| | | public void Run(Context ctx, Schedule schedule) |
| | | { |
| | | CloudClient cloudClient = new CloudClient("http://localhost/K3Cloud/"); |
| | | try |
| | | { |
| | | string sql = string.Format(@" |
| | | /*dialect*/ |
| | | select t1.FID,t3.FMATERIALID,T5.FNUMBER,t1.FHMASTERDATE,t1.FHQTY,t4.FMATERIALID FMATERIALID2,T6.FNUMBER FNUMBER2,T7.FNUMBER FUNITNUMBER,FNumerator,FDenominator,convert(decimal(18,2),(FNumerator/FDenominator) *t1.FHQTY) FHQtyMust,T4.FUnitID,t8.FNUMBER FUNITNUMBER2,T3.FID FPPBOM,T4.FENTRYID,isnull(T9.FBillNo,'')FBillNo |
| | | FROM Sc_WorkBillSortBillSub t1 |
| | | JOIN Sc_WorkBillSortBillMAIN t2 on t1.FID = t2.FID |
| | | JOIN T_PRD_PPBOM T3 on T2.FPRDMOMAINID=t3.FMOID AND T2.FPRDMOENTYID=T3.FMOENTRYID |
| | | JOIN T_PRD_PPBOMENTRY T4 ON T3.FID=T4.FID |
| | | JOIN T_BD_MATERIAL T5 ON T3.FMATERIALID=T5.FMATERIALID |
| | | JOIN T_BD_MATERIAL T6 ON T4.FMATERIALID=T6.FMATERIALID |
| | | JOIN T_BD_UNIT T7 ON T3.FUNITID = T7.FUNITID |
| | | JOIN T_BD_UNIT T8 ON T4.FUNITID = T8.FUNITID |
| | | LEFT JOIN Sc_DayPlanPPBomBillMain T9 ON T1.FID=T9.FDayPlanFID |
| | | where DATEDIFF(DAY,GETDATE(),FHMASTERDATE)=2 |
| | | " |
| | | ); |
| | | DataSet ds = DBServiceHelper.ExecuteDataSet(ctx, sql); |
| | | DataTable dt = ds.Tables[0]; |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | | DataView dv = dt.DefaultView; |
| | | DataTable _dt = dv.ToTable(true, "FID"); |
| | | foreach (DataRow dr in _dt.Rows) |
| | | { |
| | | DataRow[] DataRow = dt.Select("FID =" + dr[0]); |
| | | if (DataRow[0]["FBillNo"].ToString() != "") |
| | | { |
| | | //删除原有日计划用料清单 |
| | | JObject deletemodel = new JObject(); |
| | | deletemodel.Add("Numbers", DataRow[0]["FBillNo"].ToString()); |
| | | |
| | | JObject _saveObj = JObject.Parse(cloudClient.Delete("Paez_Sc_DayPlanPPBomBill", deletemodel.ToString())); |
| | | string _saveIsSuc = _saveObj["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper(); |
| | | |
| | | if (_saveIsSuc == "TRUE") |
| | | { |
| | | |
| | | } |
| | | else |
| | | { |
| | | LogHelper.Error(_saveIsSuc); |
| | | } |
| | | } |
| | | JObject model = new JObject(); |
| | | model.Add("FHDate", DateTime.Now); |
| | | model.Add("FHMaterID", new JObject() { ["Fnumber"] = DataRow[0]["FNUMBER"].ToString() });//物料 |
| | | model.Add("FHWorkDate", DataRow[0]["FHMASTERDATE"].ToString());//日工单日期 FHWorkDate |
| | | model.Add("FHQty", DataRow[0]["FHQTY"].ToString());//主产品数量:FHQty |
| | | model.Add("FHUnitID", new JObject() { ["Fnumber"] = DataRow[0]["FUNITNUMBER"].ToString() });//单位:FHUnitID |
| | | model.Add("FDayPlanFID", DataRow[0]["FID"].ToString());//日计划工单内码 |
| | | JArray Entry = new JArray(); |
| | | for (int i = 0; i < DataRow.Count(); i++) |
| | | { |
| | | JObject ModelEnty = new JObject(); |
| | | ModelEnty.Add("FHMaterSubID", new JObject() { ["Fnumber"] = DataRow[i]["FNUMBER2"].ToString() });//子物料FHMaterSubID |
| | | ModelEnty.Add("FHUnitSubID", new JObject() { ["Fnumber"] = DataRow[i]["FUNITNUMBER2"].ToString() });//单位FHUnitSubID |
| | | ModelEnty.Add("FHQtyMust", DataRow[i]["FHQtyMust"].ToString());//应发数量FHQtyMust |
| | | ModelEnty.Add("FHQtySub", DataRow[i]["FHQtyMust"].ToString());//数量FHQtySub |
| | | ModelEnty.Add("FHPPBomInterID", DataRow[i]["FPPBOM"].ToString());//用料清单主内码FHPPBomInterID |
| | | ModelEnty.Add("FHPPBomEntryID", DataRow[i]["FENTRYID"].ToString());//用料清单子内码FHPPBomEntryID |
| | | //model.Add("FHMaterSubID", DataRow[i]["FHQtyMust"].ToString());//分母分子 |
| | | Entry.Add(ModelEnty); |
| | | } |
| | | model.Add("FEntity", Entry); |
| | | JObject jsonRoot = new JObject() |
| | | { |
| | | ["Creator"] = "", |
| | | ["NeedUpDateFields"] = new JArray(), |
| | | ["NeedReturnFields"] = new JArray(), |
| | | ["IsDeleteEntry"] = "true", |
| | | ["SubSystemId"] = "", |
| | | ["IsVerifyBaseDataField"] = "false", |
| | | ["Model"] = model |
| | | }; |
| | | var result = cloudClient.Save("Paez_Sc_DayPlanPPBomBill", jsonRoot.ToString()); |
| | | JObject saveObj = JObject.Parse(result); |
| | | string saveIsSuc = saveObj["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper(); |
| | | |
| | | if (saveIsSuc == "TRUE") |
| | | { |
| | | |
| | | } |
| | | else |
| | | { |
| | | LogHelper.Error(saveIsSuc); |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | catch (System.Exception ex) |
| | | { |
| | | LogHelper.Error(ex.Message.ToString()); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | using System.Reflection; |
| | | using System.Runtime.CompilerServices; |
| | | using System.Runtime.InteropServices; |
| | | |
| | | // 有关程序集的一般信息由以下 |
| | | // 控制。更改这些特性值可修改 |
| | | // 与程序集关联的信息。 |
| | | [assembly: AssemblyTitle("Demo.TimedTaskPlugIn")] |
| | | [assembly: AssemblyDescription("")] |
| | | [assembly: AssemblyConfiguration("")] |
| | | [assembly: AssemblyCompany("")] |
| | | [assembly: AssemblyProduct("Demo.TimedTaskPlugIn")] |
| | | [assembly: AssemblyCopyright("Copyright © 2020")] |
| | | [assembly: AssemblyTrademark("")] |
| | | [assembly: AssemblyCulture("")] |
| | | |
| | | // 将 ComVisible 设置为 false 会使此程序集中的类型 |
| | | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 |
| | | //请将此类型的 ComVisible 特性设置为 true。 |
| | | [assembly: ComVisible(false)] |
| | | |
| | | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID |
| | | [assembly: Guid("3b5437ee-f19c-4b69-90a4-88866841337b")] |
| | | |
| | | // 程序集的版本信息由下列四个值组成: |
| | | // |
| | | // 主版本 |
| | | // 次版本 |
| | | // 生成号 |
| | | // 修订号 |
| | | // |
| | | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 |
| | | //通过使用 "*",如下所示: |
| | | // [assembly: AssemblyVersion("1.0.*")] |
| | | [assembly: AssemblyVersion("1.0.0.0")] |
| | | [assembly: AssemblyFileVersion("1.0.0.0")] |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <packages> |
| | | <package id="log4net" version="1.2.10" targetFramework="net472" /> |
| | | <package id="ZD.Cloud.Common" version="7.5.1.2" targetFramework="net472" /> |
| | | <package id="ZD.Cloud.Logger" version="1.1.0" targetFramework="net472" /> |
| | | <package id="ZD.Cloud.WebApi" version="7.3.2.3" targetFramework="net472" /> |
| | | <package id="ZD.Newtonsoft.Json" version="1.0.0" targetFramework="net472" /> |
| | | <package id="ZD.Share" version="1.0.3" targetFramework="net472" /> |
| | | </packages> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| | | <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> |
| | | <PropertyGroup> |
| | | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
| | | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
| | | <ProjectGuid>{0AF059FC-D287-42C4-8835-133C3D96243A}</ProjectGuid> |
| | | <OutputType>Library</OutputType> |
| | | <AppDesignerFolder>Properties</AppDesignerFolder> |
| | | <RootNamespace>Demo.Utility</RootNamespace> |
| | | <AssemblyName>Demo.Utility</AssemblyName> |
| | | <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> |
| | | <FileAlignment>512</FileAlignment> |
| | | <Deterministic>true</Deterministic> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
| | | <DebugSymbols>true</DebugSymbols> |
| | | <DebugType>full</DebugType> |
| | | <Optimize>false</Optimize> |
| | | <OutputPath>bin\Debug\</OutputPath> |
| | | <DefineConstants>DEBUG;TRACE</DefineConstants> |
| | | <ErrorReport>prompt</ErrorReport> |
| | | <WarningLevel>4</WarningLevel> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
| | | <DebugType>pdbonly</DebugType> |
| | | <Optimize>true</Optimize> |
| | | <OutputPath>bin\Release\</OutputPath> |
| | | <DefineConstants>TRACE</DefineConstants> |
| | | <ErrorReport>prompt</ErrorReport> |
| | | <WarningLevel>4</WarningLevel> |
| | | </PropertyGroup> |
| | | <ItemGroup> |
| | | <Reference Include="BouncyCastle.Crypto, Version=1.8.6.0, Culture=neutral, PublicKeyToken=0e99375e54769942, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\Portable.BouncyCastle.1.8.6\lib\net40\BouncyCastle.Crypto.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="ICSharpCode.SharpZipLib, Version=1.2.0.246, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\SharpZipLib.1.2.0\lib\net45\ICSharpCode.SharpZipLib.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="NPOI, Version=2.5.1.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\NPOI.2.5.1\lib\net45\NPOI.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="NPOI.OOXML, Version=2.5.1.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\NPOI.2.5.1\lib\net45\NPOI.OOXML.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="NPOI.OpenXml4Net, Version=2.5.1.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\NPOI.2.5.1\lib\net45\NPOI.OpenXml4Net.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="NPOI.OpenXmlFormats, Version=2.5.1.0, Culture=neutral, PublicKeyToken=0df73ec7942b34e1, processorArchitecture=MSIL"> |
| | | <HintPath>..\..\..\packages\NPOI.2.5.1\lib\net45\NPOI.OpenXmlFormats.dll</HintPath> |
| | | </Reference> |
| | | <Reference Include="System" /> |
| | | <Reference Include="System.Core" /> |
| | | <Reference Include="System.Drawing" /> |
| | | <Reference Include="System.Web" /> |
| | | <Reference Include="System.Web.Extensions" /> |
| | | <Reference Include="System.Xml.Linq" /> |
| | | <Reference Include="System.Data.DataSetExtensions" /> |
| | | <Reference Include="Microsoft.CSharp" /> |
| | | <Reference Include="System.Data" /> |
| | | <Reference Include="System.Net.Http" /> |
| | | <Reference Include="System.Xml" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <Compile Include="Properties\AssemblyInfo.cs" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <None Include="packages.config" /> |
| | | </ItemGroup> |
| | | <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
| | | </Project> |
New file |
| | |
| | | using System.Reflection; |
| | | using System.Runtime.CompilerServices; |
| | | using System.Runtime.InteropServices; |
| | | |
| | | // 有关程序集的一般信息由以下 |
| | | // 控制。更改这些特性值可修改 |
| | | // 与程序集关联的信息。 |
| | | [assembly: AssemblyTitle("Demo.Utility")] |
| | | [assembly: AssemblyDescription("")] |
| | | [assembly: AssemblyConfiguration("")] |
| | | [assembly: AssemblyCompany("")] |
| | | [assembly: AssemblyProduct("Demo.Utility")] |
| | | [assembly: AssemblyCopyright("Copyright © 2020")] |
| | | [assembly: AssemblyTrademark("")] |
| | | [assembly: AssemblyCulture("")] |
| | | |
| | | // 将 ComVisible 设置为 false 会使此程序集中的类型 |
| | | //对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 |
| | | //请将此类型的 ComVisible 特性设置为 true。 |
| | | [assembly: ComVisible(false)] |
| | | |
| | | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID |
| | | [assembly: Guid("0af059fc-d287-42c4-8835-133c3d96243a")] |
| | | |
| | | // 程序集的版本信息由下列四个值组成: |
| | | // |
| | | // 主版本 |
| | | // 次版本 |
| | | // 生成号 |
| | | // 修订号 |
| | | // |
| | | //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 |
| | | //通过使用 "*",如下所示: |
| | | // [assembly: AssemblyVersion("1.0.*")] |
| | | [assembly: AssemblyVersion("1.0.0.0")] |
| | | [assembly: AssemblyFileVersion("1.0.0.0")] |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <packages> |
| | | <package id="NPOI" version="2.5.1" targetFramework="net472" /> |
| | | <package id="Portable.BouncyCastle" version="1.8.6" targetFramework="net472" /> |
| | | <package id="SharpZipLib" version="1.2.0" targetFramework="net472" /> |
| | | </packages> |
| | |
| | | <Compile Include="Entity\SCM\SAL_SaleOrder.cs" /> |
| | | <Compile Include="Infrastructure\IBillHead.cs" /> |
| | | <Compile Include="Infrastructure\IBillEntry.cs" /> |
| | | <Compile Include="Model\PODemandPlan\DayPlanPpbom.cs" /> |
| | | <Compile Include="Model\PODemandPlan\PODemandPlanTemp.cs" /> |
| | | <Compile Include="Model\PODemandPlan\PurchaseInventory.cs" /> |
| | | <Compile Include="Model\PRD_Inventory.cs" /> |
| | | <Compile Include="Model\PRD_PPBOM.cs" /> |
| | | <Compile Include="Properties\AssemblyInfo.cs" /> |
| | | <Compile Include="SearchModel\SAL_SaleOrderSearch.cs" /> |
| | | </ItemGroup> |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace Demo.Model.Model.PODemandPlan |
| | | { |
| | | //日计划展开数据明细 |
| | | public class DayPlanPpbom |
| | | { |
| | | |
| | | /// <summary> |
| | | /// 日计划工单主ID |
| | | /// </summary> |
| | | public long FID { get; set; } |
| | | /// <summary> |
| | | /// 日计划工单编号 |
| | | /// </summary> |
| | | public string FBILLNO { get; set; } |
| | | /// <summary> |
| | | /// 日计划明细日期 |
| | | /// </summary> |
| | | public DateTime FHMASTERDATE { get; set; } |
| | | /// <summary> |
| | | /// 日计划明细数量 |
| | | /// </summary> |
| | | public decimal FHQTY { get; set; } |
| | | /// <summary> |
| | | /// 齐套数 |
| | | /// </summary> |
| | | public decimal FCOMPLETECOUNT { get; set; } |
| | | /// <summary> |
| | | /// 生产订单工单ID |
| | | /// </summary> |
| | | public long FPRDMOMAINID { get; set; } |
| | | /// <summary> |
| | | /// 子表ID |
| | | /// </summary> |
| | | public int FENTRYID { get; set; } |
| | | /// <summary> |
| | | /// 单位用料 |
| | | /// </summary> |
| | | public decimal FNeedQty { get; set; } |
| | | /// <summary> |
| | | /// 物料ID |
| | | /// </summary> |
| | | public string FMATERIALID { get; set; } |
| | | /// <summary> |
| | | /// 提前天数 |
| | | /// </summary> |
| | | public int FFIXLEADTIME { get; set; } |
| | | /// <summary> |
| | | ///最大包装 |
| | | /// </summary> |
| | | public decimal FMAXPOQTY { get; set; } |
| | | /// <summary> |
| | | /// 最小包装量 |
| | | /// </summary> |
| | | public decimal FMINPOQTY { get; set; } |
| | | /// <summary> |
| | | /// 物料编码 |
| | | /// </summary> |
| | | public string FNumber { get; set; } |
| | | /// <summary> |
| | | /// 实际需求 |
| | | /// </summary> |
| | | public decimal NeedQty { get; set; } |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace Demo.Model.Model.PODemandPlan |
| | | { |
| | | /// <summary> |
| | | /// 提料计划临时储存 |
| | | /// </summary> |
| | | public class PODemandPlanTemp |
| | | { |
| | | /// <summary> |
| | | /// 日计划工单主ID |
| | | /// </summary> |
| | | public long FID { get; set; } |
| | | /// <summary> |
| | | /// 日计划工单编号 |
| | | /// </summary> |
| | | public string FBILLNO { get; set; } |
| | | /// <summary> |
| | | /// 日计划明细日期 |
| | | /// </summary> |
| | | public DateTime FHMASTERDATE { get; set; } |
| | | /// <summary> |
| | | /// 日计划明细数量 |
| | | /// </summary> |
| | | public decimal FHQTY { get; set; } |
| | | /// <summary> |
| | | /// 生产订单工单ID |
| | | /// </summary> |
| | | public long FPRDMOMAINID { get; set; } |
| | | /// <summary> |
| | | /// 子表ID |
| | | /// </summary> |
| | | public int FENTRYID { get; set; } |
| | | /// <summary> |
| | | /// 数量 |
| | | /// </summary> |
| | | public decimal FQty { get; set; } |
| | | /// <summary> |
| | | /// 物料ID |
| | | /// </summary> |
| | | public string FMATERIALID { get; set; } |
| | | /// <summary> |
| | | /// 物料编码 |
| | | /// </summary> |
| | | public string FNumber { get; set; } |
| | | |
| | | /// <summary> |
| | | /// 采购FID |
| | | /// </summary> |
| | | public long PurchseFID { get; set; } |
| | | /// <summary> |
| | | /// 采购订单单号 |
| | | /// </summary> |
| | | public string PurchseFBillNo { get; set; } |
| | | /// <summary> |
| | | /// 采购子表标识 |
| | | /// </summary> |
| | | public long PurchseFentryID { get; set; } |
| | | /// <summary> |
| | | /// 供应商id |
| | | /// </summary> |
| | | public long FSUPPLIERID { get; set; } |
| | | /// <summary> |
| | | /// 供应商名称 |
| | | /// </summary> |
| | | public string PurchseFNUMBER { get; set; } |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace Demo.Model.Model.PODemandPlan |
| | | { |
| | | /// <summary> |
| | | /// 采购订单物料库存 |
| | | /// </summary> |
| | | public class PurchaseInventory |
| | | { |
| | | /// <summary> |
| | | /// 采购FID |
| | | /// </summary> |
| | | public long FID { get; set; } |
| | | //采购订单单号 |
| | | public string FBillNo { get; set; } |
| | | /// <summary> |
| | | /// 采购子表标识 |
| | | /// </summary> |
| | | public long FENTRYID { get; set; } |
| | | /// <summary> |
| | | /// 供应商id |
| | | /// </summary> |
| | | public long FSUPPLIERID { get; set; } |
| | | /// <summary> |
| | | /// 供应商名称 |
| | | /// </summary> |
| | | public string FNUMBER { get; set; } |
| | | /// <summary> |
| | | /// 物料ID |
| | | /// </summary> |
| | | public string FMATERIALID { get; set; } |
| | | /// <summary> |
| | | /// 采购数量 |
| | | /// </summary> |
| | | public decimal FQTY { get; set; } |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace Demo.Model.Model |
| | | { |
| | | /// <summary> |
| | | /// 即时库存 |
| | | /// </summary> |
| | | public class PRD_Inventory |
| | | { |
| | | /// <summary> |
| | | /// 物料ID |
| | | /// </summary> |
| | | public string FMATERIALID { get; set; } |
| | | /// <summary> |
| | | /// 即时库存 |
| | | /// </summary> |
| | | public decimal FBASEQTY { get; set; } |
| | | |
| | | |
| | | } |
| | | } |
New file |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | |
| | | namespace Demo.Model.Model |
| | | { |
| | | /// <summary> |
| | | /// 清单配料方式 |
| | | /// </summary> |
| | | public class PRD_PPBOM |
| | | { |
| | | |
| | | /// <summary> |
| | | /// 主键 |
| | | /// </summary> |
| | | public long FID { get; set; } |
| | | /// <summary> |
| | | /// 生产用料清单单号 |
| | | /// </summary> |
| | | public string FBillNo { get; set; } |
| | | /// <summary> |
| | | /// 生产订单单号 |
| | | /// </summary> |
| | | public string FMOBillNO { get; set; } |
| | | /// <summary> |
| | | /// 生产订单内码 |
| | | /// </summary> |
| | | public string FMoId { get; set; } |
| | | /// <summary> |
| | | /// 父级物料ID |
| | | /// </summary> |
| | | public string FMaterialID { get; set; } |
| | | /// <summary> |
| | | /// 父级物料数量 |
| | | /// </summary> |
| | | public decimal FQty { get; set; } |
| | | /// <summary> |
| | | /// 子项物料ID |
| | | /// </summary> |
| | | public string FMATERIALID2 { get; set; } |
| | | /// <summary> |
| | | /// 子项物料名称 |
| | | /// </summary> |
| | | public string FNumber { get; set; } |
| | | /// <summary> |
| | | /// 需求数量 |
| | | /// </summary> |
| | | public decimal FNeedQty { get; set; } |
| | | /// <summary> |
| | | /// 即时库存 |
| | | /// </summary> |
| | | public decimal FBASEQTY { get; set; } |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | <DefineConstants>DEBUG;TRACE</DefineConstants> |
| | | <ErrorReport>prompt</ErrorReport> |
| | | <WarningLevel>4</WarningLevel> |
| | | <PlatformTarget>x64</PlatformTarget> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
| | | <DebugType>pdbonly</DebugType> |
| | |
| | | <Compile Include="Untity\XhHttpClient.cs" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <None Include="app.config" /> |
| | | <None Include="Config\kdapi.config" /> |
| | | <None Include="packages.config" /> |
| | | </ItemGroup> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <configuration> |
| | | <runtime> |
| | | <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> |
| | | <dependentAssembly> |
| | | <assemblyIdentity name="BouncyCastle.Crypto" publicKeyToken="0e99375e54769942" culture="neutral" /> |
| | | <bindingRedirect oldVersion="0.0.0.0-1.8.6.0" newVersion="1.8.6.0" /> |
| | | </dependentAssembly> |
| | | <dependentAssembly> |
| | | <assemblyIdentity name="ICSharpCode.SharpZipLib" publicKeyToken="1b03e6acf1164f73" culture="neutral" /> |
| | | <bindingRedirect oldVersion="0.0.0.0-1.2.0.246" newVersion="1.2.0.246" /> |
| | | </dependentAssembly> |
| | | </assemblyBinding> |
| | | </runtime> |
| | | </configuration> |