提交当前本机整理版本
This commit is contained in:
+30
-1
@@ -338,4 +338,33 @@ namespace GetApiData
|
||||
this.Controls.Add(this.labelServerName);
|
||||
this.Controls.Add(this.textBaseName);
|
||||
this.Controls.Add(this.textServerName);
|
||||
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.MaximizeBox = false;
|
||||
this.Name = "FrmMain";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "蕊源同步工具";
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
this.panel2.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private Label label1;
|
||||
private Label label2;
|
||||
private TextBox k3appId;
|
||||
private TextBox k3ServerName;
|
||||
private Label label3;
|
||||
private TextBox k3appSecret;
|
||||
private Label label4;
|
||||
private TextBox k3dbId;
|
||||
private Label label5;
|
||||
private TextBox k3userName;
|
||||
private Label label6;
|
||||
private TextBox k3number;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -585,4 +585,36 @@ namespace GetApiData
|
||||
decimal famount = details.Sum(d => SafeToDecimal(d, "wms_ljoins_famount"));
|
||||
|
||||
string jsonDraft = apiClient.Draft("PRD_MORPT",
|
||||
|
||||
PRD_MORPTModel.CreateData(mainRow, details[0], $"{amount}", $"{famount}", moIdNo));
|
||||
}
|
||||
catch (Exception exRow)
|
||||
{
|
||||
resultText.AppendText(exRow.Message + "\r\n");
|
||||
}
|
||||
finally
|
||||
{
|
||||
StepProgress();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
resultText.AppendText(ex.Message + "\r\n");
|
||||
}
|
||||
finally
|
||||
{
|
||||
resultText.AppendText("同步到金蝶结束!\r\n");
|
||||
}
|
||||
}
|
||||
|
||||
private static decimal SafeToDecimal(DataRow r, string col)
|
||||
{
|
||||
if (!r.Table.Columns.Contains(col)) return 0m;
|
||||
string s = $"{r[col]}";
|
||||
if (string.IsNullOrWhiteSpace(s)) return 0m;
|
||||
return Convert.ToDecimal(s);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -12,4 +12,49 @@ namespace GetApiData.KingdeeModel
|
||||
|
||||
public string FSrcEntryId { get; set; }
|
||||
|
||||
|
||||
public string FIsNew { get; set; }
|
||||
|
||||
public FMaterialId FMaterialId { get; set; }
|
||||
|
||||
public string FFinishQty { get; set; }
|
||||
|
||||
public string FQuaQty { get; set; }
|
||||
|
||||
public string FProductType { get; set; }
|
||||
|
||||
public FReportType FReportType { get; set; }
|
||||
|
||||
public FWorkshipId FWorkshipId { get; set; }
|
||||
|
||||
public FLot FLot { get; set; }
|
||||
|
||||
public string FSrcBillType { get; set; }
|
||||
|
||||
public string FMoBillNo { get; set; }
|
||||
|
||||
public string FSrcBillNo { get; set; }
|
||||
|
||||
public string FSrcInterId { get; set; }
|
||||
|
||||
public string FSrcEntrySeq { get; set; }
|
||||
|
||||
public string FMoId { get; set; }
|
||||
|
||||
public string FMoEntryId { get; set; }
|
||||
|
||||
public FBomId FBomId { get; set; }
|
||||
|
||||
public string FMOMAINENTRYID { get; set; }
|
||||
|
||||
public List<PRD_MORPTFEntity_LinkItem> FEntity_Link { get; set; }
|
||||
|
||||
public FEntityItem()
|
||||
{
|
||||
FMaterialId = new FMaterialId();
|
||||
FReportType = new FReportType();
|
||||
FLot = new FLot();
|
||||
FWorkshipId = new FWorkshipId();
|
||||
FBomId = new FBomId();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -50,4 +50,38 @@ namespace GetApiData.KingdeeModel
|
||||
string fEntity_Link_FRuleId = "PRD_MO2MORPT";
|
||||
string fEntity_Link_FSTableName = "T_PRD_MOENTRY";
|
||||
string fEntity_Link_FSBillId = ((billMainRow.Table.Columns.Contains("wms_mjoins_jdid") && !string.IsNullOrEmpty(string.Concat(billMainRow["wms_mjoins_jdid"]))) ? string.Concat(billMainRow["wms_mjoins_jdid"]) : "");
|
||||
string fEntity_Link_FSId = ((billDetailRow.Table.Columns.C
|
||||
string fEntity_Link_FSId = ((billDetailRow.Table.Columns.Contains("wms_ljoins_jdid") && !string.IsNullOrEmpty(string.Concat(billDetailRow["wms_ljoins_jdid"]))) ? string.Concat(billDetailRow["wms_ljoins_jdid"]) : "");
|
||||
pRD_MORPTFEntity_LinkItem.FEntity_Link_FRuleId = fEntity_Link_FRuleId;
|
||||
pRD_MORPTFEntity_LinkItem.FEntity_Link_FSTableName = fEntity_Link_FSTableName;
|
||||
pRD_MORPTFEntity_LinkItem.FEntity_Link_FSBillId = fEntity_Link_FSBillId;
|
||||
pRD_MORPTFEntity_LinkItem.FEntity_Link_FSId = fEntity_Link_FSId;
|
||||
list2.Add(pRD_MORPTFEntity_LinkItem);
|
||||
fEntityItem.FEntity_Link = list2;
|
||||
list.Add(fEntityItem);
|
||||
var value = new
|
||||
{
|
||||
Model = new
|
||||
{
|
||||
FBillNo = fBillNo,
|
||||
FBillType = new
|
||||
{
|
||||
FNumber = "SCHBD01_SYS"
|
||||
},
|
||||
FDate = fDate,
|
||||
FPrdOrgId = new
|
||||
{
|
||||
FNumber = "101"
|
||||
},
|
||||
FDocumentStatus = "C",
|
||||
FWorkshipIdH = new
|
||||
{
|
||||
FNumber = fNumber
|
||||
},
|
||||
FDescription = fDescription,
|
||||
FEntity = list
|
||||
}
|
||||
};
|
||||
return JsonConvert.SerializeObject(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -6,4 +6,31 @@ using System.Runtime.InteropServices;
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("GetApiData")]
|
||||
[assembly: Ass
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("GetApiData")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2025")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
||||
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
||||
//请将此类型的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||
[assembly: Guid("acb19ef7-f810-43f0-8d4d-7ee615f12af1")]
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||
//通过使用 "*",如下所示:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
|
||||
+31
-1
@@ -37,4 +37,34 @@ namespace GetApiData.Properties
|
||||
/// 返回此类使用的缓存 ResourceManager 实例。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager Resou
|
||||
internal static global::System.Resources.ResourceManager ResourceManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((resourceMan == null))
|
||||
{
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("GetApiData.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 重写当前线程的 CurrentUICulture 属性,对
|
||||
/// 使用此强类型资源类的所有资源查找执行重写。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture
|
||||
{
|
||||
get
|
||||
{
|
||||
return resourceCulture;
|
||||
}
|
||||
set
|
||||
{
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+29
-1
@@ -1 +1,29 @@
|
||||
//------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace GetApiData.Properties
|
||||
{
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
{
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default
|
||||
{
|
||||
get
|
||||
{
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user