修改了单据编码不能为空

This commit is contained in:
2026-07-31 16:24:08 +08:00
parent 7aa5c14458
commit 8090ea999c
7 changed files with 72 additions and 2 deletions

View File

@@ -1267,6 +1267,21 @@
物料规格型号
</summary>
</member>
<member name="P:WMS.Web.Core.Dto.Erp.uc_warehouse_position.Id">
<summary>
Id
</summary>
</member>
<member name="P:WMS.Web.Core.Dto.Erp.uc_warehouse_position.position_code">
<summary>
编码
</summary>
</member>
<member name="P:WMS.Web.Core.Dto.Erp.uc_warehouse_position.position">
<summary>
名称
</summary>
</member>
<member name="T:WMS.Web.Core.Dto.Erp.ErpMaterialDto">
<summary>
对应金蝶,物料信息

View File

@@ -6212,6 +6212,14 @@
<param name="materialId"></param>
<returns></returns>
</member>
<member name="M:WMS.Web.Domain.Services.Public.ErpBasicDataExtendService.Getuc_warehouse_position(System.Collections.Generic.List{WMS.Web.Core.Dto.Erp.uc_warehouse_position},System.String)">
<summary>
获取物料规格型号
</summary>
<param name="erpMaterials"></param>
<param name="materialId"></param>
<returns></returns>
</member>
<member name="M:WMS.Web.Domain.Services.Public.ErpBasicDataExtendService.GetMaterialName(System.Collections.Generic.List{WMS.Web.Core.Dto.Erp.ErpMaterialDto},System.String)">
<summary>
获取物料名称

View File

@@ -15,6 +15,24 @@ namespace WMS.Web.Core.Dto.Erp
/// </summary>
public string Specifications { get; set; }
}
public class uc_warehouse_position
{
/// <summary>
/// Id
/// </summary>
public int Id { get; set; }
/// <summary>
/// 编码
/// </summary>
public string position_code { get; set; }
/// <summary>
/// 名称
/// </summary>
public string position { get; set; }
}
/// <summary>
/// 对应金蝶,物料信息
/// </summary>

View File

@@ -86,6 +86,8 @@ namespace WMS.Web.Domain.IService.Public
/// <returns></returns>
string GetMaterialSpecifications(List<ErpMaterialDto> erpMaterials, string materialNumber);
string Getuc_warehouse_position(List<uc_warehouse_position> warehouse_position, string positionCode);
/// <summary>
/// 获取物料基本单位名称
/// </summary>

View File

@@ -1197,9 +1197,10 @@ namespace WMS.Web.Domain.Services
_logger.LogInformation($"入库单->保存失败 单号:{billNo} erp明细Id:{erpDetail.ErpDetailId} 错误:{res_s.Message}");
return (Result.ReFailure(res_s.Message, res_s.Status), SyncStatus.SubmitFail, "", purchaseInStock.Details[0].DetailId);
}
//提交
_logger.LogInformation($"入库单->保存成功 开始提交 单号:{billNo} erp明细Id:{erpDetail.ErpDetailId}");
_logger.LogInformation($"入库单->保存成功 开始提交 单号:{billNo} erp明细Id:{erpDetail.ErpDetailId},提交的数据{res_s.Data}");
ErpOperateDto o_dto = new ErpOperateDto(formId, res_s.Data);//res_s.Data
var resSubmit = await sc_erpService.Submit(o_dto, formId);
if (!resSubmit.IsSuccess)
@@ -1343,6 +1344,9 @@ namespace WMS.Web.Domain.Services
_logger.LogInformation($"入库单->保存失败 单号:{billNo} erp明细Id:{erpDetail.ErpDetailId} 错误:{res_s.Message}");
return (Result.ReFailure(res_s.Message, res_s.Status), SyncStatus.SubmitFail, currentDet.OrderId, det.DetailId);
}
List<String> list = new List<String>();
list.Add(res_s.Data.ToString());
o_dto.Numbers = list;
//提交
_logger.LogInformation($"入库单->保存成功 开始提交 单号:{billNo} erp明细Id:{erpDetail.ErpDetailId}");

View File

@@ -98,6 +98,25 @@ namespace WMS.Web.Domain.Services.Public
return mat.Specifications;
}
/// <summary>
/// 获取物料规格型号
/// </summary>
/// <param name="erpMaterials"></param>
/// <param name="materialId"></param>
/// <returns></returns>
public string Getuc_warehouse_position(List<uc_warehouse_position> warehouse_position, string positionCode)
{
if (warehouse_position == null || warehouse_position.Count == 0)
return "";
var mat = warehouse_position.Where(x => x.position_code == positionCode).FirstOrDefault();
if (mat == null)
{
return "";
}
return mat.position;
}
/// <summary>
/// 获取物料名称
/// </summary>

View File

@@ -22,6 +22,7 @@ using WMS.Web.Domain.Mappers;
using WMS.Web.Domain.Values;
using WMS.Web.Domain.Values.Single;
using WMS.Web.Repositories.Configuration;
using uc_warehouse_position = WMS.Web.Core.Dto.Erp.uc_warehouse_position;
namespace WMS.Web.Repositories
{
@@ -142,7 +143,9 @@ namespace WMS.Web.Repositories
//取仓位
var positions = new List<uc_warehouse_position>();
var postionList = await _boxRepositories.Getuc_warehouse_position();
//positions = postionList
//1.获取物料集合和组织集合和供应商的集合
var materials = new List<ErpMaterialDto>();
@@ -204,7 +207,8 @@ namespace WMS.Web.Repositories
RealityQty = x.detail.Qty,
ReceiveQty = x.detail.Qty,
ShelfTime = x.order.CreateTime.ToString("yyyy-MM-dd HH:mm:ss"),
shelfSpaceCode=x.order.SubStockCode,
shelfSpaceCode= _erpBasicDataExtendService.Getuc_warehouse_position(positions, x.order.SubStockCode),
shelfSpace = x.order.SubStockCode,
Shelfer = _singleDataService.GetSingleData(SingleAction.Staffs, companyId, x.order.CreatorId),
Receiver = "",