测试多数据库访问和erp相关修改
This commit is contained in:
1 parent
68419bf7de
commit
22bfe9d015
14 files changed
+478
-294
No files matched your search
@@ -9,6 +9,7 @@ using WalkingTec.Mvvm.Mvc;
|
||||
using WalkingTec.Mvvm.Core.Extensions;
|
||||
using HHWMS.Web;
|
||||
using HHWMS.Web.Models;
|
||||
using Microsoft.AspNetCore.Routing;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace HHWMS.Web.Controllers
|
||||
@@ -239,7 +240,7 @@ namespace HHWMS.Web.Controllers
|
||||
[ActionDescription("GetReceiptDetails")]
|
||||
public ActionResult GetReceiptDetails()
|
||||
{
|
||||
var vm = Wtm.CreateVM<ReceiptHeaderVM>();
|
||||
var vm = Wtm.CreateVM<ReceiptDetailVM>();
|
||||
return PartialView(vm);
|
||||
}
|
||||
/// <summary>
|
||||
@@ -247,28 +248,31 @@ namespace HHWMS.Web.Controllers
|
||||
/// </summary>
|
||||
[HttpPost]
|
||||
[ActionDescription("GetReceiptDetails")]
|
||||
public async Task<IActionResult> GetReceiptDetails(ReceiptHeaderVM vm)
|
||||
public async Task<IActionResult> GetReceiptDetails(ReceiptDetailVM vm)
|
||||
{
|
||||
string receiptCode = vm.Entity.SourceCode;
|
||||
string tuhao = vm.Entity.MaterialType;
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(receiptCode))
|
||||
{
|
||||
return FFResult().Alert($"入库单单号不能为空");
|
||||
}
|
||||
// if (string.IsNullOrWhiteSpace(receiptCode))
|
||||
// {
|
||||
// return FFResult().Alert($"入库单单号不能为空");
|
||||
// }
|
||||
|
||||
// 根据入库单单号查找对应的 SourceCode(生产订单号)
|
||||
var header = _unitwork.FindSingle<ReceiptHeader>(h => h.SourceCode == receiptCode);
|
||||
if (header != null)
|
||||
{
|
||||
return FFResult().Alert($"已存在此入库单,单号:{receiptCode}");
|
||||
}
|
||||
// var header = _unitwork.FindSingle<ReceiptHeader>(h => h.SourceCode == receiptCode);
|
||||
// if (header != null)
|
||||
// {
|
||||
// return FFResult().Alert($"已存在此入库单,单号:{receiptCode}");
|
||||
// }
|
||||
|
||||
// 调用 ERP 接口获取该订单的最新数据
|
||||
var request = new LoadMoDetailListRequest
|
||||
{
|
||||
ErpCode = "002",
|
||||
MoCode = receiptCode, // 使用生产订单号查询
|
||||
ErpCode = "003",
|
||||
MoCode = receiptCode ?? "", // 使用生产订单号查询
|
||||
InvCode = vm.Entity?.MaterialCode ?? "",
|
||||
InvDefine1 = vm.Entity?.MaterialType ?? "",
|
||||
Size = 100,
|
||||
Page = 1
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user