1
chenyong
5 天以前 b095c75267297527116cda105669015babc01972
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
@@ -665,9 +665,13 @@
        {
            // 查询任务
            var task = await QueryTaskByPalletCode(input.PalletCode);
            if (task != null)
            if (task != null && (task.TaskState == (int)TaskInStatusEnum.InNew || task.TaskState == (int)TaskOutStatusEnum.OutNew))
            {
                return CreateAndReturnWMSTaskDTO(task);
            }
            if(task != null && (task.TaskState != (int)TaskInStatusEnum.InNew || task.TaskState != (int)TaskOutStatusEnum.OutNew))
            {
                return content.Error($"托盘{input.PalletCode}存在任务");
            }
            // 查询库存信息(这里后续要完善质检回库逻辑)
@@ -769,6 +773,7 @@
                //    return await HandleErrorCells(input, area, serialNosError);
                //}
                #endregion
                var boxing = CreateBoxingInfo(result, input.PalletCode);
                if (boxing == null) return content.Error("组盘失败");
@@ -932,7 +937,9 @@
        }
        else
        {
            _boxingInfoRepository.DeleteData(boxing);
            _boxingInfoRepository.Db.DeleteNav<DtBoxingInfo>(x => x.Id == boxing.Id)
                                            .Include(x => x.BoxingInfoDetails)
                                            .ExecuteCommandAsync();
            return new DtBoxingInfo
            {
                PalletCode = palletCode,