序列号集

This commit is contained in:
tongfei
2023-11-13 14:43:15 +08:00
parent 593422e730
commit a28f6bf0bd
5 changed files with 41 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
using AutoMapper;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Storage;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -85,7 +86,7 @@ namespace WMS.Web.Repositories
Specifications = "",
Qty = s.detail.Qty,
SubStock = "",
SerialNumbers = s.detail.SerialNumbers
SerialNumbers = JsonConvert.SerializeObject(s.detail.SerialNumbers),
}).OrderByDescending(x => x.Id).Skip((dto.PageNo - 1) * dto.PageSize).Take(dto.PageSize).ToListAsync();
response.Data = list;

View File

@@ -143,6 +143,9 @@ namespace WMS.Web.Repositories.Configuration
{
ent.ToTable("t_wms_instock_details");
ent.HasKey(x => x.Id);
ent.Property(f => f.SerialNumbers).HasConversion(
v => JsonConvert.SerializeObject(v),
v => JsonConvert.DeserializeObject<List<string>>(v));
});
# endregion
@@ -187,6 +190,9 @@ namespace WMS.Web.Repositories.Configuration
{
ent.ToTable("t_wms_back_record_details");
ent.HasKey(x => x.Id);
ent.Property(f => f.SerialNumbers).HasConversion(
v => JsonConvert.SerializeObject(v),
v => JsonConvert.DeserializeObject<List<string>>(v));
});
#endregion