From 77e7afb2172eb44226674d5d803e9eb78b9bc3b6 Mon Sep 17 00:00:00 2001 From: 王 垚 <1402714037@qq.com> Date: 星期三, 16 二月 2022 16:16:56 +0800 Subject: [PATCH] 安瑞调整 --- WebAPI/Controllers/BarCodeController.cs | 63 +++++++++++++++++++++++-------- 1 files changed, 46 insertions(+), 17 deletions(-) diff --git a/WebAPI/Controllers/BarCodeController.cs b/WebAPI/Controllers/BarCodeController.cs index 9beb439..cb634eb 100644 --- a/WebAPI/Controllers/BarCodeController.cs +++ b/WebAPI/Controllers/BarCodeController.cs @@ -761,6 +761,7 @@ string HWei = ""; string HMTONO = ""; oCn.BeginTran(); + int count = 1; foreach (Model.ClsGy_BarCodeBill_WMS_Model oItemSub in ls2) { //LogService.Write("寰幆绗簩娆�:" + oItemSub.HSupID); @@ -784,15 +785,17 @@ HSourceBillType = ClsPub.isStrNull(oItemSub.HSourceBillType); HWei = ClsPub.isStrNull(oItemSub.HEndQty); oCn.RunProc("insert into Gy_BarCodeBill (HInterID,HBarCode,HBarCodeType,HMaterID,HUnitID,HQty,HKFDate,HKFPeriod,HKFDQDate" + - ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HEndQty,HSupflag" + + ",HBatchNo,HBarcodeQtys,HBarcodeNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HEndQty,HSupflag" + ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HMTONO " + ") values (" + linterid.ToString() + ",'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID + "," + HUnitID + "," + HQty2 + ",'" + HKFDate + "'," + HKFPeriod + ",'" + HKFDQDate - + "','" + HBatchNo + "'," + HSupID + "," + HGroupID + ",'" + ClsPub.CurUserName + "','" + DateTime.Today + "'," + HPrintQty + ",'" + HWei + "',1" + + "','" + HBatchNo + "','" + ls2.Count + "','" + count + "'," + HSupID + "," + HGroupID + ",'" + ClsPub.CurUserName + "','" + DateTime.Today + "'," + HPrintQty + ",'" + HWei + "',1" + "," + HSourceInterID + "," + HSourceEntryID + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HMTONO + "')"); oCn.RunProc("exec setLSH '" + DateTime.Today + "'"); + count++; } } + int _count = 1; foreach (Model.ClsGy_BarCodeBill_WMS_Model oItemSub in ls3) { //LogService.Write("寰幆绗笁娆�:" + oItemSub.HSupID); @@ -814,13 +817,21 @@ HSourceBillNo = ClsPub.isStrNull(oItemSub.HSourceBillNo); HSourceBillType = ClsPub.isStrNull(oItemSub.HSourceBillType); HWei = ClsPub.isStrNull(oItemSub.HEndQty); - oCn.RunProc("insert into Gy_BarCodeBill (HInterID,HBarCode,HBarCodeType,HMaterID,HUnitID,HQty,HKFDate,HKFPeriod,HKFDQDate" + - ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HEndQty,HSupflag" + + LogService.Write("insert into Gy_BarCodeBill (HInterID,HBarCode,HBarCodeType,HMaterID,HUnitID,HQty,HKFDate,HKFPeriod,HKFDQDate" + + ",HBatchNo,HBarcodeQtys,HBarcodeNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HEndQty,HSupflag" + ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HMTONO " + ") values (" + linterid.ToString() + ",'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID + "," + HUnitID + "," + HQty2 + ",'" + HKFDate + "'," + HKFPeriod + ",'" + HKFDQDate - + "','" + HBatchNo + "'," + HSupID + "," + HGroupID + ",'" + ClsPub.CurUserName + "','" + DateTime.Today + "'," + HPrintQty + ",'" + HWei + "',1" + + "','" + HBatchNo + "','" + ls3.Count + "','" + _count + "'," + HSupID + "," + HGroupID + ",'" + ClsPub.CurUserName + "','" + DateTime.Today + "'," + HPrintQty + ",'" + HWei + "',1" + "," + HSourceInterID + "," + HSourceEntryID + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HMTONO + "')"); + oCn.RunProc("insert into Gy_BarCodeBill (HInterID,HBarCode,HBarCodeType,HMaterID,HUnitID,HQty,HKFDate,HKFPeriod,HKFDQDate" + + ",HBatchNo,HBarcodeQtys,HBarcodeNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HEndQty,HSupflag" + + ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HMTONO " + + ") values (" + + linterid.ToString() + ",'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID + "," + HUnitID + "," + HQty2 + ",'" + HKFDate + "'," + HKFPeriod + ",'" + HKFDQDate + + "','" + HBatchNo + "','" + ls3.Count + "','" + _count + "'," + HSupID + "," + HGroupID + ",'" + ClsPub.CurUserName + "','" + DateTime.Today + "'," + HPrintQty + ",'" + HWei + "',1" + + "," + HSourceInterID + "," + HSourceEntryID + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HMTONO + "')"); + _count++; } } //鏆傛椂鍙洖濉叧鑱旀暟閲� @@ -1526,6 +1537,7 @@ string HWei = ""; string HMTONO = ""; oCn.BeginTran(); + int count = 1; foreach (Model.ClsGy_BarCodeBill_WMS_Model oItemSub in ls2) { if (ClsPub.isLong(oItemSub.HMaterID) != 0) @@ -1546,16 +1558,21 @@ HSourceBillNo = ClsPub.isStrNull(oItemSub.HSourceBillNo); HSourceBillType = ClsPub.isStrNull(oItemSub.HSourceBillType); HWei = ClsPub.isStrNull(oItemSub.HEndQty); - oCn.RunProc("insert into Gy_BarCodeBill (HInterID,HBarCode,HBarCodeType,HMaterID,HUnitID,HQty,HKFDate,HKFPeriod,HKFDQDate" + - ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HEndQty,HSupflag" + + + string sql = "insert into Gy_BarCodeBill (HInterID,HBarCode,HBarCodeType,HMaterID,HUnitID,HQty,HKFDate,HKFPeriod,HKFDQDate" + + ",HBatchNo,HBarcodeQtys,HBarcodeNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HEndQty,HSupflag" + ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HMTONO " + ") values (" + linterid.ToString() + ",'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID + "," + HUnitID + "," + HQty2 + ",'" + HKFDate + "'," + HKFPeriod + ",'" + HKFDQDate - + "','" + HBatchNo + "'," + HSupID + "," + HGroupID + ",'" + ClsPub.CurUserName + "','" + DateTime.Today + "'," + HPrintQty + ",'" + HWei + "',1" - + "," + HSourceInterID + "," + HSourceEntryID + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HMTONO + "')"); + + "','" + HBatchNo + "','" + ls2.Count + "','" + count + "'," + HSupID + "," + HGroupID + ",'" + ClsPub.CurUserName + "','" + DateTime.Today + "'," + HPrintQty + ",'" + HWei + "',1" + + "," + HSourceInterID + "," + HSourceEntryID + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HMTONO + "')"; + LogService.Write(sql); + oCn.RunProc(sql); oCn.RunProc("exec setLSH '" + DateTime.Today + "'"); + count++; } } + int _count = 1; foreach (Model.ClsGy_BarCodeBill_WMS_Model oItemSub in ls3) { if (ClsPub.isLong(oItemSub.HMaterID) != 0) @@ -1576,13 +1593,16 @@ HSourceBillNo = ClsPub.isStrNull(oItemSub.HSourceBillNo); HSourceBillType = ClsPub.isStrNull(oItemSub.HSourceBillType); HWei = ClsPub.isStrNull(oItemSub.HEndQty); - oCn.RunProc("insert into Gy_BarCodeBill (HInterID,HBarCode,HBarCodeType,HMaterID,HUnitID,HQty,HKFDate,HKFPeriod,HKFDQDate" + - ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HEndQty,HSupflag" + - ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HMTONO " + - ") values (" - + linterid.ToString() + ",'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID + "," + HUnitID + "," + HQty2 + ",'" + HKFDate + "'," + HKFPeriod + ",'" + HKFDQDate - + "','" + HBatchNo + "'," + HSupID + "," + HGroupID + ",'" + ClsPub.CurUserName + "','" + DateTime.Today + "'," + HPrintQty + ",'" + HWei + "',1" - + "," + HSourceInterID + "," + HSourceEntryID + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HMTONO + "')"); + string sql = "insert into Gy_BarCodeBill (HInterID,HBarCode,HBarCodeType,HMaterID,HUnitID,HQty,HKFDate,HKFPeriod,HKFDQDate" + + ",HBatchNo,HBarcodeQtys,HBarcodeNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HEndQty,HSupflag" + + ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HMTONO " + + ") values (" + + linterid.ToString() + ",'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID + "," + HUnitID + "," + HQty2 + ",'" + HKFDate + "'," + HKFPeriod + ",'" + HKFDQDate + + "','" + HBatchNo + "','" + ls3.Count + "','" + _count + "'," + HSupID + "," + HGroupID + ",'" + ClsPub.CurUserName + "','" + DateTime.Today + "'," + HPrintQty + ",'" + HWei + "',1" + + "," + HSourceInterID + "," + HSourceEntryID + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HMTONO + "')"; + LogService.Write(sql); + oCn.RunProc(sql); + _count++; } } //鏆傛椂鍙洖濉叧鑱旀暟閲� @@ -1721,7 +1741,16 @@ SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); try { - WebAPIController.Add_Log("鏉$爜妗f鍒犻櫎", HUserName, "鏉$爜妗f鍒犻櫎"); + string sql = "select HBarCode from Gy_BarCodeBill where HItemID in(" + HInterID + ") "; + LogService.Write("鍒犻櫎sql:" + sql); + DataTable dt = oCN.RunProcReturn(sql, "deleteTable").Tables[0]; + if (dt.Rows.Count > 0) + { + foreach (DataRow dr in dt.Rows) + { + WebAPIController.Add_Log("鏉$爜妗f鍒犻櫎", HUserName, "鍗曞彿" + dr["HBarCode"].ToString()); ; + } + } oCN.BeginTran(); //LogService.Write("Delete From Gy_BarCodeBill where HItemID in(" + HInterID + ")") ; oCN.RunProc("Delete From Gy_BarCodeBill where HItemID in(" + HInterID + ") "); -- Gitblit v1.9.1