프로젝트 구조 개선 및 README.md 추가

- UIControl 프로젝트 구조 변경 (CapCleaningControl → Sub/UIControl)
- arAjinextek 라이브러리 통합 및 구조 개선
- 새로운 arAjinextek_Union 프로젝트 추가
- 솔루션 파일에 README.md 추가
- QR 모드에서 WMS RCV 태그 인식 기능 강화
- 데이터베이스 스키마 업데이트 및 관련 클래스 수정
- 프린터 및 바코드 장치 연동 로직 개선

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
ChiKyun Kim
2025-08-07 08:35:56 +09:00
parent c17296101a
commit 9a7d1d27c7
140 changed files with 4203 additions and 6791 deletions

View File

@@ -23,7 +23,7 @@ namespace Project
{
public static class PUB
{
public static string MCCode = "IB";
public static string MCCode = "R0";
public static Class.StatusMessage StatusMessage { get; set; } = new Class.StatusMessage();
public static string[] WaitMessage = new string[] { "", "", "", "", "", "", "", "", "", "", "" };
@@ -240,6 +240,9 @@ namespace Project
//초기화
PUB.Result.vModel.Title = string.Empty;
PUB.PrinterL.ZPLFileName = "zpl.txt"; //기본파일로 설정
PUB.PrinterR.ZPLFileName = "zpl.txt";
var modelVision = PUB.mdm.GetDataV(modelName);
if (modelVision != null)
{
@@ -284,6 +287,24 @@ namespace Project
UpLoadBarcodeConfig(PUB.keyenceR);
}
if (mv.bOwnZPL)
{
var fn = UTIL.MakePath("Model", mv.idx.ToString(), "zpl.txt");
if (System.IO.File.Exists(fn))
{
PUB.PrinterL.ZPLFileName = fn;
PUB.PrinterR.ZPLFileName = fn;
PUB.log.AddI($"전용 ZPL 설정 {fn}");
}
else
{
PUB.log.AddE($"전용 ZPL파일이 없습니다 {fn}");
}
}
else
{
PUB.log.AddI($"공용 ZPL파일을 사용합니다");
}
return true;
}
else
@@ -373,7 +394,7 @@ namespace Project
//기존 SID정보에서 데이터를 취합니다.
var mc = AR.SETTING.Data.McName;
PUB.log.AddAT($"환경설정에서 ECS SKIP이 되었습니다 기존 정보에서 데이터를 생성합니다 MC={mc}");
using (var tainfo = new DataSet1TableAdapters.Component_Reel_SID_InformationTableAdapter())
using (var tainfo = new DataSet1TableAdapters.K4EE_Component_Reel_SID_InformationTableAdapter())
{
var cntd = tainfo.DeleteAll("IB");
PUB.log.AddAT($"{cntd}건의 자료가 삭제됨");
@@ -391,7 +412,7 @@ namespace Project
return rlt;
}
/// <summary>
/// 전체 작업목록을 별도파일에 저장한다
/// </summary>
@@ -435,7 +456,7 @@ namespace Project
try
{
//sid정보테이블을 다시 불러온다
var taConv = new DataSet1TableAdapters.Component_Reel_SID_ConvertTableAdapter();
var taConv = new DataSet1TableAdapters.K4EE_Component_Reel_SID_ConvertTableAdapter();
PUB.Result.DTSidConvert.Clear();
taConv.Fill(PUB.Result.DTSidConvert);
PUB.Result.DTSidConvert.AcceptChanges();
@@ -451,6 +472,86 @@ namespace Project
}
}
/// <summary>
/// 지정된 VisionData에 해당 값을 기록 합니다
/// ColName 이 하드코딩되어있으니 필드명이 변경되면 값을 변경해야 함
/// </summary>
/// <param name="vdata"></param>
/// <param name="colName"></param>
/// <param name="vStr"></param>
/// <returns></returns>
public static bool UpdateSIDInfoData(ref Class.VisionData vdata, string colNameOrg, string vStr)
{
var colName = colNameOrg.ToLower().Trim();
if (colName == "custcode" || colName == "cust_code")
{
PUB.log.Add($"UpdateSIDInfoData [{colNameOrg}] {vdata.CUSTCODE}=>{vStr}");
vdata.CUSTCODE = vStr;
return true;
}
else if (colName == "partno" || colName == "part_no")
{
PUB.log.Add($"UpdateSIDInfoData [{colNameOrg}] {vdata.PARTNO}=>{vStr}");
vdata.PARTNO = vStr;
vdata.PARTNO_Trust = true;
return true;
}
else if (colName == "printposition" || colName == "pos")
{
PUB.log.Add($"UpdateSIDInfoData [{colNameOrg}] {vdata.PrintPositionData}=>{vStr}");
vdata.PrintPositionData = vStr;
vdata.PrintPositionCheck = true;
return true;
}
else if (colName == "vname" || colName == "vendername" || colName == "vendorname" || colName == "vendor_nm")
{
PUB.log.Add($"UpdateSIDInfoData [{colNameOrg}] {vdata.VNAME}=>{vStr}");
vdata.VNAME = vStr;
vdata.VNAME_Trust = true;
return true;
}
else if (colName == "venderlot" || colName == "vendorlot" || colName == "vendor_lot")
{
PUB.log.Add($"UpdateSIDInfoData [{colNameOrg}] {vdata.VLOT}=>{vStr}");
vdata.VLOT = vStr;
vdata.VLOT_Trust = true;
return true;
}
else if (colName == "sid")
{
PUB.log.Add($"UpdateSIDInfoData [{colNameOrg}] {vdata.SID}=>{vStr}");
vdata.SID = vStr;
vdata.SID_Trust = vdata.SID.Length == 9;
if (vStr.Length != 9)
{
PUB.log.AddE($"DB SID LEN ERROR:{vStr},LEN={vStr.Length}");
}
return true;
}
else if (colName == "batch" || colName == "batch_no")
{
PUB.log.Add($"UpdateSIDInfoData [{colNameOrg}] {vdata.BATCH}=>{vStr}");
vdata.BATCH = vStr;
return true;
}
else if (colName == "qtymax")
{
PUB.log.Add($"UpdateSIDInfoData [{colNameOrg}] {vdata.BATCH}=>{vStr}");
vdata.QTYMAX = vStr;
return true;
}
else if (colName == "attach")
{
PUB.log.Add($"UpdateSIDInfoData [{colNameOrg}] {vdata.Target}=>{vStr}");
vdata.Target = vStr;
return true;
}
return false;
}
public static string SIDCovert(string oldsid, string src, out bool err)
{
err = true;
@@ -768,12 +869,12 @@ namespace Project
{
try
{
using (var ta = new DataSet1TableAdapters.Component_Reel_RegExRuleTableAdapter())
using (var ta = new DataSet1TableAdapters.K4EE_Component_Reel_RegExRuleTableAdapter())
{
ta.ClearBeforeFill = true;
if (ignore) ta.FillIgnore(PUB.mdm.dataSet.Component_Reel_RegExRule, custname);
else ta.Fill(PUB.mdm.dataSet.Component_Reel_RegExRule, custname);
PUB.mdm.dataSet.Component_Reel_RegExRule.AcceptChanges();
if (ignore) ta.FillIgnore(PUB.mdm.dataSet.K4EE_Component_Reel_RegExRule, custname);
else ta.Fill(PUB.mdm.dataSet.K4EE_Component_Reel_RegExRule, custname);
PUB.mdm.dataSet.K4EE_Component_Reel_RegExRule.AcceptChanges();
}
}
catch (Exception ex)
@@ -783,7 +884,7 @@ namespace Project
}
//data
foreach (DataSet1.Component_Reel_RegExRuleRow dr in PUB.mdm.dataSet.Component_Reel_RegExRule)
foreach (DataSet1.K4EE_Component_Reel_RegExRuleRow dr in PUB.mdm.dataSet.K4EE_Component_Reel_RegExRule)
{
if (ignore)
{
@@ -834,11 +935,11 @@ namespace Project
{
try
{
using (var ta = new DataSet1TableAdapters.Component_Reel_PrintRegExRuleTableAdapter())
using (var ta = new DataSet1TableAdapters.K4EE_Component_Reel_PrintRegExRuleTableAdapter())
{
ta.ClearBeforeFill = true;
ta.Fill(PUB.mdm.dataSet.Component_Reel_PrintRegExRule);
PUB.mdm.dataSet.Component_Reel_RegExRule.AcceptChanges();
ta.Fill(PUB.mdm.dataSet.K4EE_Component_Reel_PrintRegExRule);
PUB.mdm.dataSet.K4EE_Component_Reel_RegExRule.AcceptChanges();
}
}
catch (Exception ex)
@@ -849,7 +950,7 @@ namespace Project
//data
foreach (DataSet1.Component_Reel_PrintRegExRuleRow dr in PUB.mdm.dataSet.Component_Reel_PrintRegExRule)
foreach (DataSet1.K4EE_Component_Reel_PrintRegExRuleRow dr in PUB.mdm.dataSet.K4EE_Component_Reel_PrintRegExRule)
{
if (dr.Groups.isEmpty() || dr.Pattern.isEmpty()) continue;
@@ -970,16 +1071,11 @@ namespace Project
popup.WindowOpen += popup_WindowOpen;
//zpl파일 만든다.
var fn = System.IO.Path.Combine(UTIL.CurrentPath, "zpl.txt");
if (System.IO.File.Exists(fn) == false)
{
System.IO.File.WriteAllText(fn, Properties.Settings.Default.ZPL, System.Text.Encoding.Default);
}
var fn = Path.Combine(UTIL.CurrentPath, "zpl.txt");
if (File.Exists(fn) == false)
File.WriteAllText(fn, Properties.Settings.Default.ZPL7, Encoding.Default);
}
static void popup_WindowOpen(object sender, EventArgs e)
{
var msgdata = sender as MessageWindow.CMessageData;
@@ -1033,8 +1129,8 @@ namespace Project
dbmCount = new Manager.DatabaseManagerCount();
dbmCount.dataPath = AR.SETTING.Data.Path_Data; //200113
dio = new arDev.AjinEXTEK.DIO();
mot = new arDev.AjinEXTEK.MOT();
dio = new arDev.AjinEXTEK.DIO(arDev.AjinEXTEK.ELibraryType.AXT);
mot = new arDev.AjinEXTEK.MOT(arDev.AjinEXTEK.ELibraryType.AXT);
// flag = new Flag();