生产工单导入
This commit is contained in:
parent
ce19f330a3
commit
311779e473
@ -68,6 +68,7 @@ namespace ZR.Admin.WebApi.Controllers
|
||||
// return File(stream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",fileName);
|
||||
}
|
||||
|
||||
|
||||
#region 方法
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -121,15 +121,10 @@ namespace ZR.Admin.WebApi.Controllers.mes.pro
|
||||
item.ProductDescription = "";
|
||||
if (item.Colour == null)
|
||||
item.Colour = "";
|
||||
|
||||
if (item.Specifications == null)
|
||||
item.Specifications = "";
|
||||
if (item.CylinderNumber == null)
|
||||
item.CylinderNumber = "";
|
||||
if (item.PQualifiedNum == null)
|
||||
item.PQualifiedNum = 0;
|
||||
if (item.PQualifiedRate == null)
|
||||
item.PQualifiedRate = 0;
|
||||
item.CylinderNumber = "";
|
||||
if (item.Remark1 == null)
|
||||
item.Remark1 = "";
|
||||
if (item.Remark2 == null)
|
||||
@ -144,6 +139,19 @@ namespace ZR.Admin.WebApi.Controllers.mes.pro
|
||||
item.Year = year;
|
||||
item.Week = week;
|
||||
item.Date = date;
|
||||
//PreviousNumber
|
||||
if (item.PQualifiedNum == null)
|
||||
item.PQualifiedNum = 0;
|
||||
if (item.PreviousNumber != null && item.PreviousNumber > 0 && item.PQualifiedNum != null && item.PQualifiedNum > 0)
|
||||
{
|
||||
decimal rate = (decimal)item.PQualifiedNum / (decimal)item.PreviousNumber;
|
||||
item.PQualifiedRate = Math.Round(rate, 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
item.PQualifiedRate = 0;
|
||||
}
|
||||
|
||||
}
|
||||
var final_list = list.Where(it => !it.BlankNumber.Contains("圈数"))
|
||||
.Where(it => !(it.BlankNumber == "" && it.FinishedPartNumber == "" && it.ProductDescription == "" && it.Specifications == "" && it.CylinderNumber == "" && it.Remark1 == "" && it.Remark2 == "" && it.Remark3 == "" && it.Remark4 == "" && it.ClientWorkorder == ""))
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user