修复bug
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user