|  |  |  | 
|---|
|  |  |  | using WIDESEA_IInboundRepository; | 
|---|
|  |  |  | using WIDESEA_IInboundService; | 
|---|
|  |  |  | using WIDESEA_IOutboundService; | 
|---|
|  |  |  | using WIDESEA_IStockRepository; | 
|---|
|  |  |  | using WIDESEA_Model.Models; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | namespace WIDESEA_InboundService | 
|---|
|  |  |  | 
|---|
|  |  |  | public IMesProInOrderRepository Repository => BaseDal; | 
|---|
|  |  |  | private readonly IUnitOfWorkManage _unitOfWorkManage; | 
|---|
|  |  |  | private readonly IInboundRepository _inboundRepository; | 
|---|
|  |  |  | public MesProInOrderService(IMesProInOrderRepository BaseDal, IUnitOfWorkManage unitOfWorkManag, IInboundRepository inboundRepository) : base(BaseDal) | 
|---|
|  |  |  | private readonly IStockRepository _stockRepository; | 
|---|
|  |  |  | public MesProInOrderService(IMesProInOrderRepository BaseDal, IUnitOfWorkManage unitOfWorkManag, IInboundRepository inboundRepository, IStockRepository stockRepository) : base(BaseDal) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | _unitOfWorkManage = unitOfWorkManag; | 
|---|
|  |  |  | _inboundRepository = inboundRepository; | 
|---|
|  |  |  | _stockRepository = stockRepository; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | /// <summary> | 
|---|
|  |  |  | /// æåå
¥åºæ«ç  | 
|---|
|  |  |  | 
|---|
|  |  |  | try | 
|---|
|  |  |  | { | 
|---|
|  |  |  | //è·å对åºMESæåå
¥åºåæ® | 
|---|
|  |  |  | Dt_MesProInOrder mesProInOrder = BaseDal.Db.Queryable<Dt_MesProInOrder>().Includes(x => x.Details).First(); | 
|---|
|  |  |  | Dt_MesProInOrder mesProInOrder = BaseDal.Db.Queryable<Dt_MesProInOrder>().Where(x => x.Id == Id).Includes(x => x.Details).First(); | 
|---|
|  |  |  | if (mesProInOrder==null) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | return content.Error("å½åMESå
¥åºåæ®ä¸åå¨"); | 
|---|
|  |  |  | 
|---|
|  |  |  | { | 
|---|
|  |  |  | return content.Error($"å½åå
¥åºè®¢åæ°é溢åº{(OverPCSQty + model.OKPCSQTY.ObjToInt())- SumPCSQty}"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | proInOrderDetail.OverInQuantity += model.OKPCSQTY.ObjToInt(); | 
|---|
|  |  |  | _inboundRepository.MesProInOrderDetailRepository.UpdateData(proInOrderDetail); | 
|---|
|  |  |  | return content.OK($"å
å
{proInOrderDetail.BagNo}å·²æ«æ°éï¼{proInOrderDetail.OverInQuantity},å©ä½ï¼{proInOrderDetail.OKPCSQTY-proInOrderDetail.OverInQuantity}"); | 
|---|