From 8d5747ca9b72c69655c9fcd8814d3e427d6b3da1 Mon Sep 17 00:00:00 2001
From: 王 垚 <1402714037@qq.com>
Date: 星期日, 14 三月 2021 01:39:58 +0800
Subject: [PATCH] 代码上传

---
 src/BLL/Demo.BillView/Demo.BillView.csproj                       |   25 +-
 src/BLL/Demo.BillView/PRD/Pro_MaterialRequisitionAudit.cs        |    1 
 src/BLL/Demo.BillView/PRD/Pro_WorkBillPlatImport.cs              |    2 
 src/BLL/Demo.BillView/app.config                                 |   12 
 src/BLL/Demo.BillView/PRD/Pro_ScDayImport.cs                     |   35 ++-
 src/BLL/Demo.BillView/PRD/Pro_MaterialRequisitionAuditDayPlan.cs |    1 
 src/BLL/Demo.BillView/PRD/ProCompleteAnalysisMateriel.cs         |    3 
 src/BLL/Demo.BillView/PRD/Pro_TlPush.cs                          |  353 ++++---------------------------------------
 src/BLL/Demo.BillView/PRD/Pro_WorkBillPlatform.cs                |    1 
 9 files changed, 84 insertions(+), 349 deletions(-)

diff --git a/src/BLL/Demo.BillView/Demo.BillView.csproj b/src/BLL/Demo.BillView/Demo.BillView.csproj
index d583cfd..5df1f6c 100644
--- a/src/BLL/Demo.BillView/Demo.BillView.csproj
+++ b/src/BLL/Demo.BillView/Demo.BillView.csproj
@@ -12,6 +12,7 @@
     <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
     <Deterministic>true</Deterministic>
+    <TargetFrameworkProfile />
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <DebugSymbols>true</DebugSymbols>
@@ -42,16 +43,16 @@
       <HintPath>..\..\..\packages\ZD.Cloud.Common.7.2.3\lib\net452\K3Cloud.Extend.dll</HintPath>
     </Reference>
     <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.2.904.6, Culture=neutral, processorArchitecture=MSIL">
-      <HintPath>..\..\..\packages\ZD.Cloud.Common.7.2.3\lib\net452\Kingdee.BOS.App.dll</HintPath>
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>C:\Users\14027\Desktop\鏈�鏂扮増bin鏂囦欢\Kingdee.BOS.dll</HintPath>
     </Reference>
     <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>
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>C:\Users\14027\Desktop\鏈�鏂扮増bin鏂囦欢\Kingdee.BOS.App.Core.dll</HintPath>
     </Reference>
     <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>
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>C:\Users\14027\Desktop\鏈�鏂扮増bin鏂囦欢\Kingdee.BOS.Business.PlugIn.dll</HintPath>
     </Reference>
     <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>
@@ -60,10 +61,12 @@
       <HintPath>..\..\..\packages\ZD.Cloud.Common.7.2.3\lib\net452\Kingdee.BOS.Contracts.dll</HintPath>
     </Reference>
     <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>
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>C:\Users\14027\Desktop\鏈�鏂扮増bin鏂囦欢\Kingdee.BOS.Core.dll</HintPath>
     </Reference>
     <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>
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>C:\Users\14027\Desktop\鏈�鏂扮増bin鏂囦欢\Kingdee.BOS.DataEntity.dll</HintPath>
     </Reference>
     <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>
@@ -93,7 +96,8 @@
       <HintPath>..\..\..\packages\ZD.Cloud.Common.7.2.3\lib\net452\Kingdee.BOS.ServiceFacade.KDServiceFx.dll</HintPath>
     </Reference>
     <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>
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>C:\Users\14027\Desktop\鏈�鏂扮増bin鏂囦欢\Kingdee.BOS.ServiceHelper.dll</HintPath>
     </Reference>
     <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>
@@ -138,7 +142,8 @@
       <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>
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>C:\Users\14027\Desktop\鏈�鏂扮増bin鏂囦欢\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>
diff --git a/src/BLL/Demo.BillView/PRD/ProCompleteAnalysisMateriel.cs b/src/BLL/Demo.BillView/PRD/ProCompleteAnalysisMateriel.cs
index 80c55bf..6ef10f6 100644
--- a/src/BLL/Demo.BillView/PRD/ProCompleteAnalysisMateriel.cs
+++ b/src/BLL/Demo.BillView/PRD/ProCompleteAnalysisMateriel.cs
@@ -1,5 +1,4 @@
-锘縰sing Kingdee.BOS.App.Data;
-using Kingdee.BOS.Core.DynamicForm;
+锘縰sing Kingdee.BOS.Core.DynamicForm;
 using Kingdee.BOS.Core.DynamicForm.PlugIn;
 using Kingdee.BOS.Core.DynamicForm.PlugIn.Args;
 
diff --git a/src/BLL/Demo.BillView/PRD/Pro_MaterialRequisitionAudit.cs b/src/BLL/Demo.BillView/PRD/Pro_MaterialRequisitionAudit.cs
index b92ab3a..98b5cc0 100644
--- a/src/BLL/Demo.BillView/PRD/Pro_MaterialRequisitionAudit.cs
+++ b/src/BLL/Demo.BillView/PRD/Pro_MaterialRequisitionAudit.cs
@@ -11,6 +11,7 @@
 using Kingdee.BOS.Core.Metadata.FieldElement;
 using System.ComponentModel;
 using Kingdee.BOS.ServiceHelper;
+using Kingdee.K3.SCM.App;
 
 namespace Demo.DynamicForm.PRD
 {
diff --git a/src/BLL/Demo.BillView/PRD/Pro_MaterialRequisitionAuditDayPlan.cs b/src/BLL/Demo.BillView/PRD/Pro_MaterialRequisitionAuditDayPlan.cs
index 2427709..46e94b5 100644
--- a/src/BLL/Demo.BillView/PRD/Pro_MaterialRequisitionAuditDayPlan.cs
+++ b/src/BLL/Demo.BillView/PRD/Pro_MaterialRequisitionAuditDayPlan.cs
@@ -11,6 +11,7 @@
 using Kingdee.BOS.Core.Metadata.FieldElement;
 using System.ComponentModel;
 using Kingdee.BOS.ServiceHelper;
+using Kingdee.K3.SCM.App;
 
 namespace Demo.DynamicForm.PRD
 {
diff --git a/src/BLL/Demo.BillView/PRD/Pro_ScDayImport.cs b/src/BLL/Demo.BillView/PRD/Pro_ScDayImport.cs
index e234176..07e1916 100644
--- a/src/BLL/Demo.BillView/PRD/Pro_ScDayImport.cs
+++ b/src/BLL/Demo.BillView/PRD/Pro_ScDayImport.cs
@@ -5,18 +5,14 @@
 using Kingdee.BOS.Orm.DataEntity;
 using Kingdee.BOS.ServiceHelper.Excel;
 using Kingdee.BOS.Util;
+using Kingdee.BOS.ServiceHelper;
+
 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;
 using Demo.Model.Model;
 using ZD.Share.Common;
@@ -29,6 +25,7 @@
     [HotUpdate]
     public class Pro_ScDayImport : AbstractDynamicFormPlugIn
     {
+
         CloudClient cloudClient = new CloudClient("http://localhost/K3Cloud/");
         private string fileFullPath = string.Empty;
         //public override void BarItemClick(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.BarItemClickEventArgs e)
@@ -52,17 +49,29 @@
         //    }
 
         //}
-        public override void AfterBarItemClick(AfterBarItemClickEventArgs e)
+        public override void OnLoad(EventArgs e)
         {
-            base.AfterBarItemClick(e);
+            base.OnLoad(e);
+            throw new Exception("1");
+        }
+
+
+        public override void BarItemClick(BarItemClickEventArgs e)
+        {
+            base.BarItemClick(e);
+            throw new Exception("1");
+
+            LogHelper.Info("瀵煎叆鍔熻兘鐐瑰嚮鎸夐挳锛�");
             if (e.BarItemKey.ToUpper().Equals("TBIMPORT"))
             {
-                LogService.WriteAsync("瀵煎叆鍔熻兘锛�");
+                this.View.ShowErrMessage("娴嬭瘯瀵煎叆鍔熻兘鐐瑰嚮鎸夐挳");
+                LogHelper.Info("瀵煎叆鍔熻兘鐐瑰嚮鎸夐挳锛�");
                 ImportData();
             }
 
             if (e.BarItemKey.ToUpper().Equals("TBWJSC"))
             {
+                this.View.ShowErrMessage("娴嬭瘯鏂囦欢涓婁紶鍔熻兘鐐瑰嚮鎸夐挳");
                 //Control updateControl = this.View.GetControl("fileFullPath");
                 //// 涓婁紶鍦板潃
                 //string uploadUrl = "FileUpLoadServices/FileService.svc/upload2attachment/";
@@ -70,7 +79,7 @@
                 //// 涓嬭浇鍦板潃
                 //string downloadUrl = "FileUpLoadServices/download.aspx";
                 //updateControl.SetCustomPropertyValue("ExDownLoadUrl", downloadUrl);
-                LogService.WriteAsync("涓婁紶鍔熻兘锛�");
+                LogHelper.Info("鏂囦欢涓婁紶鍔熻兘鐐瑰嚮鎸夐挳锛�");
                 ImportDataSC(fileFullPath);
             }
         }
@@ -108,7 +117,7 @@
                 {
                     DataSet ds = helper.ReadFromFile(fileFullPath, 1);
                     DataTable dt = ds.Tables[0];
-                    LogService.WriteAsync("瀵煎叆鍔熻兘锛歞t琛屾暟锛�" + dt.Rows.Count);
+                    LogHelper.Info("瀵煎叆鍔熻兘锛歞t琛屾暟锛�" + dt.Rows.Count);
                     DateTime date = Convert.ToDateTime(this.Model.GetValue("F_Paez_Date"));
                     if (dt.Rows.Count > 0)
                     {
@@ -251,13 +260,13 @@
         {
             try
             {
-                LogService.WriteAsync("娴嬭瘯");
                 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);
+                LogHelper.Info("瀵煎叆鍔熻兘鍒楄〃琛屾暟锛�" + entityDataObjoct.Count);
                 List<string> sqlList = new List<string>();
                 foreach (DynamicObject current in entityDataObjoct)
                 {
@@ -442,7 +451,7 @@
                         var result = cloudClient.Save("Paez_Sc_WorkBillAutoSortBill", jsonRoot.ToString());
                         JObject saveObj = JObject.Parse(result);
                         string saveIsSuc = saveObj["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper();
-                        LogService.WriteAsync(jsonRoot);
+                        //LogService.WriteAsync(jsonRoot);
                         if (saveIsSuc == "TRUE")
                         {
                             string FDayPlanBillNo = saveObj["Result"]["Number"].ToString();
diff --git a/src/BLL/Demo.BillView/PRD/Pro_TlPush.cs b/src/BLL/Demo.BillView/PRD/Pro_TlPush.cs
index 142f471..b555b37 100644
--- a/src/BLL/Demo.BillView/PRD/Pro_TlPush.cs
+++ b/src/BLL/Demo.BillView/PRD/Pro_TlPush.cs
@@ -21,6 +21,7 @@
 using Kingdee.BOS.Core.Metadata.BarElement;
 using Kingdee.BOS.Core.Metadata.ConvertElement;
 using Kingdee.BOS.Core.Metadata.ConvertElement.ServiceArgs;
+using Kingdee.BOS.Core.Metadata.EntityElement;
 using Kingdee.BOS.Core.Metadata.FormElement;
 using Kingdee.BOS.Core.Metadata.QueryElement;
 using Kingdee.BOS.Core.Msg;
@@ -36,6 +37,7 @@
 using Kingdee.K3.SCM.Business;
 using Kingdee.K3.SCM.Core.SCP;
 using Kingdee.K3.SCM.ServiceHelper;
+using Newtonsoft.Json.Linq;
 
 namespace Demo.BillView.PRD
 {
@@ -44,9 +46,6 @@
     [Kingdee.BOS.Util.HotUpdate]
     public class Pro_TlPush : AbstractBillPlugIn
     {
-        private string InstockEntryTableNameAs;
-        private string ReturnEntryTableNameAs;
-        private string PoChangeEntryTableNameAs;
         public override void BarItemClick(BarItemClickEventArgs e)
         {
             string a;
@@ -54,327 +53,47 @@
             {
                 if (a == "TBPUSH")
                 {
-                    try
-                    {
-                        PermissionAuthResult permissionAuthResult = PermissionServiceHelper.FuncPermissionAuth(base.Context, new BusinessObject
-                        {
-                            Id = "SCP_ReceiveBill"
-                        }, "fce8b1aca2144beeb3c6655eaf78bc34");
-                        if (!permissionAuthResult.Passed)
-                        {
-                            string msg = ResManager.LoadKDString("娌℃湁閫佽揣閫氱煡鍗曠殑鏂板鏉冮檺", "00444293030010485", SubSystemType.SCM, new object[0]);
-                            base.View.ShowErrMessage(msg, "", MessageBoxType.Notice);
-                            return;
-                        }
-                        DynamicObjectCollection source = this.Model.DataObject["FEntity"] as DynamicObjectCollection;
-                        string[] selEntryIds = (from p in source
-                                                select Convert.ToString(p["id"])).ToArray<string>();
-                        InvokePushToRec(base.View, selEntryIds);
-                        return;
-                    }
-                    catch (Exception ex)
-                    {
-                        if (ex.InnerException != null)
-                        {
-                            base.View.ShowErrMessage(ex.InnerException.Message, "", MessageBoxType.Notice);
-                        }
-                        else
-                        {
-                            base.View.ShowErrMessage(ex.Message, "", MessageBoxType.Notice);
-                        }
-                        return;
-                    }
-                }
-                long num = Convert.ToInt64(this.Model.DataObject["id"]);
-                string arg = Convert.ToString(this.Model.GetValue("fbillno"));
-                ScpBillTrackInfo scpBillTrackInfo = new ScpBillTrackInfo();
-                scpBillTrackInfo.IsUpTrack = false;
-                scpBillTrackInfo.BillName = ResManager.LoadKDString("渚涘簲鍟嗗崗鍚岄噰璐鍗�", "00444293030009441", SubSystemType.SCM, new object[0]);
-                TrackItem trackItem = new TrackItem();
-                trackItem.FormId = "SCP_ReceiveBill";
-                trackItem.FormName = ResManager.LoadKDString("閫佽揣閫氱煡鍗�", "00444293030009436", SubSystemType.SCM, new object[0]);
-                trackItem.Filter = string.Format("  FSRCFORMID='PUR_PurchaseOrder'  AND FSRCID={0} ", num);
-                scpBillTrackInfo.TrackItems.Add(trackItem);
-                TrackItem trackItem2 = new TrackItem();
-                trackItem2.FormId = "SCP_MRAPP";
-                trackItem2.FormName = ResManager.LoadKDString("閫�鏂欓�氱煡鍗�", "00444293030010278", SubSystemType.SCM, new object[0]);
-                trackItem2.Filter = string.Format(" FSRCBILLTYPEID='PUR_PurchaseOrder' and FSRCBILLNO = '{0}' ", arg);
-                if (string.IsNullOrWhiteSpace(this.InstockEntryTableNameAs))
-                {
-                    FormMetadata formMetadata = (FormMetadata)MetaDataServiceHelper.Load(base.Context, "SCP_InStock", true);
-                    SelectField selectField = formMetadata.BusinessInfo.GetQueryInfo().GetSelectField("FMATERIALID");
-                    this.InstockEntryTableNameAs = selectField.FullFieldName.Substring(0, selectField.FullFieldName.IndexOf('.'));
-                }
-                if (string.IsNullOrWhiteSpace(this.ReturnEntryTableNameAs))
-                {
-                    FormMetadata formMetadata2 = (FormMetadata)MetaDataServiceHelper.Load(base.Context, "SCP_MRB", true);
-                    SelectField selectField2 = formMetadata2.BusinessInfo.GetQueryInfo().GetSelectField("FMATERIALID");
-                    this.ReturnEntryTableNameAs = selectField2.FullFieldName.Substring(0, selectField2.FullFieldName.IndexOf('.'));
-                }
-                if (string.IsNullOrWhiteSpace(this.PoChangeEntryTableNameAs))
-                {
-                    FormMetadata formMetadata3 = (FormMetadata)MetaDataServiceHelper.Load(base.Context, "SCP_POChange", true);
-                    SelectField selectField3 = formMetadata3.BusinessInfo.GetQueryInfo().GetSelectField("FMATERIALID");
-                    this.PoChangeEntryTableNameAs = selectField3.FullFieldName.Substring(0, selectField3.FullFieldName.IndexOf('.'));
-                }
-                TrackItem trackItem3 = new TrackItem();
-                trackItem3.FormId = "SCP_InStock";
-                trackItem3.FormName = ResManager.LoadKDString("閲囪喘鍏ュ簱鍗�", "00444293030010276", SubSystemType.SCM, new object[0]);
-                TrackItem trackItem4 = new TrackItem();
-                trackItem4.FormId = "SCP_MRB";
-                trackItem4.FormName = ResManager.LoadKDString("閲囪喘閫�鏂欏崟", "00444293030010277", SubSystemType.SCM, new object[0]);
-                TrackItem trackItem5 = new TrackItem();
-                trackItem5.FormId = "SCP_POChange";
-                trackItem5.FormName = ResManager.LoadKDString("閲囪喘璁㈠崟鍙樻洿鍗�", "00444293030010132", SubSystemType.SCM, new object[0]);
-                List<long> list = new List<long>();
-                list.Add(-1L);
-                List<long> list2 = new List<long>();
-                list2.Add(-1L);
-                List<long> list3 = new List<long>();
-                list3.Add(-1L);
-                string item = Convert.ToString(base.View.Model.DataObject["id"]);
-                List<string> list4 = new List<string>
-                {
-                    item
-                };
-                string[] trackIds = list4.ToArray();
-                List<long> linkBillEntryIds = PurchaseNewServiceHelper.GetLinkBillEntryIds(base.Context, "T_STK_INSTOCKENTRY_lk", "t_PUR_POOrderEntry", trackIds, null, true);
-                List<long> linkBillEntryIds2 = PurchaseNewServiceHelper.GetLinkBillEntryIds(base.Context, "T_PUR_MRBENTRY_lk", "t_PUR_POOrderEntry", trackIds, null, true);
-                List<long> linkBillEntryIds3 = PurchaseNewServiceHelper.GetLinkBillEntryIds(base.Context, "T_PUR_POChangeEntry_LK", "t_PUR_POOrderEntry", trackIds, null, true);
-                trackItem3.Filter = string.Format(" {1}.fentryid in ({0}) ", string.Join<long>(",", linkBillEntryIds), this.InstockEntryTableNameAs);
-                trackItem4.Filter = string.Format(" {1}.fentryid in ({0}) ", string.Join<long>(",", linkBillEntryIds2), this.ReturnEntryTableNameAs);
-                trackItem5.Filter = string.Format(" {1}.fentryid in ({0}) ", string.Join<long>(",", linkBillEntryIds3), this.PoChangeEntryTableNameAs);
-                scpBillTrackInfo.TrackItems.Add(trackItem2);
-                scpBillTrackInfo.TrackItems.Add(trackItem3);
-                scpBillTrackInfo.TrackItems.Add(trackItem4);
-                scpBillTrackInfo.TrackItems.Add(trackItem5);
-                //base.View.ShowForm(scpBillTrackInfo);
+                    // 鑾峰彇鐖跺崟鎹綋
+                    Entity entity = this.View.BillBusinessInfo.GetEntity("FEntity");//鏍囪瘑
+                    //DynamicObjectCollection entityRows = entity.DynamicProperty.GetValue(this.Model.DataObject) as DynamicObjectCollection;//鑾峰彇鐖跺崟鎹綋琛岄泦鍚�
+                    DynamicObjectCollection entityRows = this.Model.GetEntityDataObject(entity);//鑾峰彇鐖跺崟鎹綋琛岄泦鍚�
+                    // 1鍜�2鍧囧彲
+                    // 鍙栧綋鍓嶉〉闈㈠瓙鍗曟嵁浣�
+                    //Entity subEntity = this.View.BillBusinessInfo.GetEntity("FEntity");//鏍囪瘑
+                    //DynamicObjectCollection rows = this.Model.GetEntityDataObject(subEntity);//鑾峰緱瀛愬崟鎹綋琛岄泦鍚�
 
-                View.ShowForm(new DynamicFormShowParameter
-                {
-                    Height = 500,
-                    Width = 1000,
-                    FormId = "SCP_ScpBillTracker",
-                    SyncCallBackAction = true,
-                    ParentPageId = View.PageId,
-                    PageId = SequentialGuid.NewGuid().ToString(),
-                    CustomComplexParams =
-                {
+                    string sql = $"select * from ";
+
+
+                    JObject model = new JObject();
+                    model.Add("FHDate", "");
+                    model.Add("FSettleCurrId", new JObject() { ["Fnumber"] = "PRE001" });
+                    model.Add("FSupplierID", new JObject() { ["Fnumber"] = "" });
+
+                    JArray Fentity = new JArray();
+                    for (int i = 0; i < 10; i++)
                     {
-                        "ScpBillTrackInfo",
-                        scpBillTrackInfo
+                        JObject FentityModel = new JObject();
+
+                        FentityModel.Add("FUnitID", new JObject() { ["Fnumber"] = "Pcs" }); //鍙戞枡鏂瑰紡
+
+                        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
+                    };
                 }
-                });
-                return;
             }
         }
 
-        public static void InvokePushToRec(IDynamicFormView formView, string[] selEntryIds)
-        {
-            if (CheckPoHasPushRec(formView.Context, selEntryIds))
-            {
-                formView.ShowWarnningMessage(ResManager.LoadKDString("閲囪喘璁㈠崟鏈夋殏瀛樼殑鍏宠仈閫佽揣鍗曟嵁锛屽啀娆$敓鎴愪細閫犳垚鍗曟嵁閲嶅涓嬫帹锛屾槸鍚︾户缁敓鎴愰�佽揣閫氱煡鍗曪紵", "00444293030037168", SubSystemType.SCM, new object[0]), "", MessageBoxOptions.YesNoCancel, delegate (MessageBoxResult selRst)
-                {
-                    if (MessageBoxResult.Yes == selRst)
-                    {
-                        InnerInvokePushToRec(formView, selEntryIds);
-                    }
-                }, MessageBoxType.Advise);
-                return;
-            }
-            InnerInvokePushToRec(formView, selEntryIds);
-        }
 
-        public static bool CheckPoHasPushRec(Context ctx, string[] billEntryIds)
-        {
-            string strSql = string.Format("select 1 from T_PUR_RECEIVE TH\r\nINNER JOIN T_PUR_RECEIVEENTRY TE ON TE.FID=TH.FID\r\nINNER JOIN T_PUR_RECEIVEENTRY_LK TELK ON TE.FENTRYID=TELK.FENTRYID\r\ninner join (select /*+ cardinality(b1 {0})*/FID from TABLE(fn_StrSplit(@FID,',',1)) b1) b on TELK.FSID=b.fid  \r\nwhere TH.FDOCUMENTSTATUS='Z' ", billEntryIds.Length);
-            int num = DBServiceHelper.ExecuteScalar<int>(ctx, strSql, 0, new List<SqlParam>
-            {
-                new SqlParam("@FID", KDDbType.udt_inttable, billEntryIds)
-            }.ToArray());
-            return num == 1;
-        }
-
-        public static void InnerInvokePushToRec(IDynamicFormView formView, string[] selEntryIds)
-        {
-            DynamicFormShowParameter dynamicFormShowParameter = new DynamicFormShowParameter();
-            dynamicFormShowParameter.FormId = "SCP_PushParamFrom";
-            dynamicFormShowParameter.ParentPageId = formView.PageId;
-            dynamicFormShowParameter.OpenStyle.ShowType = ShowType.Modal;
-            //dynamicFormShowParameter.CustomComplexParams.Add("SrcFormId", "paez_PODemandPlan");
-            //dynamicFormShowParameter.CustomComplexParams.Add("TargetFormId", "SCP_ReceiveBill");
-            dynamicFormShowParameter.CustomComplexParams.Add("SrcFormId", "PUR_PurchaseOrder");
-            dynamicFormShowParameter.CustomComplexParams.Add("TargetFormId", "PUR_ReceiveBill");
-
-            formView.ShowForm(dynamicFormShowParameter, delegate (FormResult results)
-            {
-                if (results != null && results.ReturnData != null)
-                {
-                    DynamicObject dynamicObject = results.ReturnData as DynamicObject;
-                    string CbConvertRule = Convert.ToString(dynamicObject["CbConvertRule"]);
-                    List<ConvertRuleElement> convertRules = ConvertServiceHelper.GetConvertRules(formView.Context, "PUR_PurchaseOrder", "PUR_ReceiveBill");
-                    //List<ConvertRuleElement> convertRules = ConvertServiceHelper.GetConvertRules(formView.Context, "paez_PODemandPlan", "SCP_ReceiveBill");
-                    ConvertRuleElement rule = convertRules.FirstOrDefault((ConvertRuleElement t) => t.Id == CbConvertRule);
-                    PushPurOrderToRec(formView, selEntryIds, rule);
-                }
-            });
-        }
-
-        public static void PushPurOrderToRec(IDynamicFormView formView, string[] billEntryIds, ConvertRuleElement rule)
-        {
-            ConvertPolicyElement convertPolicyElement = rule.Policies[6];
-            Collection<BillTypeMapElement> billTypeMaps = ((BillTypeMapPolicyElement)convertPolicyElement).BillTypeMaps;
-            Dictionary<string, string> dictionary = new Dictionary<string, string>();
-            foreach (BillTypeMapElement billTypeMapElement in billTypeMaps)
-            {
-                if (!dictionary.ContainsKey(billTypeMapElement.SourceBillTypeId))
-                {
-                    dictionary.Add(billTypeMapElement.SourceBillTypeId, billTypeMapElement.TargetBillTypeId);
-                }
-            }
-            List<ScpOrderPushInfo> list = new List<ScpOrderPushInfo>();
-            string strSQL = string.Format(" select tr.FentryID, t.fbilltypeid,ts.FMASTERID as fsupmasterid,t.fbillNO,TR.FID AS FBILLID  \r\n                        from Cg_PODemandPlanBillMain t\r\n                        inner join T_BD_SUPPLIER ts on ts.FSUPPLIERID=t.FSUPPLIERID\r\n                        inner join Cg_PODemandPlanBillSub TR ON TR.FID=T.FID \r\n                        inner join  (select /*+ cardinality(b {0})*/ fid from table(fn_StrSplit(@FID, ',',1)) b) tb on TR.fentryid=tb.fid \r\n                      ", billEntryIds.Length);
-            List<SqlParam> list2 = new List<SqlParam>
-            {
-                new SqlParam("@FID", KDDbType.udt_inttable, billEntryIds)
-            };
-            DynamicObjectCollection dynamicObjectCollection = DBServiceHelper.ExecuteDynamicObject(formView.Context, strSQL, null, null, CommandType.Text, list2.ToArray());
-            if (dynamicObjectCollection == null || dynamicObjectCollection.Count == 0)
-            {
-                throw new KDException("", ResManager.LoadKDString("鍙楁簮鍗曟墍閫夊崟鎹被鍨嬮檺鍒讹紝涓嶅厑璁镐笅鎺ㄧ洰鏍囧崟锛�", "00444293030009439", SubSystemType.SCM, new object[0]));
-            }
-            long supplierMasterIdByUserId = SupplierServiceHelper.GetSupplierMasterIdByUserId(formView.Context, formView.Context.UserId);
-            string format = ResManager.LoadKDString("鎮ㄦ病鏈夋潈闄愭搷浣滃崟鎹畕0}", "00444293030009639", SubSystemType.SCM, new object[0]);
-            foreach (DynamicObject dynamicObject in dynamicObjectCollection)
-            {
-                if (supplierMasterIdByUserId != Convert.ToInt64(dynamicObject["fsupmasterid"]))
-                {
-                    throw new KDException("", string.Format(format, Convert.ToString(dynamicObject["fbillNO"])));
-                }
-                list.Add(new ScpOrderPushInfo
-                {
-                    EntryId = Convert.ToString(dynamicObject["FentryID"]),
-                    BillId = Convert.ToString(dynamicObject["FBILLID"]),
-                    BilltypeId = Convert.ToString(dynamicObject["fbilltypeid"])
-                });
-            }
-            IEnumerable<IGrouping<string, ScpOrderPushInfo>> enumerable = from g in list
-                                                                          group g by g.BilltypeId;
-            List<DynamicObject> list3 = new List<DynamicObject>();
-            StringBuilder stringBuilder = new StringBuilder();
-            foreach (IGrouping<string, ScpOrderPushInfo> grouping in enumerable)
-            {
-                string key = grouping.Key;
-                List<ListSelectedRow> list4 = new List<ListSelectedRow>();
-                int num = 0;
-                foreach (ScpOrderPushInfo scpOrderPushInfo in grouping)
-                {
-                    list4.Add(new ListSelectedRow(scpOrderPushInfo.BillId, scpOrderPushInfo.EntryId, num++, "paez_PODemandPlan")
-                    {
-                        EntryEntityKey = "FEntity"
-                    });
-                }
-                ListSelectedRow[] selectedRows = list4.ToArray();
-                PushArgs pushArgs = new PushArgs(rule, selectedRows);
-                if (dictionary.ContainsKey(key))
-                {
-                    pushArgs.TargetBillTypeId = dictionary[key];
-                }
-                try
-                {
-                    ConvertOperationResult convertOperationResult = ConvertServiceHelper.Push(formView.Context, pushArgs, false);
-                    list3.AddRange(from p in convertOperationResult.TargetDataEntities
-                                   select p.DataEntity);
-                }
-                catch (Exception ex)
-                {
-                    stringBuilder.AppendLine(ex.Message);
-                }
-            }
-            if (list3.Count == 0)
-            {
-                if (stringBuilder.Length > 0)
-                {
-                    formView.ShowErrMessage(stringBuilder.ToString(), "", MessageBoxType.Notice);
-                    return;
-                }
-                formView.ShowErrMessage(ResManager.LoadKDString("娌℃湁鍙笅鎺ㄦ暟鎹紒", "00444293030009360", SubSystemType.SCM, new object[0]), "", MessageBoxType.Notice);
-                return;
-            }
-            else
-            {
-                DynamicObject[] array = list3.ToArray();
-                Dictionary<string, object> dictionary2 = new Dictionary<string, object>();
-                dictionary2["CodeTime"] = 0;
-                dictionary2["UpdateMaxNum"] = 1;
-                FormMetadata formMetadata = (FormMetadata)MetaDataServiceHelper.Load(formView.Context, "PUR_ReceiveBill", true);
-                List<BillNoInfo> billNo = BusinessDataServiceHelper.GetBillNo(formView.Context, formMetadata.BusinessInfo, array, dictionary2, "");
-                for (int i = 0; i < array.Count<DynamicObject>(); i++)
-                {
-                    array[i]["BillNo"] = billNo[i].BillNo;
-                    array[i]["IsInsideBill"] = true;
-                }
-                OperateOption option = OperateOption.Create();
-                IOperationResult operationResult = BusinessDataServiceHelper.Draft(formView.Context, formMetadata.BusinessInfo, array, option, "");
-                if (!operationResult.IsSuccess)
-                {
-                    formView.ShowMessage(ResManager.LoadKDString("涓嬫帹澶辫触锛�", "00444293030009440", SubSystemType.SCM, new object[0]), MessageBoxType.Notice);
-                    return;
-                }
-                if (operationResult.SuccessDataEnity.Count<DynamicObject>() == 1)
-                {
-                    DynamicObject dynamicObject2 = operationResult.SuccessDataEnity.FirstOrDefault<DynamicObject>();
-                    formView.ShowForm(new BillShowParameter
-                    {
-                        FormId = "SCP_ReceiveBill",
-                        PKey = Convert.ToString(dynamicObject2["id"]),
-                        Status = OperationStatus.EDIT,
-                        OpenStyle =
-                        {
-                            ShowType = ShowType.MainNewTabPage
-                        },
-                        CustomComplexParams =
-                        {
-                            {
-                                "FromScpOrderPushRecs",
-                                true
-                            }
-                        }
-                    });
-                    return;
-                }
-                DynamicObjectType dynamicObjectType = new DynamicObjectType("ScpRecBillDatas", null, null, DataEntityTypeFlag.Class, new object[0]);
-                dynamicObjectType.RegisterSimpleProperty("BillNo", typeof(string), null, false, new object[0]);
-                dynamicObjectType.RegisterSimpleProperty("DocumentStatus", typeof(string), null, false, new object[0]);
-                dynamicObjectType.RegisterSimpleProperty("BillId", typeof(long), null, false, new object[0]);
-                DynamicObjectCollection dynamicObjectCollection2 = new DynamicObjectCollection(dynamicObjectType, null);
-                foreach (DynamicObject dynamicObject3 in operationResult.SuccessDataEnity)
-                {
-                    DynamicObject dynamicObject4 = new DynamicObject(dynamicObjectType);
-                    dynamicObject4["BillNo"] = dynamicObject3["BillNo"];
-                    dynamicObject4["DocumentStatus"] = dynamicObject3["DocumentStatus"];
-                    dynamicObject4["BillId"] = dynamicObject3["id"];
-                    dynamicObjectCollection2.Add(dynamicObject4);
-                }
-                formView.ShowForm(new DynamicFormShowParameter
-                {
-                    FormId = "SCP_GENRECRSTFORM",
-                    PageId = SequentialGuid.NewGuid().ToString(),
-                    OpenStyle =
-                    {
-                        ShowType = ShowType.MainNewTabPage
-                    },
-                    CustomComplexParams =
-                    {
-                        {
-                            "ScpRecBillDatas",
-                            dynamicObjectCollection2
-                        }
-                    }
-                });
-                return;
-            }
-        }
     }
 }
diff --git a/src/BLL/Demo.BillView/PRD/Pro_WorkBillPlatImport.cs b/src/BLL/Demo.BillView/PRD/Pro_WorkBillPlatImport.cs
index f105da7..c9bd156 100644
--- a/src/BLL/Demo.BillView/PRD/Pro_WorkBillPlatImport.cs
+++ b/src/BLL/Demo.BillView/PRD/Pro_WorkBillPlatImport.cs
@@ -9,6 +9,7 @@
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using ZD.Cloud.Logger;
 
 namespace Demo.BillView.PRD
 {
@@ -21,6 +22,7 @@
             base.BarItemClick(e);
             if (e.BarItemKey.Equals("btImport"))
             {
+                LogHelper.Info("瀵煎叆鍔熻兘鐐瑰嚮鎸夐挳锛�");
                 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
index 26f142a..54dce4c 100644
--- a/src/BLL/Demo.BillView/PRD/Pro_WorkBillPlatform.cs
+++ b/src/BLL/Demo.BillView/PRD/Pro_WorkBillPlatform.cs
@@ -1,7 +1,6 @@
 锘縰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;
diff --git a/src/BLL/Demo.BillView/app.config b/src/BLL/Demo.BillView/app.config
index 4fa7e81..6bf9a4c 100644
--- a/src/BLL/Demo.BillView/app.config
+++ b/src/BLL/Demo.BillView/app.config
@@ -1,15 +1,15 @@
-锘�<?xml version="1.0" encoding="utf-8"?>
+<?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" />
+        <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" />
+        <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
+<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/></startup></configuration>

--
Gitblit v1.9.1