修正领料申请入库的错误
This commit is contained in:
@@ -111,8 +111,15 @@ namespace NX.ERP.Model.Response.Store
|
|||||||
|
|
||||||
public string PesoSeq { get; set; }
|
public string PesoSeq { get; set; }
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
public string DeptName { get; set; }
|
||||||
|
[JsonIgnore]
|
||||||
|
public string ProductNo { get; set; }
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
public decimal MoQuantity { get; set; }
|
||||||
|
[JsonIgnore]
|
||||||
|
public string DeptCode { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ namespace NX.ERP.U8.Store
|
|||||||
, b.iMPoIds AS MPoIds, b.comcode AS OmCode, b.iOMoDID AS OMoDId, b.cciqbookcode AS ciqBookCode, b.cmworkcentercode AS mWorkCenterCode
|
, b.iMPoIds AS MPoIds, b.comcode AS OmCode, b.iOMoDID AS OMoDId, b.cciqbookcode AS ciqBookCode, b.cmworkcentercode AS mWorkCenterCode
|
||||||
, b.cservicecode AS servicecode, b.isotype AS SoType, b.csocode AS SoCode, b.isodid AS SodId, b.isoseq AS SoSeq
|
, b.cservicecode AS servicecode, b.isotype AS SoType, b.csocode AS SoCode, b.isodid AS SodId, b.isoseq AS SoSeq
|
||||||
, b.iordertype AS ordertype, b.iordercode AS OrderCode, b.iorderdid AS OrderdId, b.iorderseq AS OrderSeq, b.ipesotype AS PesoType
|
, b.iordertype AS ordertype, b.iordercode AS OrderCode, b.iorderdid AS OrderdId, b.iorderseq AS OrderSeq, b.ipesotype AS PesoType
|
||||||
, b.cpesocode AS PesoCode, b.ipesodid AS PesodId, b.ipesoseq AS PesoSeq
|
, b.cpesocode AS PesoCode, b.ipesodid AS PesodId, b.ipesoseq AS PesoSeq,b.cdepCode as DeptCode,cdepName as DeptName,b.cinvcode as ProductNo,b.imquantity as MoQuantity
|
||||||
FROM MaterialAppVouch a
|
FROM MaterialAppVouch a
|
||||||
LEFT JOIN KCMATERIALAPPLIST b ON a.id = b.id";
|
LEFT JOIN KCMATERIALAPPLIST b ON a.id = b.id";
|
||||||
if (!string.IsNullOrEmpty(strWhere))
|
if (!string.IsNullOrEmpty(strWhere))
|
||||||
|
|||||||
@@ -39,7 +39,12 @@ namespace NX.ERP.U8.Store
|
|||||||
}
|
}
|
||||||
headXml.setAttribute("cbustype", "领料");
|
headXml.setAttribute("cbustype", "领料");
|
||||||
headXml.setAttribute("cbuscode", metailApp.Code);
|
headXml.setAttribute("cbuscode", metailApp.Code);
|
||||||
|
|
||||||
string lastProductNo = null;
|
string lastProductNo = null;
|
||||||
|
decimal moqty = 0;
|
||||||
|
string DeptName = "";
|
||||||
|
string moCode = "";
|
||||||
|
string DeptCode = "";
|
||||||
IXMLDOMElement bodyXml;
|
IXMLDOMElement bodyXml;
|
||||||
for (var n = 0; n < storeOut.Details.Count(); n++)
|
for (var n = 0; n < storeOut.Details.Count(); n++)
|
||||||
{
|
{
|
||||||
@@ -49,6 +54,25 @@ namespace NX.ERP.U8.Store
|
|||||||
{
|
{
|
||||||
throw new Exception("未知明细");
|
throw new Exception("未知明细");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (lastProductNo == null)
|
||||||
|
{
|
||||||
|
lastProductNo = materialAppDetail.ProductNo;
|
||||||
|
moqty = materialAppDetail.MoQuantity;
|
||||||
|
DeptName = materialAppDetail.DeptName;
|
||||||
|
DeptCode = materialAppDetail.DeptCode;
|
||||||
|
moCode = materialAppDetail.MoCode;
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (lastProductNo != "" && lastProductNo != materialAppDetail.ProductNo)
|
||||||
|
{
|
||||||
|
lastProductNo = "";
|
||||||
|
moqty = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bodyXml = domBody.createElement("z:row");
|
bodyXml = domBody.createElement("z:row");
|
||||||
var metail = new NX.ERP.U8.MaterialDAL().GetInvPrice(detail.InvCode, 1, storeOut.Whcode, out var _cost);
|
var metail = new NX.ERP.U8.MaterialDAL().GetInvPrice(detail.InvCode, 1, storeOut.Whcode, out var _cost);
|
||||||
bodyXml.setAttribute("iunitcost", _cost);
|
bodyXml.setAttribute("iunitcost", _cost);
|
||||||
@@ -94,9 +118,10 @@ namespace NX.ERP.U8.Store
|
|||||||
|
|
||||||
}
|
}
|
||||||
headXml.setAttribute("cpspcode", lastProductNo);
|
headXml.setAttribute("cpspcode", lastProductNo);
|
||||||
|
headXml.setAttribute("imquantity", moqty);
|
||||||
|
headXml.setAttribute("cdepname", DeptName);
|
||||||
|
headXml.setAttribute("cdepcode", DeptCode);
|
||||||
|
headXml.setAttribute("cmpocode", moCode);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user