|
|
|
@ -1231,6 +1231,15 @@ namespace FactorySystemApi.Controllers
|
|
|
|
if (hasField[1]) dataList.Rows[i]["子项序号"] = (i + 1) * 10;
|
|
|
|
if (hasField[1]) dataList.Rows[i]["子项序号"] = (i + 1) * 10;
|
|
|
|
if (hasField[2]) dataList.Rows[i]["组件损耗率"] = "";
|
|
|
|
if (hasField[2]) dataList.Rows[i]["组件损耗率"] = "";
|
|
|
|
if (hasField[3]) dataList.Rows[i]["固定损耗数量"] = "";
|
|
|
|
if (hasField[3]) dataList.Rows[i]["固定损耗数量"] = "";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (dataList.Rows[i]["计量单位"].ToString() == "G")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
dataList.Rows[i]["组件数量"] = int.Parse(dataList.Rows[i]["组件数量"].ToString()) * 100;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (dataList2.Rows[i]["计量单位"].ToString() == "G")
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
dataList2.Rows[i]["组件数量"] = int.Parse(dataList2.Rows[i]["组件数量"].ToString()) * 100;
|
|
|
|
|
|
|
|
}
|
|
|
|
dataList.Rows[i]["可选文本"] = "生产组装BOM";
|
|
|
|
dataList.Rows[i]["可选文本"] = "生产组装BOM";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
NPOIHelper.ExportDTtoExcel(dataList, "Sheet1", savePath.Replace(".xlsx", "1.xlsx"));
|
|
|
|
NPOIHelper.ExportDTtoExcel(dataList, "Sheet1", savePath.Replace(".xlsx", "1.xlsx"));
|
|
|
|
@ -1245,7 +1254,7 @@ namespace FactorySystemApi.Controllers
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (hasField[3] && !string.IsNullOrEmpty(dataList2.Rows[i]["固定损耗数量"].ToString()) && !dataList2.Rows[i]["固定损耗数量"].ToString().Equals("0"))
|
|
|
|
if (hasField[3] && !string.IsNullOrEmpty(dataList2.Rows[i]["固定损耗数量"].ToString()) && !dataList2.Rows[i]["固定损耗数量"].ToString().Equals("0"))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
dataList3.Rows[i]["组件数量"] = "";
|
|
|
|
dataList3.Rows[i]["组件数量"] = dataList2.Rows[i]["固定损耗数量"].ToString();
|
|
|
|
dataList3.Rows[i]["组件损耗率"] = "";
|
|
|
|
dataList3.Rows[i]["组件损耗率"] = "";
|
|
|
|
dataList3.Rows[i]["固定损耗数量"] = "X";
|
|
|
|
dataList3.Rows[i]["固定损耗数量"] = "X";
|
|
|
|
if (hasField[1]) dataList3.Rows[i]["子项序号"] = (i + rowCount + 1) * 10;
|
|
|
|
if (hasField[1]) dataList3.Rows[i]["子项序号"] = (i + rowCount + 1) * 10;
|
|
|
|
|