| | |
| | | List<Dt_OutStockLockInfo> outStockLockInfos = Repository.QueryData(x => x.PalletCode == palletCode); |
| | | for (int i = 0; i < outStockLockInfos.Count; i++) |
| | | { |
| | | outStockLockInfos[i].Status = OutLockStockStatusEnum.åºåºå®æ.ObjToInt(); |
| | | outStockLockInfos[i].Status = OutLockStockStatusEnum.æ£é宿.ObjToInt(); |
| | | } |
| | | List<Dt_StockInfoDetail> beforeDetaile = stockInfo.Details.GroupBy(x => x.MaterielCode).Select(x => new Dt_StockInfoDetail { MaterielCode = x.Key, StockQuantity = x.Sum(v => v.StockQuantity) }).ToList(); |
| | | |
| | |
| | | } |
| | | |
| | | List<string> mCodes = stockInfo.Details.GroupBy(x => x.MaterielCode).Select(x => x.Key).ToList(); |
| | | _unitOfWorkManage.BeginTran(); |
| | | foreach (string code in mCodes) |
| | | { |
| | | _recordService.StockQuantityChangeRecordService.AddStockChangeRecord(stockInfo, updateDetailList, deleteDetailList, StockChangeTypeEnum.Outbound); |
| | | } |
| | | |
| | | updateDetailList.ForEach(x => |
| | | { |
| | | x.OutboundQuantity = 0; |
| | | }); |
| | | |
| | | stockInfo.StockStatus = StockStatusEmun.æå¨ç»çå
¥åºç¡®è®¤.ObjToInt(); |
| | | //_stockService.StockInfoDetailService.Repository.DeleteAndMoveIntoHty(deleteDetailList, OperateTypeEnum.èªå¨å®æ); |
| | | _stockService.StockInfoService.Repository.UpdateData(stockInfo); |
| | | _stockService.StockInfoDetailService.Repository.UpdateData(updateDetailList); |
| | | _stockService.StockInfoDetailService.Repository.DeleteData(deleteDetailList); |
| | | BaseDal.UpdateData(outStockLockInfos); |
| | | |
| | | _unitOfWorkManage.BeginTran(); |
| | | return WebResponseContent.Instance.OK(); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | _unitOfWorkManage.RollbackTran(); |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |