From bbf733403f3a9e51da1f9aaff7438174e217e8bd Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期二, 23 十二月 2025 10:16:07 +0800
Subject: [PATCH] Merge branch 'htq20251215' of http://115.159.85.185:8098/r/ZhongRui/ALDbanyunxiangmu into htq20251215
---
项目代码/WMS无仓储版/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/SemanticSymbols.db | 0
/dev/null | 0
项目代码/WMS无仓储版/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/CodeChunks.db | 0
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs | 11 +++++
项目代码/WIDESEA_WMSClient/src/extension/outbound/outboundOrderDetail.js | 1
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs | 29 +++++++++-----
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_Common/LocationEnum/LocationTypeEnum.cs | 26 +++++++++----
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs | 2
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_Core/BaseRepository/RepositoryBase.cs | 9 +++-
9 files changed, 54 insertions(+), 24 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/outboundOrderDetail.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/outboundOrderDetail.js"
index 24e1d94..6292426 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/outboundOrderDetail.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEA_WMSClient/src/extension/outbound/outboundOrderDetail.js"
@@ -17,6 +17,7 @@
methods: {
//涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄�
onInit() {
+
},
onInited() {
//妗嗘灦鍒濆鍖栭厤缃悗
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/CodeChunks.db" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/CodeChunks.db"
index fdaab99..7daab4d 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/CodeChunks.db"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/CodeChunks.db"
Binary files differ
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/SemanticSymbols.db" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/SemanticSymbols.db"
index b492550..2644848 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/SemanticSymbols.db"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.1204.46620/SemanticSymbols.db"
Binary files differ
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.878.3237/CodeChunks.db-shm" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.878.3237/CodeChunks.db-shm"
deleted file mode 100644
index 90089a4..0000000
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.878.3237/CodeChunks.db-shm"
+++ /dev/null
Binary files differ
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.878.3237/SemanticSymbols.db-shm" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.878.3237/SemanticSymbols.db-shm"
deleted file mode 100644
index 05d54c7..0000000
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/CopilotIndices/17.14.878.3237/SemanticSymbols.db-shm"
+++ /dev/null
Binary files differ
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Common/LocationEnum/LocationTypeEnum.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Common/LocationEnum/LocationTypeEnum.cs"
index d97e18f..f1c8b7e 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Common/LocationEnum/LocationTypeEnum.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Common/LocationEnum/LocationTypeEnum.cs"
@@ -19,23 +19,33 @@
Normal = 0,
/// <summary>
+ /// -鑸潗鏂欏尯
+ /// </summary>
+ [Description("鏅轰粨--鑸潗鏂欎粨")]
+ Ordinary = 1,
+
+ /// <summary>
/// 涓嶈壇鍝佸尯
/// </summary>
- [Description("涓嶈壇鍝佸尯")]
- Defective = 1,
+ [Description("鏅轰粨-涓嶈壇鍝佷粨")]
+ Defective = 2,
/// <summary>
/// PCBA鍖�
/// </summary>
- [Description("PCBA鍖�")]
- PCBA = 2,
+ [Description("鏅轰粨-鐢靛瓙浠�")]
+ Electronic = 3,
/// <summary>
/// 淇濈◣鍖�
/// </summary>
- [Description("淇濈◣鍖�")]
- Bonded = 3,
+ [Description("鏅轰粨-淇濈◣鏉愭枡浠�")]
+ Bonded = 4,
-
-
+ [Description("鏅轰粨-鍖呮潗浠�")]
+ Package = 5,
+
+ [Description("鏅轰粨-璇曚骇浠�")]
+ TrialProduction = 6,
+
}
}
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Core/BaseRepository/RepositoryBase.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Core/BaseRepository/RepositoryBase.cs"
index aae83ad..a49d374 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Core/BaseRepository/RepositoryBase.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_Core/BaseRepository/RepositoryBase.cs"
@@ -873,7 +873,10 @@
{
Type type = entity.GetType();
Assembly assembly = type.Assembly;
- Type? htyType = assembly.GetType(type.FullName + "_Hty");
+
+ Type? htyType = assembly.GetTypes().FirstOrDefault(t => !t.IsInterface && !t.IsAbstract && type.IsAssignableFrom(t) && typeof(IBaseHistoryEntity).IsAssignableFrom(t));
+
+ //assembly.GetType(type.FullName + "_Hty");
if (htyType != null)
{
object? obj = Activator.CreateInstance(htyType);
@@ -892,7 +895,7 @@
PropertyInfo propertyInfo = propertyInfos[i];
PropertyInfo? property = type.GetProperty(propertyInfo.Name);
- if (property != null)
+ if (property != null && property.CanWrite)
{
if (propertyInfo.Name == nameof(BaseEntity.Modifier))
{
@@ -905,7 +908,7 @@
}
}
if (obj != null)
- _db.InsertableByObject(obj).AS(type.Name + "_Hty").ExecuteCommand();
+ _db.InsertableByObject(obj).AS(htyType.Name).ExecuteCommand();
}
}
return DeleteData(entity);
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
index fe908d7..ddabda4 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundOrderService.cs"
@@ -4,6 +4,7 @@
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using WIDESEA_Common.CommonEnum;
+using WIDESEA_Common.LocationEnum;
using WIDESEA_Common.OrderEnum;
using WIDESEA_Common.StockEnum;
using WIDESEA_Core;
@@ -43,10 +44,11 @@
private readonly IRepository<Dt_WarehouseArea> _warehouseAreaRepository;
private readonly IRepository<Dt_LocationType> _locationTypeRepository;
private readonly IRepository<Dt_StockInfo> _stockRepository;
+ private readonly IRepository<Dt_LocationInfo> _locationInfoRepository;
private readonly IBasicService _basicService;
public IRepository<Dt_InboundOrder> Repository => BaseDal;
- public InboundOrderService(IRepository<Dt_InboundOrder> BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IRepository<Dt_InboundOrderDetail> inboundOrderDetailRepository, IRepository<Dt_Task> taskRepository, IStockService stockService, IInboundOrderDetailService inboundOrderDetailService, IMaterialUnitService materialUnitService, IRepository<Dt_StockInfoDetail> stockDetailRepository, IRepository<Dt_InboundOrder> inboundOrderRepository, IRepository<Dt_WarehouseArea> warehouseAreaRepository, IRepository<Dt_StockInfo> stockRepository, IRepository<Dt_LocationType> locationTypeRepository, IMaterielInfoService materielInfoService, IBasicService basicService) : base(BaseDal)
+ public InboundOrderService(IRepository<Dt_InboundOrder> BaseDal, IMapper mapper, IUnitOfWorkManage unitOfWorkManage, IRepository<Dt_InboundOrderDetail> inboundOrderDetailRepository, IRepository<Dt_Task> taskRepository, IStockService stockService, IInboundOrderDetailService inboundOrderDetailService, IMaterialUnitService materialUnitService, IRepository<Dt_StockInfoDetail> stockDetailRepository, IRepository<Dt_InboundOrder> inboundOrderRepository, IRepository<Dt_WarehouseArea> warehouseAreaRepository, IRepository<Dt_StockInfo> stockRepository, IRepository<Dt_LocationType> locationTypeRepository, IMaterielInfoService materielInfoService, IBasicService basicService, IRepository<Dt_LocationInfo> locationInfoRepository) : base(BaseDal)
{
_mapper = mapper;
_unitOfWorkManage = unitOfWorkManage;
@@ -62,6 +64,7 @@
_locationTypeRepository = locationTypeRepository;
_materielInfoService = materielInfoService;
_basicService = basicService;
+ _locationInfoRepository = locationInfoRepository;
}
public async Task<WebResponseContent> ReceiveInboundOrder(List<Dt_InboundOrder> models, int operateType)
@@ -463,10 +466,16 @@
WebResponseContent content = new WebResponseContent();
try
{
+
(bool, string, object?) result2 = ModelValidate.ValidateModelData(materielGroupDTO);
if (!result2.Item1) return content = WebResponseContent.Instance.Error(result2.Item2);
bool code = _locationTypeRepository.Db.Queryable<Dt_LocationType>().Where(x => x.LocationType == materielGroupDTO.WarehouseCode).Any();
+ bool statu = _locationInfoRepository.Db.Queryable<Dt_LocationInfo>().Where(x => x.LocationType == materielGroupDTO.WarehouseCode && x.LocationStatus == (int)LocationStatusEnum.Free).Any();
+ if (!statu)
+ {
+ return content = WebResponseContent.Instance.Error($"璇ュ尯鍩熸棤璐т綅鍙垎閰�");
+ }
if (!code)
{
return content = WebResponseContent.Instance.Error($"鍖哄煙涓病鏈夎{materielGroupDTO.WarehouseCode}缂栧彿銆�");
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs"
index b295a20..9721aff 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs"
@@ -132,7 +132,7 @@
Status = 0,
OrderNo = inboundOrder.InboundOrderNo,
BusinessType = inboundOrder.BusinessType,
- ValidDate = inboundOrder.BusinessType == BusinessTypeEnum.澶栭儴浠撳簱璋冩櫤浠�.ToString() ? item.ValidDate : datevaliDate.ValidityDays == null ? null : Convert.ToDateTime(DateTime.Now).AddDays(Convert.ToDouble(datevaliDate.ValidityDays)),
+ ValidDate = inboundOrder.BusinessType == BusinessTypeEnum.澶栭儴浠撳簱璋冩櫤浠�.ToString() ? item.ValidDate : datevaliDate == null ? null : Convert.ToDateTime(DateTime.Now).AddDays(Convert.ToDouble(datevaliDate.ValidityDays)),
//ValidDate = datevaliDate == null ? null : DateTime.Now.AddDays(datevaliDate.ValidityDays),
});
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs"
index 89c656a..51a849f 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs"
@@ -252,16 +252,16 @@
result.FactoryArea = outboundOrder.FactoryArea;
List<Dt_OutboundOrderDetail> selectedDetails = new List<Dt_OutboundOrderDetail>();
- if(request.DetailIds == null || !request.DetailIds.Any())
+ if (request.DetailIds == null || !request.DetailIds.Any())
{
selectedDetails = _detailRepository.QueryData(x => x.OrderId == outboundOrder.Id);
}
else
{
// 鑾峰彇閫夋嫨鐨勫嚭搴撴槑缁�
- selectedDetails = _detailRepository.QueryData(x => x.OrderId == outboundOrder.Id && request.DetailIds.Contains(x.Id));
+ selectedDetails = _detailRepository.QueryData(x => x.OrderId == outboundOrder.Id && request.DetailIds.Contains(x.Id));
}
-
+
//if (outboundOrder.IsBatch == 1 && request.DetailIds.Count == 1)
//{
@@ -1015,34 +1015,41 @@
//}
List<Barcodes> barcodesList = new List<Barcodes>();
List<Dt_StockInfoDetail> stockInfoDetails = stockInfo.Details.Where((x => x.StockQuantity > x.OutboundQuantity)).ToList();
+
+ decimal itemQuantity = item.LockQuantity - item.OverOutQuantity;
+
foreach (var stockDetail in stockInfoDetails)
{
- if (item.LockQuantity - item.OverOutQuantity >= stockDetail.StockQuantity - stockInfoDetail.OutboundQuantity)
+ if (itemQuantity >= stockDetail.StockQuantity - stockDetail.OutboundQuantity)
{
Barcodes barcodes = new Barcodes
{
Barcode = stockDetail.Barcode,
- Qty = stockDetail.StockQuantity - stockInfoDetail.OutboundQuantity,
+ Qty = stockDetail.StockQuantity - stockDetail.OutboundQuantity,
SupplyCode = stockDetail?.SupplyCode ?? "",
BatchNo = stockDetail?.BatchNo ?? "",
Unit = stockDetail?.Unit ?? ""
};
- stockDetail.StockQuantity = stockInfoDetail.OutboundQuantity;
+ itemQuantity -= (stockDetail.StockQuantity - stockDetail.OutboundQuantity);
+ stockDetail.OutboundQuantity = stockDetail.StockQuantity;
barcodesList.Add(barcodes);
+
+ if (itemQuantity <= 0) break;
}
else
{
Barcodes barcodes = new Barcodes
{
Barcode = stockDetail.Barcode,
- Qty = item.LockQuantity - item.OverOutQuantity,
+ Qty = itemQuantity,
SupplyCode = stockDetail?.SupplyCode ?? "",
BatchNo = stockDetail?.BatchNo ?? "",
Unit = stockDetail?.Unit ?? ""
};
- stockInfoDetail.OutboundQuantity += item.LockQuantity - item.OverOutQuantity;
+ stockDetail.OutboundQuantity += itemQuantity;
barcodesList.Add(barcodes);
+ break;
}
}
@@ -1107,11 +1114,11 @@
{
UpdateOutboundOrderStatus(request.OrderNo, OutOrderStatusEnum.鍑哄簱瀹屾垚.ObjToInt());
- if(outboundOrder.OrderType != OutOrderTypeEnum.InternalAllocat.ObjToInt())
+ if (outboundOrder.OrderType != OutOrderTypeEnum.InternalAllocat.ObjToInt())
{
_feedbackMesService.OutboundFeedback(outboundOrder.OrderNo);
}
-
+
}
}
catch (Exception ex)
@@ -1428,7 +1435,7 @@
List<Barcodes> barcodesList = new List<Barcodes>();
Barcodes barcodes = new Barcodes
{
- Barcode = request.Barcode,
+ Barcode = newBarcode,
Qty = barcodeQuantity,
SupplyCode = stockDetail?.SupplyCode ?? "",
BatchNo = stockDetail?.BatchNo ?? "",
--
Gitblit v1.9.3