From fe256a7afaa132910875d3dc73783d9ab2d7ace5 Mon Sep 17 00:00:00 2001
From: liulijun <liulijun@hnkhzn.com>
Date: 星期四, 12 三月 2026 18:57:44 +0800
Subject: [PATCH] 老厂排程单页面增加用纸顺序号和是否缺料
---
项目代码/WMS/WMSServices/WIDESEA_BasicService/Base/LocationInfoService.cs | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 56 insertions(+), 4 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_BasicService/Base/LocationInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_BasicService/Base/LocationInfoService.cs"
index b3f1bf3..0f6bef4 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_BasicService/Base/LocationInfoService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_BasicService/Base/LocationInfoService.cs"
@@ -32,13 +32,65 @@
private readonly IUnitOfWorkManage _unitOfWorkManage;
private readonly IBasicRepository _basicRepository;
private readonly IStockInfoRepository _stockInfoRepository;
+ private readonly IProStockInfoRepository _proStockInfoRepository;
public ILocationInfoRepository Repository => BaseDal;
- public LocationInfoService(ILocationInfoRepository BaseDal, IUnitOfWorkManage unitOfWorkManage, IBasicRepository basicRepository, IStockInfoRepository stockInfoRepository) : base(BaseDal)
+ public LocationInfoService(ILocationInfoRepository BaseDal, IUnitOfWorkManage unitOfWorkManage, IBasicRepository basicRepository, IStockInfoRepository stockInfoRepository, IProStockInfoRepository proStockInfoRepository) : base(BaseDal)
{
_unitOfWorkManage = unitOfWorkManage;
_basicRepository = basicRepository;
_stockInfoRepository = stockInfoRepository;
+ _proStockInfoRepository = proStockInfoRepository;
+ }
+
+ /// <summary>
+ /// 鏌ヨ璐т綅瀵瑰簲鐨凴FID
+ /// </summary>
+ /// <param name="locationCodes"></param>
+ /// <returns></returns>
+ public WebResponseContent GetRfid(string[] locationCodes, int warehouseId = 0)
+ {
+ try
+ {
+ // 鍙傛暟楠岃瘉
+ if (locationCodes == null || locationCodes.Length == 0)
+ {
+ return WebResponseContent.Instance.Error("璐т綅缂栧彿涓嶈兘涓虹┖");
+ }
+
+ if (warehouseId == 1)
+ {
+ // 鏌ヨ鍘熸枡搴揇t_StockInfo琛紝鑾峰彇RFID淇℃伅
+ var rawMaterialRfidList = _stockInfoRepository.QueryData()
+ .Where(x => locationCodes.Contains(x.LocationCode))
+ .Select(x => new { x.LocationCode, x.RfidCode })
+ .ToList();
+
+ var rfidList = rawMaterialRfidList.ToList();
+ // 杩斿洖缁撴灉
+ return WebResponseContent.Instance.OK(data: rfidList);
+ }
+
+ if (warehouseId == 2)
+ {
+ // 鏌ヨ鎴愬搧搴揇t_ProStockInfo琛紝鑾峰彇PalletCode淇℃伅
+ var finishedProductRfidList =_proStockInfoRepository.QueryData()
+ .Where(x => locationCodes.Contains(x.LocationCode))
+ .Select(x => new { x.LocationCode, RfidCode = x.PalletCode })
+ .ToList();
+
+ var rfidList = finishedProductRfidList.ToList();
+ // 杩斿洖缁撴灉
+ return WebResponseContent.Instance.OK(data: rfidList);
+ }
+ // 濡傛灉娌℃湁鍖归厤鐨勪粨搴揑D锛岃繑鍥炵┖鍒楄〃
+ return WebResponseContent.Instance.OK(data: new List<object>());
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine($"GetRfid 寮傚父: {ex.Message}");
+ return WebResponseContent.Instance.Error(ex.Message);
+ }
}
/// <summary>
@@ -133,7 +185,7 @@
Dt_LocationInfo locationInfo = new Dt_LocationInfo()
{
WarehouseId = 0,
- Column = j + 1,
+ Columns = j + 1,
EnableStatus = EnableStatusEnum.Normal.ObjToInt(),
Layer = k + 1,
LocationStatus = LocationStatusEnum.Free.ObjToInt(),
@@ -142,8 +194,8 @@
Row = i + 1,
Depth = depth,
};
- locationInfo.LocationCode = $"{locationInfo.RoadwayNo}-{locationInfo.Row.ToString().PadLeft(3, '0')}-{locationInfo.Column.ToString().PadLeft(3, '0')}-{locationInfo.Layer.ToString().PadLeft(3, '0')}-{locationInfo.Depth.ToString().PadLeft(2, '0')}";
- locationInfo.LocationName = $"{locationInfo.RoadwayNo}宸烽亾{locationInfo.Row.ToString().PadLeft(3, '0')}琛寋locationInfo.Column.ToString().PadLeft(3, '0')}鍒梴locationInfo.Layer.ToString().PadLeft(3, '0')}灞倇locationInfo.Depth.ToString().PadLeft(2, '0')}娣�";
+ locationInfo.LocationCode = $"{locationInfo.RoadwayNo}-{locationInfo.Row.ToString().PadLeft(3, '0')}-{locationInfo.Columns.ToString().PadLeft(3, '0')}-{locationInfo.Layer.ToString().PadLeft(3, '0')}-{locationInfo.Depth.ToString().PadLeft(2, '0')}";
+ locationInfo.LocationName = $"{locationInfo.RoadwayNo}宸烽亾{locationInfo.Row.ToString().PadLeft(3, '0')}琛寋locationInfo.Columns.ToString().PadLeft(3, '0')}鍒梴locationInfo.Layer.ToString().PadLeft(3, '0')}灞倇locationInfo.Depth.ToString().PadLeft(2, '0')}娣�";
locationInfos.Add(locationInfo);
}
}
--
Gitblit v1.9.3