From 03a06f173db1be72a419679bbb01489399ab28aa Mon Sep 17 00:00:00 2001 From: hehaibing-1996 Date: Mon, 10 Mar 2025 19:10:30 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=AF=BC=E5=85=A5=E6=97=B6=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E6=89=80=E6=9C=89=E7=89=A9=E6=96=99=E4=B8=BA=E5=90=AF=E7=94=A8?= =?UTF-8?q?=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PDA/PDA/pages/bind/bind.vue | 1 + WCS.BLL/Services/Service/MatBaseInfoService.cs | 2 +- WCS.WebApi/Controllers/MatBaseInfoController.cs | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/PDA/PDA/pages/bind/bind.vue b/PDA/PDA/pages/bind/bind.vue index 26f1ad5..4c568f0 100644 --- a/PDA/PDA/pages/bind/bind.vue +++ b/PDA/PDA/pages/bind/bind.vue @@ -305,6 +305,7 @@ if (typeIndex + 1 < this.shelfTypeOptions.length) { this.selectedShelfTypeIndex = typeIndex; } + this.shelfAreaOptions = res.data.data.locationArea; var index = getConfig("bindSelectedShelfAreaIndex", 0); diff --git a/WCS.BLL/Services/Service/MatBaseInfoService.cs b/WCS.BLL/Services/Service/MatBaseInfoService.cs index adab4ae..2280829 100644 --- a/WCS.BLL/Services/Service/MatBaseInfoService.cs +++ b/WCS.BLL/Services/Service/MatBaseInfoService.cs @@ -164,7 +164,7 @@ namespace WCS.BLL.Services.Service MatUnit = mat.单位, MatCustomer = mat.客户, ModifyUser = userName, - IsEnable = mat.状态 == "启用" ? true : false, + IsEnable = true,//导入的数据默认启用 }; matBaseInfos.Add(matBaseInfo); } diff --git a/WCS.WebApi/Controllers/MatBaseInfoController.cs b/WCS.WebApi/Controllers/MatBaseInfoController.cs index ff063b7..c737e4e 100644 --- a/WCS.WebApi/Controllers/MatBaseInfoController.cs +++ b/WCS.WebApi/Controllers/MatBaseInfoController.cs @@ -84,6 +84,8 @@ namespace WCS.WebApi.Controllers var list = MiniExcelLibs.MiniExcel.Query(stream, "物料管理", ExcelType.XLSX).ToList(); //去除空白行 list.RemoveAll(x => string.IsNullOrWhiteSpace(x.物料编码)); + //去掉重复项 + list = list.Distinct().ToList(); return await _matBaseInfoService.importMatBaseInfo(list, userName, deviceType); }