From 38072f522dd49da33b22f604fb6b262e884b8a32 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期四, 12 三月 2026 18:30:47 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/RuiShengZhiNeng/GaoPuLiTiKu
---
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs | 28 ++++++++++++++++++++++------
1 files changed, 22 insertions(+), 6 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
index b89b523..63097eb 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
@@ -18,6 +18,7 @@
using AutoMapper;
using SixLabors.ImageSharp.ColorSpaces;
using SqlSugar;
+using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using WIDESEAWCS_BasicInfoService;
using WIDESEAWCS_Common;
@@ -106,7 +107,7 @@
continue;
//throw new Exception(content.Message);
}
- if (BaseDal.QueryFirst(x => x.WMSTaskNum == task.taskCode) != null)
+ if (BaseDal.QueryFirst(x => x.WMSTaskNum == task.taskCode && x.TaskType == item.taskType) != null)
{
objects.Add(new
{
@@ -116,7 +117,7 @@
continue;
//throw new Exception($"浠诲姟鍙枫�恵task.taskCode}銆戝凡瀛樺湪浠诲姟");
}
- if (BaseDal.QueryFirst(x => x.PalletCode == task.containerCode) != null)
+ if (BaseDal.QueryFirst(x => x.PalletCode == task.containerCode && x.TaskType == item.taskType) != null)
{
objects.Add(new
{
@@ -126,7 +127,7 @@
continue;
//throw new Exception($"鎵樼洏鍙枫�恵task.containerCode}銆戝凡瀛樺湪浠诲姟");
}
- if (BaseDal.QueryFirst(x => x.SourceAddress == task.fromLocationCode) != null)
+ if (BaseDal.QueryFirst(x => x.SourceAddress == task.fromLocationCode && x.TaskType == item.taskType) != null)
{
objects.Add(new
{
@@ -232,6 +233,7 @@
if (apiInfo == null) throw new Exception("鏈壘鍒板嚡涔愬+AGV浠诲姟涓嬪彂鎺ュ彛閰嶇疆淇℃伅锛佽妫�鏌ユ帴鍙i厤缃�");
string response = HttpHelper.Post(apiInfo.ApiAddress, KLS.Serialize());
GALAXISReturn agvContent = response.DeserializeObject<GALAXISReturn>();
+ content.OK(data: agvContent);
if (agvContent.success == true && agvContent.code == 0)
{
//鐩存帴绉诲叆鍘嗗彶
@@ -258,6 +260,7 @@
if (apiInfo == null) throw new Exception("鏈壘鍒板洓鍚戣溅AGV浠诲姟涓嬪彂鎺ュ彛閰嶇疆淇℃伅锛佽妫�鏌ユ帴鍙i厤缃�");
string response = HttpHelper.Post(apiInfo.ApiAddress, cancelSXCTake.Serialize());
FOURBOTReturn fOURBOTReturn = response.DeserializeObject<FOURBOTReturn>();
+ content.OK(data: fOURBOTReturn);
if (fOURBOTReturn.returnCode == 0 && fOURBOTReturn.returnUserMsg == "鎴愬姛")
{
//鐩存帴绉诲叆鍘嗗彶
@@ -283,6 +286,7 @@
if (apiInfo == null) throw new Exception("鏈壘鍒板洓鍚戣溅AGV浠诲姟涓嬪彂鎺ュ彛閰嶇疆淇℃伅锛佽妫�鏌ユ帴鍙i厤缃�");
string response = HttpHelper.Post(apiInfo.ApiAddress, cancelHIKROBOTTask.Serialize());
HIKROBOTReturn hIKROBOTReturn = response.DeserializeObject<HIKROBOTReturn>();
+ content.OK(data: hIKROBOTReturn);
if (hIKROBOTReturn.code == "SUCCESS" && hIKROBOTReturn.message == "鎴愬姛")
{
//鐩存帴绉诲叆鍘嗗彶
@@ -373,6 +377,7 @@
if (apiInfo == null) throw new Exception("鏈壘鍒板嚡涔愬+AGV浠诲姟涓嬪彂鎺ュ彛閰嶇疆淇℃伅锛佽妫�鏌ユ帴鍙i厤缃�");
string response = HttpHelper.Post(apiInfo.ApiAddress, updateGALAXISTaskGrade.Serialize());
GALAXISReturn agvContent = response.DeserializeObject<GALAXISReturn>();
+ content.OK(data: agvContent);
if (agvContent.success == true && agvContent.code == 0)
{
@@ -398,6 +403,7 @@
if (apiInfo == null) throw new Exception("鏈壘鍒版洿鏂板洓鍚戣溅浠诲姟浼樺厛绾ф帴鍙i厤缃俊鎭紒璇锋鏌ユ帴鍙i厤缃�");
string response = HttpHelper.Post(apiInfo.ApiAddress, request.Serialize());
FOURBOTReturn fOURBOTReturn = response.DeserializeObject<FOURBOTReturn>();
+ content.OK(data: fOURBOTReturn);
if (fOURBOTReturn.returnCode == 0 && fOURBOTReturn.returnUserMsg == "鎴愬姛")
{
BaseDal.UpdateData(dt_Task);
@@ -422,6 +428,7 @@
if (apiInfo == null) throw new Exception("鏈壘鍒板洓鍚戣溅AGV浠诲姟涓嬪彂鎺ュ彛閰嶇疆淇℃伅锛佽妫�鏌ユ帴鍙i厤缃�");
string response = HttpHelper.Post(apiInfo.ApiAddress, Hkrequest.Serialize());
HIKROBOTReturn hIKROBOTReturn = response.DeserializeObject<HIKROBOTReturn>();
+ content.OK(data: hIKROBOTReturn);
if (hIKROBOTReturn.code == "SUCCESS0" && hIKROBOTReturn.message == "鎴愬姛")
{
BaseDal.UpdateData(dt_Task);
@@ -1079,11 +1086,15 @@
try
{
if (getLocationInfo == null) throw new Exception("璇锋眰鍙傛暟涓嶈兘涓虹┖锛�");
- if (getLocationInfo.AreaCode == null) throw new Exception("搴撳尯缂栧彿涓嶈兘涓虹┖锛�");
+ //if (getLocationInfo.AreaCode == null) throw new Exception("搴撳尯缂栧彿涓嶈兘涓虹┖锛�");
if (getLocationInfo.WarehouseId == 0) throw new Exception("浠撳簱ID涓嶈兘涓虹┖锛�");
if (getLocationInfo.WarehouseId == 1)
{
- List<Dt_RGVLocationInfo> rGVLocationInfos = _rGVLocationInfoService.Repository.QueryData(x => x.WarehouseId == getLocationInfo.AreaCode.ObjToInt());
+ List<Dt_RGVLocationInfo> rGVLocationInfos = new List<Dt_RGVLocationInfo>();
+ if (!string.IsNullOrEmpty(getLocationInfo.AreaCode))
+ rGVLocationInfos = _rGVLocationInfoService.Repository.QueryData(x => x.WarehouseId == getLocationInfo.AreaCode.ObjToInt());
+ else
+ rGVLocationInfos = _rGVLocationInfoService.Repository.QueryData();
foreach (var item in rGVLocationInfos)
{
list.Add(new
@@ -1097,7 +1108,11 @@
}
else if (getLocationInfo.WarehouseId == 2)
{
- List<Dt_KLSLocationInfo> rGVLocationInfos = _kLSLocationInfoService.Repository.QueryData(x => x.WarehouseId == getLocationInfo.AreaCode.ObjToInt());
+ List<Dt_KLSLocationInfo> rGVLocationInfos = new List<Dt_KLSLocationInfo>();
+ if (!string.IsNullOrEmpty(getLocationInfo.AreaCode))
+ rGVLocationInfos = _kLSLocationInfoService.Repository.QueryData(x => x.WarehouseId == getLocationInfo.AreaCode.ObjToInt());
+ else
+ rGVLocationInfos = _kLSLocationInfoService.Repository.QueryData();
foreach (var item in rGVLocationInfos)
{
list.Add(new
@@ -1222,6 +1237,7 @@
};
string response = HttpHelper.Post(apiInfo.ApiAddress, fOURBOToccupyStation.Serialize());
FOURBOTReturn fOURBOTReturn = response.DeserializeObject<FOURBOTReturn>();
+ content.OK(data: fOURBOTReturn);
if (fOURBOTReturn.returnCode != 0 /*&& fOURBOTReturn.returnUserMsg != $"绔欑偣宸茶鍗犵敤,(podID={iQC.ContainerCode})"*/)
throw new Exception(fOURBOTReturn.returnUserMsg);
#endregion
--
Gitblit v1.9.3