Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
Line-Smart-Workstation
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit ec36f8f8
由
LN
编写于
2025-03-06 16:35:08 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
bom导入可支持一个元器件多个库位
1 个父辈
2512d66f
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
13 行增加
和
89 行删除
DeviceLibrary/csvLoad/CSVBomManager.cs
DeviceLibrary/manager/BoardManager.cs
TSA-V/frmBoard/FrmBomUpload.cs
DeviceLibrary/csvLoad/CSVBomManager.cs
查看文件 @
ec36f8f
...
@@ -297,94 +297,6 @@ namespace TSA_V.LoadCSVLibrary
...
@@ -297,94 +297,6 @@ namespace TSA_V.LoadCSVLibrary
index
++;
index
++;
}
}
#
region
旧代码
//Dictionary<string, string> pnposlist = new Dictionary<string, string>();
//HashSet<string> usedposlist = new HashSet<string>();
//List<ComponetInfo> componetlist = new List<ComponetInfo>();
//int Id = 1;
//foreach (var com in comList)
//{
// if (string.IsNullOrWhiteSpace(com.PositionNum))
// continue;
// string[] strarr = GetPositionNum(com.PositionNum);
// string[] intarr = com.ComCount.Split(';');
// if (strarr.Length != +intarr.Length)
// {
// MessageBox.Show($"{com.PN}的数量分组{intarr.Length}和位置分组{strarr.Length},不统一!");
// return new List<ComponetInfo>();
// }
// else if (intarr.Length == 1 && strarr.Length == 1)
// {
// com.Id = Id;
// componetlist.Add(com);
// Id++;
// continue;
// }
// int j = 0;
// foreach (var item in strarr)
// {
// ComponetInfo componet = new ComponetInfo();
// string tagno = com.TagNo;
// int comid = Id + 1;
// if (j != 0)
// {
// tagno = "";
// comid = 0;
// }
// componet.Id = comid;
// componet.TagNo = tagno;
// componet.PositionX = com.PositionX;
// componet.PositionNum = item;
// componet.PN = com.PN;
// componet.Text = com.Text;
// componet.ComCount = intarr[j];
// componet.ComponentDes = com.ComponentDes;
// componet.Notes = com.Notes;
// componetlist.Add(componet);
// if (!string.IsNullOrEmpty(com.PositionNum))
// {
// usedposlist.Add(com.PositionNum);
// pnposlist[com.PN] = com.PositionNum;
// }
// j++;
// Id++;
// }
// //if (!string.IsNullOrEmpty(com.PositionNum))
// //{
// // usedposlist.Add(com.PositionNum);
// // pnposlist[com.PN] = com.PositionNum;
// //}
//}
//List<ComponetInfo> componedate = componetlist.Where(m => !m.PositionNum.Contains(";")).ToList();
//foreach (var com in componedate)
//{
// if (string.IsNullOrWhiteSpace(com.PositionNum) && !string.IsNullOrWhiteSpace(com.PN))
// {
// if (pnposlist.ContainsKey(com.PN))
// com.PositionNum = pnposlist[com.PN];
// else
// {
// foreach (var p in CSVPositionReader<TSAVPosition>.allPositionMap)
// {
// if (usedposlist.Contains(p.Value.PositionNum))
// continue;
// com.PositionNum = p.Value.PositionNum;
// pnposlist[com.PN] = com.PositionNum;
// usedposlist.Add(com.PositionNum);
// break;
// }
// }
// }
// //if (String.IsNullOrEmpty(com.PositionNum) || String.IsNullOrEmpty(com.PN))
// //{
// // LOGGER.Error("读取csv,数据不完整,跳过数据,line=" + com.TagNo);
// // continue;
// //}
//}
#
endregion
return
CreateCompone
(
comList
);
return
CreateCompone
(
comList
);
}
}
...
...
DeviceLibrary/manager/BoardManager.cs
查看文件 @
ec36f8f
...
@@ -391,6 +391,18 @@ namespace TSA_V.DeviceLibrary
...
@@ -391,6 +391,18 @@ namespace TSA_V.DeviceLibrary
}
}
return
null
;
return
null
;
}
}
public
static
List
<
BoardInfo
>
getBoardByBomName
(
string
bomName
)
{
List
<
BoardInfo
>
list
=
new
List
<
BoardInfo
>();
foreach
(
BoardInfo
board
in
boardList
)
{
if
(
board
.
boardName
.
Equals
(
bomName
))
{
list
.
Add
(
board
);
}
}
return
list
;
}
/// <summary>
/// <summary>
/// 修正前备份
/// 修正前备份
/// </summary>
/// </summary>
...
...
TSA-V/frmBoard/FrmBomUpload.cs
查看文件 @
ec36f8f
...
@@ -356,7 +356,7 @@ namespace TSA_V.frmBoard
...
@@ -356,7 +356,7 @@ namespace TSA_V.frmBoard
}
}
else
else
{
{
this
.
componetInfos
=
frmViewer
.
dataList
;
this
.
componetInfos
=
CSVBomManager
.
CreateCompone
(
frmViewer
.
dataList
)
;
this
.
DialogResult
=
DialogResult
.
OK
;
this
.
DialogResult
=
DialogResult
.
OK
;
}
}
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论