| | |
| | | /// </summary> |
| | | [Description("ç产å
¥åºå")] |
| | | works = 2, |
| | | |
| | | /// <summary> |
| | | /// è°æ¨åºåºå |
| | | /// </summary> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | using Microsoft.AspNetCore.SignalR; |
| | | |
| | | namespace WIDESEA_Model |
| | | { |
| | | public class WMSNoticeHub : Hub |
| | | { |
| | | // å端çå¬è¿ä¸ªæ¹æ³å°±è½æ¶å°æ¶æ¯ |
| | | public async Task SendMessage(string message) |
| | | { |
| | | await Clients.All.SendAsync("ReceiveMessage", message); |
| | | } |
| | | } |
| | | } |
| | |
| | | using MailKit.Search; |
| | | using Microsoft.AspNetCore.SignalR; |
| | | using Microsoft.Extensions.Logging; |
| | | using System; |
| | | using System.Collections.Generic; |
| | |
| | | Dt_Task task = Repository.QueryFirst(x => x.PalletCode == palletCode); |
| | | if (task != null) |
| | | { |
| | | _hubContext.Clients.All.SendAsync("ReceiveMessage", $"该æç{palletCode}å·²çæä»»å¡"); |
| | | return WebResponseContent.Instance.Error($"该æç{palletCode}å·²çæä»»å¡"); |
| | | } |
| | | Dt_StockInfo stockInfo = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.PalletCode == palletCode).Includes(x => x.Details).First(); |
| | | |
| | | if (stockInfo == null) |
| | | { |
| | | _hubContext.Clients.All.SendAsync("ReceiveMessage", $"æªæ¾å°ç»çä¿¡æ¯"); |
| | | |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°ç»çä¿¡æ¯"); |
| | | } |
| | | |
| | |
| | | Dt_LocationInfo locationInfo1 = _locationInfoService.Repository.QueryFirst(x => x.LocationCode == stockInfo.LocationCode); |
| | | if (locationInfo1 == null) |
| | | { |
| | | _hubContext.Clients.All.SendAsync("ReceiveMessage", $"ååºåä¸è¯¥åºä½{stockInfo.LocationCode}æªæ¾å°"); |
| | | |
| | | return WebResponseContent.Instance.Error($"ååºåä¸è¯¥åºä½{stockInfo.LocationCode}æªæ¾å°"); |
| | | } |
| | | returnRoadwayInfo = _basicRepository.RoadwayInfoRepository.QueryFirst(x => x.RoadwayNo == locationInfo1.RoadwayNo && x.InStationCode == (returnRoadwayInfo.InStationCode != null ? returnRoadwayInfo.InStationCode : stationCode)); |
| | |
| | | Dt_LocationInfo locationInfo1 = _locationInfoService.Repository.QueryFirst(x => x.LocationCode == returnOrder.LocationCode); |
| | | if (locationInfo1 == null) |
| | | { |
| | | _hubContext.Clients.All.SendAsync("ReceiveMessage", $"ååºåä¸è¯¥åºä½{returnOrder.LocationCode}æªæ¾å°"); |
| | | |
| | | return WebResponseContent.Instance.Error($"ååºåä¸è¯¥åºä½{returnOrder.LocationCode}æªæ¾å°"); |
| | | } |
| | | returnRoadwayInfo = _basicRepository.RoadwayInfoRepository.QueryFirst(x => x.RoadwayNo == locationInfo1.RoadwayNo && x.InStationCode == (returnRoadwayInfo.InStationCode != null ? returnRoadwayInfo.InStationCode : stationCode)); |
| | |
| | | |
| | | if (Repository.QueryFirst(x => x.SourceAddress == (returnRoadwayInfo.InStationCode != null ? returnRoadwayInfo.InStationCode : stationCode) && x.TaskStatus == TaskStatusEnum.New.ObjToInt()) != null) |
| | | { |
| | | _hubContext.Clients.All.SendAsync("ReceiveMessage", $"该ç«ç¹å·²ææªæ§è¡çä»»å¡"); |
| | | |
| | | return WebResponseContent.Instance.Error($"该ç«ç¹å·²ææªæ§è¡çä»»å¡"); |
| | | } |
| | | |
| | | var details = stockInfo.Details.FirstOrDefault(); |
| | | if (!string.IsNullOrEmpty(stockInfo.LocationCode)) |
| | | { |
| | | _hubContext.Clients.All.SendAsync("ReceiveMessage", $"该æçå·²ç»å®è´§ä½"); |
| | | |
| | | return WebResponseContent.Instance.Error($"该æçå·²ç»å®è´§ä½"); |
| | | } |
| | | Dt_RoadwayInfo roadwayInfo = _basicRepository.RoadwayInfoRepository.QueryFirst(x => x.InStationCode == (returnRoadwayInfo.InStationCode != null ? returnRoadwayInfo.InStationCode : stationCode)); |
| | | if (roadwayInfo == null) |
| | | { |
| | | _hubContext.Clients.All.SendAsync("ReceiveMessage", $"æªæ¾å°è¯¥å
¥åºç«å°å°å"); |
| | | |
| | | return WebResponseContent.Instance.Error($"æªæ¾å°è¯¥å
¥åºç«å°å°å"); |
| | | } |
| | | |
| | | Dt_Warehouse warehouse = _basicRepository.WarehouseRepository.QueryFirst(x => x.WarehouseCode == roadwayInfo.RoadwayNo); |
| | | if (warehouse == null) |
| | | { |
| | | _hubContext.Clients.All.SendAsync("ReceiveMessage", $"æªæ¾å°è¯¥ä»åº"); |
| | | |
| | | return WebResponseContent.Instance.Error("æªæ¾å°è¯¥ä»åº"); |
| | | } |
| | | |
| | |
| | | locationInfo = _locationInfoService.Repository.QueryFirst(x => x.LocationCode == returnOrder.LocationCode); |
| | | if (locationInfo.LocationStatus != LocationStatusEnum.Lock.ObjToInt() || locationInfo.EnableStatus == EnableStatusEnum.Disable.ObjToInt() || locationInfo.EnableStatus == EnableStatusEnum.OnlyOut.ObjToInt()) |
| | | { |
| | | _hubContext.Clients.All.SendAsync("ReceiveMessage", $"该ååºåè´§ä½{locationInfo.LocationCode}ééå®ç¶ææè´§ä½å¯ç¨ç¶æä¸æ£ç¡®ï¼è¯·æ£æ¥"); |
| | | |
| | | return WebResponseContent.Instance.Error($"该ååºåè´§ä½{locationInfo.LocationCode}ééå®ç¶ææè´§ä½å¯ç¨ç¶æä¸æ£ç¡®ï¼è¯·æ£æ¥"); |
| | | } |
| | | } |
| | |
| | | locationInfo = _basicService.LocationInfoService.AssignLocation(roadwayInfo.RoadwayNo, stockInfo.PalletType, warehouse.WarehouseId, "", heightType);//, stockInfo.WarehouseId |
| | | if (locationInfo == null) |
| | | { |
| | | _hubContext.Clients.All.SendAsync("ReceiveMessage", $"è´§ä½åé
失败,æªæ¾å°å¯åé
è´§ä½"); |
| | | |
| | | return WebResponseContent.Instance.Error($"è´§ä½åé
失败,æªæ¾å°å¯åé
è´§ä½"); |
| | | } |
| | | } |
| | |
| | | private readonly IInboundRepository _inboundRepository; |
| | | private readonly ITakeStockOrderCPRepository _takeStockOrderCPRepository; |
| | | private readonly ITakeStockOrderDetailCPRepository _takeStockOrderDetailCPRepository; |
| | | private readonly IHubContext<WMSNoticeHub> _hubContext; |
| | | public ITaskRepository Repository => BaseDal; |
| | | |
| | | public TaskService(ITaskRepository BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IMaterielInfoService materielInfoService, IInboundOrderDetail_HtyService inboundOrderDetail_HtyService, IOutboundOrder_HtyService outboundOrder_HtyService, IOutboundOrderDetail_HtyService outboundOrderDetail_HtyService, IInboundOrder_HtyService inboundOrder_HtyService, IStockRepository stockRepository, IInboundOrderDetailService inboundOrderDetailService, IBasicService basicService, IOutboundService outboundService, IInboundService inboundService, IRecordService recordService, IStockService stockService, ITask_HtyService taskHtyService, ILocationInfoService locationInfoService, IOutboundOrderDetailRepository outboundOrderDetailRepository, IBasicRepository basicRepository, IStockInfoDetailRepository stockInfoDetailRepository, IPalletTypeInfoRepository palletTypeInfoRepository, IReturnOrderRepository returnOrderRepository, IProductionRepository productionRepository, IInboundRepository inboundRepository, INewOutboundOrderDetailRepository newOutboundOrderDetailRepository, ITakeStockOrderCPRepository takeStockOrderCPRepository, ITakeStockOrderDetailCPRepository takeStockOrderDetailCPRepository, IStockInfoDetailCPRepository stockInfoDetailCPRepository) : base(BaseDal) |
| | | public TaskService(ITaskRepository BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IMaterielInfoService materielInfoService, IInboundOrderDetail_HtyService inboundOrderDetail_HtyService, IOutboundOrder_HtyService outboundOrder_HtyService, IOutboundOrderDetail_HtyService outboundOrderDetail_HtyService, IInboundOrder_HtyService inboundOrder_HtyService, IStockRepository stockRepository, IInboundOrderDetailService inboundOrderDetailService, IBasicService basicService, IOutboundService outboundService, IInboundService inboundService, IRecordService recordService, IStockService stockService, ITask_HtyService taskHtyService, ILocationInfoService locationInfoService, IOutboundOrderDetailRepository outboundOrderDetailRepository, IBasicRepository basicRepository, IStockInfoDetailRepository stockInfoDetailRepository, IPalletTypeInfoRepository palletTypeInfoRepository, IReturnOrderRepository returnOrderRepository, IProductionRepository productionRepository, IInboundRepository inboundRepository, INewOutboundOrderDetailRepository newOutboundOrderDetailRepository, ITakeStockOrderCPRepository takeStockOrderCPRepository, ITakeStockOrderDetailCPRepository takeStockOrderDetailCPRepository, IStockInfoDetailCPRepository stockInfoDetailCPRepository, |
| | | IHubContext<WMSNoticeHub> hubContext) : base(BaseDal) |
| | | { |
| | | _mapper = mapper; |
| | | _stockRepository = stockRepository; |
| | |
| | | _takeStockOrderCPRepository = takeStockOrderCPRepository; |
| | | _takeStockOrderDetailCPRepository = takeStockOrderDetailCPRepository; |
| | | _stockInfoDetailCPRepository = stockInfoDetailCPRepository; |
| | | _hubContext = hubContext; |
| | | } |
| | | |
| | | public string ReceiveWMSTaskin = WIDESEA_Core.Helper.AppSettings.Configuration["ReceiveWMSTaskin"]; |