修复bug
This commit is contained in:
@@ -1607,11 +1607,11 @@
|
|||||||
解绑
|
解绑
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:WMS.Web.Domain.Entitys.SerialNumbers.OutStock(System.String,WMS.Web.Domain.Values.OutStockType,System.Int32)">
|
<member name="M:WMS.Web.Domain.Entitys.SerialNumbers.OutStock(System.Collections.Generic.List{System.String},WMS.Web.Domain.Values.OutStockType,System.Int32)">
|
||||||
<summary>
|
<summary>
|
||||||
出库
|
出库
|
||||||
</summary>
|
</summary>
|
||||||
<param name="outStockBillNo">出库单号</param>
|
<param name="salBillNos">出库单号</param>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:WMS.Web.Domain.Entitys.SerialNumbers.InStock(System.String,WMS.Web.Domain.Values.InstockType)">
|
<member name="M:WMS.Web.Domain.Entitys.SerialNumbers.InStock(System.String,WMS.Web.Domain.Values.InstockType)">
|
||||||
<summary>
|
<summary>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using Newtonsoft.Json;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@@ -110,13 +111,13 @@ namespace WMS.Web.Domain.Entitys
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 出库
|
/// 出库
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="outStockBillNo">出库单号</param>
|
/// <param name="salBillNos">出库单号</param>
|
||||||
public void OutStock(string outStockBillNo, OutStockType type,int customerId)
|
public void OutStock(List<string> salBillNos, OutStockType type,int customerId)
|
||||||
{
|
{
|
||||||
this.BoxId = 0;
|
this.BoxId = 0;
|
||||||
if (type == OutStockType.Sal)
|
if (type == OutStockType.Sal)
|
||||||
{
|
{
|
||||||
this.SalBillNo = outStockBillNo;
|
this.SalBillNo = JsonConvert.SerializeObject(salBillNos);
|
||||||
this.CustomerId = customerId;
|
this.CustomerId = customerId;
|
||||||
this.OutStockTime = DateTime.Now;
|
this.OutStockTime = DateTime.Now;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using Microsoft.EntityFrameworkCore.Storage;
|
using Microsoft.EntityFrameworkCore.Storage;
|
||||||
|
using Newtonsoft.Json;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -194,7 +195,7 @@ namespace WMS.Web.Domain.Services
|
|||||||
var outstockDetail = outStock.Details.FirstOrDefault(f => f.MaterialId == entity.MaterialId);
|
var outstockDetail = outStock.Details.FirstOrDefault(f => f.MaterialId == entity.MaterialId);
|
||||||
if (outstockDetail == null) continue;
|
if (outstockDetail == null) continue;
|
||||||
//修改序列号和箱绑定关系
|
//修改序列号和箱绑定关系
|
||||||
entity.OutStock(outStock.BillNo, outStock.Type, outStock.ReceiptCustomerId);
|
entity.OutStock(outstockDetail.ErpDetails.Select(s => s.SaleBillNo).ToList(), outStock.Type, outStock.ReceiptCustomerId);
|
||||||
|
|
||||||
//记录序列号操作日志
|
//记录序列号操作日志
|
||||||
SerialNumberOperate op = new SerialNumberOperate()
|
SerialNumberOperate op = new SerialNumberOperate()
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore.Storage;
|
using Microsoft.EntityFrameworkCore.Storage;
|
||||||
|
using Newtonsoft.Json;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -123,10 +124,20 @@ namespace WMS.Web.Repositories
|
|||||||
InStockTime = s.InStockTime.DateToStringSeconds(),
|
InStockTime = s.InStockTime.DateToStringSeconds(),
|
||||||
OutStockTime = s.OutStockTime.DateToStringSeconds(),
|
OutStockTime = s.OutStockTime.DateToStringSeconds(),
|
||||||
PurchaseBillNo = s.PurchaseBillNo,
|
PurchaseBillNo = s.PurchaseBillNo,
|
||||||
SalBillNo = s.SalBillNo,
|
|
||||||
Customer = _erpBasicDataExtendService.GetCustomerName(customers, s.CustomerId),
|
Customer = _erpBasicDataExtendService.GetCustomerName(customers, s.CustomerId),
|
||||||
SerialNumber = s.SerialNumber
|
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;
|
return respone;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user