1
wankeda
2025-02-12 8326222e65f0bb258c99d93f1954d7696c4ef00d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
using AutoMapper;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
using WIDESEA_Core.BaseRepository;
using WIDESEA_Core.BaseServices;
using WIDESEA_Core.Helper;
using WIDESEA_IRecordService;
using WIDESEA_IStockRepository;
using WIDESEA_IStockService;
using WIDESEA_ITaskInfoRepository;
using WIDESEA_Model.Models;
using WIDESEA_StockRepository;
 
namespace WIDESEA_StockService
{
    public partial class StockInfoDetailService : ServiceBase<Dt_StockInfoDetail, IStockInfoDetailRepository>, IStockInfoDetailService
    {
        /// <summary>
        /// 根据批次号查询库存
        /// </summary>
        /// <param name="palletCode"></param>
        /// <returns></returns>
        public Dt_StockInfoDetail? GetStockByPalletCode(string palletCode)
        {
            Dt_StockInfoDetail stockInfo = BaseDal.QueryFirst(x => x.BatchNo == palletCode);
            //if (stockInfo != null)
            //{
            //    stockInfo.Details = _stockRepository.StockInfoDetailRepository.QueryData(x => x.StockId == stockInfo.Id);
            //}
            return stockInfo;
        }
 
        public bool ExistSerialNumber(string SerialNumber)
        {
            return BaseDal.QueryFirst(x => x.SerialNumber == SerialNumber) != null;
        }
 
        public bool ExistSerialNumbers(List<string> SerialNumbers)
        {
            return BaseDal.QueryFirst(x => SerialNumbers.Contains(x.SerialNumber)) != null;
        }
 
        
    }
}