修改入库
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)
|
||||
{
|
||||
if (type == InstockType.Purchase)
|
||||
{
|
||||
this.Status = InstockStatus.Wait;
|
||||
}
|
||||
|
||||
else if (type == InstockType.ProduceSotck)
|
||||
{
|
||||
this.Status = InstockStatus.Wait;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Status = InstockStatus.WaitInStock;
|
||||
}
|
||||
this.Type = type;
|
||||
this.SourceBillNo = sourceBillNo;
|
||||
this.SupplierId = supplierId;
|
||||
@@ -205,6 +212,8 @@ namespace WMS.Web.Domain.Entitys
|
||||
this.Status = InstockStatus.Already;
|
||||
else if (totalReceiveQty <= 0 && this.Type == InstockType.Purchase)
|
||||
this.Status = InstockStatus.Wait;
|
||||
else if (totalReceiveQty <= 0 && this.Type == InstockType.ProduceSotck)
|
||||
this.Status = InstockStatus.Wait;
|
||||
else if (totalRealityQty <= 0)
|
||||
this.Status = InstockStatus.WaitInStock;
|
||||
else
|
||||
|
||||
@@ -2016,6 +2016,9 @@ namespace WMS.Web.Domain.Services
|
||||
return OrderType.Stkdirecttransfers_In;
|
||||
case InstockType.StktransferInst:
|
||||
return OrderType.StktransferInst_In;
|
||||
case InstockType.ProduceSotck:
|
||||
return OrderType.ProduceSotck_In;
|
||||
|
||||
default:
|
||||
return OrderType.StktransferInst_In;
|
||||
}
|
||||
|
||||
@@ -313,7 +313,7 @@ namespace WMS.Web.Domain.Services
|
||||
List<string> TransferDirect_sourceBillNos = new List<string>();
|
||||
List<string> Transferin_sourceBillNos = new List<string>();
|
||||
List<string> AssembledApp_sourceBillNos = new List<string>();
|
||||
|
||||
List<string> ProduceStock_sourceBillNos = new List<string>();
|
||||
var taskList = await _inStockTaskRepositories.GetListBy(billNos);
|
||||
foreach (var entity in taskList)
|
||||
{
|
||||
@@ -327,6 +327,10 @@ namespace WMS.Web.Domain.Services
|
||||
AssembledApp_sourceBillNos.Add(entity.SourceBillNo);
|
||||
else if (entity.Type == InstockType.Miscellaneous)
|
||||
Miscellaneous_sourceBillNos.Add(entity.SourceBillNo);
|
||||
else if (entity.Type == InstockType.ProduceSotck)
|
||||
ProduceStock_sourceBillNos.Add(entity.SourceBillNo);
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (Instock_sourceBillNos.Count() > 0)
|
||||
@@ -364,6 +368,15 @@ namespace WMS.Web.Domain.Services
|
||||
if (!AssembledApp_result.IsSuccess)
|
||||
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();
|
||||
}
|
||||
@@ -634,16 +647,16 @@ namespace WMS.Web.Domain.Services
|
||||
bool IsAny = details_Groups.Any(d => d.RealityQtyTotal != 0 && d.AccruedQtyTotal > d.RealityQtyTotal);
|
||||
if (IsAny)
|
||||
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;
|
||||
else if (details_Groups.Sum(x => x.RealityQtyTotal) <= 0)
|
||||
{
|
||||
//if (order.Type == InstockType.ProduceSotck)
|
||||
// {
|
||||
// order.Status = InstockStatus.Wait;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
//if (order.Type == InstockType.ProduceSotck)
|
||||
//{
|
||||
// order.Status = InstockStatus.Wait;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
order.Status = InstockStatus.WaitInStock;
|
||||
//}
|
||||
}
|
||||
@@ -805,7 +818,7 @@ namespace WMS.Web.Domain.Services
|
||||
List<string> TransferDirect_sourceBillNos = new List<string>();
|
||||
List<string> Transferin_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)
|
||||
{
|
||||
@@ -819,8 +832,8 @@ namespace WMS.Web.Domain.Services
|
||||
AssembledApp_sourceBillNos.Add(entity.SourceBillNo);
|
||||
else if (entity.Type == InstockType.Miscellaneous)
|
||||
Miscellaneous_sourceBillNos.Add(entity.SourceBillNo);
|
||||
//else if (entity.Type == InstockType.ProduceSotck)
|
||||
// ProduceSotck_sourceBillNos.Add(entity.SourceBillNo);
|
||||
else if (entity.Type == InstockType.ProduceSotck)
|
||||
ProduceSotck_sourceBillNos.Add(entity.SourceBillNo);
|
||||
}
|
||||
|
||||
//if (ProduceSotck_sourceBillNos.Count() > 0)//生产入库
|
||||
|
||||
@@ -80,5 +80,12 @@ namespace WMS.Web.Domain.Values
|
||||
/// </summary>
|
||||
[EnumRemark("盘点单")]
|
||||
Take = 14,
|
||||
|
||||
/// <summary>
|
||||
/// 盘点单
|
||||
/// </summary>
|
||||
[EnumRemark("生产入库")]
|
||||
ProduceSotck_In = 15,
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user