signalr 取消,长时间会有问题,打开浏览器会白屏
对接erp,接口 线边任务完成根据detailid,分入库 出库报工 todo 成品的报工(定时器回传 or 入库/拣货的时候回传)
This commit is contained in:
1 parent
00119151c9
commit
c3ec557c4d
19 files changed
+403
-362
No files matched your search
@@ -0,0 +1,54 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
using WalkingTec.Mvvm.Core.Extensions;
|
||||
using WalkingTec.Mvvm.Mvc;
|
||||
using HHWMS.Web;
|
||||
using HHWMS.Web.Models;
|
||||
|
||||
|
||||
namespace HHWMS.Web.Controllers
|
||||
{
|
||||
[Area("inventory")]
|
||||
[Public]
|
||||
[ActionDescription("库存管理")]
|
||||
[ApiController]
|
||||
[Route("api/Inventory")]
|
||||
public partial class InventoryApiController : BaseApiController
|
||||
{
|
||||
[ActionDescription("Sys.Search")]
|
||||
[HttpPost("Search")]
|
||||
[Public]
|
||||
public IActionResult Search(InventoryApiSearcher searcher)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
{
|
||||
var vm = Wtm.CreateVM<InventoryApiListVM>(passInit: true);
|
||||
searcher.SortInfo = new SortInfo()
|
||||
{
|
||||
Property = "MaterialCode",
|
||||
Direction = SortDir.Asc
|
||||
};
|
||||
searcher.IsPlainText = false;
|
||||
searcher.IsEnumToString = true;
|
||||
vm.Searcher = searcher;
|
||||
|
||||
if (searcher.WareHouse.ToLower() == "mj")
|
||||
vm.Searcher.ZoneId = 1025;
|
||||
else if (searcher.WareHouse.ToLower() == "xb")
|
||||
vm.Searcher.ZoneId = 1027;
|
||||
else if (searcher.WareHouse.ToLower() == "cp")
|
||||
vm.Searcher.ZoneId = 1028;
|
||||
|
||||
var data = vm.GetJson();
|
||||
return Content(data);
|
||||
}
|
||||
else
|
||||
{
|
||||
return BadRequest(ModelState.GetErrorJson());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -549,6 +549,10 @@ namespace HHWMS.Web.Controllers
|
||||
{
|
||||
return FFResult().Alert("所选库存没关联订单,无需回传!").RefreshGrid();
|
||||
}
|
||||
if (inv.UploadErpFlag == 0)
|
||||
{
|
||||
return FFResult().Alert("所选库存已报工回传,无需再次回传!").RefreshGrid();
|
||||
}
|
||||
|
||||
// 构建ERP请求
|
||||
// 字段映射参照 ReceiptInController:
|
||||
@@ -562,8 +566,8 @@ namespace HHWMS.Web.Controllers
|
||||
{
|
||||
Main = new FinishInMain
|
||||
{
|
||||
ErpCode = "999", // 账套号
|
||||
InCode = $"{inv.SourceCode}-{DateTime.Now.Ticks}", // 报工单号(上游单号)
|
||||
ErpCode = "002", // 账套号
|
||||
InCode = _unitWork.GetSerialNumber("RW"), // 报工单号(上游单号)
|
||||
InDate = (inv.CreateTime ?? DateTime.Now).ToString("yyyy-MM-dd"), // 报工日期
|
||||
StepCode = inv.BatchCode, // 工序(批次编码)
|
||||
WorkerCode = inv.CreateBy, // 工人编码(创建人)
|
||||
|
||||
Reference in new issue
Block a user