From cee72e16c01608b462b7eca6e1d11bd02828c52c Mon Sep 17 00:00:00 2001 From: zhougf Date: Sun, 26 Apr 2026 22:35:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=9C=AA=E5=9B=9E=E4=BC=A0?= =?UTF-8?q?=E5=BA=93=E5=AD=98=EF=BC=8C=E6=9B=B4=E6=96=B0=E5=BA=93=E5=AD=98?= =?UTF-8?q?uploadflag=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HHWMS.Web/Areas/Api/IDataController.cs | 44 ++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/HHWMS.Web/Areas/Api/IDataController.cs b/HHWMS.Web/Areas/Api/IDataController.cs index da93c7e..bea234a 100644 --- a/HHWMS.Web/Areas/Api/IDataController.cs +++ b/HHWMS.Web/Areas/Api/IDataController.cs @@ -244,5 +244,49 @@ namespace HHWMS.Web return ApiResult(result); } + [HttpPost("FindUnUpload")] + public IActionResult FindUnUpload(string warehousecode) + { + var data = _unitWork.Find(x => + x.ZoneId == (warehousecode == "xb" ? 1027 : 1025) + && x.UploadErpFlag != 1) + .Select(x => new InventoryApi_View + { + ID = x.ID, + WareHouse = x.ZoneId == 1027 ? "xb" : x.ZoneId == 1028 ? "cp" : "mj" , + MaterialCode = x.MaterialCode, + FigureNo = x.MaterialType, + MaterialName = x.MaterialName, + MaterialSpec = x.MaterialSpec, + SourceCode = x.SourceCode ?? "", + MoDetailId = x.ReceiptDetailId ?? "", + Company = x.CompanyCode ?? "", + Remark = x.Batch ?? "", + BatchCode = x.BatchCode ?? "", + SuFigureNo = x.SupplierCode, + LocationCode = x.LocationCode, + Qty = x.Qty, + Createtime = x.CreateTime, + NextBatch = x.Lot, + UpdateTime = x.UpdateTime, + UploadFlag = x.UploadErpFlag + }); + return ApiResult(data); + } + + [HttpPost("SetUploadById")] + public IActionResult SetUploadById(int id) + { + var data = _unitWork.BatchUpdate(x => + x.ID == id, x => new Inventory() + { + UploadErpFlag = 1, + UpdateBy = "ERP", + UpdateTime = DateTime.Now, + } + ); + + return ApiResult(); + } } } \ No newline at end of file