修改
This commit is contained in:
@@ -53,8 +53,9 @@ namespace U8AppMain
|
||||
bom.Bom.Version.Version = Convert.ToInt32(row["版本号"]);
|
||||
bom.Bom.Version.VersionDesc = row.Field<string>("版本说明");
|
||||
bom.Bom.Parent.InvCode = row.Field<string>("母件编码");
|
||||
bom.Bom.Version.VersionEffDate = DateTime.Parse(row.Field<string>("版本生效日"));
|
||||
bom.Bom.Version.BomType = row.Field<string>("BOM类别");
|
||||
|
||||
bom.Bom.Version.VersionEffDate = DateTime.Parse(row["版本生效日"].ToString());
|
||||
//bom.Bom.Version.BomType ="1" row.Field<string>("BOM类别");
|
||||
bom.Bom.Parent.ParentScrap = decimal.Parse(row["母件损耗率"].ToString());
|
||||
var strKey = $"{bom.Bom.Parent.InvCode}-{bom.Bom.Version.Version}";
|
||||
if (bomLookup.ContainsKey(strKey))
|
||||
@@ -65,17 +66,18 @@ namespace U8AppMain
|
||||
{
|
||||
bomLookup.Add(strKey, bom);
|
||||
}
|
||||
comp.Component.OpComponentId = bom.Bom.ComponentBodies.Count;
|
||||
comp.Component.EffBegDate = bom.Bom.Version.VersionEffDate;
|
||||
|
||||
comp.Component.InvCode = row.Field<string>("子件编码");
|
||||
comp.Component.SortSeq = row.Field<string>("行号");
|
||||
comp.Component.OptionsId = bom.Bom.ComponentBodies.Count;
|
||||
comp.Component.BaseQtyN = decimal.Parse(row["基本用量分子"].ToString());
|
||||
comp.Component.BaseQtyD = decimal.Parse(row["基础数量分母"].ToString());
|
||||
comp.Component.CompScrap = decimal.Parse(row["子件损耗率"].ToString());
|
||||
comp.ComponentOpt.WIPType = row["供应类型"].ToString();
|
||||
|
||||
comp.ComponentOpt.OptionsId = bom.Bom.ComponentBodies.Count;
|
||||
bom.Bom.ComponentBodies.Add(comp);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -88,8 +90,9 @@ namespace U8AppMain
|
||||
//bom.Bom.ComponentBodies.Add(new Bom.ComponentBody());
|
||||
//bom.Bom.ComponentBodies.Add(new Bom.ComponentBody());
|
||||
var strbody = XmlHelper.XmlSerialize(bomLookup.Values.ToList()[0], Encoding.UTF8);
|
||||
var response = await HttpHelper.Post("", strbody);
|
||||
MessageBox.Show(response);
|
||||
//var response = await HttpHelper.Post("", strbody);
|
||||
this.textBox1.Text = strbody;
|
||||
MessageBox.Show(strbody);
|
||||
}
|
||||
|
||||
private void BtnImportExcel_Click(object sender, EventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user