From 695571c6009ecbc12e7d4a4fb147df7967a1260e Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期一, 07 七月 2025 20:21:19 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/MeiRuiAn/HuaiAn
---
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/WarehouseService.cs | 25 ++++++++++++++++++++++++-
1 files changed, 24 insertions(+), 1 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/WarehouseService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/WarehouseService.cs"
index 1353a56..768ee2f 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/WarehouseService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Service/WarehouseService.cs"
@@ -3,14 +3,37 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using WIDESEA_Core;
using WIDESEA_Core.BaseServices;
+using WIDESEA_Core.Helper;
+using WIDESEA_Core.HostedService;
+using WIDESEA_DTO.System;
using WIDESEA_IBasicRepository;
using WIDESEA_IBasicService;
using WIDESEA_Model.Models;
namespace WIDESEA_BasicService
{
- public partial class WarehouseService : ServiceBase<Dt_Warehouse, IWarehouseRepository>, IWarehouseService
+ public partial class WarehouseService
{
+ public WebResponseContent GetWarehouseDicByUser()
+ {
+ try
+ {
+ List<int> warehouseIds = Db.Queryable<Sys_RoleDataPermission>().Where(x => x.RoleId == App.User.RoleId).Select(x => x.WarehouseId).ToList();
+ List<DictionaryDTO> dic = Repository.QueryData(x => new DictionaryDTO { Key = x.WarehouseId, Value = x.WarehouseName + $"({x.WarehouseCode})" }, x => warehouseIds.Contains(x.WarehouseId)).ToList();
+ List<Dt_PalletTypeInfo> palletTypeInfos = _palletTypeInfoRepository.QueryData();//x => x.TypeName + $"({x.CodeStartStr})", x => true
+ dic.ForEach(x =>
+ {
+ x.Extra = palletTypeInfos.Where(v => v.WarehouseId == x.Key.ObjToInt()).Select(x => new DictionaryDTO { Key = x.Id, Value = x.TypeName + $"({x.CodeStartStr})" }).ToList();
+ });
+
+ return WebResponseContent.Instance.OK(data: dic);
+ }
+ catch (Exception ex)
+ {
+ return WebResponseContent.Instance.Error(ex.Message);
+ }
+ }
}
}
--
Gitblit v1.9.3