| | |
| | | using WIDESEA_DTO.Inbound; |
| | | using WIDESEA_DTO.Stock; |
| | | using WIDESEA_DTO.Task; |
| | | using WIDESEA_External.ERPService; |
| | | using WIDESEA_IBasicRepository; |
| | | using WIDESEA_IBasicService; |
| | | using WIDESEA_IInboundService; |
| | |
| | | private readonly IOutboundService _outboundService; |
| | | private readonly IStockService _stockService; |
| | | private readonly IBasicRepository _basicRepository; |
| | | private readonly IApiInfoRepository _apiInfoRepository; |
| | | private readonly IInvokeERPService _invokeERPService; |
| | | |
| | | public ITaskRepository Repository => BaseDal; |
| | | |
| | |
| | | |
| | | public List<int> TaskOutboundTypes => typeof(TaskTypeEnum).GetEnumIndexList(); |
| | | |
| | | public TaskService(ITaskRepository BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IStockRepository stockRepository, IBasicService basicService, IRecordService recordService, IOutboundService outboundService, IStockService stockService, IBasicRepository basicRepository) : base(BaseDal) |
| | | public TaskService(ITaskRepository BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IStockRepository stockRepository, IBasicService basicService, IRecordService recordService, IOutboundService outboundService, IStockService stockService, IBasicRepository basicRepository, IApiInfoRepository apiInfoRepository, IInvokeERPService invokeERPService) : base(BaseDal) |
| | | { |
| | | _mapper = mapper; |
| | | _unitOfWorkManage = unitOfWorkManage; |
| | |
| | | _outboundService = outboundService; |
| | | _stockService = stockService; |
| | | _basicRepository = basicRepository; |
| | | _apiInfoRepository = apiInfoRepository; |
| | | _invokeERPService = invokeERPService; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | if (task.TaskType == TaskTypeEnum.TestInbound.ObjToInt()) |
| | | { |
| | | stockInfo.StockStatus = StockStatusEmun.å
¥åºå®ææªå»ºåºåºå.ObjToInt(); |
| | | stockInfo.Details.ForEach(x => |
| | | { |
| | | x.Status = StockStatusEmun.å
¥åºå®æ.ObjToInt(); |
| | | }); |
| | | } |
| | | else |
| | | { |
| | |
| | | _basicService.LocationInfoService.Repository.UpdateData(locationInfo); |
| | | |
| | | _stockRepository.StockInfoRepository.UpdateData(stockInfo); |
| | | |
| | | _stockRepository.StockInfoDetailRepository.UpdateData(stockInfo.Details); |
| | | _recordService.LocationStatusChangeRecordSetvice.AddLocationStatusChangeRecord(locationInfo, lastStatus, LocationChangeType.InboundCompleted); |
| | | _recordService.StockQuantityChangeRecordService.AddStockChangeRecord(stockInfo, stockInfo.Details, stockInfo.Details.Sum(x => x.StockQuantity), stockInfo.Details.Sum(x => x.StockQuantity), StockChangeTypeEnum.Inbound, taskNum); |
| | | _unitOfWorkManage.CommitTran(); |