| | |
| | | |
| | | public class BoxingInfoService : ServiceBase<DtBoxingInfo, IBoxingInfoRepository>, IBoxingInfoService |
| | | { |
| | | private readonly IStockInfoRepository stockInfoRepository; |
| | | private readonly IDt_PalletStockInfoRepository _stockInfoRepository; |
| | | private readonly IBoxingInfoDetailRepository boxingInfoDetailRepository; |
| | | public BoxingInfoService(IBoxingInfoRepository BaseDal, IStockInfoRepository stockInfoRepository, IBoxingInfoDetailRepository boxingInfoDetailRepository) : base(BaseDal) |
| | | public BoxingInfoService(IBoxingInfoRepository BaseDal, IDt_PalletStockInfoRepository stockInfoRepository, IBoxingInfoDetailRepository boxingInfoDetailRepository) : base(BaseDal) |
| | | { |
| | | this.stockInfoRepository = stockInfoRepository; |
| | | this.boxingInfoDetailRepository = boxingInfoDetailRepository; |
| | | _stockInfoRepository = stockInfoRepository; |
| | | } |
| | | |
| | | // éªè¯æ¨¡å |
| | |
| | | return validationResults; |
| | | } |
| | | |
| | | public override PageGridData<DtBoxingInfo> GetPageData(PageDataOptions options) |
| | | { |
| | | |
| | | |
| | | return base.GetPageData(options); |
| | | } |
| | | |
| | | public WebResponseContent AddBoxingInfo(SaveModel saveModel) |
| | | { |
| | | WebResponseContent content = new WebResponseContent(); |
| | |
| | | if (obj == null || obj.Count == 0) throw new Exception("ç©æä¿¡æ¯ä¸ºç©º,请è¾å
¥"); |
| | | |
| | | var info = BaseDal.QueryFirst(x => x.PalletCode == palletcode); |
| | | if (info != null) throw new Exception("该æçå·²åå¨ç»ç"); |
| | | if (info != null) throw new Exception($"æ¤æç{palletcode}å·²åå¨ç»ç"); |
| | | |
| | | var stockinfo = stockInfoRepository.QueryFirst(x => x.PalletCode == palletcode); |
| | | if (stockinfo != null) throw new Exception("该æçå·²åå¨åºåæ°æ®"); |
| | | var stockinfo = _stockInfoRepository.QueryFirst(x => x.PalletCode == palletcode); |
| | | if (stockinfo != null) throw new Exception($"æ¤æç{palletcode}å·²åå¨åºåæ°æ®"); |
| | | |
| | | foreach (var item in obj) |
| | | { |
| | | if (boxingInfoDetailRepository.QueryFirst(x => x.MaterielName == item.MaterilName) != null) throw new Exception($"{item.MaterilName}å·²åå¨ç»çæ°æ®"); |
| | | } |
| | | //foreach (var item in obj) |
| | | //{ |
| | | // if (boxingInfoDetailRepository.QueryFirst(x => x.MaterielName == item.MaterilName) != null) throw new Exception($"{item.MaterilName}å·²åå¨ç»çæ°æ®"); |
| | | //} |
| | | |
| | | DtBoxingInfo dtBoxingInfo = new DtBoxingInfo() |
| | | { |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | } |