From e2655143a06ee42eec06a97b045f33a09fbb3a3f Mon Sep 17 00:00:00 2001
From: 肖洋 <cathay_xy@163.com>
Date: 星期二, 24 十二月 2024 17:40:18 +0800
Subject: [PATCH] 合并更改
---
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs | 46 ++++++++++++++++++++++++++++++++++++++--------
1 files changed, 38 insertions(+), 8 deletions(-)
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
index 1764161..b19f3b0 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
@@ -1,5 +1,6 @@
锘縰sing Mapster;
using Masuit.Tools;
+using SixLabors.Fonts.Tables.AdvancedTypographic;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using WIDESEA_Core.Const;
@@ -455,7 +456,7 @@
Remark = boxing.BoxingInfoDetails.Count().ToString(),
};
- if (boxing.ProcessCode != "OCVB")
+ if (boxing.ProcessCode != "OCVB" && !task.Roadway.Contains("FR"))
{
// 澶勭悊璇锋眰鍙傛暟
AgingInputDto agingInputDto = new AgingInputDto()
@@ -1028,7 +1029,7 @@
{
// 鏍规嵁鎵樼洏绫诲瀷鏌ヨ搴撳瓨淇℃伅
DtStockInfo stockInfo = tag == (int)TaskOutboundTypeEnum.Outbound
- ? areaCodes == null ? await QueryStockInfoForRealTrayAsync(areaCode, productionLine) : await QueryStockInfoForRealTrayCWAsync(areaCodes, productionLine)
+ ? areaCode != "CWSC1" ? await QueryStockInfoForRealTrayAsync(areaCode, areaCodes, productionLine) : await QueryStockInfoForRealTrayCWAsync(areaCodes, productionLine)
: await QueryStockInfoForEmptyTrayAsync(areaCode);
if (stockInfo == null)
@@ -1076,7 +1077,7 @@
/// <summary>
/// 鏌ヨ瀹炵洏搴撳瓨淇℃伅
/// </summary>
- private async Task<DtStockInfo> QueryStockInfoForRealTrayAsync(string areaCode, string productionLine)
+ private async Task<DtStockInfo> QueryStockInfoForRealTrayAsync(string areaCode, List<string> devices, string productionLine)
{
var area = await _areaInfoRepository.QueryFirstAsync(x => x.AreaCode == areaCode);
@@ -1086,6 +1087,7 @@
.Where(x => x.AreaCode == areaCode && x.OutboundTime < DateTime.Now && x.IsFull == true) // 杩囨护鏉′欢
.WhereIF(!productionLine.IsNullOrEmpty(), x => x.ProductionLine == productionLine)
.Where(x => x.LocationInfo.LocationStatus == (int)LocationEnum.InStock && x.LocationInfo.AreaId == area.AreaID) // 杩囨护鏉′欢
+ .WhereIF(!devices.IsNullOrEmpty(), x => devices.Contains(x.LocationInfo.RoadwayNo))
.OrderBy(x => x.OutboundTime) // 鎺掑簭
.FirstAsync(); // 鑾峰彇绗竴涓厓绱�
@@ -1096,7 +1098,7 @@
}
/// <summary>
- /// 鏌ヨ瀹炵洏搴撳瓨淇℃伅
+ /// 鏌ヨ甯告俯瀹炵洏搴撳瓨淇℃伅
/// </summary>
private async Task<DtStockInfo> QueryStockInfoForRealTrayCWAsync(List<string> areaCodes, string productionLine)
{
@@ -1145,7 +1147,7 @@
{
return new Dt_Task
{
- Grade = 1,
+ Grade = tag == 104 ? 2 : 1,
Roadway = stockInfo.LocationInfo.RoadwayNo,
TargetAddress = position,
Dispatchertime = DateTime.Now,
@@ -1172,7 +1174,7 @@
return new WMSTaskDTO
{
TaskNum = task.TaskNum.Value,
- Grade = 1,
+ Grade = task.Grade.Value,
PalletCode = task.PalletCode,
RoadWay = task.Roadway,
SourceAddress = task.SourceAddress,
@@ -1471,7 +1473,35 @@
{
return await BaseDal.Delete(ids);
}
+ public override WebResponseContent DeleteData(object[] key)
+ {
+ WebResponseContent content = new WebResponseContent();
+ // 鍒涘缓鍘嗗彶浠诲姟瀹炰緥妯″瀷
+ try
+ {
+ Dt_Task task = BaseDal.QueryFirst(x => x.TaskId == Convert.ToInt32(key[0]));
+ if (task == null)
+ {
+ return content.Error("鏈壘鍒颁换鍔′俊鎭�!");
+ }
+ var taskHtyNG = CreateHistoricalTask(task, true);
+ // 鎵ц鏁版嵁搴撲簨鍔�
+
+ // 娣诲姞鍘嗗彶浠诲姟
+ var isTaskHtyAdd = _task_HtyRepository.AddData(taskHtyNG) > 0;
+
+ // 鍒犻櫎浠诲姟鏁版嵁
+ var isTaskDelete = BaseDal.Delete(task.TaskId);
+
+ return content.OK("鍒犻櫎鎴愬姛!");
+ }
+ catch (Exception ex)
+ {
+ return content.Error("鍒犻櫎浠诲姟寮傚父锛�" + ex.Message);
+ }
+
+ }
/// <summary>
/// 閫氳繃ID鑾峰彇浠诲姟
/// </summary>
@@ -1581,7 +1611,7 @@
/// </summary>
/// <param name="task"></param>
/// <returns></returns>
- private Dt_Task_Hty CreateHistoricalTask(Dt_Task task)
+ private Dt_Task_Hty CreateHistoricalTask(Dt_Task task, bool isHand = false)
{
// 鏇存柊浠诲姟鐘舵��
task.TaskState = TaskOutStatusEnum.OutFinish.ObjToInt();
@@ -1591,7 +1621,7 @@
var taskHty = _mapper.Map<Dt_Task_Hty>(task);
taskHty.FinishTime = DateTime.Now;
taskHty.TaskId = 0;
- taskHty.OperateType = (int)OperateTypeEnum.鑷姩瀹屾垚;
+ taskHty.OperateType = isHand ? (int)OperateTypeEnum.浜哄伐鍒犻櫎 : (int)OperateTypeEnum.鑷姩瀹屾垚;
taskHty.SourceId = task.TaskId;
taskHty.TaskState = TaskOutStatusEnum.OutFinish.ObjToInt();
return taskHty;
--
Gitblit v1.9.3