| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | string HBarCode = ""; |
| | | string HBarCodeType = ""; |
| | | Int64 HMaterID = 0; |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //校验批号 和 生产日期 |
| | | sql = $"select top 1 HKFDate from Gy_BarCodeBill where HSupID = '{oItemSub.HSupID}' and HBatchNo = '{oItemSub.HBatchNo.TrimStart().TrimEnd()}' and HMaterID ={oItemSub.HMaterID} and isnull(HKFDate, '') <> ''"; |
| | | LogService.Write($"sql:{sql}"); |
| | | DataTable dt = oCn.RunProcReturn(sql, "tables").Tables[0]; |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | | LogService.Write($"HKFDate:{dt.Rows[0][0]}"); |
| | | sql = $"select DATEDIFF(D,{dt.Rows[0][0]},{oItemSub.HKFDate})"; |
| | | ds = oCn.RunProcReturn(sql, "tables2"); |
| | | LogService.Write($"DATEDIFF:{Convert.ToInt32(ds.Tables[0].Rows[0][0])}"); |
| | | if (ds.Tables[0].Rows.Count > 0 && Convert.ToInt32(ds.Tables[0].Rows[0][0]) != 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = $"物料编码{oItemSub.HMaterNumber},批号{oItemSub.HBatchNo.TrimStart().TrimEnd()},生产日期为{dt.Rows[0][0]},请核对"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | if (ClsPub.isLong(oItemSub.HMaterID) != 0) |
| | | { |
| | | |
| | |
| | | } |
| | | |
| | | //安瑞条码规则:物料编码(系统代入)@物料名称(系统代入)@规格型号(系统代入)@生产日期(手工输入)@数量(手工输入)@失效日期(手工输入)@批次号(手工代入)@供应商名称(系统代入)@采购订单号(系统代入) |
| | | TM = $"{oItemSub.HMaterNumber}@{oItemSub.HMaterName}@{oItemSub.HMaterModel}@{oItemSub.HKFDate}@{HMinQty}@{oItemSub.HKFDQDate}@{oItemSub.HBatchNo}@{oItemSub.HSupName}@{oItemSub.HSourceBillNo}"; |
| | | TM = $"{oItemSub.HMaterNumber}@{oItemSub.HMaterName}@{oItemSub.HMaterModel}@{oItemSub.HKFDate}@{HMinQty}@{oItemSub.HKFDQDate}@{oItemSub.HBatchNo.TrimStart().TrimEnd()}@{oItemSub.HSupName}@{oItemSub.HSourceBillNo}"; |
| | | Model.ClsGy_BarCodeBill_WMS_Model bar = new Model.ClsGy_BarCodeBill_WMS_Model(); |
| | | |
| | | bar.HBarCode = TM; |
| | |
| | | + linterid.ToString() + ",'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID + "," + HUnitID + "," + HQty2 + ",'" + HKFDate + "'," + HKFPeriod + ",'" + HKFDQDate |
| | | + "','" + HBatchNo + "','" + SubModel.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++; |
| | |
| | | + linterid.ToString() + ",'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID + "," + HUnitID + "," + HQty2 + ",'" + HKFDate + "'," + HKFPeriod + ",'" + HKFDQDate |
| | | + "','" + HBatchNo + "','" + SubModel.Count + "','" + _count + "'," + HSupID + "," + HGroupID + ",'" + ClsPub.CurUserName + "','" + DateTime.Today + "'," + HPrintQty + ",'" + HWei + "',1" |
| | | + "," + HSourceInterID + "," + HSourceEntryID + ",'" + HSourceBillNo + "','" + HSourceBillType + "','" + HMTONO + "')"; |
| | | LogService.Write(sql); |
| | | oCn.RunProc(sql); |
| | | _count++; |
| | | } |