// GET: Test public ActionResult Index() { //PDA查询 //T_OutStockTask_Func tfunc = new T_OutStockTask_Func(); //tfunc.GetT_OutTaskListADF("","10016700", "1"); //T_LandMark_DB db = new T_LandMark_DB(); //db.Getlandmark("003"); //T_LandMarkWithTaskInfo model = new T_LandMarkWithTaskInfo(); //T_LandMarkWithTask_DB dbb = new T_LandMarkWithTask_DB(); //string strmsg = ""; //dbb.GetTaskForLandmark("1@FY2@10011931@8008970000831@2024-04-23@20240423@6@20190906001297", ref model, ref strmsg); //T_Stock_Func tfunc = new T_Stock_Func(); //tfunc.GetStockModelBySql("{\"AreaID\":4947,\"AreaType\":0,\"Barcode\":\"6938826811521\",\"FromAreaID\":0,\"FromHouseID\":0,\"FromWareHouseID\":0,\"HouseID\":0,\"HouseProp\":2,\"IsLimitStock\":0,\"OutstockDetailID\":0,\"OutstockHeaderID\":0,\"PickModel\":0,\"ScanType\":2,\"StockBarCodeStatus\":0,\"WareHouseID\":1162,\"ErpLineStatus\":0,\"HeaderID\":0,\"ID\":0,\"LineStatus\":0,\"MaterialNoID\":0,\"Status\":0,\"StockType\":0,\"TerminateReasonID\":0,\"VoucherType\":0}"); //T_LandMarkWithTask_Func func = new T_LandMarkWithTask_Func(); //func.SaveTaskwithandmark("{\"CarNo\":\"002\",\"Landmarkid\":1.0,\"TaskNo\":\"D201909010485\",\"landmarkno\":\"001\",\"EDate\":\"Dec 31, 3938 7:00:00 PM\",\"ErpLineStatus\":0,\"ErpVoucherNo\":\"FY2-DB6-1909010001\",\"HeaderID\":0,\"ID\":0,\"LineStatus\":0,\"MaterialNoID\":0,\"Status\":0,\"StockType\":0,\"TerminateReasonID\":0,\"VoucherType\":0}", "{\"BIsAdmin\":true,\"BIsOnline\":false,\"IsOnline\":1,\"PickAreaNo\":\"DFK001\",\"PickWareHouseNo\":\"MS006\",\"QuanUserName\":\"\",\"QuanUserNo\":\"\",\"ReceiveAreaNo\":\"DSK001\",\"ReceiveWareHouseNo\":\"MS006\",\"StrIsAdmin\":\"管理员\",\"StrSex\":\"男\",\"StrUserStatus\":\"正常\",\"StrUserType\":\"管理员\",\"WarehouseName\":\"储备主仓\",\"lstMenu\":[{\"BHaveParameter\":false,\"BIsChecked\":false,\"BIsDefault\":false,\"Description\":\"预收货\",\"IsDel\":1.0,\"MenuStatus\":1,\"MenuStyle\":0.0,\"MenuType\":4,\"NodeUrl\":\"0\",\"ProjectName\":\"预收货\",\"SafeLevel\":1.0},{\"BHaveParameter\":false,\"BIsChecked\":false,\"BIsDefault\":false,\"Description\":\"收货\",\"IsDel\":1.0,\"MenuStatus\":1,\"MenuStyle\":0.0,\"MenuType\":4,\"NodeUrl\":\"2\",\"ProjectName\":\"收货\",\"SafeLevel\":1.0},{\"BHaveParameter\":false,\"BIsChecked\":false,\"BIsDefault\":false,\"Description\":\"上架\",\"IsDel\":1.0,\"MenuStatus\":1,\"MenuStyle\":0.0,\"MenuType\":4,\"NodeUrl\":\"3\",\"ProjectName\":\"上架\",\"SafeLevel\":1.0},{\"BHaveParameter\":false,\"BIsChecked\":false,\"BIsDefault\":false,\"Description\":\"发货复核\",\"IsDel\":1.0,\"MenuStatus\":1,\"MenuStyle\":0.0,\"MenuType\":4,\"NodeUrl\":\"5\",\"ProjectName\":\"发货复核\",\"SafeLevel\":1.0},{\"BHaveParameter\":false,\"BIsChecked\":false,\"BIsDefault\":false,\"Description\":\"下架\",\"IsDel\":1.0,\"MenuStatus\":1,\"MenuStyle\":0.0,\"MenuType\":4,\"NodeUrl\":\"4\",\"ProjectName\":\"下架\",\"SafeLevel\":1.0},{\"BHaveParameter\":false,\"BIsChecked\":false,\"BIsDefault\":false,\"Description\":\"盘点\",\"IsDel\":1.0,\"MenuStatus\":1,\"MenuStyle\":0.0,\"MenuType\":4,\"NodeUrl\":\"7\",\"ProjectName\":\"盘点\",\"SafeLevel\":1.0},{\"BHaveParameter\":false,\"BIsChecked\":false,\"BIsDefault\":false,\"Description\":\"移库\",\"IsDel\":1.0,\"MenuStatus\":1,\"MenuStyle\":0.0,\"MenuType\":4,\"NodeUrl\":\"6\",\"ProjectName\":\"移库\",\"SafeLevel\":1.0},{\"BHaveParameter\":false,\"BIsChecked\":false,\"BIsDefault\":false,\"Description\":\"PDA菜单\",\"IsDel\":1.0,\"MenuStatus\":1,\"MenuStyle\":0.0,\"MenuType\":4,\"NodeUrl\":\"14\",\"ProjectName\":\"库存调整\",\"SafeLevel\":1.0},{\"BHaveParameter\":false,\"BIsChecked\":false,\"BIsDefault\":false,\"Description\":\"装车扫描\",\"IsDel\":1.0,\"MenuStatus\":1,\"MenuStyle\":0.0,\"MenuType\":4,\"NodeUrl\":\"20\",\"ProjectName\":\"装车扫描\",\"SafeLevel\":1.0},{\"BHaveParameter\":false,\"BIsChecked\":false,\"BIsDefault\":false,\"Description\":\"查询\",\"IsDel\":1.0,\"MenuStatus\":1,\"MenuStyle\":0.0,\"MenuType\":4,\"NodeUrl\":\"8\",\"ProjectName\":\"查询\",\"SafeLevel\":1.0},{\"BHaveParameter\":false,\"BIsChecked\":false,\"BIsDefault\":false,\"Description\":\"物流扫描\",\"IsDel\":1.0,\"MenuStatus\":1,\"MenuStyle\":0.0,\"MenuType\":4,\"NodeUrl\":\"34\",\"ProjectName\":\"物流扫描\",\"SafeLevel\":1.0},{\"BHaveParameter\":false,\"BIsChecked\":false,\"BIsDefault\":false,\"Description\":\"补货扫描\",\"IsDel\":1.0,\"MenuStatus\":1,\"MenuStyle\":0.0,\"MenuType\":4,\"NodeUrl\":\"35\",\"ProjectName\":\"补货扫描\",\"SafeLevel\":1.0},{\"BHaveParameter\":false,\"BIsChecked\":false,\"BIsDefault\":false,\"Description\":\"地标扫描\",\"IsDel\":1.0,\"MenuStatus\":1,\"MenuStyle\":0.0,\"MenuType\":4,\"NodeUrl\":\"36\",\"ProjectName\":\"地标扫描\",\"SafeLevel\":1.0}],\"lstUserGroup\":[{\"BIsChecked\":true,\"IsDel\":1.0,\"UserGroupAbbname\":\"管理员组\",\"UserGroupName\":\"管理员组\",\"UserGroupNo\":\"1\",\"UserGroupStatus\":1,\"UserGroupType\":2}],\"lstWarehouse\":[{\"AreaCount\":0,\"AreaRate\":0.0,\"AreaUsingCount\":0,\"BIsChecked\":true,\"BIsLock\":false,\"HouseCount\":10,\"HouseRate\":0.0,\"HouseUsingCount\":0,\"ID\":16,\"IsDel\":1.0,\"PickRule\":0,\"WareHouseName\":\"电子商务仓\",\"WareHouseNo\":\"MS005\",\"WareHouseStatus\":1,\"WareHouseType\":0},{\"AreaCount\":0,\"AreaRate\":0.0,\"AreaUsingCount\":0,\"BIsChecked\":true,\"BIsLock\":false,\"HouseCount\":24,\"HouseRate\":0.0,\"HouseUsingCount\":0,\"ID\":1120,\"IsDel\":1.0,\"LocationDesc\":\"储备主仓\",\"PickRule\":0,\"WareHouseName\":\"储备主仓\",\"WareHouseNo\":\"MS006\",\"WareHouseStatus\":1,\"WareHouseType\":0},{\"AreaCount\":0,\"AreaRate\":0.0,\"AreaUsingCount\":0,\"BIsChecked\":true,\"BIsLock\":false,\"HouseCount\":3,\"HouseRate\":0.0,\"HouseUsingCount\":0,\"ID\":1140,\"IsDel\":1.0,\"PickRule\":0,\"WareHouseName\":\"特批采购仓\",\"WareHouseNo\":\"MS002\",\"WareHouseStatus\":1,\"WareHouseType\":0},{\"AreaCount\":0,\"AreaRate\":0.0,\"AreaUsingCount\":0,\"BIsChecked\":true,\"BIsLock\":false,\"HouseCount\":3,\"HouseRate\":0.0,\"HouseUsingCount\":0,\"ID\":1141,\"IsDel\":1.0,\"PickRule\":0,\"WareHouseName\":\"待处理仓\",\"WareHouseNo\":\"MS501\",\"WareHouseStatus\":1,\"WareHouseType\":0},{\"AreaCount\":0,\"AreaRate\":0.0,\"AreaUsingCount\":0,\"BIsChecked\":true,\"BIsLock\":false,\"HouseCount\":3,\"HouseRate\":0.0,\"HouseUsingCount\":0,\"ID\":1142,\"IsDel\":1.0,\"PickRule\":0,\"WareHouseName\":\"坏品仓\",\"WareHouseNo\":\"MS502\",\"WareHouseStatus\":1,\"WareHouseType\":0},{\"AreaCount\":0,\"AreaRate\":0.0,\"AreaUsingCount\":0,\"BIsChecked\":true,\"BIsLock\":false,\"HouseCount\":3,\"HouseRate\":0.0,\"HouseUsingCount\":0,\"ID\":1143,\"IsDel\":1.0,\"PickRule\":0,\"WareHouseName\":\"储位异常仓\",\"WareHouseNo\":\"MS504\",\"WareHouseStatus\":1,\"WareHouseType\":0},{\"AreaCount\":0,\"AreaRate\":0.0,\"AreaUsingCount\":0,\"BIsChecked\":true,\"BIsLock\":false,\"HouseCount\":2,\"HouseRate\":0.0,\"HouseUsingCount\":0,\"ID\":1144,\"IsDel\":1.0,\"PickRule\":0,\"WareHouseName\":\"耗材仓库\",\"WareHouseNo\":\"MS701\",\"WareHouseStatus\":1,\"WareHouseType\":0},{\"AreaCount\":0,\"AreaRate\":0.0,\"AreaUsingCount\":0,\"BIsChecked\":true,\"BIsLock\":false,\"HouseCount\":3,\"HouseRate\":0.0,\"HouseUsingCount\":0,\"ID\":1145,\"IsDel\":1.0,\"PickRule\":0,\"WareHouseName\":\"平台代发专用仓\",\"WareHouseNo\":\"MS702\",\"WareHouseStatus\":1,\"WareHouseType\":0},{\"AreaCount\":0,\"AreaRate\":0.0,\"AreaUsingCount\":0,\"BIsChecked\":true,\"BIsLock\":false,\"HouseCount\":2,\"HouseRate\":0.0,\"HouseUsingCount\":0,\"ID\":1146,\"IsDel\":1.0,\"PickRule\":0,\"WareHouseName\":\"拼多多专用仓\",\"WareHouseNo\":\"MS703\",\"WareHouseStatus\":1,\"WareHouseType\":0},{\"AreaCount\":0,\"AreaRate\":0.0,\"AreaUsingCount\":0,\"BIsChecked\":true,\"BIsLock\":false,\"HouseCount\":2,\"HouseRate\":0.0,\"HouseUsingCount\":0,\"ID\":1147,\"IsDel\":1.0,\"PickRule\":0,\"WareHouseName\":\"C01\",\"WareHouseNo\":\"C01\",\"WareHouseStatus\":1,\"WareHouseType\":0},{\"AreaCount\":0,\"AreaRate\":0.0,\"AreaUsingCount\":0,\"BIsChecked\":true,\"BIsLock\":false,\"HouseCount\":0,\"HouseRate\":0.0,\"HouseUsingCount\":0,\"ID\":1160,\"IsDel\":1.0,\"PickRule\":0,\"WareHouseName\":\"仓库003\",\"WareHouseNo\":\"ck003\",\"WareHouseStatus\":1,\"WareHouseType\":0},{\"AreaCount\":0,\"AreaRate\":0.0,\"AreaUsingCount\":0,\"BIsChecked\":true,\"BIsLock\":false,\"HouseCount\":23,\"HouseRate\":0.0,\"HouseUsingCount\":0,\"ID\":1180,\"IsDel\":1.0,\"PickRule\":0,\"WareHouseName\":\"MS007测试仓\",\"WareHouseNo\":\"MS007\",\"WareHouseStatus\":1,\"WareHouseType\":0}],\"Email\":\"2008050001\",\"GroupCode\":\"1\",\"GroupName\":\"管理员组\",\"ID\":175382,\"IsDel\":1.0,\"IsPick\":0,\"IsPickLeader\":1,\"IsQuality\":0,\"IsReceive\":0,\"Mobile\":\"18969350230\",\"PDAPrintIP\":\"1.1.1.1\",\"PassWord\":\"123\",\"PickAreaID\":30221,\"PickHouseID\":1188,\"PickLeader\":false,\"PickWareHouseID\":1120,\"ReceiveAreaID\":30220,\"ReceiveHouseID\":1189,\"Sex\":1,\"StrIsPick\":\"不拣货\",\"StrIsPickLeader\":\"否\",\"StrIsReceive\":\"不收货\",\"UserName\":\"叶盼盼\",\"UserNo\":\"2008050001\",\"UserStatus\":1,\"UserType\":1,\"WarehouseCode\":\"MS006\",\"WarehouseID\":1120}"); //T_TransportSupDetail_Func func = new T_TransportSupDetail_Func(); //func.GetTransportSupplierDetailList("P201909091577"); //T_Stock_Func tfunc = new T_Stock_Func(); //tfunc.GetStockModelBySql("{\"AreaID\":690,\"AreaType\":0,\"Barcode\":\"6937803921260\",\"FromAreaID\":0,\"FromHouseID\":0,\"FromWareHouseID\":0,\"HouseID\":0,\"HouseProp\":2,\"IsLimitStock\":0,\"OutstockDetailID\":0,\"OutstockHeaderID\":0,\"PickModel\":0,\"ScanType\":2,\"StockBarCodeStatus\":0,\"WareHouseID\":1167,\"ErpLineStatus\":0,\"HeaderID\":0,\"ID\":0,\"LineStatus\":0,\"MaterialNoID\":0,\"Status\":0,\"StockType\":0,\"TerminateReasonID\":0,\"VoucherType\":0}"); T_Stock_Func tfunc = new T_Stock_Func(); tfunc.GetStockInfoByScanType("", "10016173", "1"); return(View()); }
/// <summary> /// 根据获取到上架任务明细后,再获取库存信息 /// </summary> /// <param name="headerID"></param> /// <returns></returns> public override List <T_InStockTaskDetailsInfo> GetModelListByHeaderID(int headerID) { string strErrMsg = string.Empty; List <T_AreaInfo> areaList = new List <T_AreaInfo>(); T_Stock_Func tfunc = new T_Stock_Func(); List <T_InStockTaskDetailsInfo> list = base.GetModelListByHeaderID(headerID); //获取推荐库位 if (GetRecommendAreaNo(list, ref areaList, ref strErrMsg) == false) { throw new Exception(strErrMsg); } foreach (var item in list) { item.lstArea = areaList.FindAll(t => t.MaterialNo == item.MaterialNo); if (!(item.lstArea == null || item.lstArea.Count == 0)) { item.AreaNo = item.lstArea[0].AreaNo; } else { item.AreaNo = ""; } } return(list); }
/// <summary> /// 根据获取到上架任务明细后,再获取库存信息 /// </summary> /// <param name="headerID"></param> /// <returns></returns> public override List <T_InStockTaskDetailsInfo> GetModelListByHeaderID(int headerID, string PromotionWareHouseNo = "") { string strErrMsg = string.Empty; List <T_AreaInfo> areaList = new List <T_AreaInfo>(); T_Stock_Func tfunc = new T_Stock_Func(); List <T_InStockTaskDetailsInfo> list = base.GetModelListByHeaderID(headerID); foreach (T_InStockTaskDetailsInfo item in list) { item.WareHouseNo = PromotionWareHouseNo; item.RemainQty = item.TaskQty1; if (item.VoucherType == 39) { item.VoucherType = 390; } } //获取推荐库位 if (GetRecommendAreaNo(list, ref areaList, ref strErrMsg) == false) { //throw new Exception(strErrMsg); } else { foreach (var item in list) { item.lstArea = areaList.FindAll(t => t.MaterialNo == item.MaterialNo); if (!(item.lstArea == null || item.lstArea.Count == 0)) { item.AreaNo = item.lstArea[0].AreaNo; } else { item.AreaNo = ""; } } } list = list.FindAll(t => t.RemainQty > 0); return(list); }
public string CheckGetBatchnoAndMaterialno(string EAN, string areaid) { T_Stock_Func stock_Func = new T_Stock_Func(); return(stock_Func.CheckGetBatchnoAndMaterialno(EAN, areaid)); }
/// <summary> /// 仓库内移库提交数据 /// </summary> /// <param name="UserJson"></param> /// <param name="ModelJson"></param> /// <returns></returns> public string SaveT_StockADF(string UserJson, string ModelJson) { T_Stock_Func tfunc = new T_Stock_Func(); return(tfunc.SaveModelListSqlToDBADF(UserJson, ModelJson)); }
public string CheckSerialno(string EAN, string areaid, string batchno, string materialno) { T_Stock_Func stock_Func = new T_Stock_Func(); return(stock_Func.CheckSerialno(EAN, areaid, batchno, materialno)); }
/// <summary> /// 上架扫描条码或者托盘条码 /// </summary> /// <param name="SerialNo"></param> /// <param name="ERPVoucherNo"></param> /// <param name="TaskNo"></param> /// <param name="AreaNo"></param> /// <returns></returns> public string GetT_ScanInStockModelADF(string SerialNo, string ERPVoucherNo, string TaskNo, string AreaNo, int WareHouseID) { T_Stock_Func tfunc = new T_Stock_Func(); return(tfunc.GetScanInStockModelADF(SerialNo, ERPVoucherNo, TaskNo, AreaNo, WareHouseID)); }
/// <summary> /// 扫描序列号或者ENA条码 /// </summary> /// <param name="SerialNo"></param> /// <returns></returns> public string GetStockModelADF(string ModelStockJson) { T_Stock_Func tfunc = new T_Stock_Func(); return(tfunc.GetStockModelBySql(ModelStockJson)); }
public string Save_MoveInfoADF(string UserJson, string StockJson, string AreaJson) { T_Stock_Func func = new T_Stock_Func(); return(func.saveMoveBarcode(UserJson, StockJson, AreaJson)); }
/// <summary> /// 上架扫描序列号,有托盘返回托盘关联物料总数,没有托盘返回单个库存对象 /// </summary> /// <param name="SerialNo"></param> /// <returns></returns> public string GetInStockModelADF(string SerialNo, string VoucherNo, string TaskNo) { T_Stock_Func tfunc = new T_Stock_Func(); return(tfunc.GetInStockModelADF(SerialNo, VoucherNo, TaskNo)); }
//启用序列号管理 public override bool GetStockByBarCode(T_StockInfo model, ref List <T_StockInfo> modelList, ref string strError) { string strSerialNo = string.Empty; string BarCodeType = string.Empty; int iWareHouseID = 0; T_Stock_Func sfunc = new T_Stock_Func(); T_StockInfo newModel = new T_StockInfo(); List <T_StockInfo> newModelList = new List <T_StockInfo>(); T_Stock_DB db = new T_Stock_DB(); T_OutBarCode_Func toc = new T_OutBarCode_Func(); T_OutBarCodeInfo outBarCodeModel = new T_OutBarCodeInfo(); T_OutBarCodeInfo JBarCodeModel = new T_OutBarCodeInfo(); T_OutBarcode_DB odb = new T_OutBarcode_DB(); //if (model.Barcode.Contains("@") == true) //{ // strSerialNo = OutBarCode_DeCode.GetEndSerialNo(model.Barcode); // //根据序列号查库存 // if (sfunc.GetStockByBarCode(strSerialNo, ref newModel, ref strError) == false) // { // return false; // } //} //else //{ // iWareHouseID = model.WareHouseID; // newModelList = db.GetStockByWHBarCode(model); // if (newModelList == null || newModelList.Count==0) // { // strError = Language_CHS.StockIsEmpty; // return false; // } // if (string.IsNullOrEmpty(model.ErpVoucherNo)) // { // newModelList = newModelList.Where(t => t.TaskDetailesID == 0).ToList(); // } // else // { // newModelList = newModelList.Where(t => t.TaskDetailesID > 0).ToList(); // } //} if ((model.Barcode.Length == 13 || model.Barcode.Length == 14) && model.ScanType != 2) //69码,复核的时候用 { iWareHouseID = model.WareHouseID; newModelList = db.GetStockByWHBarCode(model); if (newModelList == null || newModelList.Count == 0) { strError = Language_CHS.StockIsEmpty; return(false); } if (string.IsNullOrEmpty(model.ErpVoucherNo)) { newModelList = newModelList.Where(t => t.TaskDetailesID == 0).ToList(); } else { newModelList = newModelList.Where(t => t.TaskDetailesID > 0).ToList(); } modelList = newModelList; } else { if (outBarCodeFunc.GetSerialNoByBarCode(model.Barcode, ref strSerialNo, ref BarCodeType, ref strError) == false) { return(false); } if (BarCodeType == "1") { //根据序列号查库存 if (sfunc.GetStockByBarCode(strSerialNo, ref newModel, ref strError) == false) { return(false); } //扫描到的是外箱 newModel.IsPalletOrBox = 1; } else if (BarCodeType == "2") { if (sfunc.GetStockInfoByPalletNo(strSerialNo, ref modelList, ref strError) == false) { return(false); } //扫描到的是托盘 modelList.ForEach(t => t.IsPalletOrBox = 2); List <T_StockInfo> HStockList = modelList.Where(t => t.BarCodeType == 5).ToList(); if (HStockList != null && HStockList.Count > 0) { foreach (var item in HStockList) { item.lstHBarCode = GetNewListStock(item.Barcode, item);//odb.GetBarCodeOutAll(model.Barcode); item.lstHBarCode.ForEach(t => t.WareHouseID = item.WareHouseID); item.lstHBarCode.ForEach(t => t.HouseID = item.HouseID); item.lstHBarCode.ForEach(t => t.AreaID = item.AreaID); } } } if (!string.IsNullOrEmpty(model.JBarCode)) { string strJSerialNo = string.Empty; if (OutBarCode_DeCode.GetSubBarcodeType(model.JBarCode) != "1") { strError = "您扫描的不是J箱条码!"; return(false); } strJSerialNo = OutBarCode_DeCode.GetSubBarcodeSerialNo(model.JBarCode); if (toc.GetOutBarCodeInfoBySerialNo(strJSerialNo, ref JBarCodeModel, ref strError) == false) { return(false); } if (odb.GetJBarCodeIsScan(strJSerialNo) > 0) { strError = "J箱条码已经扫描,不能重复扫描!"; return(false); } if (JBarCodeModel.fserialno.Substring(0, 1) == "2") //J箱对应中盒 { //根据中盒找外箱 if (toc.GetOutBarCodeInfoBySerialNo(JBarCodeModel.fserialno, ref JBarCodeModel, ref strError) == false) { return(false); } } if (model.Barcode.CompareTo(JBarCodeModel.fserialno) != 0) { strError = "外箱条码不包含J箱码!"; return(false); } else { //J箱码转换库存类 modelList.Add(GetAmoutInnerStock(newModel, JBarCodeModel)); } } //外箱条码需要查看条码是否是混箱 if (BarCodeType == "1" && string.IsNullOrEmpty(model.JBarCode)) { if (toc.GetOutBarCodeInfoBySerialNo(strSerialNo, ref outBarCodeModel, ref strError) == false) { return(false); } if (outBarCodeModel.BarcodeType == 5) //混箱 { newModel.BarCodeType = 5; newModel.lstHBarCode = GetNewListStock(model.Barcode, newModel);//odb.GetBarCodeOutAll(model.Barcode); newModel.lstHBarCode.ForEach(t => t.WareHouseID = newModel.WareHouseID); newModel.lstHBarCode.ForEach(t => t.HouseID = newModel.HouseID); newModel.lstHBarCode.ForEach(t => t.AreaID = newModel.AreaID); } else//不是混箱 { newModel.BarCodeType = outBarCodeModel.BarcodeType; //查看是否J箱 newModel.lstBarCode = odb.GetBarCodeOutAll(model.Barcode); //newModel.lstBarCode.ForEach(t => t.WareHouseID = newModel.WareHouseID); //newModel.lstBarCode.ForEach(t => t.HouseID = newModel.HouseID); //newModel.lstBarCode.ForEach(t => t.AreaID = newModel.AreaID); if (newModel.lstBarCode == null || newModel.lstBarCode.Count == 0) { newModel.ISJ = "2";//不是J箱 } else if (newModel.lstBarCode[0].BarcodeType == 1) { newModel.ISJ = "1"; //是J想 } else if (newModel.lstBarCode[0].BarcodeType == 2) //找到中盒 { //根据中盒找J箱 newModel.lstBarCode = odb.GetBarCodeOutAll(newModel.lstBarCode[0].BarCode); //newModel.lstBarCode.ForEach(t => t.WareHouseID = newModel.WareHouseID); //newModel.lstBarCode.ForEach(t => t.HouseID = newModel.HouseID); //newModel.lstBarCode.ForEach(t => t.AreaID = newModel.AreaID); if (newModel.lstBarCode == null || newModel.lstBarCode.Count == 0) { newModel.ISJ = "2";//不是J箱 } else if (newModel.lstBarCode[0].BarcodeType == 1) { newModel.ISJ = "1";//是J箱 } } newModel.lstBarCode = null; } modelList.Add(newModel); } } ////整箱或者零数发货 //if (model.ScanType == 2 || model.ScanType == 3) //{ // if (model.Barcode.Contains("@") == true) // { // modelList.Add(newModel); // } // else // { // modelList.AddRange(newModelList); // } //} ////整托发货 //if (model.ScanType == 1 && model.Barcode.Contains("@") == true) //{ // if (string.IsNullOrEmpty(newModel.PalletNo)) // { // strError = Language_CHS.StockPEmpty; // return false; // } // if (sfunc.GetStockInfoByPalletNo(newModel.PalletNo, ref modelList, ref strError) == false) // { // return false; // } //} decimal SumQty = modelList.Sum(t1 => t1.Qty).ToDecimal(); modelList.ForEach(t => t.PalletQty = SumQty); return(true); }
/// <summary> /// 获取货位库存条码列表 /// </summary> /// <param name="UserJson"></param> /// <param name="ModelJson"></param> /// <returns></returns> public string GetT_StockInfoADF(string UserJson, string ModelJson) { T_Stock_Func func = new T_Stock_Func(); return(func.GetModelListADF(UserJson, ModelJson)); }
public bool UpdateT_StockStatus(UserInfo user, ref T_StockInfo t_stock, int NewStatus, ref string strError) { T_Stock_Func tfunc = new T_Stock_Func(); return(tfunc.UpdateModelStatus(user, ref t_stock, NewStatus, ref strError)); }
/// <summary> /// 根据物料编号获取库存信息 /// 根据scantype查询不同条件的库存 /// </summary> /// <param name="MaterialNo"></param> /// <returns></returns> public string GetStockByMaterialNoADF(string UserJson, string MaterialNo, string ScanType) { T_Stock_Func tfunc = new T_Stock_Func(); return(tfunc.GetStockInfoByScanType(UserJson, MaterialNo, ScanType)); }
public bool GetAllT_StockByHeaderID(ref List <T_StockInfo> modelList, int headerID, ref string strError) { T_Stock_Func tfunc = new T_Stock_Func(); return(tfunc.GetModelListByHeaderID(ref modelList, headerID, ref strError)); }
public bool GetT_StockListByPage(ref List <T_StockInfo> modelList, UserInfo user, T_StockInfo t_stock, ref DividPage page, ref string strError) { T_Stock_Func tfunc = new T_Stock_Func(); return(tfunc.GetModelListByPage(ref modelList, user, t_stock, ref page, ref strError)); }
public bool GetT_StockByID(ref T_StockInfo model, ref string strError) { T_Stock_Func tfunc = new T_Stock_Func(); return(tfunc.GetModelByID(ref model, ref strError)); }
public bool DeleteT_StockByModel(UserInfo user, T_StockInfo model, ref string strError) { T_Stock_Func tfunc = new T_Stock_Func(); return(tfunc.DeleteModelByModel(user, model, ref strError)); }
public bool SaveT_Stock(UserInfo user, ref T_StockInfo t_stock, ref string strError) { T_Stock_Func tfunc = new T_Stock_Func(); return(tfunc.SaveModelBySqlToDB(user, ref t_stock, ref strError)); }
public string GetInfoBySerial(string EAN, string areaid, string batchno, string materialno) { T_Stock_Func func = new T_Stock_Func(); return(func.OffSerialno(EAN, areaid, batchno, materialno)); }
/// <summary> /// 获取条码库存数据 /// </summary> /// <param name="SerialNo"></param> /// <param name="model"></param> /// <param name="strErrMsg"></param> /// <returns></returns> private bool GetBarCodeIsStock(string SerialNo, ref T_StockInfo model, ref string strErrMsg) { T_Stock_Func tfunc = new T_Stock_Func(); return(tfunc.GetStockByBarCode(SerialNo, ref model, ref strErrMsg)); }