| | |
| | | let loadingInstance; |
| | | let loadingStatus = false; |
| | | if (process.env.NODE_ENV == 'development') { |
| | | axios.defaults.baseURL = 'http://127.0.0.1:9291/'; |
| | | // axios.defaults.baseURL = 'http://192.168.35.3:9281/'; |
| | | // axios.defaults.baseURL = 'http://127.0.0.1:9291/'; |
| | | axios.defaults.baseURL = 'http://192.168.35.3:9281/'; |
| | | } |
| | | else if (process.env.NODE_ENV == 'debug') { |
| | | axios.defaults.baseURL = 'http://127.0.0.1:8098/'; |
| | |
| | | { |
| | | return content.Error($"æªæ¾å°æ¡ç {barCode}"); |
| | | } |
| | | List<Dt_StationPackInfo> stationPackInfos = _stationPackInfoRepository.QueryData(); |
| | | List<Dt_StationPackInfo> stationPackInfos = _stationPackInfoRepository.Db.Queryable<Dt_StationPackInfo>().ToList(); |
| | | Dt_StationPackInfo? stationPackInfo = stationPackInfos.FirstOrDefault(x => x.PackType == packinfo.PackType && x.OrderNo == packinfo.OrderNo && x.AssignNum < x.PackNum); |
| | | Dt_PackaxisTask packaxisTask = new Dt_PackaxisTask(); |
| | | //å¦æè®¢åç¸åãååä¸è´å¹¶ä¸åé
æ°éå°äºç åç»ææ°éååé
å°ä¸èµ· |
| | | _unitOfWorkManage.BeginTran(); |
| | | if (stationPackInfo != null) |
| | | { |
| | | Dt_PackaxisTask packaxisTask = new Dt_PackaxisTask() |
| | | packaxisTask = new Dt_PackaxisTask() |
| | | { |
| | | DeviceCode = deviceCode, |
| | | SourceAddress = "2421", |
| | |
| | | stationPackInfo.AssignNum += 1; |
| | | stationPackInfo.ExecutingNum += 1; |
| | | packinfo.PackStatus = StationOccupiedEnum.Sure.ObjToInt(); |
| | | _unitOfWorkManage.BeginTran(); |
| | | |
| | | //æ´æ°ç åæ§è¡å·¥ä½ |
| | | _stationPackInfoRepository.UpdateData(stationPackInfo); |
| | | //æ´æ°å¾
ç åä¿¡æ¯è¡¨ |
| | | _packinfoRepository.UpdateData(packinfo); |
| | | //æ·»å ç åä»»å¡ |
| | | BaseDal.AddData(packaxisTask); |
| | | _unitOfWorkManage.CommitTran(); |
| | | return content.OK(barCode, packaxisTask); |
| | | |
| | | } |
| | | else//åé
æ°å·¥ä½ |
| | | { |
| | | //è·åå½å空çåå¤çç åå·¥ä½ |
| | | List<string> stations = _stationMangerRepository.QueryData(x => x.StationDeviceCode == "CLC_CP" && x.IsOccupied == StationOccupiedEnum.None.ObjToInt()).Select(x => x.StationCode).ToList(); |
| | | //è·åç åé
置表æ¥è¯¢å¯åé
å¹¶å·²é
ç½®çç åå·¥ä½ |
| | | List<Dt_Packaxis> packaxes = _packaxisRepository.QueryData(x => x.PackType == packinfo.PackType && stations.Contains(x.StationCode)); |
| | | List<Dt_Packaxis> packaxes = _packaxisRepository.Db.Queryable<Dt_Packaxis>().Where(x => x.PackType == packinfo.PackType && stations.Contains(x.StationCode)).ToList(); |
| | | if (packaxes.Count == 0) |
| | | { |
| | | return content.Error("æªæ¾å°å¯åé
ç åé
ç½®"); |
| | |
| | | packInfoAssign.MakeCode = packinfo.MakeCode; |
| | | packInfoAssign.MaterielCode = packInfoAssign.MaterielCode; |
| | | packInfoAssign.PackNum = packaxes.FirstOrDefault(x => x.StationCode == packInfoAssign.StationCode).PackNum; |
| | | Dt_PackaxisTask packaxisTask = new Dt_PackaxisTask() |
| | | packaxisTask = new Dt_PackaxisTask() |
| | | { |
| | | DeviceCode = deviceCode, |
| | | SourceAddress = "2421", |
| | |
| | | packInfoAssign.AssignNum += 1; |
| | | packInfoAssign.ExecutingNum += 1; |
| | | packinfo.PackStatus = StationOccupiedEnum.Sure.ObjToInt(); |
| | | _unitOfWorkManage.BeginTran(); |
| | | //æ´æ°ç åæ§è¡å·¥ä½ |
| | | _stationPackInfoRepository.UpdateData(packInfoAssign); |
| | | //æ´æ°å¾
ç åä¿¡æ¯è¡¨ |
| | | _packinfoRepository.UpdateData(packinfo); |
| | | //æ·»å ç åä»»å¡ |
| | | BaseDal.AddData(packaxisTask); |
| | | _unitOfWorkManage.CommitTran(); |
| | | return content.OK(barCode, packaxisTask); |
| | | } |
| | | _unitOfWorkManage.CommitTran(); |
| | | return content.OK(barCode, packaxisTask); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | |
| | | Dt_PackaxisTask packaxisTask = BaseDal.QueryFirst(x => x.PackTaskNum == PackTaskNum); |
| | | if(packaxisTask == null) |
| | | { |
| | |
| | | WriteInfo($"çº¿ç¨ {Thread.CurrentThread.ManagedThreadId}ååå£","å¼å§æ§è¡"); |
| | | while (true) |
| | | { |
| | | //WriteInfo($"ååå£è¿è¡æ¶é´" , $"å¼å§æ¶é´:" + DateTime.Now.ToString("HH:mm:ss.fff")); |
| | | if (RequestIn != null) |
| | | { |
| | | DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == RequestIn.StationCode && x.DeviceProParamType == nameof(R_CLineCPHDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault(); |
| | |
| | | //ç åç¯çº¿è¯·æ±ä»»å¡ |
| | | if (conveyorLineInfoRead != null && (conveyorLineInfoRead.R_State == 2 || conveyorLineInfoRead.R_State == 3) && conveyorLineInfoRead.R_TaskNo <= 0 && !string.IsNullOrEmpty(conveyorLineInfoRead.R_BoxCode) && conveyorLineInfoRead.R_Request == 1) |
| | | { |
| | | //WriteInfo($"ååå£è¿è¡æ¶é´", $"{conveyorLineInfoRead.R_BoxCode}请æ±" + DateTime.Now.ToString("HH:mm:ss.fff")); |
| | | //夿æ¯å¦ä»»å¡å·²ç»åå¨ |
| | | Dt_PackaxisTask packaxisTask = _packaxisTaskRepository.Db.Queryable<Dt_PackaxisTask>().Where(x => x.BarCode == conveyorLineInfoRead.R_BoxCode.Trim() && x.TaskState == TaskStatusEnum.Line_Executing.ObjToInt()).First(); |
| | | if (packaxisTask != null) |
| | |
| | | device.SetValue(W_CLineCPHDB.W_Long, packaxisTask.PackLength, RequestIn.StationCode); |
| | | device.SetValue(W_CLineCPHDB.W_Wide, packaxisTask.PackWidth, RequestIn.StationCode); |
| | | device.SetValue(W_CLineCPHDB.W_High, packaxisTask.PackHeight, RequestIn.StationCode); |
| | | device.SetValue(W_CLineCPHDB.W_TMID, packaxisTask.BarCode, RequestIn.StationCode); |
| | | device.SetValue(W_CLineCPHDB.W_TMID, conveyorLineInfoRead.R_BoxCode.Trim(), RequestIn.StationCode); |
| | | device.SetValue(W_CLineCPHDB.W_Request, 1, RequestIn.StationCode); |
| | | //WriteInfo($"ååå£è¿è¡æ¶é´", $"{conveyorLineInfoRead.R_BoxCode}请æ±å®æ" + DateTime.Now.ToString("HH:mm:ss.fff")); |
| | | } |
| | | else |
| | | { |
| | |
| | | device.SetValue(W_CLineCPHDB.W_Long, _PackaxisTask.PackLength, RequestIn.StationCode); |
| | | device.SetValue(W_CLineCPHDB.W_Wide, _PackaxisTask.PackWidth, RequestIn.StationCode); |
| | | device.SetValue(W_CLineCPHDB.W_High, _PackaxisTask.PackHeight, RequestIn.StationCode); |
| | | device.SetValue(W_CLineCPHDB.W_TMID, _PackaxisTask.BarCode, RequestIn.StationCode); |
| | | device.SetValue(W_CLineCPHDB.W_TMID, conveyorLineInfoRead.R_BoxCode.Trim(), RequestIn.StationCode); |
| | | device.SetValue(W_CLineCPHDB.W_Request, 1, RequestIn.StationCode); |
| | | //WriteInfo($"ååå£è¿è¡æ¶é´", $"{conveyorLineInfoRead.R_BoxCode}请æ±å®æ" + DateTime.Now.ToString("HH:mm:ss.fff")); |
| | | WebResponseContent content = _taskService.MESBoxCodeNotice(conveyorLineInfoRead.R_BoxCode.Trim()); |
| | | if (content.Status) |
| | | { |
| | |
| | | WriteError(RequestIn.StationName, $"æªæ¾å°è®¾å¤åç¼å·{RequestIn.StationCode}çå议信æ¯"); |
| | | } |
| | | } |
| | | //WriteInfo($"ååå£è¿è¡æ¶é´", $"ç»ææ¶é´:" + DateTime.Now.ToString("HH:mm:ss.fff")); |
| | | } |
| | | } |
| | | catch (Exception ex) |
copy from "\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\347\240\201\345\236\233/MDJob_CP.cs"
copy to "\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\347\240\201\345\236\233/MDJob1_CP.cs"
| Îļþ´Ó ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Tasks/Âë¶â/MDJob_CP.cs ¸´ÖÆ |
| | |
| | | namespace WIDESEAWCS_Tasks |
| | | { |
| | | [DisallowConcurrentExecution] |
| | | public class MDJob_CP : JobBase, IJob |
| | | public class MDJob1_CP : JobBase, IJob |
| | | { |
| | | private readonly ICacheService _cacheService; |
| | | private readonly IStationMangerRepository _stationMangerRepository; |
| | |
| | | private readonly IStationPackInfoRepository _stationPackInfoRepository; |
| | | private readonly List<Dt_WarehouseDevice> warehouseDevices; |
| | | |
| | | public MDJob_CP(ICacheService cacheService, IStationMangerRepository stationMangerRepository, IPackaxisRepository packaxisRepository, IPackaxisTaskRepository packaxisTaskRepository,IPackaxisTaskService packaxisTaskService, IStationPackInfoRepository stationPackInfoRepository) |
| | | public MDJob1_CP(ICacheService cacheService, IStationMangerRepository stationMangerRepository, IPackaxisRepository packaxisRepository, IPackaxisTaskRepository packaxisTaskRepository,IPackaxisTaskService packaxisTaskService, IStationPackInfoRepository stationPackInfoRepository) |
| | | { |
| | | _cacheService = cacheService; |
| | | _stationMangerRepository = stationMangerRepository; |
| | |
| | | if (flag && value != null) |
| | | { |
| | | OtherDevice device = (OtherDevice)value; |
| | | if (!device.IsConnected) |
| | | { |
| | | return Task.CompletedTask; |
| | | } |
| | | List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StackerCraneCode == device.DeviceCode && x.StationType == StationTypeEnum.StationType_InStartAndOutEnd.ObjToInt()); |
| | | //è·ååè®® |
| | | DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == device.DeviceCode && x.DeviceProParamType == nameof(R_MDDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault(); |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | WriteError(nameof(MDJob_CP),ex.Message); |
| | | WriteError(nameof(MDJob1_CP),ex.Message); |
| | | } |
| | | return Task.CompletedTask; |
| | | } |
copy from "\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\347\240\201\345\236\233/MDJob_CP.cs"
copy to "\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\347\240\201\345\236\233/MDJob2_CP.cs"
| Îļþ´Ó ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Tasks/Âë¶â/MDJob_CP.cs ¸´ÖÆ |
| | |
| | | namespace WIDESEAWCS_Tasks |
| | | { |
| | | [DisallowConcurrentExecution] |
| | | public class MDJob_CP : JobBase, IJob |
| | | public class MDJob2_CP : JobBase, IJob |
| | | { |
| | | private readonly ICacheService _cacheService; |
| | | private readonly IStationMangerRepository _stationMangerRepository; |
| | |
| | | private readonly IStationPackInfoRepository _stationPackInfoRepository; |
| | | private readonly List<Dt_WarehouseDevice> warehouseDevices; |
| | | |
| | | public MDJob_CP(ICacheService cacheService, IStationMangerRepository stationMangerRepository, IPackaxisRepository packaxisRepository, IPackaxisTaskRepository packaxisTaskRepository,IPackaxisTaskService packaxisTaskService, IStationPackInfoRepository stationPackInfoRepository) |
| | | public MDJob2_CP(ICacheService cacheService, IStationMangerRepository stationMangerRepository, IPackaxisRepository packaxisRepository, IPackaxisTaskRepository packaxisTaskRepository,IPackaxisTaskService packaxisTaskService, IStationPackInfoRepository stationPackInfoRepository) |
| | | { |
| | | _cacheService = cacheService; |
| | | _stationMangerRepository = stationMangerRepository; |
| | |
| | | if (flag && value != null) |
| | | { |
| | | OtherDevice device = (OtherDevice)value; |
| | | if (!device.IsConnected) |
| | | { |
| | | return Task.CompletedTask; |
| | | } |
| | | List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StackerCraneCode == device.DeviceCode && x.StationType == StationTypeEnum.StationType_InStartAndOutEnd.ObjToInt()); |
| | | //è·ååè®® |
| | | DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == device.DeviceCode && x.DeviceProParamType == nameof(R_MDDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault(); |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | WriteError(nameof(MDJob_CP),ex.Message); |
| | | WriteError(nameof(MDJob2_CP),ex.Message); |
| | | } |
| | | return Task.CompletedTask; |
| | | } |
| ÎļþÃû´Ó ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Tasks/Âë¶â/MDJob_CP.cs ÐÞ¸Ä |
| | |
| | | namespace WIDESEAWCS_Tasks |
| | | { |
| | | [DisallowConcurrentExecution] |
| | | public class MDJob_CP : JobBase, IJob |
| | | public class MDJob3_CP : JobBase, IJob |
| | | { |
| | | private readonly ICacheService _cacheService; |
| | | private readonly IStationMangerRepository _stationMangerRepository; |
| | |
| | | private readonly IStationPackInfoRepository _stationPackInfoRepository; |
| | | private readonly List<Dt_WarehouseDevice> warehouseDevices; |
| | | |
| | | public MDJob_CP(ICacheService cacheService, IStationMangerRepository stationMangerRepository, IPackaxisRepository packaxisRepository, IPackaxisTaskRepository packaxisTaskRepository,IPackaxisTaskService packaxisTaskService, IStationPackInfoRepository stationPackInfoRepository) |
| | | public MDJob3_CP(ICacheService cacheService, IStationMangerRepository stationMangerRepository, IPackaxisRepository packaxisRepository, IPackaxisTaskRepository packaxisTaskRepository,IPackaxisTaskService packaxisTaskService, IStationPackInfoRepository stationPackInfoRepository) |
| | | { |
| | | _cacheService = cacheService; |
| | | _stationMangerRepository = stationMangerRepository; |
| | |
| | | if (flag && value != null) |
| | | { |
| | | OtherDevice device = (OtherDevice)value; |
| | | if (!device.IsConnected) |
| | | { |
| | | return Task.CompletedTask; |
| | | } |
| | | List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StackerCraneCode == device.DeviceCode && x.StationType == StationTypeEnum.StationType_InStartAndOutEnd.ObjToInt()); |
| | | //è·ååè®® |
| | | DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == device.DeviceCode && x.DeviceProParamType == nameof(R_MDDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault(); |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | WriteError(nameof(MDJob_CP),ex.Message); |
| | | WriteError(nameof(MDJob3_CP),ex.Message); |
| | | } |
| | | return Task.CompletedTask; |
| | | } |
copy from "\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\347\240\201\345\236\233/MDJob_CP.cs"
copy to "\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\347\240\201\345\236\233/MDJob4_CP.cs"
| Îļþ´Ó ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Tasks/Âë¶â/MDJob_CP.cs ¸´ÖÆ |
| | |
| | | namespace WIDESEAWCS_Tasks |
| | | { |
| | | [DisallowConcurrentExecution] |
| | | public class MDJob_CP : JobBase, IJob |
| | | public class MDJob4_CP : JobBase, IJob |
| | | { |
| | | private readonly ICacheService _cacheService; |
| | | private readonly IStationMangerRepository _stationMangerRepository; |
| | |
| | | private readonly IStationPackInfoRepository _stationPackInfoRepository; |
| | | private readonly List<Dt_WarehouseDevice> warehouseDevices; |
| | | |
| | | public MDJob_CP(ICacheService cacheService, IStationMangerRepository stationMangerRepository, IPackaxisRepository packaxisRepository, IPackaxisTaskRepository packaxisTaskRepository,IPackaxisTaskService packaxisTaskService, IStationPackInfoRepository stationPackInfoRepository) |
| | | public MDJob4_CP(ICacheService cacheService, IStationMangerRepository stationMangerRepository, IPackaxisRepository packaxisRepository, IPackaxisTaskRepository packaxisTaskRepository,IPackaxisTaskService packaxisTaskService, IStationPackInfoRepository stationPackInfoRepository) |
| | | { |
| | | _cacheService = cacheService; |
| | | _stationMangerRepository = stationMangerRepository; |
| | |
| | | if (flag && value != null) |
| | | { |
| | | OtherDevice device = (OtherDevice)value; |
| | | if (!device.IsConnected) |
| | | { |
| | | return Task.CompletedTask; |
| | | } |
| | | List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StackerCraneCode == device.DeviceCode && x.StationType == StationTypeEnum.StationType_InStartAndOutEnd.ObjToInt()); |
| | | //è·ååè®® |
| | | DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == device.DeviceCode && x.DeviceProParamType == nameof(R_MDDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault(); |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | WriteError(nameof(MDJob_CP),ex.Message); |
| | | WriteError(nameof(MDJob4_CP),ex.Message); |
| | | } |
| | | return Task.CompletedTask; |
| | | } |
copy from "\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\347\240\201\345\236\233/MDJob_CP.cs"
copy to "\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WCSServices/WIDESEAWCS_Tasks/\347\240\201\345\236\233/MDJob5_CP.cs"
| Îļþ´Ó ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Tasks/Âë¶â/MDJob_CP.cs ¸´ÖÆ |
| | |
| | | namespace WIDESEAWCS_Tasks |
| | | { |
| | | [DisallowConcurrentExecution] |
| | | public class MDJob_CP : JobBase, IJob |
| | | public class MDJob5_CP : JobBase, IJob |
| | | { |
| | | private readonly ICacheService _cacheService; |
| | | private readonly IStationMangerRepository _stationMangerRepository; |
| | |
| | | private readonly IStationPackInfoRepository _stationPackInfoRepository; |
| | | private readonly List<Dt_WarehouseDevice> warehouseDevices; |
| | | |
| | | public MDJob_CP(ICacheService cacheService, IStationMangerRepository stationMangerRepository, IPackaxisRepository packaxisRepository, IPackaxisTaskRepository packaxisTaskRepository,IPackaxisTaskService packaxisTaskService, IStationPackInfoRepository stationPackInfoRepository) |
| | | public MDJob5_CP(ICacheService cacheService, IStationMangerRepository stationMangerRepository, IPackaxisRepository packaxisRepository, IPackaxisTaskRepository packaxisTaskRepository,IPackaxisTaskService packaxisTaskService, IStationPackInfoRepository stationPackInfoRepository) |
| | | { |
| | | _cacheService = cacheService; |
| | | _stationMangerRepository = stationMangerRepository; |
| | |
| | | if (flag && value != null) |
| | | { |
| | | OtherDevice device = (OtherDevice)value; |
| | | if (!device.IsConnected) |
| | | { |
| | | return Task.CompletedTask; |
| | | } |
| | | List<Dt_StationManger> stationMangers = _stationMangerRepository.QueryData(x => x.StackerCraneCode == device.DeviceCode && x.StationType == StationTypeEnum.StationType_InStartAndOutEnd.ObjToInt()); |
| | | //è·ååè®® |
| | | DeviceProDTO? deviceProRead = device.DeviceProDTOs.Where(x => x.DeviceChildCode == device.DeviceCode && x.DeviceProParamType == nameof(R_MDDB)).OrderBy(x => x.DeviceProOffset).FirstOrDefault(); |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | WriteError(nameof(MDJob_CP),ex.Message); |
| | | WriteError(nameof(MDJob5_CP),ex.Message); |
| | | } |
| | | return Task.CompletedTask; |
| | | } |
| | |
| | | /// </summary> |
| | | [Navigate(NavigateType.OneToMany, nameof(Dt_OutSGOrderDetail.OutSGOrderId), nameof(Id))] |
| | | public List<Dt_OutSGOrderDetail> Details { get; set; } |
| | | [SugarColumn(IsIgnore = true)] |
| | | public string MaterialLackStatus { get; set; } |
| | | } |
| | | } |
| | |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Common.LocationEnum; |
| | | using WIDESEA_Common.OrderEnum; |
| | | using WIDESEA_Common.StockEnum; |
| | | using WIDESEA_Core; |
| | | using WIDESEA_Core.BaseServices; |
| | |
| | | List<Dt_StockInfo> stockInfos = _stockService.StockInfoService.GetUseOldCacheStocks(item.MaterialNo, item.Width).Where(x => !palletCodes.Contains(x.PalletCode)).ToList() ?? new List<Dt_StockInfo>(); |
| | | //è·åç«åºå¯ç¨åºå |
| | | stockInfos.AddRange(_stockService.StockInfoService.GetUseableStocks(item.MaterialNo, item.Width, outBSTOrders.FirstOrDefault().WarehouseId).Where(x=>!palletCodes.Contains(x.PalletCode)).ToList()); |
| | | |
| | | //è·åææè¯¥ç©æåæ® |
| | | List<Dt_OutSGOrderDetail> details = outboundOrderDetails.Where(x => x.MaterialNo == item.MaterialNo && x.Width == item.Width && x.MachineName == item.MachineName).ToList(); |
| | | |
| | | if (!stockInfos.Any()) |
| | | { |
| | | //没æå¯ç¨åºåï¼æ 记为缺æ |
| | | foreach (var detail in details) |
| | | { |
| | | detail.OutSGOrderDetailStatus = OutOrderStatusEnum.缺æ.ObjToInt(); |
| | | } |
| | | message += $"ç©æï¼{item.MaterialNo},å¹
宽ï¼{item.Width}æ åºåï¼"; |
| | | continue; |
| | | } |
| | |
| | | List<Dt_StockInfo> autoAssignStocks = _stockService.StockInfoService.GetOutOldStocks(stockInfos, needQuantity).ToList(); |
| | | //æ·»å åºååé
|
| | | outStocks.AddRange(autoAssignStocks); |
| | | //è·åææè¯¥ç©æåæ® |
| | | List<Dt_OutSGOrderDetail> details = outboundOrderDetails.Where(x => x.MaterialNo == item.MaterialNo && x.Width == item.Width && x.MachineName == item.MachineName).ToList(); |
| | | |
| | | autoAssignStocks.ForEach(x => |
| | | { |
| | | x.StockOutLength = 0; |
| | |
| | | { |
| | | item.Count -= count.Count; |
| | | } |
| | | if (item.Count >= 50 && count?.Count<=2) |
| | | { |
| | | return item.RoadwayNo; |
| | | } |
| | | } |
| | | return locationCounts.Where(x => x.Count > 0).OrderByDescending(x => x.Count).FirstOrDefault()?.RoadwayNo ?? ""; |
| | | } |