Browse Source

零件取零件表里的 没有取导入值

master
qian 10 months ago
parent
commit
1c1f332760
  1. 9
      北京北汽/Controller/SCP_PO_CONTROLLER.cs

9
北京北汽/Controller/SCP_PO_CONTROLLER.cs

@ -2743,6 +2743,8 @@ namespace CK.SCP.Controller
} }
else else
{ {
List<string> PartList = _lst.Select(q => q..Trim()).ToList();
List<TA_PART> _partList = db.TA_PART.Where(q => PartList.Contains(q.PartCode)).ToList();
_lst.ForEach(p => _lst.ForEach(p =>
{ {
var _price = new TB_PRICE(); var _price = new TB_PRICE();
@ -2775,7 +2777,7 @@ namespace CK.SCP.Controller
_price.StartTime = DateTime.Parse(starttime); _price.StartTime = DateTime.Parse(starttime);
_price.EndTime = DateTime.Parse(endtime); _price.EndTime = DateTime.Parse(endtime);
_price.Curr = p.; _price.Curr = p.;
_price.Unit = p.; _price.Unit = _partList.Where(q=>q.PartCode == p..Trim()) != null? _partList.First(q => q.PartCode == p..Trim()).Unit : p.;
_price.Amt = decimal.Parse(p.); _price.Amt = decimal.Parse(p.);
_price.Site = p..Trim(); _price.Site = p..Trim();
_price.SubSite = p..Trim(); _price.SubSite = p..Trim();
@ -3067,7 +3069,8 @@ namespace CK.SCP.Controller
} }
else else
{ {
List<string> PartList = _lst.Select(q => q..Trim()).ToList();
List<TA_PART> _partList = db.TA_PART.Where(q => PartList.Contains(q.PartCode)).ToList();
_lst.ForEach(p => _lst.ForEach(p =>
{ {
string starttime = Convert.ToDateTime(p.).ToShortDateString(); string starttime = Convert.ToDateTime(p.).ToShortDateString();
@ -3130,7 +3133,7 @@ namespace CK.SCP.Controller
tb.VendId = p.; tb.VendId = p.;
tb.PartCode = p..Trim(); tb.PartCode = p..Trim();
tb.Curr = p.; tb.Curr = p.;
tb.Unit = p.; tb.Unit = _partList.Where(q => q.PartCode == p..Trim()) != null ? _partList.First(q => q.PartCode == p..Trim()).Unit : p.;
tb.Remarks = p.; tb.Remarks = p.;
tb.Amt = Convert.ToDecimal(p.); tb.Amt = Convert.ToDecimal(p.);
tb.Site = p.; tb.Site = p.;

Loading…
Cancel
Save