diff --git a/.gitignore b/.gitignore index dc24ff3..0dabc63 100644 --- a/.gitignore +++ b/.gitignore @@ -58,3 +58,49 @@ /Pilot_KD_Parino/obj/Debug/Pilot_KD_Parino.pdb /Pilot_KD_Parino/packages.config /.vs +/NoPackageMachine/bin/Debug/EZ.DB.dll +/NoPackageMachine/bin/Debug/K3Cloud.WebApi.Client.dll +/NoPackageMachine/bin/Debug/Kingdee.BOS.App.Core.dll +/NoPackageMachine/bin/Debug/Kingdee.BOS.App.dll +/NoPackageMachine/bin/Debug/Kingdee.BOS.ApprovalFlow.PlugIns.dll +/NoPackageMachine/bin/Debug/Kingdee.BOS.BusinessEntity.dll +/NoPackageMachine/bin/Debug/Kingdee.BOS.Contracts.dll +/NoPackageMachine/bin/Debug/Kingdee.BOS.Core.dll +/NoPackageMachine/bin/Debug/Kingdee.BOS.DataEntity.dll +/NoPackageMachine/bin/Debug/Kingdee.BOS.ServiceHelper.dll +/NoPackageMachine/bin/Debug/Kingdee.BOS.VerificationHelper.dll +/NoPackageMachine/bin/Debug/Kingdee.BOS.Web.dll +/NoPackageMachine/bin/Debug/Kingdee.BOS.WebApi.Client.dll +/NoPackageMachine/bin/Debug/Kingdee.BOS.WebApi.FormService.dll +/NoPackageMachine/bin/Debug/Kingdee.BOS.WebApi.ServicesStub.dll +/NoPackageMachine/bin/Debug/Kingdee.BOS.dll +/NoPackageMachine/bin/Debug/Kingdee.K3.Core.dll +/NoPackageMachine/bin/Debug/Kingdee.K3.FIN.App.Core.dll +/NoPackageMachine/bin/Debug/Kingdee.K3.FIN.CB.App.Report.dll +/NoPackageMachine/bin/Debug/Kingdee.K3.FIN.HS.App.Report.dll +/NoPackageMachine/bin/Debug/Kingdee.K3.MFG.App.dll +/NoPackageMachine/bin/Debug/Kingdee.K3.MFG.PLN.App.MrpModel.dll +/NoPackageMachine/bin/Debug/Kingdee.K3.SCM.App.Core.dll +/NoPackageMachine/bin/Debug/Kingdee.K3.SCM.App.Credit.Core.dll +/NoPackageMachine/bin/Debug/Kingdee.K3.SCM.App.Sal.ServicePlugIn.dll +/NoPackageMachine/bin/Debug/Kingdee.K3.SCM.App.Stock.Report.dll +/NoPackageMachine/bin/Debug/Kingdee.K3.SCM.App.dll +/NoPackageMachine/bin/Debug/Kingdee.K3.SCM.Business.dll +/NoPackageMachine/bin/Debug/Kingdee.K3.SCM.Common.BusinessEntity.dll +/NoPackageMachine/bin/Debug/Kingdee.K3.SCM.Contracts.dll +/NoPackageMachine/bin/Debug/Kingdee.K3.SCM.Core.dll +/NoPackageMachine/bin/Debug/Kingdee.K3.SCM.ServiceHelper.dll +/NoPackageMachine/bin/Debug/Kingdee.K3.SCM.Stock.Business.PlugIn.dll +/NoPackageMachine/bin/Debug/Newtonsoft.Json.dll +/NoPackageMachine/bin/Debug/NoPackageMachine.dll +/NoPackageMachine/bin/Debug/NoPackageMachine.pdb +/NoPackageMachine/bin/Debug/Oracle.DataAccess.dll +/NoPackageMachine/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.cs +/NoPackageMachine/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache +/NoPackageMachine/obj/Debug/NoPackag.8916CF04.Up2Date +/NoPackageMachine/obj/Debug/NoPackageMachine.csproj.AssemblyReference.cache +/NoPackageMachine/obj/Debug/NoPackageMachine.csproj.CopyComplete +/NoPackageMachine/obj/Debug/NoPackageMachine.csproj.CoreCompileInputs.cache +/NoPackageMachine/obj/Debug/NoPackageMachine.csproj.FileListAbsolute.txt +/NoPackageMachine/obj/Debug/NoPackageMachine.dll +/NoPackageMachine/obj/Debug/NoPackageMachine.pdb diff --git a/Component/EZ.DB.dll b/Component/EZ.DB.dll new file mode 100644 index 0000000..66a1545 Binary files /dev/null and b/Component/EZ.DB.dll differ diff --git a/Component/K3Cloud.WebApi.Client.dll b/Component/K3Cloud.WebApi.Client.dll new file mode 100644 index 0000000..a3e00fb Binary files /dev/null and b/Component/K3Cloud.WebApi.Client.dll differ diff --git a/Component/Kingdee.BOS.App.Core.dll b/Component/Kingdee.BOS.App.Core.dll new file mode 100644 index 0000000..4100d59 Binary files /dev/null and b/Component/Kingdee.BOS.App.Core.dll differ diff --git a/Component/Kingdee.BOS.App.dll b/Component/Kingdee.BOS.App.dll new file mode 100644 index 0000000..68b0d6b Binary files /dev/null and b/Component/Kingdee.BOS.App.dll differ diff --git a/Component/Kingdee.BOS.ApprovalFlow.PlugIns.dll b/Component/Kingdee.BOS.ApprovalFlow.PlugIns.dll new file mode 100644 index 0000000..f060c10 Binary files /dev/null and b/Component/Kingdee.BOS.ApprovalFlow.PlugIns.dll differ diff --git a/Component/Kingdee.BOS.BusinessEntity.dll b/Component/Kingdee.BOS.BusinessEntity.dll new file mode 100644 index 0000000..8dffbf0 Binary files /dev/null and b/Component/Kingdee.BOS.BusinessEntity.dll differ diff --git a/Component/Kingdee.BOS.Contracts.dll b/Component/Kingdee.BOS.Contracts.dll new file mode 100644 index 0000000..94fbdd1 Binary files /dev/null and b/Component/Kingdee.BOS.Contracts.dll differ diff --git a/Component/Kingdee.BOS.Core.dll b/Component/Kingdee.BOS.Core.dll new file mode 100644 index 0000000..6afad14 Binary files /dev/null and b/Component/Kingdee.BOS.Core.dll differ diff --git a/Component/Kingdee.BOS.DataEntity.dll b/Component/Kingdee.BOS.DataEntity.dll new file mode 100644 index 0000000..f3b2391 Binary files /dev/null and b/Component/Kingdee.BOS.DataEntity.dll differ diff --git a/Component/Kingdee.BOS.ServiceHelper.dll b/Component/Kingdee.BOS.ServiceHelper.dll new file mode 100644 index 0000000..3259de7 Binary files /dev/null and b/Component/Kingdee.BOS.ServiceHelper.dll differ diff --git a/Component/Kingdee.BOS.VerificationHelper.dll b/Component/Kingdee.BOS.VerificationHelper.dll new file mode 100644 index 0000000..931e531 Binary files /dev/null and b/Component/Kingdee.BOS.VerificationHelper.dll differ diff --git a/Component/Kingdee.BOS.Web.dll b/Component/Kingdee.BOS.Web.dll new file mode 100644 index 0000000..f45bd87 Binary files /dev/null and b/Component/Kingdee.BOS.Web.dll differ diff --git a/Component/Kingdee.BOS.WebApi.Client.dll b/Component/Kingdee.BOS.WebApi.Client.dll new file mode 100644 index 0000000..df8916e Binary files /dev/null and b/Component/Kingdee.BOS.WebApi.Client.dll differ diff --git a/Component/Kingdee.BOS.WebApi.FormService.dll b/Component/Kingdee.BOS.WebApi.FormService.dll new file mode 100644 index 0000000..d2954e7 Binary files /dev/null and b/Component/Kingdee.BOS.WebApi.FormService.dll differ diff --git a/Component/Kingdee.BOS.WebApi.ServicesStub.dll b/Component/Kingdee.BOS.WebApi.ServicesStub.dll new file mode 100644 index 0000000..9148ee2 Binary files /dev/null and b/Component/Kingdee.BOS.WebApi.ServicesStub.dll differ diff --git a/Component/Kingdee.BOS.dll b/Component/Kingdee.BOS.dll new file mode 100644 index 0000000..763a979 Binary files /dev/null and b/Component/Kingdee.BOS.dll differ diff --git a/Component/Kingdee.K3.Core.dll b/Component/Kingdee.K3.Core.dll new file mode 100644 index 0000000..c2442b6 Binary files /dev/null and b/Component/Kingdee.K3.Core.dll differ diff --git a/Component/Kingdee.K3.FIN.App.Core.dll b/Component/Kingdee.K3.FIN.App.Core.dll new file mode 100644 index 0000000..873bf85 Binary files /dev/null and b/Component/Kingdee.K3.FIN.App.Core.dll differ diff --git a/Component/Kingdee.K3.FIN.CB.App.Report.dll b/Component/Kingdee.K3.FIN.CB.App.Report.dll new file mode 100644 index 0000000..2916d15 Binary files /dev/null and b/Component/Kingdee.K3.FIN.CB.App.Report.dll differ diff --git a/Component/Kingdee.K3.FIN.HS.App.Report.dll b/Component/Kingdee.K3.FIN.HS.App.Report.dll new file mode 100644 index 0000000..92c7862 Binary files /dev/null and b/Component/Kingdee.K3.FIN.HS.App.Report.dll differ diff --git a/Component/Kingdee.K3.MFG.App.dll b/Component/Kingdee.K3.MFG.App.dll new file mode 100644 index 0000000..46e7b5e Binary files /dev/null and b/Component/Kingdee.K3.MFG.App.dll differ diff --git a/Component/Kingdee.K3.MFG.PLN.App.MrpModel.dll b/Component/Kingdee.K3.MFG.PLN.App.MrpModel.dll new file mode 100644 index 0000000..38d8d7f Binary files /dev/null and b/Component/Kingdee.K3.MFG.PLN.App.MrpModel.dll differ diff --git a/Component/Kingdee.K3.SCM.App.Core.dll b/Component/Kingdee.K3.SCM.App.Core.dll new file mode 100644 index 0000000..4b15195 Binary files /dev/null and b/Component/Kingdee.K3.SCM.App.Core.dll differ diff --git a/Component/Kingdee.K3.SCM.App.Credit.Core.dll b/Component/Kingdee.K3.SCM.App.Credit.Core.dll new file mode 100644 index 0000000..22858ac Binary files /dev/null and b/Component/Kingdee.K3.SCM.App.Credit.Core.dll differ diff --git a/Component/Kingdee.K3.SCM.App.Sal.ServicePlugIn.dll b/Component/Kingdee.K3.SCM.App.Sal.ServicePlugIn.dll new file mode 100644 index 0000000..9c1b21e Binary files /dev/null and b/Component/Kingdee.K3.SCM.App.Sal.ServicePlugIn.dll differ diff --git a/Component/Kingdee.K3.SCM.App.Stock.Report.dll b/Component/Kingdee.K3.SCM.App.Stock.Report.dll new file mode 100644 index 0000000..d1145bf Binary files /dev/null and b/Component/Kingdee.K3.SCM.App.Stock.Report.dll differ diff --git a/Component/Kingdee.K3.SCM.App.dll b/Component/Kingdee.K3.SCM.App.dll new file mode 100644 index 0000000..63c7abf Binary files /dev/null and b/Component/Kingdee.K3.SCM.App.dll differ diff --git a/Component/Kingdee.K3.SCM.Business.dll b/Component/Kingdee.K3.SCM.Business.dll new file mode 100644 index 0000000..f8e48ff Binary files /dev/null and b/Component/Kingdee.K3.SCM.Business.dll differ diff --git a/Component/Kingdee.K3.SCM.Common.BusinessEntity.dll b/Component/Kingdee.K3.SCM.Common.BusinessEntity.dll new file mode 100644 index 0000000..9c7bf40 Binary files /dev/null and b/Component/Kingdee.K3.SCM.Common.BusinessEntity.dll differ diff --git a/Component/Kingdee.K3.SCM.Contracts.dll b/Component/Kingdee.K3.SCM.Contracts.dll new file mode 100644 index 0000000..b51bd80 Binary files /dev/null and b/Component/Kingdee.K3.SCM.Contracts.dll differ diff --git a/Component/Kingdee.K3.SCM.Core.dll b/Component/Kingdee.K3.SCM.Core.dll new file mode 100644 index 0000000..f86d15e Binary files /dev/null and b/Component/Kingdee.K3.SCM.Core.dll differ diff --git a/Component/Kingdee.K3.SCM.ServiceHelper.dll b/Component/Kingdee.K3.SCM.ServiceHelper.dll new file mode 100644 index 0000000..135731d Binary files /dev/null and b/Component/Kingdee.K3.SCM.ServiceHelper.dll differ diff --git a/Component/Kingdee.K3.SCM.Stock.Business.PlugIn.dll b/Component/Kingdee.K3.SCM.Stock.Business.PlugIn.dll new file mode 100644 index 0000000..f7d61ec Binary files /dev/null and b/Component/Kingdee.K3.SCM.Stock.Business.PlugIn.dll differ diff --git a/Component/Newtonsoft.Json.dll b/Component/Newtonsoft.Json.dll new file mode 100644 index 0000000..341d08f Binary files /dev/null and b/Component/Newtonsoft.Json.dll differ diff --git a/NoPackageMachine/GetSingleLuoJi.cs b/NoPackageMachine/GetSingleLuoJi.cs new file mode 100644 index 0000000..f4da524 --- /dev/null +++ b/NoPackageMachine/GetSingleLuoJi.cs @@ -0,0 +1,85 @@ +using Kingdee.BOS.Core.DynamicForm.PlugIn; +using Kingdee.BOS.Core.List.PlugIn; +using Kingdee.BOS.Util; +using Kingdee.K3.SCM.Common.BusinessEntity.Sales; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Kingdee.BOS.Core.DynamicForm.PlugIn.Args; +using Kingdee.BOS.Core.Bill.PlugIn; +using Kingdee.BOS.Core.Bill.PlugIn.Args; +using static System.Net.WebRequestMethods; +using Newtonsoft.Json; +using Kingdee.BOS.ServiceHelper; +using Kingdee.BOS; + +namespace NoPackageMachine +{ + [Description("销售订单列表获取裸机信息#列表插件:审核后获取单据体中成品编码下的裸机信息"), HotUpdate] + public class GetSingleLuoJi : AbstractOperationServicePlugIn + { + public override void BeforeExecuteOperationTransaction(BeforeExecuteOperationTransaction e) + { + base.BeforeExecuteOperationTransaction(e); + var formId = this.BusinessInfo.GetForm().Id; + try + { + // 获取销售订单信息 + foreach (var entry in e.DataEntitys) + { + var s = JsonConvert.SerializeObject(entry); + var order = JsonConvert.DeserializeObject(s); + foreach (var item in order.SaleOrderEntry) + { + string sql = string.Format("/*dialect*/select m0.FNUMBER PMaterialCode,m.FMATERIALID,m.FNUMBER MaterialCode,t.FSPECIFICATION FModel,sum(isnull(i.FBASEQTY,0)) AS Qty from T_ENG_BOM a left jOIN T_ORG_ORGANIZATIONS O ON O.FORGID = a.FUSEORGID " + + "left join T_ENG_BOMCHILD b on a.FID=b.FID " + + "left join T_BD_MATERIAL m0 on m0.FMATERIALID=a.FMATERIALID " + + "left join T_BD_MATERIAL m on m.FMATERIALID=b.FMATERIALID " + + "left join T_BD_MATERIAL_L t on t.FMATERIALID=m.FMATERIALID " + + "left join T_BD_MATERIALBASE s on s.FMATERIALID=m.FMATERIALID " + + "left join t_BD_MaterialStock ms on ms.fmaterialid=m.fmaterialid " + + "left join T_STK_INVENTORY i on i.FMATERIALID=m.FMASTERID and i.fstockorgid=m0.fuseorgid " + + "left JOIN T_BD_Stock invSIC ON invSIC.FSTOCKID = i.FSTOCKID " + + "left JOIN T_BD_Stock SIC ON SIC.FSTOCKID = ms.FSTOCKID " + + "where a.FDOCUMENTSTATUS='C' and a.FFORBIDSTATUS='A' and O.fnumber='PL' and m0.FMATERIALID='{0}' and (m.fnumber like 'N.%' or m.fnumber like 'M.%') group by m0.FNUMBER,m.FNUMBER,t.FSPECIFICATION,m.FMATERIALID", item.MaterialId_Id); + var data = DBServiceHelper.ExecuteDynamicObject(this.Context, sql); + if (data != null && data.Count > 0) + { + if (formId == "SAL_SaleOrder") + { + if (data.Count > 1) + { + sql = string.Format("/*dialect*/update t_sal_orderentry set F_ISLUOJI='是' where FENTRYID={0}", item.Id); + } + else + { + sql = string.Format("/*dialect*/update t_sal_orderentry set F_ISLUOJI='否',F_LJBM='{0}',F_LUOJIDESC='{1}' where FENTRYID={2}", data[0]["FMATERIALID"].ToString(), data[0]["FModel"].ToString(), item.Id); + } + } + else + { + if (data.Count > 1) + { + sql = string.Format("/*dialect*/update t_sal_xorderentry set F_ISLUOJI='是' where FENTRYID={0}", item.Id); + } + else + { + sql = string.Format("/*dialect*/update t_sal_xorderentry set F_ISLUOJI='否',F_LJBM='{0}',F_LUOJIDESC='{1}' where FENTRYID={2}", data[0]["FMATERIALID"].ToString(), data[0]["FModel"].ToString(), item.Id); + } + } + DBServiceHelper.Execute(this.Context, sql); + } + } + + } + } + catch(Exception ex) + { + throw new KDBusinessException("",ex.Message); + } + } + } +} diff --git a/NoPackageMachine/GetSonMachines.cs b/NoPackageMachine/GetSonMachines.cs new file mode 100644 index 0000000..5138acc --- /dev/null +++ b/NoPackageMachine/GetSonMachines.cs @@ -0,0 +1,53 @@ +using Kingdee.BOS.Core.DynamicForm.PlugIn.Args; +using Kingdee.BOS.Core.DynamicForm; +using Kingdee.BOS.Core.List; +using Kingdee.BOS.Core.List.PlugIn; +using Kingdee.BOS.Util; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Kingdee.BOS.Core.Metadata.EntityElement; +using Kingdee.BOS.Orm.DataEntity; + +namespace NoPackageMachine +{ + [Description("销售订单获取裸机信息#按钮列表插件:点击按钮显示裸机信息动态表单"), HotUpdate] + public class GetSonMachines: AbstractListPlugIn + { + public override void BarItemClick(BarItemClickEventArgs e) + { + base.BarItemClick(e); + if (e.BarItemKey.EqualsIgnoreCase("LJBM_tbButton")) + { + + //获取选中行 + var listView = this.View as IListView; + var selectedRows = listView.SelectedRowsInfo; + if (selectedRows == null || selectedRows.Count == 0) + { + this.View.ShowMessage("列表中的销售订单没有被选中"); + return; + } + if (selectedRows.Count > 1) + { + this.View.ShowMessage("列表中的销售订单不能多选"); + return; + } + var materialID = selectedRows.Select(c => c.DataRow["FMaterialId_Id"]).ToList()[0].ToString(); + + //var Params = string.Join(",", number); + DynamicFormShowParameter parameter = new DynamicFormShowParameter(); + parameter.OpenStyle.ShowType = ShowType.Floating; + //选择需要打开的窗体FID + parameter.FormId = "VRYF_LJBM_FORM"; //YKQC_LJBM_FORM 测试环境 + parameter.MultiSelect = false; + //获取的FID以字符串发送到输出的窗体 + parameter.CustomComplexParams.Add("EntryPrimaryKeys", materialID); + this.View.ShowForm(parameter); + } + } + } +} diff --git a/NoPackageMachine/Model/SalOrderEntryModel.cs b/NoPackageMachine/Model/SalOrderEntryModel.cs new file mode 100644 index 0000000..f905a15 --- /dev/null +++ b/NoPackageMachine/Model/SalOrderEntryModel.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace NoPackageMachine +{ + public class SalOrderEntryModel + { + public int FID { get; set; } + public int Id { get; set; } + public int MaterialId_Id { get; set; } + } +} diff --git a/NoPackageMachine/Model/SalOrderModel.cs b/NoPackageMachine/Model/SalOrderModel.cs new file mode 100644 index 0000000..9fab071 --- /dev/null +++ b/NoPackageMachine/Model/SalOrderModel.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace NoPackageMachine +{ + public class SalOrderModel + { + public int Id { get; set; } + public string FBILLNO { get; set; } + public string F_CONTRACTNUMBER { get; set; } + public List SaleOrderEntry = new List(); + } +} diff --git a/NoPackageMachine/Model/SonMachine.cs b/NoPackageMachine/Model/SonMachine.cs new file mode 100644 index 0000000..9698c0e --- /dev/null +++ b/NoPackageMachine/Model/SonMachine.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace NoPackageMachine +{ + public class SonMachine + { + public int RowNum { get; set; } + public string PMaterialCode { get; set; } + public string MaterialCode { get; set; } + public string FModel { get; set; } + public decimal Qty { get; set; } + } +} diff --git a/NoPackageMachine/NoPackageMachine.csproj b/NoPackageMachine/NoPackageMachine.csproj new file mode 100644 index 0000000..c30e69b --- /dev/null +++ b/NoPackageMachine/NoPackageMachine.csproj @@ -0,0 +1,156 @@ + + + + + Debug + AnyCPU + {9788649F-42E6-4687-A1BF-5064CF806553} + Library + Properties + NoPackageMachine + NoPackageMachine + v4.8 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\Component\EZ.DB.dll + + + ..\Component\K3Cloud.WebApi.Client.dll + + + ..\Component\Kingdee.BOS.dll + + + ..\Component\Kingdee.BOS.App.dll + + + ..\Component\Kingdee.BOS.App.Core.dll + + + ..\Component\Kingdee.BOS.ApprovalFlow.PlugIns.dll + + + ..\Component\Kingdee.BOS.BusinessEntity.dll + + + ..\Component\Kingdee.BOS.Contracts.dll + + + ..\Component\Kingdee.BOS.Core.dll + + + ..\Component\Kingdee.BOS.DataEntity.dll + + + ..\Component\Kingdee.BOS.ServiceHelper.dll + + + ..\Component\Kingdee.BOS.VerificationHelper.dll + + + ..\Component\Kingdee.BOS.Web.dll + + + ..\Component\Kingdee.BOS.WebApi.Client.dll + + + ..\Component\Kingdee.BOS.WebApi.FormService.dll + + + ..\Component\Kingdee.BOS.WebApi.ServicesStub.dll + + + ..\Component\Kingdee.K3.Core.dll + + + ..\Component\Kingdee.K3.FIN.App.Core.dll + + + ..\Component\Kingdee.K3.FIN.CB.App.Report.dll + + + ..\Component\Kingdee.K3.FIN.HS.App.Report.dll + + + ..\Component\Kingdee.K3.MFG.App.dll + + + ..\Component\Kingdee.K3.MFG.PLN.App.MrpModel.dll + + + ..\Component\Kingdee.K3.SCM.App.dll + + + ..\Component\Kingdee.K3.SCM.App.Core.dll + + + ..\Component\Kingdee.K3.SCM.App.Credit.Core.dll + + + ..\Component\Kingdee.K3.SCM.App.Sal.ServicePlugIn.dll + + + ..\Component\Kingdee.K3.SCM.App.Stock.Report.dll + + + ..\Component\Kingdee.K3.SCM.Business.dll + + + ..\Component\Kingdee.K3.SCM.Common.BusinessEntity.dll + + + ..\Component\Kingdee.K3.SCM.Contracts.dll + + + ..\Component\Kingdee.K3.SCM.Core.dll + + + ..\Component\Kingdee.K3.SCM.ServiceHelper.dll + + + ..\Component\Kingdee.K3.SCM.Stock.Business.PlugIn.dll + + + False + ..\packages\Newtonsoft.Json.dll + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/NoPackageMachine/NoPackageMaterialForm.cs b/NoPackageMachine/NoPackageMaterialForm.cs new file mode 100644 index 0000000..ba2e876 --- /dev/null +++ b/NoPackageMachine/NoPackageMaterialForm.cs @@ -0,0 +1,58 @@ +using Kingdee.BOS.Core.DynamicForm.PlugIn; +using Kingdee.BOS.Core.DynamicForm.PlugIn.Args; +using Kingdee.BOS.Core.List; +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 NoPackageMachine +{ + [Description("动态窗口插件:获取产品的裸机编码和库存"), HotUpdate] + public class NoPackageMaterialForm: AbstractDynamicFormPlugIn + { + string ListFidS = null; + public override void OnLoad(EventArgs e) + { + base.OnLoad(e); + //接受传输的值 + ListFidS = Convert.ToString(this.View.OpenParameter.GetCustomParameter("EntryPrimaryKeys")); + string sql = string.Format("/*dialect*/select m0.FNUMBER PMaterialCode,m.FNUMBER MaterialCode,t.FSPECIFICATION FModel,sum(isnull(i.FBASEQTY,0)) AS Qty from T_ENG_BOM a left jOIN T_ORG_ORGANIZATIONS O ON O.FORGID = a.FUSEORGID " + + "left join T_ENG_BOMCHILD b on a.FID=b.FID " + + "left join T_BD_MATERIAL m0 on m0.FMATERIALID=a.FMATERIALID " + + "left join T_BD_MATERIAL m on m.FMATERIALID=b.FMATERIALID " + + "left join T_BD_MATERIAL_L t on t.FMATERIALID=m.FMATERIALID " + + "left join T_BD_MATERIALBASE s on s.FMATERIALID=m.FMATERIALID " + + "left join t_BD_MaterialStock ms on ms.fmaterialid=m.fmaterialid " + + "left join T_STK_INVENTORY i on i.FMATERIALID=m.FMASTERID and i.fstockorgid=m0.fuseorgid " + + "left JOIN T_BD_Stock invSIC ON invSIC.FSTOCKID = i.FSTOCKID " + + "left JOIN T_BD_Stock SIC ON SIC.FSTOCKID = ms.FSTOCKID " + + "where a.FDOCUMENTSTATUS='C' and a.FFORBIDSTATUS='A' and O.fnumber='PL' and m0.FMATERIALID='{0}' and (m.fnumber like 'N.%' or m.fnumber like 'M.%') group by m0.FNUMBER,m.FNUMBER,t.FSPECIFICATION", ListFidS); + List sonMachines = new List(); + //var result = DBServiceHelper.ExecuteScalar>(this.Context, sql, sonMachines); + var data = DBServiceHelper.ExecuteDynamicObject(this.Context, sql); + + int num = 0; + foreach (var one in data) + { + this.View.Model.SetValue("F_MaterialCode", one["MaterialCode"], num); + this.View.Model.SetValue("F_FModel", one["FModel"], num); + this.View.Model.SetValue("F_Qty", one["Qty"], num); + num++; + } + //foreach(SonMachine sonMachine in result) + //{ + // //this.View.Model.SetValue("PMaterialCode", sonMachine.PMaterialCode, num); + // this.View.Model.SetValue("F_MaterialCode", sonMachine.MaterialCode, num); + // this.View.Model.SetValue("F_FModel", sonMachine.FModel, num); + // this.View.Model.SetValue("F_Qty", sonMachine.Qty, num); + // num++; + //} + } + } +} diff --git a/NoPackageMachine/Properties/AssemblyInfo.cs b/NoPackageMachine/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..cf5faa4 --- /dev/null +++ b/NoPackageMachine/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的一般信息由以下 +// 控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("NoPackageMachine")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("NoPackageMachine")] +[assembly: AssemblyCopyright("Copyright © 2025")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 会使此程序集中的类型 +//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 +//请将此类型的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("9788649f-42e6-4687-a1bf-5064cf806553")] + +// 程序集的版本信息由下列四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 +//通过使用 "*",如下所示: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Pilot_KD_Parino.sln b/Pilot_KD_Parino.sln index dc786f7..d8bab4f 100644 --- a/Pilot_KD_Parino.sln +++ b/Pilot_KD_Parino.sln @@ -5,6 +5,8 @@ VisualStudioVersion = 17.11.35327.3 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Pilot_KD_Parino", "Pilot_KD_Parino\Pilot_KD_Parino.csproj", "{D8751053-74AF-4619-A5BE-939ADFF10991}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NoPackageMachine", "NoPackageMachine\NoPackageMachine.csproj", "{9788649F-42E6-4687-A1BF-5064CF806553}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -15,6 +17,10 @@ Global {D8751053-74AF-4619-A5BE-939ADFF10991}.Debug|Any CPU.Build.0 = Debug|Any CPU {D8751053-74AF-4619-A5BE-939ADFF10991}.Release|Any CPU.ActiveCfg = Release|Any CPU {D8751053-74AF-4619-A5BE-939ADFF10991}.Release|Any CPU.Build.0 = Release|Any CPU + {9788649F-42E6-4687-A1BF-5064CF806553}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9788649F-42E6-4687-A1BF-5064CF806553}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9788649F-42E6-4687-A1BF-5064CF806553}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9788649F-42E6-4687-A1BF-5064CF806553}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE