protected override void ExecuteSubmit(Resolver resolver) { User user = userMgr.LoadUser(resolver.UserCode, false, true); IList <CycleCountDetail> cycleCountDetailList = this.ConvertResolverToCycleCountDetail(resolver); if (resolver.CodePrefix == BusinessConstants.CODE_PREFIX_CYCCNT) { cycleCountMgr.RecordCycleCountDetail(resolver.Code, cycleCountDetailList, user); resolver.Result = languageMgr.TranslateMessage("CycCnt.Process.Successfully", resolver.UserCode); resolver.Transformers = null; resolver.Command = BusinessConstants.CS_BIND_VALUE_TRANSFORMER; resolver.BinCode = null; resolver.LocationCode = null; } //else if (resolver.LocationCode != null && resolver.LocationCode.Trim() != string.Empty) //{ // if (resolver.BinCode != null && resolver.BinCode.Trim() != string.Empty) // { // StorageBin bin = storageBinMgr.CheckAndLoadStorageBin(resolver.BinCode); // cycleCountMgr.CreateCycleCount(bin, cycleCountDetailList, user); // } // else // { // Location location = locationMgr.CheckAndLoadLocation(resolver.LocationCode); // cycleCountMgr.CreateCycleCount(location, cycleCountDetailList, user); // } //} else { throw new BusinessErrorException("Common.Business.Error.ScanFlowOrStorageBinFirst"); } }
public void CreateRepack(Resolver resolver) { IList <RepackDetail> repackDetailList = executeMgr.ConvertTransformerListToRepackDetail(resolver.Transformers); if (repackDetailList.Count == 0) { throw new BusinessErrorException("MasterData.Inventory.Repack.Error.RepackDetailEmpty"); } Repack repack = repackMgr.CreateRepack(repackDetailList, userMgr.LoadUser(resolver.UserCode, false, true)); resolver.Code = repack.RepackNo; resolver.Transformers = null; resolver.Command = BusinessConstants.CS_BIND_VALUE_TRANSFORMERDETAIL; resolver.Result = languageMgr.TranslateMessage("MasterData.Inventory.Repack.Successfully", resolver.UserCode); #region 打印 if (resolver.IsCSClient) { IList <Hu> huList = new List <Hu>(); repack = repackMgr.LoadRepack(resolver.Code, true); foreach (RepackDetail repackDet in repack.RepackDetails) { if (repackDet.IOType == BusinessConstants.IO_TYPE_OUT && repackDet.LocationLotDetail.Hu != null && repackDet.LocationLotDetail.Hu.PrintCount == 0) { huList.Add(repackDet.LocationLotDetail.Hu); } } resolver.PrintUrl = PrintHu(huList, resolver.UserCode); } #endregion }
public void TryCloseTransportationOrder() { IList <TransportationOrder> transportationOrderList = this.GetTransportationOrder(BusinessConstants.CODE_MASTER_STATUS_VALUE_COMPLETE, true); foreach (TransportationOrder transportationOrder in transportationOrderList) { CloseTransportationOrder(transportationOrder, userMgr.LoadUser(BusinessConstants.SYSTEM_USER_MONITOR)); } }
public void CreateInspectOrder(Resolver resolver) { IList<LocationLotDetail> locationLotDetailList = executeMgr.ConvertTransformersToLocationLotDetails(resolver.Transformers, false); if (locationLotDetailList.Count == 0) { throw new BusinessErrorException("MasterData.Inventory.Repack.Error.RepackDetailEmpty"); } User user = userMgr.LoadUser(resolver.UserCode, false, true); InspectOrder inspectOrder = inspectOrderMgr.CreateInspectOrder(locationLotDetailList, user); resolver.Result = languageMgr.TranslateMessage("MasterData.InspectOrder.Create.Successfully", resolver.UserCode, inspectOrder.InspectNo); resolver.Transformers = null; resolver.Code = inspectOrder.InspectNo; resolver.Command = BusinessConstants.CS_BIND_VALUE_TRANSFORMER; }
protected override void ExecuteSubmit(Resolver resolver) { User user = userMgr.LoadUser(resolver.UserCode, false, true); IDictionary <string, decimal> itemDictionary = new Dictionary <string, decimal>(); foreach (Transformer transformer in resolver.Transformers) { itemDictionary.Add(transformer.ItemCode, transformer.CurrentQty); } productLineInProcessLocationDetailMgr.RawMaterialBackflush(resolver.Code, itemDictionary, user); resolver.Result = languageMgr.TranslateMessage("MasterData.BackFlush.Successfully", resolver.UserCode, resolver.Code); resolver.Transformers = null; resolver.Command = BusinessConstants.CS_BIND_VALUE_TRANSFORMER; }
public string TranslateMessage(string content, string userCode, params string[] parameters) { User user = userMgr.LoadUser(userCode, true, false); return(this.TranslateMessage(content, user, parameters)); }