| | |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_IInboundRepository; |
| | | using WIDESEA_IInboundService; |
| | | using WIDESEA_InboundRepository; |
| | | using WIDESEA_IOutboundRepository; |
| | | using WIDESEA_IOutboundService; |
| | |
| | | { |
| | | private readonly IMapper _mapper; |
| | | private readonly IUnitOfWorkManage _unitOfWorkManage; |
| | | private readonly IStockRepository _stockRepository; |
| | | private readonly IBasicService _basicService; |
| | | private readonly IRecordService _recordService; |
| | | private readonly IStockRepository _stockRepository; |
| | | private readonly IStockService _stockService; |
| | | private readonly IBasicRepository _basicRepository; |
| | | private readonly IApiInfoRepository _apiInfoRepository; |
| | | private readonly IBasicService _basicService; |
| | | private readonly IInvokeERPService _invokeERPService; |
| | | private readonly IPalletTypeInfoRepository _palletTypeInfoRepository; |
| | | private readonly IAGVStationInfoRepository _agvStationInfoRepository; |
| | | private readonly IPurchaseBSTOrderRepository _purchaseBSTOrderRepository; |
| | | private readonly IPurchaseBSTOrderDetailRepository _purchaseBSTOrderDetailRepository; |
| | | private readonly IOutBSTOrderDetailRepository _outBSTOrderDetailRepository; |
| | | private readonly IOutBSTOrderRepository _outBSTOrderRepository; |
| | | private readonly IOutBSTOrderDetailService _outBSTOrderDetailService; |
| | | private readonly IOutMESOrderService _outMESOrderService; |
| | | private readonly IOutMESOrderRepository _outMESOrderRepository; |
| | | private readonly IOutboundRepository _outboundRepository; |
| | | private readonly IOutboundService _outboundService; |
| | | private readonly IInboundRepository _inboundRepository; |
| | | private readonly IInboundService _inboundService; |
| | | public ITaskRepository Repository => BaseDal; |
| | | |
| | | private Dictionary<string, OrderByType> _taskOrderBy = new() |
| | |
| | | |
| | | public List<int> TaskOutboundTypes => typeof(TaskTypeEnum).GetEnumIndexList().Where(x => x >= 100 && x < 500).ToList(); |
| | | |
| | | public TaskService(ITaskRepository BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IStockRepository stockRepository, IBasicService basicService, IRecordService recordService, IStockService stockService, IBasicRepository basicRepository, IApiInfoRepository apiInfoRepository, IInvokeERPService invokeERPService, IPalletTypeInfoRepository palletTypeInfoRepository, IAGVStationInfoRepository agvStationInfoRepository, IPurchaseBSTOrderRepository purchaseBSTOrderRepository, IPurchaseBSTOrderDetailRepository purchaseBSTOrderDetailRepository, IOutBSTOrderDetailRepository outBSTOrderDetailRepository, IOutBSTOrderRepository outBSTOrderRepository,IOutBSTOrderDetailService outBSTOrderDetailService, IOutMESOrderService outMESOrderService, IOutMESOrderRepository outMESOrderRepository, IOutboundRepository outboundRepository, IOutboundService outboundService, IInboundRepository inboundRepository) : base(BaseDal) |
| | | public TaskService(ITaskRepository BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IStockRepository stockRepository, IBasicService basicService, IRecordService recordService, IStockService stockService, IBasicRepository basicRepository, IInvokeERPService invokeERPService, IOutboundRepository outboundRepository, IOutboundService outboundService, IInboundRepository inboundRepository,IInboundService inboundService) : base(BaseDal) |
| | | { |
| | | _mapper = mapper; |
| | | _unitOfWorkManage = unitOfWorkManage; |
| | |
| | | _recordService = recordService; |
| | | _stockService = stockService; |
| | | _basicRepository = basicRepository; |
| | | _apiInfoRepository = apiInfoRepository; |
| | | _invokeERPService = invokeERPService; |
| | | _palletTypeInfoRepository = palletTypeInfoRepository; |
| | | _agvStationInfoRepository = agvStationInfoRepository; |
| | | _purchaseBSTOrderRepository = purchaseBSTOrderRepository; |
| | | _purchaseBSTOrderDetailRepository = purchaseBSTOrderDetailRepository; |
| | | _outBSTOrderRepository = outBSTOrderRepository; |
| | | _outBSTOrderDetailRepository = outBSTOrderDetailRepository; |
| | | _outBSTOrderDetailService = outBSTOrderDetailService; |
| | | _outMESOrderService = outMESOrderService; |
| | | _outMESOrderRepository = outMESOrderRepository; |
| | | _outboundRepository = outboundRepository; |
| | | _outboundService = outboundService; |
| | | _inboundRepository = inboundRepository; |
| | | _inboundService = inboundService; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | try |
| | | { |
| | | if (tasks==null || tasks.Count == 0) |
| | | { |
| | | return WebResponseContent.Instance.Error($"浼犲叆浠诲姟涓虹┖"); |
| | | } |
| | | List<WMSTaskDTO> taskDTOs = _mapper.Map<List<WMSTaskDTO>>(tasks); |
| | | taskDTOs.ForEach(x => |
| | | { |
| | |
| | | WebResponseContent content = new WebResponseContent(); |
| | | try |
| | | { |
| | | |
| | | lock (lockerAddSG) |
| | | { |
| | | int outDetailId = _outboundRepository.OutSGOrderDetailRepository.QueryData().OrderByDescending(x=>x.Id).FirstOrDefault().Id; |
| | | int outDetailId = _outboundRepository.OutSGOrderDetailRepository.QueryData().OrderByDescending(x=>x.Id).FirstOrDefault()?.Id ?? 0; |
| | | content = _outboundService.OutSGOrderService.AddOutSGOrder(outOrderDTOs); |
| | | if (!content.Status) |
| | | { |