|  |  |  | 
|---|
|  |  |  | private readonly IUnitOfWorkManage _unitOfWorkManage; | 
|---|
|  |  |  | private readonly IBasicRepository _basicRepository; | 
|---|
|  |  |  | private readonly IOutboundService _outboundService; | 
|---|
|  |  |  | private readonly IInboundRepository _inboundRepository; | 
|---|
|  |  |  | public ReturnOrderService(IReturnOrderRepository BaseDal,IUnitOfWorkManage unitOfWorkManage,IBasicRepository basicRepository, | 
|---|
|  |  |  | IOutboundService outboundService) : base(BaseDal) | 
|---|
|  |  |  | IOutboundService outboundService,IInboundRepository inboundRepository) : base(BaseDal) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | _unitOfWorkManage = unitOfWorkManage; | 
|---|
|  |  |  | _basicRepository = basicRepository; | 
|---|
|  |  |  | _outboundService = outboundService; | 
|---|
|  |  |  | _inboundRepository = inboundRepository; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | /// <summary> | 
|---|
|  |  |  | /// è·åéæå | 
|---|
|  |  |  | 
|---|
|  |  |  | { | 
|---|
|  |  |  | return content.Error("该éæå已宿æéæä¸"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //夿æ¯å¦å建å
¥åºå | 
|---|
|  |  |  | Dt_InboundOrder InboundOld = _inboundRepository.InboundOrderRepository.QueryFirst(x=>x.UpperOrderNo== returnOrder.OrderNo); | 
|---|
|  |  |  | if (InboundOld!=null) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | return content.Error($"该éæå{returnOrder.OrderNo}å·²çæå
¥åºåå·{InboundOld.InboundOrderNo}"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | List<Dt_InboundOrderDetail> inboundOrderDetails = new List<Dt_InboundOrderDetail>(); | 
|---|
|  |  |  | foreach (var item in returnOrder.Details) | 
|---|
|  |  |  | { | 
|---|