修复bug

This commit is contained in:
18942506660
2023-12-06 14:35:57 +08:00
parent dcbf27c519
commit 18b6d126fd
4 changed files with 24 additions and 11 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;
@@ -123,10 +124,20 @@ namespace WMS.Web.Repositories
InStockTime = s.InStockTime.DateToStringSeconds(),
OutStockTime = s.OutStockTime.DateToStringSeconds(),
PurchaseBillNo = s.PurchaseBillNo,
SalBillNo = s.SalBillNo,
Customer = _erpBasicDataExtendService.GetCustomerName(customers, s.CustomerId),
SerialNumber = s.SerialNumber
};
if (!string.IsNullOrEmpty(s.SalBillNo))
{
Random rd = new Random();
var list = JsonConvert.DeserializeObject<List<string>>(s.SalBillNo);
if (list.Count() > 0)
{
int index = rd.Next(0, list.Count);
respone.SalBillNo = list[index];
}
}
return respone;
}