From 1e12c140c041c0cb52306a0db9ff0ba18354d0d8 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期四, 03 四月 2025 18:01:52 +0800
Subject: [PATCH] 优化WMS前端首页,货位查询column数据库关键字处理
---
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Service/InboundOrderService.cs | 31 +++++++++++++++++--------------
1 files changed, 17 insertions(+), 14 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Service/InboundOrderService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Service/InboundOrderService.cs"
index 4e165fe..af86350 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Service/InboundOrderService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Service/InboundOrderService.cs"
@@ -47,43 +47,46 @@
/// </summary>
/// <param name="materielGroupDTO"></param>
/// <returns></returns>
- public WebResponseContent PdaAddEmptyStockInfo(PdaMaterielGroupDTO materielGroupDTO)
+ public WebResponseContent PdaAddEmptyStockInfo(string barcode)
{
try
{
#region 娣诲姞涓�涓┖鎵樼粍鐩樹俊鎭強绌烘墭浠诲姟骞朵笅鍙戠粰WCS
- Dt_StockInfo stockInfo = _stockService.StockInfoService.Repository.GetStockInfo(materielGroupDTO.PalletCode);
+ Dt_StockInfo stockInfo = _stockService.StockInfoService.Repository.GetStockInfo(barcode);
if (stockInfo != null) throw new Exception($"鎵樼洏鍙枫�恵stockInfo.PalletCode}銆戝凡瀛樺湪缁勭洏淇℃伅");
- Dt_Task task = _taskRepository.QueryFirst(x => x.PalletCode == materielGroupDTO.PalletCode && x.TaskType == TaskTypeEnum.PalletInbound.ObjToInt());
+ Dt_Task task = _taskRepository.QueryFirst(x => x.PalletCode == barcode && x.TaskType == TaskTypeEnum.PalletInbound.ObjToInt());
if (task == null)
{
task = new Dt_Task()
{
- CurrentAddress = "",
+ CurrentAddress = "1001",
NextAddress = "SC01",
- SourceAddress = "",
+ SourceAddress = "1001",
TargetAddress = "SC01",
Creater = "System",
- PalletCode = materielGroupDTO.PalletCode,
+ PalletCode = barcode,
Roadway = "SC01",
OrderNo = DateTime.Now.ToString("yyMMdd"),
TaskNum = _taskRepository.GetTaskNum(nameof(SequenceEnum.SeqTaskNum)),
- TaskState = InTaskStatusEnum.InNew.ObjToInt(),
+ TaskState = InTaskStatusEnum.AGV_InFinish.ObjToInt(),
TaskType = TaskTypeEnum.PalletInbound.ObjToInt(),
CreateDate = DateTime.Now,
Dispatchertime = DateTime.Now,
};
Db.Ado.BeginTran();
- _stockService.StockInfoService.AddStockEmpty(materielGroupDTO.PalletCode);
+ WebResponseContent content = _stockService.StockInfoService.AddStockEmpty(barcode);
+ if (!content.Status) throw new Exception(content.Message);
_taskRepository.AddData(task);
+ List<WMSTaskDTO> wMSTaskDTOs = _mapper.Map<List<WMSTaskDTO>>(new List<Dt_Task> { task });
+ var ResultData = HttpHelper.PostAsync(WCSInterfaceAddress.ReceiveTask, wMSTaskDTOs.ToJson(), headers: new Dictionary<string, string>());
+ if (ResultData.Result == null) throw new Exception($"鍚慦CS涓嬪彂绌烘墭鍏ュ簱浠诲姟瓒呮椂");
+ content = JsonConvert.DeserializeObject<WebResponseContent>(ResultData.Result);
+ if (content == null) throw new Exception($"涓嬪彂绌烘墭鍏ュ簱浠诲姟WCS鏃犲搷搴�");
+ if (!content.Status) throw new Exception(content.Message);
Db.Ado.CommitTran();
}
- List<WMSTaskDTO> wMSTaskDTOs = _mapper.Map<List<WMSTaskDTO>>(task);
- var ResultData = HttpHelper.PostAsync(WCSInterfaceAddress.ReceiveTask, wMSTaskDTOs.ToJson(), headers: new Dictionary<string, string>());
- if (ResultData.Result == null) throw new Exception($"鍚慦CS涓嬪彂绌烘墭鍏ュ簱浠诲姟瓒呮椂");
- WebResponseContent content = JsonConvert.DeserializeObject<WebResponseContent>(ResultData.Result);
- if (content == null) throw new Exception($"涓嬪彂绌烘墭鍏ュ簱浠诲姟WCS鏃犲搷搴�");
- if (!content.Status) throw new Exception(content.Message);
+ else
+ throw new Exception($"鎵樼洏鍙枫�恵barcode}銆戝凡瀛樺湪浠诲姟");
#endregion
return WebResponseContent.Instance.OK();
}
--
Gitblit v1.9.3