Commit 2a9e27b4 LN

导入程序组装位置与bom位置显示不一致。

1 个父辈 9d5db606
...@@ -214,11 +214,16 @@ namespace TSA_V.DeviceLibrary ...@@ -214,11 +214,16 @@ namespace TSA_V.DeviceLibrary
List<ComponetInfo> componetInfos = new List<ComponetInfo>(); List<ComponetInfo> componetInfos = new List<ComponetInfo>();
int i = 0; int i = 0;
foreach (SMTPointInfo p in board.smtList) foreach (SMTPointInfo p in board.smtList)
{ {
ComponetInfo c = new ComponetInfo(); ComponetInfo c = new ComponetInfo();
if (p.componet != null) if (p.componet != null)
{ {
c = p.componet; c = p.componet;
if (p.PositionNum != c.PositionNum)
{
LogUtil.error($"改导入程序【{board.boardName}】组装点【{p.TagNo + " " + p.PN}】的位置从【{p.PositionNum}】改为元器件库对应位置【{c.PositionNum}】 ");
p.PositionNum = c.PositionNum;
}
} }
else else
{ {
......
...@@ -297,7 +297,7 @@ namespace TSA_V ...@@ -297,7 +297,7 @@ namespace TSA_V
view.Cells[3].Value = point.PositionX.ToString(); view.Cells[3].Value = point.PositionX.ToString();
view.Cells[4].Value = point.PositionY.ToString(); view.Cells[4].Value = point.PositionY.ToString();
view.Cells[5].Value = point.NodePositionX.ToString(); view.Cells[5].Value = point.NodePositionX.ToString();
view.Cells[6].Value = point.NodePositionY.ToString(); view.Cells[6].Value = point.NodePositionY.ToString();
view.Cells[7].Value = point.PositionNum.ToString(); view.Cells[7].Value = point.PositionNum.ToString();
view.Cells[8].Value = point.NeedSoldering; view.Cells[8].Value = point.NeedSoldering;
view.Cells[9].Value = point.WeldTemp; view.Cells[9].Value = point.WeldTemp;
...@@ -317,6 +317,7 @@ namespace TSA_V ...@@ -317,6 +317,7 @@ namespace TSA_V
if (com != null) if (com != null)
{ {
view.Cells[Column_Notes.Index].Value = com.Notes; view.Cells[Column_Notes.Index].Value = com.Notes;
view.Cells[7].Value = com.PositionNum.ToString();
} }
} }
......
...@@ -342,6 +342,16 @@ namespace TSA_V ...@@ -342,6 +342,16 @@ namespace TSA_V
for (int i= 0;i < board.smtList.Count; i++){ for (int i= 0;i < board.smtList.Count; i++){
SMTPointInfo p = board.smtList[i]; SMTPointInfo p = board.smtList[i];
board.smtList[i].componet = CSVBomManager.GetCom(board.boardName, p); board.smtList[i].componet = CSVBomManager.GetCom(board.boardName, p);
//优先使用bom的位置
if(board.smtList[i].componet!=null)
{
string bomPos = board.smtList[i].componet.PositionNum;
if (p.PositionNum!=bomPos )
{
p.PositionNum = bomPos;
}
}
} }
SaveFileDialog sfd = new SaveFileDialog(); SaveFileDialog sfd = new SaveFileDialog();
sfd.FileName = ""; sfd.FileName = "";
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!