qrmode 에서 wms rcv 태그 인식되게 함
This commit is contained in:
@@ -2,11 +2,14 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Data.SqlClient;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Forms.Design;
|
||||
using AR;
|
||||
namespace Project.Dialog
|
||||
{
|
||||
@@ -258,7 +261,7 @@ namespace Project.Dialog
|
||||
//PUB.sm.seq.Clear(eSMStep.RUN_VISION0);
|
||||
//PUB.sm.seq.UpdateTime(eSMStep.RUN_COM_VS0);
|
||||
PUB.log.Add(string.Format("LEFT-QR검증({0}) 취소 JGUID={1}", "L", PUB.Result.ItemDataL.guid));
|
||||
UpdateDatabase(0);
|
||||
UpdateDatabase(eWorkPort.Left);
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
|
||||
@@ -283,25 +286,34 @@ namespace Project.Dialog
|
||||
{
|
||||
var itemdata = vidx == eWorkPort.Left ? PUB.Result.ItemDataL : PUB.Result.ItemDataR;
|
||||
|
||||
//취소상태를 DB에도 남긴다.
|
||||
using (var db = new EEEntities())
|
||||
var sql = "select top 1 * from K4EE_Component_Reel_Result where JGUID = @jguid";
|
||||
var dr = DBHelper.Get<DataSet1.Component_Reel_ResultDataTable>(sql, new SqlParameter("jguid", itemdata.guid)).FirstOrDefault();
|
||||
if (dr == null)
|
||||
{
|
||||
|
||||
var dr = db.Component_Reel_Result.AsNoTracking().Where(t => t.JGUID == itemdata.guid).FirstOrDefault();
|
||||
if (dr == null)
|
||||
{
|
||||
var ermsg = string.Format("다음 guid 를 찾을수 없어 검증취소 를 변경하지 못함 vidx={2},guid={0},sid={1}", itemdata.guid, itemdata.VisionData.SID, vidx);
|
||||
PUB.AddDebugLog(ermsg, true);
|
||||
PUB.log.AddE(ermsg);
|
||||
}
|
||||
else
|
||||
{
|
||||
dr.ANGLE = itemdata.VisionData.ApplyAngle; //210331 - 도중에 사용자 angle 이 있다면 그것이 적용되었음
|
||||
dr.PRNVALID = false;
|
||||
dr.REMARK = "검증취소";
|
||||
db.SaveChanges();
|
||||
}
|
||||
var ermsg = string.Format("다음 guid 를 찾을수 없어 검증취소 를 변경하지 못함 vidx={2},guid={0},sid={1}", itemdata.guid, itemdata.VisionData.SID, vidx);
|
||||
PUB.AddDebugLog(ermsg, true);
|
||||
PUB.log.AddE(ermsg);
|
||||
}
|
||||
else
|
||||
{
|
||||
DBHelper.UpdateWhere("K4EE_Component_Reel_Result",
|
||||
new Dictionary<string, object>
|
||||
{
|
||||
{ "ANGLE", itemdata.VisionData.ApplyAngle },
|
||||
{ "PRNVALID", 0 },
|
||||
{ "REMARK", "검증취소" }
|
||||
},
|
||||
new Dictionary<string, object>
|
||||
{
|
||||
{ "idx", dr.idx }
|
||||
});
|
||||
|
||||
//dr.ANGLE = itemdata.VisionData.ApplyAngle; //210331 - 도중에 사용자 angle 이 있다면 그것이 적용되었음
|
||||
//dr.PRNVALID = false;
|
||||
//dr.REMARK = "검증취소";
|
||||
//db.SaveChanges();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void button11_Click(object sender, EventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user