From ca52de22ee83aff47081786a482f01308be6b080 Mon Sep 17 00:00:00 2001
From: 王 垚 <1402714037@qq.com>
Date: 星期二, 17 十一月 2020 11:13:10 +0800
Subject: [PATCH] 项目文件上传

---
 src/BLL/Demo.BillView/PRD/ProCompleteAnalysisDetails.cs      |  170 +++
 src/BLL/Demo.TimedTaskPlugIn/Config/kdapi.config             |    9 
 src/BLL/Demo.BillView/Config/kdapi.config                    |    9 
 src/BLL/Demo.TimedTaskPlugIn/Demo.TimedTaskPlugIn.csproj     |  155 +++
 src/BLL/Demo.BillView/app.config                             |   15 
 src/BLL/Demo.TimedTaskPlugIn/PRD/DayPlanPPBomBillTimeTask.cs |  123 ++
 src/BLL/Demo.BillView/PRD/Pro_ScDayImport.cs                 |  328 +++++++
 src/Model/Demo.Model/Demo.Model.csproj                       |    5 
 src/Model/Demo.Model/Model/PODemandPlan/PODemandPlanTemp.cs  |   73 +
 src/ProductizationTemplate/app.config                        |   15 
 src/BLL/Demo.BillView/PRD/ProCompleteAnalysisMateriel.cs     |   58 +
 src/BLL/Demo.Utility/Demo.Utility.csproj                     |   71 +
 src/BLL/Demo.BillView/PRD/Pro_WorkBillPlatImport.cs          |   31 
 src/BLL/Demo.TimedTaskPlugIn/Properties/AssemblyInfo.cs      |   36 
 src/BLL/Demo.DynamicForm/Properties/AssemblyInfo.cs          |    2 
 src/BLL/Demo.TimedTaskPlugIn/packages.config                 |    9 
 src/BLL/Demo.Utility/Properties/AssemblyInfo.cs              |   36 
 src/BLL/Demo.BillView/PRD/Pro_WorkBillPlatform.cs            | 1055 ++++++++++++++++++++++
 src/BLL/Demo.BillView/Demo.BillView.csproj                   |  195 +++-
 ProductizationTemplate.sln                                   |   28 
 src/BLL/Demo.BillView/packages.config                        |   11 
 src/ProductizationTemplate/ProductizationTemplate.csproj     |    2 
 src/Model/Demo.Model/Model/PRD_PPBOM.cs                      |   58 +
 /dev/null                                                    |    4 
 src/BLL/Demo.Utility/packages.config                         |    6 
 src/Model/Demo.Model/Model/PODemandPlan/DayPlanPpbom.cs      |   70 +
 src/Model/Demo.Model/Model/PRD_Inventory.cs                  |   25 
 src/BLL/Demo.DynamicForm/Demo.DynamicForm.csproj             |   87 -
 src/Model/Demo.Model/Model/PODemandPlan/PurchaseInventory.cs |   42 
 29 files changed, 2,577 insertions(+), 151 deletions(-)

diff --git a/ProductizationTemplate.sln b/ProductizationTemplate.sln
index 10917e2..975c3b0 100644
--- a/ProductizationTemplate.sln
+++ b/ProductizationTemplate.sln
@@ -19,8 +19,6 @@
 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}"
@@ -38,6 +36,12 @@
 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
@@ -65,10 +69,6 @@
 		{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
@@ -97,6 +97,18 @@
 		{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
@@ -105,7 +117,6 @@
 		{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}
@@ -113,6 +124,9 @@
 		{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}
diff --git a/src/BLL/Demo.BillView/Config/kdapi.config b/src/BLL/Demo.BillView/Config/kdapi.config
new file mode 100644
index 0000000..50a5a75
--- /dev/null
+++ b/src/BLL/Demo.BillView/Config/kdapi.config
@@ -0,0 +1,9 @@
+锘�<?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>
\ No newline at end of file
diff --git a/src/BLL/Demo.BillView/Demo.BillView.csproj b/src/BLL/Demo.BillView/Demo.BillView.csproj
index 1f3c0d7..9529e2e 100644
--- a/src/BLL/Demo.BillView/Demo.BillView.csproj
+++ b/src/BLL/Demo.BillView/Demo.BillView.csproj
@@ -21,6 +21,7 @@
     <DefineConstants>DEBUG;TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
+    <PlatformTarget>x64</PlatformTarget>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <DebugType>pdbonly</DebugType>
@@ -31,101 +32,178 @@
     <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>
@@ -133,10 +211,21 @@
       <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>
\ No newline at end of file
diff --git a/src/BLL/Demo.BillView/PRD/ProCompleteAnalysisDetails.cs b/src/BLL/Demo.BillView/PRD/ProCompleteAnalysisDetails.cs
new file mode 100644
index 0000000..b2a07cb
--- /dev/null
+++ b/src/BLL/Demo.BillView/PRD/ProCompleteAnalysisDetails.cs
@@ -0,0 +1,170 @@
+锘縰sing 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;
+        }
+    }
+}
diff --git a/src/BLL/Demo.BillView/PRD/ProCompleteAnalysisMateriel.cs b/src/BLL/Demo.BillView/PRD/ProCompleteAnalysisMateriel.cs
new file mode 100644
index 0000000..4b2e832
--- /dev/null
+++ b/src/BLL/Demo.BillView/PRD/ProCompleteAnalysisMateriel.cs
@@ -0,0 +1,58 @@
+锘縰sing 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);//褰撳墠搴撳瓨鎯呭喌  
+                }
+            }
+        }
+
+
+
+    }
+}
diff --git a/src/BLL/Demo.BillView/PRD/Pro_ScDayImport.cs b/src/BLL/Demo.BillView/PRD/Pro_ScDayImport.cs
new file mode 100644
index 0000000..1607510
--- /dev/null
+++ b/src/BLL/Demo.BillView/PRD/Pro_ScDayImport.cs
@@ -0,0 +1,328 @@
+锘縰sing 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(); //浜у搧浠g爜
+                            //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>  
+        /// 鏃堕棿鎴砊imestamp杞崲鎴愭棩鏈�  
+        /// </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()); //鐢熶骇璁㈠崟鍙稦SCOrderNo
+                    jsonModel.Add("FHSeOrderBillNo", current["FSalOrderNo"].ToString());//閿�鍞鍗曞彿
+                    jsonModel.Add("FHOrderLev", current["FOrderLevel"].ToString());//璁㈠崟绛夌骇
+                    jsonModel.Add("FSalOrderCount", current["FOrderLevel"].ToString());//閿�鍞鍗曟暟閲�
+                    jsonModel.Add("FHOrderCommitDate", current["FDeliveryDate"].ToString());//浜よ揣鏈烪OrderCommitDate
+                    //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());
+            }
+
+        }
+
+
+
+
+    }
+
+}
diff --git a/src/BLL/Demo.BillView/PRD/Pro_WorkBillPlatImport.cs b/src/BLL/Demo.BillView/PRD/Pro_WorkBillPlatImport.cs
new file mode 100644
index 0000000..f105da7
--- /dev/null
+++ b/src/BLL/Demo.BillView/PRD/Pro_WorkBillPlatImport.cs
@@ -0,0 +1,31 @@
+锘縰sing 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);
+
+            }
+        }
+    }
+}
diff --git a/src/BLL/Demo.BillView/PRD/Pro_WorkBillPlatform.cs b/src/BLL/Demo.BillView/PRD/Pro_WorkBillPlatform.cs
new file mode 100644
index 0000000..4275c62
--- /dev/null
+++ b/src/BLL/Demo.BillView/PRD/Pro_WorkBillPlatform.cs
@@ -0,0 +1,1055 @@
+锘縰sing 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>
+        /// 瀵煎嚭鏁版嵁鍒癊xcel
+        /// </summary>
+        public void ExportExcel()
+        {
+            string[] Title = new string[] {"閿�鍞鍗曞彿", "鐢熶骇璁㈠崟鍙�", "鐢熶骇缁勭粐", "鐢熶骇杞﹂棿", "鐢熶骇璧勬簮", "浜у搧浠g爜", "浜у搧鍚嶇О", "瑙勬牸鍨嬪彿", "璁¢噺鍗曚綅",
+                "鎵规鍙�","閿�鍞鍗曟暟閲�","鐢熶骇璁㈠崟鏁伴噺","鎬婚綈濂楁暟閲�","浜よ揣鏃ユ湡","璁㈠崟绛夌骇","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 锛�
+            // 鏄剧ず涓�涓笉鍋滄粴鍔ㄧ殑妯℃嫙杩涘害锛屼笌瀹為檯澶勭悊杩涘害娌℃湁鍏宠仈銆�
+            // 姝ゆ柟妗堜紭鐐癸細瀹為檯澶勭悊浠g爜鏃犻渶璁$畻杩涘害
+            // 姝ゆ柟妗堢己鐐癸細杩涘害涓嶅噯纭紝涓旇繘搴﹂〉闈笉浼氳嚜鍔ㄥ叧闂��
+
+
+            // bUseTruePro = true: 杩涘害鐣岄潰鏄剧ず鐪熷疄杩涘害
+            // 姝ゆ柟妗堜紭鐐癸細杩涘害鐪熷疄
+            // 姝ゆ柟妗堢己鐐癸細闇�瑕佸湪澶勭悊浠g爜涓紝涓嶆柇鐨勬洿鏂扮湡瀹炶繘搴︼紝鏇存柊璇彞
+            // this.View.Session["ProcessRateValue"] = 100;
+            // 鐗瑰埆璇存槑锛屽綋杩涘害鏇存柊鍒�100鏃讹紝杩涘害鐣岄潰浼氳嚜鍔ㄥ叧闂�
+            // 鏈渚嬮�夌敤姝ゆ柟妗�
+            var processForm = this.View.ShowProcessForm(
+                new Action<FormResult>(t => { }),
+                true,
+                "姝e湪鐢熸垚锛岃绋嶅��...");
+
+            // 寮�鍚竴涓紓姝ョ嚎绋嬶紝澶勭悊寮曞叆鍔熻兘
+            // 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")#闇�瑕佽缃殑鍗曟嵁浣撴爣璇咾ey
+                    //grid.SetRowBackcolor("#FFFF00", 0)#璁剧疆鏁磋鑳屾櫙棰滆壊
+                    //grid.SetForecolor("FMaterialName", "#FF0000", 0)#闇�瑕佽缃瓧娈垫爣璇咾ey[/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"> 鏃ヨ鍒掑伐鍗旻ID</param>
+        /// <param name="FDayPlanWorkID"> 璁″垝鎬绘暟閲�</param>
+        /// <returns></returns>
+        public string SumGetComplete(string FMATERIALID, string FMainInterID, string FMainEntryID, string FDayPlanWorkID, decimal SumPlan)
+        {
+            //FDayPlanWorkID鏃ヨ鍒掑伐鍗旾D鍘诲垹闄ょ幇鏈夌殑榻愬鍒嗘瀽鏁版嵁
+            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);//浜у搧浠g爜
+                    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);//婧愬崟涓诲唴鐮丗HMainSourceInterID
+                    this.Model.SetValue("FHMainSourceEntryID", dt.Rows[i]["FPRDMOENTYID"].ToString(), i);//婧愬崟瀛愬唴鐮丗HMainSourceEntryID
+                    this.Model.SetValue("FDayPlanWorkID", dt.Rows[i]["FID"].ToString(), i);//鏃ヨ鍒掑伐鍗旻ID
+
+                    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);//鏃ヨ鍒掑伐鍗旻ID
+                        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);//鏃ヨ鍒掑伐鍗旻ID
+                        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"]);//鏃ュ伐鍗旾D
+                    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());//鏃ヨ鍒掑伐鍗旻ID
+                                    FentityModel.Add("FHSourceEntryID", dr["FENTRYID"].ToString());//鏃ヨ鍒掑伐鍗旻ENTRYID
+                                    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 = "";//鏃ュ伐鍗旾D
+            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
+
+                                });
+                                //鎵i櫎褰撳墠琛屽搴旈噰璐鍗曟暟閲�
+                                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
+
+                                });
+                                //鎵i櫎褰撳墠琛屽搴旈噰璐鍗曟暟閲�
+                                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);//鏃ヨ鍒掑伐鍗旻ID
+                    FentityModel.Add("FHSourceEntryID", _item.FENTRYID);//鏃ヨ鍒掑伐鍗旻ENTRYID
+                    FentityModel.Add("FHSourceBillNo", _item.FBILLNO);//鏃ヨ鍒掑伐鍗曞崟鍙�
+                    FentityModel.Add("FHSourceBillType", "");//鏃ヨ鍒掑伐鍗曠被鍨�
+
+                    FentityModel.Add("FHPOOrderInterID", _item.PurchseFID);// 閲囪喘璁㈠崟鍐呯爜锛欶HPOOrderInterID
+                    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();
+        }
+    }
+}
diff --git a/src/BLL/Demo.BillView/app.config b/src/BLL/Demo.BillView/app.config
new file mode 100644
index 0000000..4fa7e81
--- /dev/null
+++ b/src/BLL/Demo.BillView/app.config
@@ -0,0 +1,15 @@
+锘�<?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>
\ No newline at end of file
diff --git a/src/BLL/Demo.BillView/packages.config b/src/BLL/Demo.BillView/packages.config
index 7658684..12f2e02 100644
--- a/src/BLL/Demo.BillView/packages.config
+++ b/src/BLL/Demo.BillView/packages.config
@@ -1,4 +1,13 @@
 锘�<?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>
\ No newline at end of file
diff --git a/src/BLL/Demo.DynamicForm/Demo.DynamicForm.csproj b/src/BLL/Demo.DynamicForm/Demo.DynamicForm.csproj
index 62d4b56..fdac406 100644
--- a/src/BLL/Demo.DynamicForm/Demo.DynamicForm.csproj
+++ b/src/BLL/Demo.DynamicForm/Demo.DynamicForm.csproj
@@ -4,7 +4,7 @@
   <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>
@@ -31,87 +31,6 @@
     <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" />
@@ -122,12 +41,10 @@
     <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>
\ No newline at end of file
diff --git a/src/BLL/Demo.DynamicForm/PRD/Pro_WorkBillPlatform.cs b/src/BLL/Demo.DynamicForm/PRD/Pro_WorkBillPlatform.cs
deleted file mode 100644
index 0b5c3cc..0000000
--- a/src/BLL/Demo.DynamicForm/PRD/Pro_WorkBillPlatform.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-锘縰sing Kingdee.BOS.Core.Bill.PlugIn;
-using Kingdee.BOS.Core.DynamicForm.PlugIn;
-using Kingdee.BOS.Core.DynamicForm.PlugIn.Args;
-using Kingdee.BOS.Util;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Linq;
-using System.Runtime.CompilerServices;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace Demo.DynamicForm.PRD
-{
-    [Description("鐢熶骇璁″垝骞冲彴瀵煎嚭")]
-    [HotUpdate]
-    public class Pro_WorkBillPlatform : AbstractDynamicFormPlugIn
-    {
-        public override void BarItemClick(BarItemClickEventArgs e)
-        {
-            base.BarItemClick(e);
-            try
-            {
-                if (e.BarItemKey.ToUpper() == "BTEXPORT")
-                {
-
-                    this.View.ShowMessage("娴嬭瘯鍟�");
-                }
-            }
-            catch (Exception)
-            {
-
-                throw;
-            }
-        }
-    }
-}
diff --git a/src/BLL/Demo.DynamicForm/Properties/AssemblyInfo.cs b/src/BLL/Demo.DynamicForm/Properties/AssemblyInfo.cs
index a26ae43..0a6a3e6 100644
--- a/src/BLL/Demo.DynamicForm/Properties/AssemblyInfo.cs
+++ b/src/BLL/Demo.DynamicForm/Properties/AssemblyInfo.cs
@@ -20,7 +20,7 @@
 [assembly: ComVisible(false)]
 
 // 濡傛灉姝ら」鐩悜 COM 鍏紑锛屽垯涓嬪垪 GUID 鐢ㄤ簬绫诲瀷搴撶殑 ID
-[assembly: Guid("d227b701-e3b7-432c-951b-5f396b82b1f3")]
+[assembly: Guid("e2975d07-f28a-417e-8225-19281a7a62bd")]
 
 // 绋嬪簭闆嗙殑鐗堟湰淇℃伅鐢变笅鍒楀洓涓�肩粍鎴�: 
 //
diff --git a/src/BLL/Demo.DynamicForm/packages.config b/src/BLL/Demo.DynamicForm/packages.config
deleted file mode 100644
index 7658684..0000000
--- a/src/BLL/Demo.DynamicForm/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-锘�<?xml version="1.0" encoding="utf-8"?>
-<packages>
-  <package id="ZD.Cloud.Common" version="7.5.1.2" targetFramework="net472" />
-</packages>
\ No newline at end of file
diff --git a/src/BLL/Demo.TimedTaskPlugIn/Config/kdapi.config b/src/BLL/Demo.TimedTaskPlugIn/Config/kdapi.config
new file mode 100644
index 0000000..25b63df
--- /dev/null
+++ b/src/BLL/Demo.TimedTaskPlugIn/Config/kdapi.config
@@ -0,0 +1,9 @@
+锘�<?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>
\ No newline at end of file
diff --git a/src/BLL/Demo.TimedTaskPlugIn/Demo.TimedTaskPlugIn.csproj b/src/BLL/Demo.TimedTaskPlugIn/Demo.TimedTaskPlugIn.csproj
new file mode 100644
index 0000000..df313f2
--- /dev/null
+++ b/src/BLL/Demo.TimedTaskPlugIn/Demo.TimedTaskPlugIn.csproj
@@ -0,0 +1,155 @@
+锘�<?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>
\ No newline at end of file
diff --git a/src/BLL/Demo.TimedTaskPlugIn/PRD/DayPlanPPBomBillTimeTask.cs b/src/BLL/Demo.TimedTaskPlugIn/PRD/DayPlanPPBomBillTimeTask.cs
new file mode 100644
index 0000000..7db3fe0
--- /dev/null
+++ b/src/BLL/Demo.TimedTaskPlugIn/PRD/DayPlanPPBomBillTimeTask.cs
@@ -0,0 +1,123 @@
+锘縰sing 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() });//鍗曚綅锛欶HUnitID 
+                        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() });//瀛愮墿鏂橣HMaterSubID
+                            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());//鐢ㄦ枡娓呭崟涓诲唴鐮丗HPPBomInterID
+                            ModelEnty.Add("FHPPBomEntryID", DataRow[i]["FENTRYID"].ToString());//鐢ㄦ枡娓呭崟瀛愬唴鐮丗HPPBomEntryID
+                            //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());
+            }
+
+        }
+
+    }
+}
diff --git a/src/BLL/Demo.TimedTaskPlugIn/Properties/AssemblyInfo.cs b/src/BLL/Demo.TimedTaskPlugIn/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..8fcbcc7
--- /dev/null
+++ b/src/BLL/Demo.TimedTaskPlugIn/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+锘縰sing 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")]
diff --git a/src/BLL/Demo.TimedTaskPlugIn/packages.config b/src/BLL/Demo.TimedTaskPlugIn/packages.config
new file mode 100644
index 0000000..6660b02
--- /dev/null
+++ b/src/BLL/Demo.TimedTaskPlugIn/packages.config
@@ -0,0 +1,9 @@
+锘�<?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>
\ No newline at end of file
diff --git a/src/BLL/Demo.Utility/Demo.Utility.csproj b/src/BLL/Demo.Utility/Demo.Utility.csproj
new file mode 100644
index 0000000..b0dc0d8
--- /dev/null
+++ b/src/BLL/Demo.Utility/Demo.Utility.csproj
@@ -0,0 +1,71 @@
+锘�<?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>
\ No newline at end of file
diff --git a/src/BLL/Demo.Utility/Properties/AssemblyInfo.cs b/src/BLL/Demo.Utility/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..e88847e
--- /dev/null
+++ b/src/BLL/Demo.Utility/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+锘縰sing 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")]
diff --git a/src/BLL/Demo.Utility/packages.config b/src/BLL/Demo.Utility/packages.config
new file mode 100644
index 0000000..ffcc8bc
--- /dev/null
+++ b/src/BLL/Demo.Utility/packages.config
@@ -0,0 +1,6 @@
+锘�<?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>
\ No newline at end of file
diff --git a/src/Model/Demo.Model/Demo.Model.csproj b/src/Model/Demo.Model/Demo.Model.csproj
index 0e7961c..bc5194d 100644
--- a/src/Model/Demo.Model/Demo.Model.csproj
+++ b/src/Model/Demo.Model/Demo.Model.csproj
@@ -45,6 +45,11 @@
     <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>
diff --git a/src/Model/Demo.Model/Model/PODemandPlan/DayPlanPpbom.cs b/src/Model/Demo.Model/Model/PODemandPlan/DayPlanPpbom.cs
new file mode 100644
index 0000000..062444b
--- /dev/null
+++ b/src/Model/Demo.Model/Model/PODemandPlan/DayPlanPpbom.cs
@@ -0,0 +1,70 @@
+锘縰sing 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; }
+    }
+}
diff --git a/src/Model/Demo.Model/Model/PODemandPlan/PODemandPlanTemp.cs b/src/Model/Demo.Model/Model/PODemandPlan/PODemandPlanTemp.cs
new file mode 100644
index 0000000..7000ebd
--- /dev/null
+++ b/src/Model/Demo.Model/Model/PODemandPlan/PODemandPlanTemp.cs
@@ -0,0 +1,73 @@
+锘縰sing 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>
+        /// 渚涘簲鍟唅d
+        /// </summary>
+        public long FSUPPLIERID { get; set; }
+        /// <summary>
+        /// 渚涘簲鍟嗗悕绉�
+        /// </summary>
+        public string PurchseFNUMBER { get; set; }
+
+    }
+}
diff --git a/src/Model/Demo.Model/Model/PODemandPlan/PurchaseInventory.cs b/src/Model/Demo.Model/Model/PODemandPlan/PurchaseInventory.cs
new file mode 100644
index 0000000..5a57e5a
--- /dev/null
+++ b/src/Model/Demo.Model/Model/PODemandPlan/PurchaseInventory.cs
@@ -0,0 +1,42 @@
+锘縰sing 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>
+        /// 渚涘簲鍟唅d
+        /// </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; }
+
+    }
+}
diff --git a/src/Model/Demo.Model/Model/PRD_Inventory.cs b/src/Model/Demo.Model/Model/PRD_Inventory.cs
new file mode 100644
index 0000000..c181799
--- /dev/null
+++ b/src/Model/Demo.Model/Model/PRD_Inventory.cs
@@ -0,0 +1,25 @@
+锘縰sing 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; }
+
+
+    }
+}
diff --git a/src/Model/Demo.Model/Model/PRD_PPBOM.cs b/src/Model/Demo.Model/Model/PRD_PPBOM.cs
new file mode 100644
index 0000000..315612b
--- /dev/null
+++ b/src/Model/Demo.Model/Model/PRD_PPBOM.cs
@@ -0,0 +1,58 @@
+锘縰sing 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; }
+
+
+    }
+}
diff --git a/src/ProductizationTemplate/ProductizationTemplate.csproj b/src/ProductizationTemplate/ProductizationTemplate.csproj
index f595d2f..a082d6c 100644
--- a/src/ProductizationTemplate/ProductizationTemplate.csproj
+++ b/src/ProductizationTemplate/ProductizationTemplate.csproj
@@ -22,6 +22,7 @@
     <DefineConstants>DEBUG;TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
+    <PlatformTarget>x64</PlatformTarget>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <DebugType>pdbonly</DebugType>
@@ -168,6 +169,7 @@
     <Compile Include="Untity\XhHttpClient.cs" />
   </ItemGroup>
   <ItemGroup>
+    <None Include="app.config" />
     <None Include="Config\kdapi.config" />
     <None Include="packages.config" />
   </ItemGroup>
diff --git a/src/ProductizationTemplate/app.config b/src/ProductizationTemplate/app.config
new file mode 100644
index 0000000..4fa7e81
--- /dev/null
+++ b/src/ProductizationTemplate/app.config
@@ -0,0 +1,15 @@
+锘�<?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>
\ No newline at end of file

--
Gitblit v1.9.1