From a34059e688e947a2ea079a0646872f1a21089940 Mon Sep 17 00:00:00 2001
From: huanghongfeng <huanghongfeng@hnkhzn.com>
Date: 星期一, 22 九月 2025 14:47:00 +0800
Subject: [PATCH] 1
---
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/AGV/Partial/genAgvSchedulingTask.cs | 30 +++++++++++++++++++++++++-----
1 files changed, 25 insertions(+), 5 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/AGV/Partial/genAgvSchedulingTask.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/AGV/Partial/genAgvSchedulingTask.cs"
index 6b5281c..d80e66f 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/AGV/Partial/genAgvSchedulingTask.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_StoragIntegrationServices/AGV/Partial/genAgvSchedulingTask.cs"
@@ -26,16 +26,36 @@
WebResponseContent content = new WebResponseContent();
try
{
+ if (input.RequestType == "999")
+ {
+ int CZInfotli = _task_CZInfoRepository.QueryData(x => x.CurrentStatue == "3").Count();
+ if (CZInfotli == 0)
+ {
+ return content.Error($"娌℃湁鑷姩鍙栬酱浠诲姟锛屾棤鑷姩浠诲姟");
+ }
+ }
+
if (string.IsNullOrEmpty(input.Position)) { return content.Error($"agv浠诲姟涓嬪彂鐢宠鐩爣鍦板潃涓虹┖锛侊紒锛佽妫�鏌�"); }
//鏌ユ壘褰撳墠鍦ㄨ溅杞寸嚎鏈闇�瑕乤gv鎼繍鐨勮溅杞�
- List<Dt_CZInfo_mes> CZInfotlist = _task_CZInfoRepository.QueryData(x => x.CurrentStatue == "3" || x.CurrentStatue == "4" || x.CurrentStatue == "5" || x.CurrentStatue == "13");
+ List<Dt_CZInfo_mes> CZInfotlist = _task_CZInfoRepository.QueryData(x => x.CurrentStatue == "4" || x.CurrentStatue == "5" );
if (CZInfotlist.Count >= 2) { return content.Error($"宸叉湁agv浠诲姟姝e湪杩涜涓紝涓嬪彂澶辫触锛侊紒锛�"); }
- Dt_CZInfo_mes CZInfot = CZInfotlist.FirstOrDefault(x => x.CurrentStatue == "3" || x.CurrentStatue == "13");
- if (CZInfot == null) { return content.Error($"鏈壘鍒扮幇鏈夎緭閫佺嚎瀹屾垚鐨勮溅杞翠俊鎭�"); }
+ Dt_CZInfo_mes CZInfot = null;
+
+ if (input.RequestType == "888")
+ {
+ CZInfot = _task_CZInfoRepository.QueryFirst(x =>x.CZTM==input.PalletCode && (x.CurrentStatue == "11" || x.CurrentStatue == "12" || x.CurrentStatue == "13"));
+ if (CZInfot == null) { return content.Error($"鏈壘鍒扮幇鏈夎緭閫佺嚎瀹屾垚鐨勮溅杞翠俊鎭�"); }
+ }
+ else
+ {
+ CZInfot = _task_CZInfoRepository.QueryFirst(x => x.CurrentStatue == "3");
+ if (CZInfot == null) { return content.Error($"鏈壘鍒扮幇鏈夎緭閫佺嚎瀹屾垚鐨勮溅杞翠俊鎭�"); }
+ }
+
CZInfot.CurrentStatue = "4";
@@ -59,7 +79,7 @@
//agv鍙傛暟璋冨彇
genAgvSchedulingTask schedulingTask = new genAgvSchedulingTask
{
- reqCode = Guid.NewGuid().ToString().Replace("-", ""),
+ reqCode = $"{DateTime.Now:yyyyMMddHHmmss}",
clientCode = "WMS",
taskTyp = "BY",
ctnrTyp = "1",
@@ -108,7 +128,7 @@
catch (Exception ex)
{
LogFactory.GetLog("涓嬪彂AGV浠诲姟").Error(true, ex.Message);
- return content.Error($"璇锋眰寮傚父锛歿ex.Message}");
+ return content.Error($"涓嬪彂浠诲姟鎺ュ彛寮傚父锛歿ex.Message}");
}
}
}
--
Gitblit v1.9.3