fix: CS0136 variable name conflict (bomLevel→localBomLevel, delIdList→rowDelIds)

This commit is contained in:
Gaussian committed 2026-11-09 22:45:29 +08:00
1 parent 582bcb8764
commit 5b3f1eb9d7
1 file changed
+6 -6
+6 -6
View File
@@ -2505,11 +2505,11 @@ LEFT JOIN #SupByMat SP ON SP.MaterialCode=D.ChildMaterialId;
string stopDate = "", arrDate = "";
string riskVal = rows[0]["DeliveryRisk"].ToStringEx();
string materialName = "";
int bomLevel = int.MaxValue;
int localBomLevel = int.MaxValue;
decimal arrivalSum = 0;
HashSet<string> supSet = new HashSet<string>(), purSet = new HashSet<string>(),
ptSet = new HashSet<string>(), bvSet = new HashSet<string>(), rmkSet = new HashSet<string>();
List<string> delIdList = new List<string>();
List<string> rowDelIds = new List<string>();
foreach (DataRow r in rows)
{
@@ -2522,14 +2522,14 @@ LEFT JOIN #SupByMat SP ON SP.MaterialCode=D.ChildMaterialId;
string mn = r["MaterialName"].ToStringEx();
if (mn.Length > materialName.Length) materialName = mn;
int bl = Int(r["BOMLevel"]);
if (bl < bomLevel) bomLevel = bl;
if (bl < localBomLevel) localBomLevel = bl;
string sp = r["Supplier"].ToStringEx(); if (!string.IsNullOrEmpty(sp)) supSet.Add(sp);
string pu = r["Purchaser"].ToStringEx(); if (!string.IsNullOrEmpty(pu)) purSet.Add(pu);
string pt = r["ProductTypes"].ToStringEx(); if (!string.IsNullOrEmpty(pt)) ptSet.Add(pt);
string bv = r["BOMVersion"].ToStringEx(); if (!string.IsNullOrEmpty(bv)) bvSet.Add(bv);
string rm = r["Remark"].ToStringEx(); if (!string.IsNullOrEmpty(rm)) rmkSet.Add(rm);
string did = r["Id"].ToString();
delIdList.Add(did);
rowDelIds.Add(did);
if (arrivalQtyMap.ContainsKey(did)) arrivalSum += arrivalQtyMap[did];
}
@@ -2548,10 +2548,10 @@ LEFT JOIN #SupByMat SP ON SP.MaterialCode=D.ChildMaterialId;
{
// 主键 / 操作
["Id"] = rows[0]["Id"].ToStringEx(), // 第一行 DeliveryId(向后兼容 openEdit)
["DeliveryIds"] = string.Join(",", delIdList), // 所有 DeliveryId(逗号分隔)
["DeliveryIds"] = string.Join(",", rowDelIds), // 所有 DeliveryId(逗号分隔)
["ChildMaterialId"] = mid,
["MaterialName"] = materialName,
["BOMLevel"] = bomLevel == int.MaxValue ? "" : bomLevel.ToString(),
["BOMLevel"] = localBomLevel == int.MaxValue ? "" : localBomLevel.ToString(),
["ProductCode"] = productCodes, // 该物料用于哪些产品(从 BOM 展开)
["BOMVersion"] = string.Join(",", bvSet),