| | |
| | | string HWei = ""; |
| | | string HMTONO = ""; |
| | | oCn.BeginTran(); |
| | | int count = 1; |
| | | foreach (Model.ClsGy_BarCodeBill_WMS_Model oItemSub in ls2) |
| | | { |
| | | //LogService.Write("循环第二次:" + oItemSub.HSupID); |
| | |
| | | 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); |
| | |
| | | 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++; |
| | | } |
| | | } |
| | | //暂时只回填关联数量 |
| | |
| | | string HWei = ""; |
| | | string HMTONO = ""; |
| | | oCn.BeginTran(); |
| | | int count = 1; |
| | | foreach (Model.ClsGy_BarCodeBill_WMS_Model oItemSub in ls2) |
| | | { |
| | | if (ClsPub.isLong(oItemSub.HMaterID) != 0) |
| | |
| | | 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) |
| | |
| | | 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++; |
| | | } |
| | | } |
| | | //暂时只回填关联数量 |
| | |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | try |
| | | { |
| | | WebAPIController.Add_Log("条码档案删除", HUserName, "条码档案删除"); |
| | | 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("条码档案删除", 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 + ") "); |