From f7686c71ac53f0d1bbd439bc0c898c86f7d68e34 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期一, 10 十一月 2025 16:39:10 +0800
Subject: [PATCH] 优化代码
---
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
index d2faf8e..7cd098d 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
@@ -614,7 +614,7 @@
if (Sourcelocation != null)
{
- if (BaseDal.QueryFirst(x => x.SourceAddress == task.SourceAddress && x.TaskState < TaskOutStatusEnum.SC_OutFinish.ObjToInt()) == null)
+ if (BaseDal.QueryFirst(x => x.SourceAddress == task.SourceAddress && x.TaskState < TaskOutStatusEnum.SC_OutFinish.ObjToInt() && x.TaskId != task.TaskId) == null)
Sourcelocation.LocationStatus = LocationStatusEnum.InStock.ObjToInt();
Sourcelocation.CurrentQty--;
if (Sourcelocation.CurrentQty <= 0)
@@ -792,7 +792,7 @@
//stockInfo.SerialNumber = Targetlocation.CurrentQty;
stockInfo.StockStatus = StockStatusEmun.宸插叆搴�.ObjToInt();
if (Sourcelocation.CurrentQty == 0) Sourcelocation.LocationStatus = LocationStatusEnum.Free.ObjToInt();
- Dt_Task _Task = BaseDal.QueryFirst(x => x.TaskNum != task.TaskNum && x.TaskType == task.TaskType && x.SourceAddress == Sourcelocation.LocationCode && x.TargetAddress == Targetlocation.LocationCode);
+ Dt_Task _Task = BaseDal.QueryFirst(x => x.TaskId != task.TaskId && x.TaskType == task.TaskType && x.SourceAddress == Sourcelocation.LocationCode && x.TargetAddress == Targetlocation.LocationCode);
if (_Task == null)
{
if (Targetlocation.CurrentQty == Targetlocation.MaxQty) Targetlocation.LocationStatus = LocationStatusEnum.Fullload.ObjToInt();
@@ -839,7 +839,7 @@
inventoryInfo.InDate = DateTime.Now;
inventoryInfo.StockStatus = StockStatusEmun.宸插叆搴�.ObjToInt();
int beforeStatus = locationInfo.LocationStatus;
- if (BaseDal.QueryFirst(x => x.TargetAddress == locationInfo.LocationCode && x.TaskNum != task.TaskNum) == null)
+ if (BaseDal.QueryFirst(x => x.TargetAddress == locationInfo.LocationCode && x.TaskId != task.TaskId) == null)
locationInfo.LocationStatus = LocationStatusEnum.InStock.ObjToInt();
task.CurrentAddress = task.NextAddress;
task.NextAddress = string.Empty;
--
Gitblit v1.9.3