From 48ed41879227c9b495f48ecd7cfde0acfd375da3 Mon Sep 17 00:00:00 2001
From: zhanghonglin <zhanghonglin@hnkhzn.com>
Date: 星期二, 28 十月 2025 08:53:12 +0800
Subject: [PATCH] 新增整形机入库功能
---
项目代码/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs | 80 ++++++++++++++++++++++++++++++++++++++-
1 files changed, 77 insertions(+), 3 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
index 217ceea..75939b9 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs"
@@ -785,7 +785,7 @@
Movstask.TaskType = (int)TaskMoveEnum.Mowe;
Movstask.TaskState = (int)TaskMoveStatusEnum.OutNewMove;
Movstask.SourceAddress = "0";
- Movstask.TargetAddress = "8-5-1";
+ Movstask.TargetAddress = "30-5-1";
Movstask.NextAddress = "text";
Movstask.Grade = 1;
Movstask.WMSId = 3;
@@ -1357,6 +1357,11 @@
//{
// throw new Exception($"鏁村舰鏈哄ぉ杞︽斁鏉夸俊鍙蜂负false");
//}
+ var location = _locationRepository.QueryFirst(v => v.LocationCode == wei);
+ if (location.LocationType != (int)LocationTypeEnum.Flat)
+ {
+ return content.OK("5");
+ }
//鏌ヨ褰撳墠浠诲姟姹犱腑鏄惁瀛樺湪鍑哄簱浠诲姟锛屽嚭搴撲换鍔″彧鑳藉瓨鍦ㄤ竴鏉�
var oldtask = _dt_taskRepositiry.QueryFirst(v => v.TaskType == (int)TaskOutboundTypeEnum.Outbound);
if (oldtask != null)
@@ -1454,11 +1459,15 @@
//{
// throw new Exception($"瑙勬暣鏈哄墧闄ゆ灦瀛愬彲鏀炬澘鎴栧墧闄や笂鏂欐ā寮忎俊鍙蜂负false");
//}
- //鏌ヨ褰撳墠浠诲姟姹犱腑鏄惁瀛樺湪鍑哄簱浠诲姟锛屽嚭搴撲换鍔″彧鑳藉瓨鍦ㄤ竴鏉�
+ var oldtask = _dt_taskRepositiry.QueryFirst(v => v.TaskType == (int)TaskOutboundTypeEnum.Outbound);
var isout = _outStockRepository.QueryFirst(v => v.Id == 1);
if (isout.isout == 0)
{
- var oldtask = _dt_taskRepositiry.QueryFirst(v => v.TaskType == (int)TaskOutboundTypeEnum.Outbound);
+ var location = _locationRepository.QueryFirst(v => v.LocationCode == wei);
+ if(location.LocationType != (int)LocationTypeEnum.Cube)
+ {
+ return content.OK("5");
+ }
if (oldtask != null)
{
throw new Exception($"褰撳墠浠诲姟姹犱腑宸插瓨鍦ㄤ竴鏉″嚭搴撲换鍔�");
@@ -1498,6 +1507,10 @@
_unitOfWorkManage.CommitTran();
return content.OK("2");
}
+ }
+ else
+ {
+ return content.OK("1");
}
return content.OK("3");
}
@@ -1513,6 +1526,11 @@
var isout = _outStockRepository.QueryFirst(v => v.Id == 1);
if (isout.isout == 0)
{
+ var location = _locationRepository.QueryFirst(v => v.LocationCode == wei);
+ if (location.LocationType != (int)LocationTypeEnum.Cube)
+ {
+ return content.OK("5");
+ }
//鍒ゆ柇搴撳瓨鏄惁鏈夎揣
//鏌ヨ璐т綅
Dt_LocationInfo huo = _LocationInfoRepository.QueryFirst(v => v.LocationCode == wei);
@@ -1549,5 +1567,61 @@
}
return content.OK("3");
}
+
+ public WebResponseContent zxjruku(string wei,string weis)
+ {
+ Dt_Task task = new Dt_Task();
+ WebResponseContent content = new WebResponseContent();
+ //if (!OHTJob.oHTReadData.R_ZXJ_isWork)
+ //{
+ // throw new Exception($"鏁村舰鏈烘姇鍏ヤ娇鐢ㄤ俊鍙蜂负false");
+ //}
+ var isout = _outStockRepository.QueryFirst(v => v.Id == 1);
+ if (isout.isout == 0)
+ {
+ var location = _locationRepository.QueryFirst(v => v.LocationCode == wei);
+ if (location.LocationType != (int)LocationTypeEnum.Flat)
+ {
+ return content.OK("5");
+ }
+ //鍒ゆ柇搴撳瓨鏄惁鏈夎揣
+ //鏌ヨ璐т綅
+ Dt_LocationInfo huo = _LocationInfoRepository.QueryFirst(v => v.LocationCode == wei);
+ Dt_LocationInfo huos = _LocationInfoRepository.QueryFirst(v => v.LocationCode == weis);
+ if (huo.LocationStatus != 0)
+ {
+ return content.OK("4");
+ }
+ huo.LocationStatus = 1;
+ huos.LocationStatus = 1;
+ var station = _dt_stationInfoRepository.QueryFirst(v => v.msg == "鏁村舰鏈烘斁鏂欎綅");
+ task.SourceAddress = station.Row + "-" + station.Column + "-1";
+ var oldhtytask = _dt_taskRepositiry.QueryFirst(v => v.SourceAddress == task.SourceAddress);
+ if (oldhtytask == null)
+ {
+ task.TargetAddress = wei;
+ task.Grade = 3;
+ task.Remark = (int)MateTypeEnum.ZiChan;
+ task.NextAddress = weis;
+ task.Roadway = "TC01";
+ task.TaskType = (int)TaskInboundTypeEnum.Inbound;
+ task.TaskState = (int)TaskInStatusEnum.InNew;
+ task.PalletCode = "text";
+ task.CurrentAddress = "text";
+ task.WMSId = 2;
+ _unitOfWorkManage.BeginTran();
+ _dt_taskRepositiry.AddData(task);
+ _LocationInfoRepository.UpdateData(huo);
+ _LocationInfoRepository.UpdateData(huos);
+ _unitOfWorkManage.CommitTran();
+ return content.OK("2");
+ }
+ }
+ else
+ {
+ return content.OK("1");
+ }
+ return content.OK("3");
+ }
}
}
--
Gitblit v1.9.3