修复bug

This commit is contained in:
18942506660
2023-11-14 16:11:59 +08:00
parent e27c4ae5de
commit d02668a871
3 changed files with 14 additions and 11 deletions

View File

@@ -1223,15 +1223,15 @@
解绑 解绑
</summary> </summary>
</member> </member>
<member name="M:WMS.Web.Domain.Entitys.SerialNumbers.OutStock(System.String)"> <member name="M:WMS.Web.Domain.Entitys.SerialNumbers.OutStock(System.String,WMS.Web.Domain.Values.OutStockType)">
<summary> <summary>
出库 出库
</summary> </summary>
<param name="outStockBillNo">出库单号</param> <param name="outStockBillNo">出库单号</param>
</member> </member>
<member name="M:WMS.Web.Domain.Entitys.SerialNumbers.InStock(System.String)"> <member name="M:WMS.Web.Domain.Entitys.SerialNumbers.InStock(System.String,WMS.Web.Domain.Values.InstockType)">
<summary> <summary>
</summary> </summary>
<param name="inStockBillNo">出库单号</param> <param name="inStockBillNo">出库单号</param>
</member> </member>

View File

@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Text; using System.Text;
using WMS.Web.Core; using WMS.Web.Core;
using WMS.Web.Domain.Values;
namespace WMS.Web.Domain.Entitys namespace WMS.Web.Domain.Entitys
{ {
@@ -14,7 +15,7 @@ namespace WMS.Web.Domain.Entitys
public class SerialNumbers : EntityBase public class SerialNumbers : EntityBase
{ {
public SerialNumbers() { } public SerialNumbers() { }
public SerialNumbers(string serialNumber,int materialId,int boxId,int opsBoxId,string creator,DateTime? createTime) public SerialNumbers(string serialNumber, int materialId, int boxId, int opsBoxId, string creator, DateTime? createTime)
{ {
this.SerialNumber = serialNumber; this.SerialNumber = serialNumber;
this.MaterialId = materialId; this.MaterialId = materialId;
@@ -88,17 +89,19 @@ namespace WMS.Web.Domain.Entitys
/// 出库 /// 出库
/// </summary> /// </summary>
/// <param name="outStockBillNo">出库单号</param> /// <param name="outStockBillNo">出库单号</param>
public void OutStock(string outStockBillNo) public void OutStock(string outStockBillNo, OutStockType type)
{ {
this.BoxId = 0; this.BoxId = 0;
if (type == OutStockType.Sal)
this.OutStockBillNo = outStockBillNo; this.OutStockBillNo = outStockBillNo;
} }
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
/// <param name="inStockBillNo">出库单号</param> /// <param name="inStockBillNo">出库单号</param>
public void InStock(string inStockBillNo) public void InStock(string inStockBillNo, InstockType type)
{ {
if (type == InstockType.Purchase)
this.InStockBillNo = inStockBillNo; this.InStockBillNo = inStockBillNo;
} }
} }

View File

@@ -188,7 +188,7 @@ namespace WMS.Web.Domain.Services
{ {
var box = boxList.FirstOrDefault(f => f.Id == entity.BoxId); var box = boxList.FirstOrDefault(f => f.Id == entity.BoxId);
//修改序列号和箱绑定关系 //修改序列号和箱绑定关系
entity.OutStock(outStock.BillNo); entity.OutStock(outStock.BillNo, outStock.Type);
//记录序列号操作日志 //记录序列号操作日志
SerialNumberOperate op = new SerialNumberOperate() SerialNumberOperate op = new SerialNumberOperate()
@@ -316,7 +316,7 @@ namespace WMS.Web.Domain.Services
var instockDetail = inStock.Details.FirstOrDefault(f => f.MaterialId == entity.MaterialId); var instockDetail = inStock.Details.FirstOrDefault(f => f.MaterialId == entity.MaterialId);
var subStock = _singleDataService.GetSingleData(SingleAction.SubStocks, loginInfo.UserInfo.CompanyId, instockDetail.SubStockId); var subStock = _singleDataService.GetSingleData(SingleAction.SubStocks, loginInfo.UserInfo.CompanyId, instockDetail.SubStockId);
//修改序列号和箱绑定关系 //修改序列号和箱绑定关系
entity.InStock(inStock.BillNo); entity.InStock(inStock.BillNo, inStock.Type);
//记录序列号操作日志 //记录序列号操作日志
SerialNumberOperate op = new SerialNumberOperate() SerialNumberOperate op = new SerialNumberOperate()