From b7c6607e6937df8f60d99a076178f3173213af1e Mon Sep 17 00:00:00 2001 From: kyy <3283105747@qq.com> Date: 星期三, 17 九月 2025 15:59:20 +0800 Subject: [PATCH] 1、送货条码操作类型修改 --- MES.Service/service/BasicData/DeliveryBarcodeManager.cs | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/MES.Service/service/BasicData/DeliveryBarcodeManager.cs b/MES.Service/service/BasicData/DeliveryBarcodeManager.cs index b4212dd..c5a82a5 100644 --- a/MES.Service/service/BasicData/DeliveryBarcodeManager.cs +++ b/MES.Service/service/BasicData/DeliveryBarcodeManager.cs @@ -29,9 +29,9 @@ // 鎸塗ype鍖哄垎鎿嶄綔绫诲瀷锛�0=鏂板锛�1=鍒犻櫎锛� switch (barcodeDto.Type) { - case "0": - return InsertBarcode(barcodeEntity); case "1": + return InsertBarcode(barcodeEntity); + case "2": return DeleteBarcode(barcodeEntity.Id); default: throw new ArgumentOutOfRangeException( nameof(barcodeDto.Type), barcodeDto.Type, "鏉$爜鎿嶄綔绫诲瀷閿欒锛氫粎鏀寔 0锛堟柊澧烇級銆�1锛堝垹闄わ級"); @@ -78,14 +78,14 @@ { switch (type) { - case "0": + case "1": groupResultList.Add(InsertBarcodeBatch(entityGroup)); break; - case "1": + case "2": groupResultList.Add(DeleteBarcodeBatch(entityGroup.Select(e => e.Id).ToArray())); break; default: - throw new ArgumentOutOfRangeException(nameof(type),type,"鎵归噺鎿嶄綔涓瓨鍦ㄩ潪娉昑ype锛氫粎鏀寔 0锛堟柊澧烇級銆�1锛堝垹闄わ級"); + throw new ArgumentOutOfRangeException(nameof(type),type,"鎵归噺鎿嶄綔涓瓨鍦ㄩ潪娉昑ype锛氫粎鏀寔 1锛堟柊澧烇級銆�2锛堝垹闄わ級"); } } @@ -304,7 +304,7 @@ /// </summary> private BarcodeInformation ConvertDtoToEntity(DeliveryBarcodeInfo dto) { - var entityId = dto.Type == "0" ? Guid.NewGuid() : (string.IsNullOrEmpty(dto.SmallBarcode) ? Guid.Empty : Guid.Parse(dto.SmallBarcode)); + var entityId = dto.Type == "1" ? Guid.NewGuid() : (string.IsNullOrEmpty(dto.SmallBarcode) ? Guid.Empty : Guid.NewGuid()); return new BarcodeInformation { @@ -316,7 +316,7 @@ DeliveryNo = dto.DeliveryNo, DnLines = dto.LineNo, PackLevel = dto.BarcodeType, - CreateTime = dto.Type == "0" ? DateTime.Now : (DateTime?)null, + CreateTime = dto.Type == "1" ? DateTime.Now : (DateTime?)null, UpdateTime = DateTime.Now, // 鎵╁睍瀛楁璧嬮粯璁ゅ�� BigBarcode = null, -- Gitblit v1.9.3