增加了初始数据处理
This commit is contained in:
@@ -161,13 +161,23 @@ namespace BarCode.Web.Repositories
|
||||
/// 获取集合
|
||||
/// </summary>
|
||||
/// <param name="ids"></param>
|
||||
/// <param name="strUpdate">更新而使用的</param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public async Task<List<SerialNumberGenerateRecord>> GetEntityList(List<int> ids)
|
||||
public async Task<List<SerialNumberGenerateRecord>> GetEntityList(List<int> ids,string strUpdate)
|
||||
{
|
||||
return await _context.SerialNumberGenerateRecord.AsNoTracking()
|
||||
.Where(f => ids.Contains(f.Id))
|
||||
.ToListAsync();
|
||||
if(strUpdate=="1")
|
||||
{
|
||||
return await _context.SerialNumberGenerateRecord.AsNoTracking()
|
||||
.Where(f => f.IsTwo==3)
|
||||
.ToListAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
return await _context.SerialNumberGenerateRecord.AsNoTracking()
|
||||
.Where(f => ids.Contains(f.Id))
|
||||
.ToListAsync();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -16,6 +16,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Storage;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Npoi.Mapper;
|
||||
using NPOI.OpenXmlFormats.Wordprocessing;
|
||||
using NPOI.POIFS.FileSystem;
|
||||
using Quartz.Logging;
|
||||
using System;
|
||||
@@ -250,6 +251,8 @@ namespace BarCode.Web.Repositories
|
||||
if (materials_result.IsSuccess)
|
||||
materials = materials_result.Data.ToList();
|
||||
|
||||
//var queery2= _context.ser
|
||||
|
||||
var query = _context.SerialNumbers.AsNoTracking()
|
||||
.GroupJoin(_context.Box, serial => serial.BoxId, box => box.Id, (serial, box) => new { serial, box })
|
||||
.SelectMany(x => x.box.DefaultIfEmpty(), (p, box) => new { p.serial, box })
|
||||
@@ -704,6 +707,20 @@ namespace BarCode.Web.Repositories
|
||||
.ToListAsync();
|
||||
}
|
||||
|
||||
|
||||
///// <summary>
|
||||
///// 跟据特定条件得到产生的序列号列表(主要是内部使用)
|
||||
///// </summary>
|
||||
///// <param name="boxIds"></param>
|
||||
///// <returns></returns>
|
||||
//public async Task<List<SerialNumbers>> GetEntityListBySuitNumber(string suitNumber)
|
||||
//{
|
||||
// return await _context.SerialNumbers.AsNoTracking()
|
||||
// .Where(f => f.TwoSerialNumber.Contains(suitNumber))
|
||||
// .ToListAsync();
|
||||
//}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// wms系统查询序列码 支持数字序列码
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user