From 948604b0ca72697746ffc8f372f44e6cc3da1939 Mon Sep 17 00:00:00 2001 From: KwakJooYoung Date: Thu, 2 Oct 2025 13:47:02 +0900 Subject: [PATCH] =?UTF-8?q?=EB=8C=80=EB=9F=89=ED=8F=AC=EC=9E=A5=EB=90=9C?= =?UTF-8?q?=20=ED=8C=A8=ED=82=B9=EC=9D=84=20=EC=86=A1=EC=9E=A5=EC=97=90=20?= =?UTF-8?q?=EB=A7=A4=ED=95=91=ED=95=A0=20=EB=95=8C=20jomtOrderDB.jomtOrder?= =?UTF-8?q?Tbl=20=ED=85=8C=EC=9D=B4=EB=B8=94=EC=97=90=20=EC=A3=BC=EB=AC=B8?= =?UTF-8?q?=EC=A0=95=EB=B3=B4=20=EC=A0=80=EC=9E=A5=20>=20=ED=99=88?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=A0=95=ED=92=88=EB=B2=88?= =?UTF-8?q?=ED=98=B8=20=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8=ED=95=A0=20?= =?UTF-8?q?=EB=95=8C=20=EC=9D=BC=EB=B0=98=ED=8F=AC=EC=9E=A5=EA=B3=BC=20?= =?UTF-8?q?=EB=8F=99=EC=9D=BC=ED=95=98=EA=B2=8C=20=EC=A0=95=ED=92=88?= =?UTF-8?q?=EB=B2=88=ED=98=B8=20=EC=A1=B0=ED=9A=8C=EB=90=98=EC=96=B4=20?= =?UTF-8?q?=EC=B2=98=EB=A6=AC=EB=90=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- State_Comparision_Ver_1.0.0/frm_Main.vb | 72 ++++++++++++++++++++++--- 1 file changed, 64 insertions(+), 8 deletions(-) diff --git a/State_Comparision_Ver_1.0.0/frm_Main.vb b/State_Comparision_Ver_1.0.0/frm_Main.vb index 81da1ef..c381f5c 100644 --- a/State_Comparision_Ver_1.0.0/frm_Main.vb +++ b/State_Comparision_Ver_1.0.0/frm_Main.vb @@ -5,7 +5,7 @@ Imports Newtonsoft.Json.Linq Public Class frm_Main Public programName As String = "DUALSONIC Mapping Or Search Program Ver. " - Private programVer As String = "1.2.0" + Private programVer As String = "1.3.0" Private apiItemOutURL As String = "item-outflows/page" @@ -57,7 +57,8 @@ Public Class frm_Main face eye id_Serial '' 전표 : api id 코드, 맵핑 : 제품 시리얼 번호 - invoice + invoice_number + packing_code pk_Type '' 전표 : pk 코드, 맵핑 : 물품 타입(완제품 혹은 구성품) type '' 정보 종합 시 물품 타입 저장 @@ -662,7 +663,8 @@ Public Class frm_Main txbLeftOver.ForeColor = Color.Red For i = 0 To packItemSet.GetLength(1) - 1 - packItemSet(itemInfoList.invoice, i) = codeData + packItemSet(itemInfoList.invoice_number, i) = codeData + packItemSet(itemInfoList.packing_code, i) = txbMsPacking.Text Next mapping_list.Add(packItemSet) @@ -726,6 +728,7 @@ Public Class frm_Main setCodeUse = False stateFullCount = 0 + mapping_list.Clear() If ckbAPIUse.Checked = True Then @@ -1843,6 +1846,7 @@ Public Class frm_Main For i = 0 To ChkItemSet.GetLength(1) - 1 If ChkItemSet(itemInfoList.code, i) = chkItem(itemInfoList.code) And ChkItemSet(itemInfoList.face, i) = chkItem(itemInfoList.face) And ChkItemSet(itemInfoList.eye, i) = chkItem(itemInfoList.eye) Then ChkItemSet(itemInfoList.count, i) += 1 + ChkItemSet(itemInfoList.id_Serial, i) = ChkItemSet(itemInfoList.id_Serial, i) & "/" & chkItem(itemInfoList.id_Serial) successSwitch = True Exit For End If @@ -1877,6 +1881,7 @@ Public Class frm_Main For i = 0 To packItemSet.GetLength(1) - 1 If packItemSet(itemInfoList.code, i) = chkItem(itemInfoList.code) And packItemSet(itemInfoList.face, i) = chkItem(itemInfoList.face) And packItemSet(itemInfoList.eye, i) = chkItem(itemInfoList.eye) Then packItemSet(itemInfoList.count, i) += 1 + packItemSet(itemInfoList.id_Serial, i) = packItemSet(itemInfoList.id_Serial, i) & "/" & chkItem(itemInfoList.id_Serial) successSwitch = True Exit For End If @@ -3046,14 +3051,65 @@ Public Class frm_Main Private Function apiMassSave() As Boolean Dim jsonData As String Dim apiResult As String - Dim packItemSet(,) As String - Dim serial_number As String For i = 0 To mapping_list.Count - 1 - packItemSet = mapping_list(i) - serial_number = "" + Dim packItemSet(,) As String = mapping_list(i) + Dim serial_number As String = "" + Dim order_code As String = ProdSelect(ProdList.OrderCode) & "/" & i + 1 + Dim buy_date As String = Mid(ProdSelect(ProdList.BuyDate), 1, InStr(ProdSelect(ProdList.BuyDate), " ") - 1) + Dim nowToday As String = Format(Now, "yyyy") & "-" & Format(Now, "MM") & "-" & Format(Now, "dd") For j = 0 To packItemSet.GetLength(1) - 1 + DBCmd = "INSERT INTO " & applyOrderDB & "( DATETIME + , Order_Code + , DATE + , Account_Code + , Account_Name + , Orderer_Code + , Orderer_Name + , Receiver_Name + , Phone_Number + , ZipCode + , Address + , Shipment_Date + , Item_Code + , Item_Name + , Item_Count + , Apply_Face + , Apply_Eye + , Invoice_Number + , Packing_Code + , Serial_Number + , release_state + ) + VALUE ( Now() " & + ", '" & order_code & "'" & + ", '" & buy_date & "'" & + ", '" & ProdSelect(ProdList.AccountCode) & "'" & + ", '" & ProdSelect(ProdList.AccountName) & "'" & + ", '" & ProdSelect(ProdList.OrdererCode) & "'" & + ", '" & ProdSelect(ProdList.OrdererName) & "'" & + ", '" & ProdSelect(ProdList.OrdererName) & "'" & + ", '" & ProdSelect(ProdList.phone) & "'" & + ", '" & ProdSelect(ProdList.zip) & "'" & + ", '" & ProdSelect(ProdList.Address) & "'" & + ", '" & nowToday & "'" & + ", '" & packItemSet(itemInfoList.code, j) & "'" & + ", '" & packItemSet(itemInfoList.name, j) & "'" & + ", '" & packItemSet(itemInfoList.count, j) & "'" & + ", '" & packItemSet(itemInfoList.face, j) & "'" & + ", '" & packItemSet(itemInfoList.eye, j) & "'" & + ", '" & packItemSet(itemInfoList.invoice_number, 0) & "'" & + ", '" & packItemSet(itemInfoList.packing_code, 0) & "'" & + ", '" & packItemSet(itemInfoList.id_Serial, j) & "'" & + ", 'release'" & + ")" + If DBCommand(DBCmd) = False Then + 'errorOut("등록오류") + MsgBox("전표 데이터 등록 도중 오류가 발생하였습니다.", vbExclamation) + Return False + End If + If packItemSet(itemInfoList.id_Serial, j) <> Nothing And packItemSet(itemInfoList.id_Serial, j) <> "" Then If serial_number = "" Then serial_number = packItemSet(itemInfoList.id_Serial, j) @@ -3063,7 +3119,7 @@ Public Class frm_Main End If Next - jsonData = "{""expectedOutCount"": 1,""serialNumber"":""" & serial_number & """,""invoiceNumber"":""" & packItemSet(itemInfoList.invoice, 0) & """}" + jsonData = "{""expectedOutCount"": 1,""serialNumber"":""" & serial_number & """,""invoiceNumber"":""" & packItemSet(itemInfoList.invoice_number, 0) & """}" apiResult = apiRequest_PUT(jsonData, SetIdCode(i))