修改入库
This commit is contained in:
@@ -103,11 +103,18 @@ namespace WMS.Web.Domain.Entitys
|
|||||||
public void Create(InstockType type, string sourceBillNo, DateTime createTime, int supplierId, string orgCode)
|
public void Create(InstockType type, string sourceBillNo, DateTime createTime, int supplierId, string orgCode)
|
||||||
{
|
{
|
||||||
if (type == InstockType.Purchase)
|
if (type == InstockType.Purchase)
|
||||||
|
{
|
||||||
this.Status = InstockStatus.Wait;
|
this.Status = InstockStatus.Wait;
|
||||||
|
}
|
||||||
|
|
||||||
else if (type == InstockType.ProduceSotck)
|
else if (type == InstockType.ProduceSotck)
|
||||||
|
{
|
||||||
this.Status = InstockStatus.Wait;
|
this.Status = InstockStatus.Wait;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
this.Status = InstockStatus.WaitInStock;
|
this.Status = InstockStatus.WaitInStock;
|
||||||
|
}
|
||||||
this.Type = type;
|
this.Type = type;
|
||||||
this.SourceBillNo = sourceBillNo;
|
this.SourceBillNo = sourceBillNo;
|
||||||
this.SupplierId = supplierId;
|
this.SupplierId = supplierId;
|
||||||
@@ -205,6 +212,8 @@ namespace WMS.Web.Domain.Entitys
|
|||||||
this.Status = InstockStatus.Already;
|
this.Status = InstockStatus.Already;
|
||||||
else if (totalReceiveQty <= 0 && this.Type == InstockType.Purchase)
|
else if (totalReceiveQty <= 0 && this.Type == InstockType.Purchase)
|
||||||
this.Status = InstockStatus.Wait;
|
this.Status = InstockStatus.Wait;
|
||||||
|
else if (totalReceiveQty <= 0 && this.Type == InstockType.ProduceSotck)
|
||||||
|
this.Status = InstockStatus.Wait;
|
||||||
else if (totalRealityQty <= 0)
|
else if (totalRealityQty <= 0)
|
||||||
this.Status = InstockStatus.WaitInStock;
|
this.Status = InstockStatus.WaitInStock;
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -2016,6 +2016,9 @@ namespace WMS.Web.Domain.Services
|
|||||||
return OrderType.Stkdirecttransfers_In;
|
return OrderType.Stkdirecttransfers_In;
|
||||||
case InstockType.StktransferInst:
|
case InstockType.StktransferInst:
|
||||||
return OrderType.StktransferInst_In;
|
return OrderType.StktransferInst_In;
|
||||||
|
case InstockType.ProduceSotck:
|
||||||
|
return OrderType.ProduceSotck_In;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return OrderType.StktransferInst_In;
|
return OrderType.StktransferInst_In;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -313,7 +313,7 @@ namespace WMS.Web.Domain.Services
|
|||||||
List<string> TransferDirect_sourceBillNos = new List<string>();
|
List<string> TransferDirect_sourceBillNos = new List<string>();
|
||||||
List<string> Transferin_sourceBillNos = new List<string>();
|
List<string> Transferin_sourceBillNos = new List<string>();
|
||||||
List<string> AssembledApp_sourceBillNos = new List<string>();
|
List<string> AssembledApp_sourceBillNos = new List<string>();
|
||||||
|
List<string> ProduceStock_sourceBillNos = new List<string>();
|
||||||
var taskList = await _inStockTaskRepositories.GetListBy(billNos);
|
var taskList = await _inStockTaskRepositories.GetListBy(billNos);
|
||||||
foreach (var entity in taskList)
|
foreach (var entity in taskList)
|
||||||
{
|
{
|
||||||
@@ -327,6 +327,10 @@ namespace WMS.Web.Domain.Services
|
|||||||
AssembledApp_sourceBillNos.Add(entity.SourceBillNo);
|
AssembledApp_sourceBillNos.Add(entity.SourceBillNo);
|
||||||
else if (entity.Type == InstockType.Miscellaneous)
|
else if (entity.Type == InstockType.Miscellaneous)
|
||||||
Miscellaneous_sourceBillNos.Add(entity.SourceBillNo);
|
Miscellaneous_sourceBillNos.Add(entity.SourceBillNo);
|
||||||
|
else if (entity.Type == InstockType.ProduceSotck)
|
||||||
|
ProduceStock_sourceBillNos.Add(entity.SourceBillNo);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Instock_sourceBillNos.Count() > 0)
|
if (Instock_sourceBillNos.Count() > 0)
|
||||||
@@ -364,6 +368,15 @@ namespace WMS.Web.Domain.Services
|
|||||||
if (!AssembledApp_result.IsSuccess)
|
if (!AssembledApp_result.IsSuccess)
|
||||||
return Result.ReFailure(AssembledApp_result.Message, AssembledApp_result.Status);
|
return Result.ReFailure(AssembledApp_result.Message, AssembledApp_result.Status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ProduceStock_sourceBillNos.Count() > 0)
|
||||||
|
{
|
||||||
|
//5.同步数据:生产汇报单
|
||||||
|
var ProduceStock_result = await this.SsynPurchaseInStock(ProduceStock_sourceBillNos, isTransaction);
|
||||||
|
if (!ProduceStock_result.IsSuccess)
|
||||||
|
return Result.ReFailure(ProduceStock_result.Message, ProduceStock_result.Status);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return Result.ReSuccess();
|
return Result.ReSuccess();
|
||||||
}
|
}
|
||||||
@@ -634,7 +647,7 @@ namespace WMS.Web.Domain.Services
|
|||||||
bool IsAny = details_Groups.Any(d => d.RealityQtyTotal != 0 && d.AccruedQtyTotal > d.RealityQtyTotal);
|
bool IsAny = details_Groups.Any(d => d.RealityQtyTotal != 0 && d.AccruedQtyTotal > d.RealityQtyTotal);
|
||||||
if (IsAny)
|
if (IsAny)
|
||||||
order.Status = InstockStatus.Part;
|
order.Status = InstockStatus.Part;
|
||||||
else if (details_Groups.Sum(x => x.ReceiveQtyTotal) <= 0 && order.Type == InstockType.Purchase)
|
else if (details_Groups.Sum(x => x.ReceiveQtyTotal) <= 0 && (order.Type == InstockType.Purchase || order.Type == InstockType.ProduceSotck))
|
||||||
order.Status = InstockStatus.Wait;
|
order.Status = InstockStatus.Wait;
|
||||||
else if (details_Groups.Sum(x => x.RealityQtyTotal) <= 0)
|
else if (details_Groups.Sum(x => x.RealityQtyTotal) <= 0)
|
||||||
{
|
{
|
||||||
@@ -805,7 +818,7 @@ namespace WMS.Web.Domain.Services
|
|||||||
List<string> TransferDirect_sourceBillNos = new List<string>();
|
List<string> TransferDirect_sourceBillNos = new List<string>();
|
||||||
List<string> Transferin_sourceBillNos = new List<string>();
|
List<string> Transferin_sourceBillNos = new List<string>();
|
||||||
List<string> AssembledApp_sourceBillNos = new List<string>();
|
List<string> AssembledApp_sourceBillNos = new List<string>();
|
||||||
// List<string> ProduceSotck_sourceBillNos = new List<string>();//生产入库
|
List<string> ProduceSotck_sourceBillNos = new List<string>();//生产入库
|
||||||
|
|
||||||
foreach (var entity in list)
|
foreach (var entity in list)
|
||||||
{
|
{
|
||||||
@@ -819,8 +832,8 @@ namespace WMS.Web.Domain.Services
|
|||||||
AssembledApp_sourceBillNos.Add(entity.SourceBillNo);
|
AssembledApp_sourceBillNos.Add(entity.SourceBillNo);
|
||||||
else if (entity.Type == InstockType.Miscellaneous)
|
else if (entity.Type == InstockType.Miscellaneous)
|
||||||
Miscellaneous_sourceBillNos.Add(entity.SourceBillNo);
|
Miscellaneous_sourceBillNos.Add(entity.SourceBillNo);
|
||||||
//else if (entity.Type == InstockType.ProduceSotck)
|
else if (entity.Type == InstockType.ProduceSotck)
|
||||||
// ProduceSotck_sourceBillNos.Add(entity.SourceBillNo);
|
ProduceSotck_sourceBillNos.Add(entity.SourceBillNo);
|
||||||
}
|
}
|
||||||
|
|
||||||
//if (ProduceSotck_sourceBillNos.Count() > 0)//生产入库
|
//if (ProduceSotck_sourceBillNos.Count() > 0)//生产入库
|
||||||
|
|||||||
@@ -80,5 +80,12 @@ namespace WMS.Web.Domain.Values
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[EnumRemark("盘点单")]
|
[EnumRemark("盘点单")]
|
||||||
Take = 14,
|
Take = 14,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 盘点单
|
||||||
|
/// </summary>
|
||||||
|
[EnumRemark("生产入库")]
|
||||||
|
ProduceSotck_In = 15,
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user