This commit is contained in:
tongfei
2023-11-24 14:29:57 +08:00
parent 9ab4575f19
commit 5f71e20802
9 changed files with 90 additions and 32 deletions

View File

@@ -680,7 +680,7 @@
明细
</summary>
</member>
<member name="M:WMS.Web.Domain.Entitys.InStockTask.Create(WMS.Web.Domain.Values.OrderType,System.String,System.DateTime)">
<member name="M:WMS.Web.Domain.Entitys.InStockTask.Create(WMS.Web.Domain.Values.InstockType,System.String,System.DateTime)">
<summary>
创建
</summary>
@@ -1523,7 +1523,7 @@
</summary>
<param name="outStockBillNo">出库单号</param>
</member>
<member name="M:WMS.Web.Domain.Entitys.SerialNumbers.InStock(System.String,WMS.Web.Domain.Values.OrderType)">
<member name="M:WMS.Web.Domain.Entitys.SerialNumbers.InStock(System.String,WMS.Web.Domain.Values.InstockType)">
<summary>
入库
</summary>
@@ -3408,6 +3408,20 @@
<param name="isTransaction"></param>
<returns></returns>
</member>
<member name="M:WMS.Web.Domain.Services.BoxInventoryService.OutStockTypeConvert(WMS.Web.Domain.Values.OutStockType)">
<summary>
出库类型转换为单据类型
</summary>
<param name="type"></param>
<returns></returns>
</member>
<member name="M:WMS.Web.Domain.Services.BoxInventoryService.InStockTypeConvert(WMS.Web.Domain.Values.InstockType)">
<summary>
入库类型转换为单据类型
</summary>
<param name="type"></param>
<returns></returns>
</member>
<member name="M:WMS.Web.Domain.Services.BoxInventoryService.HandlBoxInventory(System.Collections.Generic.List{WMS.Web.Core.Dto.Inventory.BoxInventoryGenerateDto},System.Boolean)">
<summary>
处理箱库存变更:出入库
@@ -3537,7 +3551,7 @@
<param name="boxBillNo"></param>
<returns></returns>
</member>
<member name="M:WMS.Web.Domain.Services.InStockService.ShelfSave(WMS.Web.Core.Dto.InStock.PurchaseShelfRequest,WMS.Web.Domain.Values.OrderType,WMS.Web.Core.Dto.Login.LoginInDto,System.Boolean)">
<member name="M:WMS.Web.Domain.Services.InStockService.ShelfSave(WMS.Web.Core.Dto.InStock.PurchaseShelfRequest,WMS.Web.Domain.Values.InstockType,WMS.Web.Core.Dto.Login.LoginInDto,System.Boolean)">
<summary>
采购上架-保存
</summary>
@@ -4465,7 +4479,7 @@
<param name="type"></param>
<returns></returns>
</member>
<member name="M:WMS.Web.Domain.Services.SerialNumberService.InStockTypeConvert(WMS.Web.Domain.Values.OrderType)">
<member name="M:WMS.Web.Domain.Services.SerialNumberService.InStockTypeConvert(WMS.Web.Domain.Values.InstockType)">
<summary>
出库单类型转化序列号记录类型
</summary>

View File

@@ -25,7 +25,7 @@ namespace WMS.Web.Domain.Entitys
/// <summary>
/// 入库类型
/// </summary>
public OrderType Type { get; set; }
public InstockType Type { get; set; }
/// <summary>
/// 入库方式1按箱2按产品
/// </summary>

View File

@@ -33,7 +33,7 @@ namespace WMS.Web.Domain.Entitys
/// <summary>
/// 入库类型
/// </summary>
public OrderType Type { get; set; }
public InstockType Type { get; set; }
/// <summary>
/// 收货人
/// </summary>
@@ -72,7 +72,7 @@ namespace WMS.Web.Domain.Entitys
/// <param name="type"></param>
/// <param name="sourceBillNo"></param>
/// <param name="createTime"></param>
public void Create(OrderType type,string sourceBillNo, DateTime createTime)
public void Create(InstockType type,string sourceBillNo, DateTime createTime)
{
this.Status = InstockStatus.Wait;
this.Type = type;

View File

@@ -99,9 +99,9 @@ namespace WMS.Web.Domain.Entitys
/// 入库
/// </summary>
/// <param name="inStockBillNo">出库单号</param>
public void InStock(string inStockBillNo, OrderType type)
public void InStock(string inStockBillNo, InstockType type)
{
if (type == OrderType.Purchase_In)
if (type == InstockType.Purchase)
this.InStockBillNo = inStockBillNo;
}
}

View File

@@ -524,7 +524,7 @@ namespace WMS.Web.Domain.Services
var inventoryInOutDet = _inventoryInOutDetailsService.GenerateDto(
item.BoxId, item.MaterialId,
item.OrgCode, item.StockCode,
item.SubStockId, entity.Type,
item.SubStockId, InStockTypeConvert(entity.Type),
item.SourceBillNo, item.Qty, InventoryInOutType.In);
InventoryInOutDetailsGenerateDtoList.Add(inventoryInOutDet);
}
@@ -1337,8 +1337,52 @@ namespace WMS.Web.Domain.Services
}
/// <summary>
/// 出库类型转换为单据类型
/// </summary>
/// <param name="type"></param>
/// <returns></returns>
private OrderType OutStockTypeConvert(OutStockType type)
{
switch (type)
{
case OutStockType.Sal:
return OrderType.Sal_Out;
case OutStockType.Assembled:
return OrderType.Assembled_Out;
case OutStockType.Miscellaneous:
return OrderType.Miscellaneous_Out;
case OutStockType.Stkdirecttransfers:
return OrderType.Stkdirecttransfers_Out;
case OutStockType.StktransferInst:
return OrderType.StktransferInst_Out;
default:
return OrderType.StktransferInst_Out;
}
}
/// <summary>
/// 入库类型转换为单据类型
/// </summary>
/// <param name="type"></param>
/// <returns></returns>
private OrderType InStockTypeConvert(InstockType type)
{
switch (type)
{
case InstockType.Purchase:
return OrderType.Purchase_In;
case InstockType.Assembled:
return OrderType.Assembled_In;
case InstockType.Miscellaneous:
return OrderType.Miscellaneous_In;
case InstockType.Stkdirecttransfers:
return OrderType.Stkdirecttransfers_In;
case InstockType.StktransferInst:
return OrderType.StktransferInst_In;
default:
return OrderType.StktransferInst_In;
}
}

View File

@@ -99,7 +99,7 @@ namespace WMS.Web.Domain.Services
bool isRollback = false;
bool isTransaction = false;
//1.添加入库单同步金蝶在save方法里面进行
var save_result = await this.ShelfSave(instock, OrderType.Purchase_In, loginInfo, isTransaction);
var save_result = await this.ShelfSave(instock, InstockType.Purchase, loginInfo, isTransaction);
if (!save_result.IsSuccess) isRollback = true;
{
//2.修改入库任务单
@@ -192,7 +192,7 @@ namespace WMS.Web.Domain.Services
/// <param name="staffId"></param>
/// <param name="isTransaction"></param>
/// <returns></returns>
private async Task<Result> ShelfSave(PurchaseShelfRequest dto, OrderType type, LoginInDto loginInfo, bool isTransaction = true)
private async Task<Result> ShelfSave(PurchaseShelfRequest dto, InstockType type, LoginInDto loginInfo, bool isTransaction = true)
{
var entity = new InStock();
entity.Type = type;

View File

@@ -62,27 +62,27 @@ namespace WMS.Web.Domain.Services
var billNos = new List<string>();
billNos.Add(sourceBillNo);
//3.1订单类型-进去金蝶交互更新
if (task.Type == OrderType.Purchase_In)
if (task.Type == InstockType.Purchase)
{
var result = await this.SsynPurchaseInStock(billNos, isTransaction);
if (!result.IsSuccess) isRollback = true;
}
else if (task.Type == OrderType.Miscellaneous_In)
else if (task.Type == InstockType.Miscellaneous)
{
var result = await this.SysnMiscellaneous(billNos, isTransaction);
if (!result.IsSuccess) isRollback = true;
}
else if (task.Type == OrderType.Assembled_In)
else if (task.Type == InstockType.Assembled)
{
var result = await this.SysnAssembledApp(billNos, isTransaction);
if (!result.IsSuccess) isRollback = true;
}
else if (task.Type == OrderType.Stkdirecttransfers_In)
else if (task.Type == InstockType.Stkdirecttransfers)
{
var result = await this.SysnTransferDirect(billNos, isTransaction);
if (!result.IsSuccess) isRollback = true;
}
else if (task.Type == OrderType.StktransferInst_In)
else if (task.Type == InstockType.StktransferInst)
{
var result = await this.SysnTransferin(billNos, isTransaction);
if (!result.IsSuccess) isRollback = true;
@@ -310,7 +310,7 @@ namespace WMS.Web.Domain.Services
{
var current_order= erp_list.Where(x => x.BillNo == item).FirstOrDefault();
var dto = new InStockTask();
dto.Create((OrderType)current_order.Type, current_order.BillNo, current_order.CreateTime);
dto.Create((InstockType)current_order.Type, current_order.BillNo, current_order.CreateTime);
//找到当前对应来源单据编号的集合数据
var current_erp_details = erp_list.Where(x => x.BillNo == item).ToList();

View File

@@ -232,7 +232,7 @@ namespace WMS.Web.Domain.Services.Public
lis.StockCode = item[9];
lis.DeliveredQty = Convert.ToDecimal(item[10]);
lis.OrgCode = item[11];
lis.Type = (int)OrderType.Purchase_In;
lis.Type = (int)InstockType.Purchase;
erp_list.Add(lis);
}
return ResultList<ErpInStockResultDto>.ReSuccess(erp_list);
@@ -336,7 +336,7 @@ namespace WMS.Web.Domain.Services.Public
lis.CreateTime = Convert.ToDateTime(item[6]);
lis.Remark = item[7];
lis.OrgCode = item[8];
lis.Type = (int)OrderType.Miscellaneous_In;
lis.Type = (int)InstockType.Miscellaneous;
erp_list.Add(lis);
}
return ResultList<ErpInStockResultDto>.ReSuccess(erp_list);
@@ -440,7 +440,7 @@ namespace WMS.Web.Domain.Services.Public
lis.CreateTime = Convert.ToDateTime(item[6]);
lis.Remark = item[7];
lis.OrgCode = item[8];
lis.Type = (int)OrderType.Stkdirecttransfers_In;
lis.Type = (int)InstockType.Stkdirecttransfers;
erp_list.Add(lis);
}
return ResultList<ErpInStockResultDto>.ReSuccess(erp_list);
@@ -544,7 +544,7 @@ namespace WMS.Web.Domain.Services.Public
lis.CreateTime = Convert.ToDateTime(item[6]);
lis.Remark = item[7];
lis.OrgCode = item[8];
lis.Type = (int)OrderType.StktransferInst_In;
lis.Type = (int)InstockType.StktransferInst;
erp_list.Add(lis);
}
return ResultList<ErpInStockResultDto>.ReSuccess(erp_list);
@@ -649,7 +649,7 @@ namespace WMS.Web.Domain.Services.Public
lis.CreateTime = Convert.ToDateTime(item[6]);
lis.Remark = item[7];
lis.OrgCode = item[8];
lis.Type = (int)OrderType.Assembled_In;
lis.Type = (int)InstockType.Assembled;
erp_list.Add(lis);
}
return ResultList<ErpInStockResultDto>.ReSuccess(erp_list);
@@ -754,7 +754,7 @@ namespace WMS.Web.Domain.Services.Public
lis.CreateTime = Convert.ToDateTime(item[6]);
lis.Remark = item[7];
lis.OrgCode = item[8];
lis.Type = (int)OrderType.Assembled_In;
lis.Type = (int)InstockType.Assembled;
erp_list.Add(lis);
}
return ResultList<ErpInStockResultDto>.ReSuccess(erp_list);

View File

@@ -261,19 +261,19 @@ namespace WMS.Web.Domain.Services
/// </summary>
/// <param name="type"></param>
/// <returns></returns>
private SerialNumberOperateType InStockTypeConvert(OrderType type)
private SerialNumberOperateType InStockTypeConvert(InstockType type)
{
switch (type)
{
case OrderType.Purchase_In:
case InstockType.Purchase:
return SerialNumberOperateType.Purchase_In;
case OrderType.Assembled_In:
case InstockType.Assembled:
return SerialNumberOperateType.Assembled_In;
case OrderType.Miscellaneous_In:
case InstockType.Miscellaneous:
return SerialNumberOperateType.Miscellaneous_In;
case OrderType.Stkdirecttransfers_In:
case InstockType.Stkdirecttransfers:
return SerialNumberOperateType.Stkdirecttransfers_In;
case OrderType.StktransferInst_In:
case InstockType.StktransferInst:
return SerialNumberOperateType.StktransferInst_In;
default:
return SerialNumberOperateType.StktransferInst_In;