Browse Source

查不到bom 赋值0

SCP_CYJ
qian 1 week ago
parent
commit
4620c1a86c
  1. 8
      Controller/SCP_PO_CONTROLLER.cs

8
Controller/SCP_PO_CONTROLLER.cs

@ -5803,8 +5803,8 @@ namespace CK.SCP.Controller
BomList1.JsonService bomVersionRe = new BomList1.JsonService();
var _ReturnRelust = bomVersionRe.GetBom(itm., itm.);
var _Bomlist = JsonConvert.DeserializeObject<List<TM_CYJ_BOM>>(_ReturnRelust);
var _bom = _Bomlist.First();
maxpodetail.Singlecon = _bom.Qty;
var _bom = _Bomlist.FirstOrDefault()??null;
maxpodetail.Singlecon = _bom==null?0: _bom.Qty;
var part = db.TA_PART.FirstOrDefault(t => t.PartCode == itm.);
maxpodetail.PoBillNum = maxp.PoBillNum;
maxpodetail.ContractNo = maxp.PoBillNum;
@ -5812,7 +5812,7 @@ namespace CK.SCP.Controller
maxpodetail.PartCode = itm.;
maxpodetail.PartNumber = itm.;
maxpodetail.Texture = part.ProjectId;//材质
maxpodetail.Model = itm.;
maxpodetail.Model = itm.;
maxpodetail.Finprspec = part.PartDesc2;//规格
maxpodetail.TechStandard = itm.;
maxpodetail.MinordQty = decimal.Parse(itm.);
@ -5919,7 +5919,7 @@ namespace CK.SCP.Controller
maxuni.SubSite = maxpodetail.forecastsix;//预测6
maxuni.Site = site;
maxuni.Extend2 = itm.;
maxuni.TaxAmt = _bom.Qty;//单件消耗
maxuni.TaxAmt = _bom ==null?0:_bom.Qty;//单件消耗
maxuni.ValidDate = DateTime.Now;
maxuni.ErpLineNum = maxpodetail.PoLine;
maxuni.Site = site;

Loading…
Cancel
Save