其他出库追加
This commit is contained in:
@@ -93,5 +93,84 @@ namespace NX.ERP.U8.Store
|
|||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public bool UpdateVocher(Model.Request.OtherStoreInOut storeIn)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
VoucherParameter voucherParameter = this.LoadVoucher($"cCode='{storeIn.Code}'");
|
||||||
|
|
||||||
|
|
||||||
|
DOMDocument domHead = voucherParameter.DomHead;
|
||||||
|
DOMDocument domBody = voucherParameter.DomBody;
|
||||||
|
|
||||||
|
IXMLDOMElement headXml = domHead.createElement("z:row");
|
||||||
|
|
||||||
|
|
||||||
|
headXml.setAttribute("bpufirst", "0");
|
||||||
|
headXml.setAttribute("bisstqc", "0");
|
||||||
|
headXml.setAttribute("bomfirst", "0");
|
||||||
|
headXml.setAttribute("biafirst", "0");
|
||||||
|
headXml.setAttribute("brdflag", 1);
|
||||||
|
headXml.setAttribute("ccode", storeIn.Code);
|
||||||
|
headXml.setAttribute("ddate", storeIn.Date);
|
||||||
|
headXml.setAttribute("cmaker", storeIn.Maker);
|
||||||
|
headXml.setAttribute("cvouchtype", this.VoucherID);
|
||||||
|
headXml.setAttribute("vt_id", new VT().GetDefaltVTID("0302"));
|
||||||
|
headXml.setAttribute("editprop", "A");
|
||||||
|
headXml.setAttribute("cdepcode", "");
|
||||||
|
headXml.setAttribute("cpersoncode", "");
|
||||||
|
headXml.setAttribute("crdcode", "");
|
||||||
|
|
||||||
|
headXml.setAttribute("csource", "库存");
|
||||||
|
headXml.setAttribute("cwhcode", storeIn.WhCode);
|
||||||
|
headXml.setAttribute("cbustype", "其他出库");
|
||||||
|
headXml.setAttribute("cmemo", "");
|
||||||
|
|
||||||
|
|
||||||
|
IXMLDOMElement bodyXml;
|
||||||
|
for (var n = 0; n < storeIn.details.Count(); n++)
|
||||||
|
{
|
||||||
|
var detail = storeIn.details[n];
|
||||||
|
//var arrivalDetail = Arrival.ArrivalDetails.First(m => { return m.Id == detail.SorceDetailId; });
|
||||||
|
//headXml.setAttribute("cordercode", arrivalDetail.OrderCode);
|
||||||
|
// headXml.setAttribute("ipurorderid", arrivalDetail.PoId);
|
||||||
|
bodyXml = domBody.createElement("z:row");
|
||||||
|
bodyXml.setAttribute("cinvcode", detail.InvCode);
|
||||||
|
bodyXml.setAttribute("iquantity", detail.Quantity);
|
||||||
|
|
||||||
|
|
||||||
|
bodyXml.setAttribute("cbatch", "");
|
||||||
|
|
||||||
|
bodyXml.setAttribute("cposition", detail.Position);
|
||||||
|
bodyXml.setAttribute("cvmivencode", "");
|
||||||
|
bodyXml.setAttribute("dmadedate", "");
|
||||||
|
bodyXml.setAttribute("dvdate", "");
|
||||||
|
bodyXml.setAttribute("iexpiratdatecalcu", "");
|
||||||
|
bodyXml.setAttribute("cmassunit", "");
|
||||||
|
bodyXml.setAttribute("imassdate", "");
|
||||||
|
bodyXml.setAttribute("cexpirationdate", "");
|
||||||
|
bodyXml.setAttribute("dexpirationdate", "");
|
||||||
|
bodyXml.setAttribute("citem_class", "");
|
||||||
|
bodyXml.setAttribute("citemcode", "");
|
||||||
|
bodyXml.setAttribute("cbmemo", "");
|
||||||
|
bodyXml.setAttribute("editprop", "A");
|
||||||
|
|
||||||
|
bodyXml.setAttribute("irowno", domBody.selectSingleNode("//rs:data").childNodes.length + 1);
|
||||||
|
domBody.selectSingleNode("//rs:data").appendChild(bodyXml);
|
||||||
|
|
||||||
|
}
|
||||||
|
domHead.selectSingleNode("//rs:data").appendChild(headXml);
|
||||||
|
var str = voucherParameter.DomBody.xml;
|
||||||
|
Console.WriteLine(str);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return UpdateRdVoucher(voucherParameter);
|
||||||
|
}
|
||||||
|
catch (Exception err)
|
||||||
|
{
|
||||||
|
|
||||||
|
throw err;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,5 +17,14 @@ namespace NX.ERP.WebAPi.Controllers.Store
|
|||||||
var dal = new NX.ERP.U8.Store.OtherStoreOutDAL();
|
var dal = new NX.ERP.U8.Store.OtherStoreOutDAL();
|
||||||
return dal.AddVocher(storeIn);
|
return dal.AddVocher(storeIn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[Route("api/OtherOut/Update")]
|
||||||
|
[HttpPost]
|
||||||
|
public bool UpdateVoucher([FromBody] Model.Request.OtherStoreInOut storeIn)
|
||||||
|
{
|
||||||
|
var dal = new NX.ERP.U8.Store.OtherStoreOutDAL();
|
||||||
|
return dal.UpdateVocher(storeIn);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
<appSettings>
|
<appSettings>
|
||||||
<add key="server" value="10.0.0.12"/>
|
<add key="server" value="10.0.0.12"/>
|
||||||
<add key="AccId" value="u8-2@001"/>
|
<add key="AccId" value="u8-2@001"/>
|
||||||
<add key="UserId" value="wx997"/>
|
<add key="UserId" value="wx993"/>
|
||||||
<add key="Password" value="1"/>
|
<add key="Password" value="1"/>
|
||||||
<add key="EaiPort" value="80"/>
|
<add key="EaiPort" value="80"/>
|
||||||
<add key="EaiPath" value="U8EAI/import.asp" />
|
<add key="EaiPath" value="U8EAI/import.asp" />
|
||||||
|
|||||||
Reference in New Issue
Block a user