From 011ca316e6ec2ed93e31c45a9ebd9d3c66664871 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期五, 17 四月 2026 11:47:03 +0800
Subject: [PATCH] 代码更新
---
项目代码/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs | 34 ++++++++++++++++++++++++++--------
1 files changed, 26 insertions(+), 8 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
index c5848e0..1913125 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
@@ -365,9 +365,14 @@
throw new Exception($"鏈壘鍒版潯鐮亄stockInfoOld.PalletCode}涓�鏈烢RP搴撳瓨涓嶅瓨鍦�");
}
BSTStockInfoDTO bSTStockInfoDTO = bSTResponse.Data ?? throw new Exception($"涓�鏈烢RP鏈繑鍥瀧stockInfoOld.PalletCode}鐨勫簱瀛樹俊鎭�");
+ if (stockInfoOld.StockLength <= 0 || bSTStockInfoDTO.StockMeter<=0)
+ {
+ throw new Exception($"{stockInfoOld.RfidCode}缁戝畾鏉$爜{stockInfoOld.PalletCode}搴撳瓨涓�0");
+ }
stockInfoOld.IsPick = WhetherEnum.False.ObjToInt();
decimal stockLength = bSTStockInfoDTO.StockMeter;
- if (weight != bSTStockInfoDTO.Qty && weight < stockInfoOld.InitialWeight)
+ decimal errWeight = Math.Abs(weight - bSTStockInfoDTO.Qty);
+ if (weight != bSTStockInfoDTO.Qty && weight < stockInfoOld.InitialWeight && errWeight <= AppSettings.Get("ErrWeight").ObjToInt())
{
Dt_MaterielInfo materielInfo = _basicRepository.MaterielInfoRepository.QueryFirst(x => x.MaterialSourceId == stockInfoOld.MaterielId);
int gramWeight = (int)(materielInfo.MaterielWeight * 1000);
@@ -376,7 +381,7 @@
Paper_code = stockInfoOld.PalletCode,
Estimate_weight = bSTStockInfoDTO.Qty,
Actual_weight = weight,
- Error_weight = Math.Abs(weight - bSTStockInfoDTO.Qty),
+ Error_weight = errWeight,
Weigh_time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
Operator = "LiKu",
Width = bSTStockInfoDTO.W,
@@ -397,6 +402,11 @@
stockInfoOld.StockLength = stockLength;
stockInfoOld.StockOutLength = 0;
stockInfoOld.WarehouseId = WarehouseEnum.LLDYL.ObjToInt();
+ List<Dt_OutLineView> outLineViewsDel = _outboundRepository.OutLineViewRepository.QueryData(x=>x.PalletCode==stockInfoOld.PalletCode);
+ if (outLineViewsDel.Count>0)
+ {
+ _outboundRepository.OutLineViewRepository.DeleteData(outLineViewsDel);
+ }
content.OK("鎴愬姛",data:stockInfoOld);
}
catch (Exception ex)
@@ -965,6 +975,10 @@
{
item.Count -= count.Count;
}
+ if (item.Count >= 50 && count?.Count<=1)
+ {
+ return item.RoadwayNo;
+ }
}
return locationCounts.Where(x => x.Count > 0).OrderByDescending(x => x.Count).FirstOrDefault()?.RoadwayNo ?? "";
}
@@ -1059,7 +1073,7 @@
}
proInUpModel.PB_INV_PRODUCT_IN= pRODUCT_INItems;
string request = _invokeERPService.ERPProInUp(proInUpModel) ?? throw new Exception("鎴愬搧鍏ュ簱鎺ュ彛璇锋眰澶辫触");
- if (!request.Contains("Success"))
+ if (!request.Contains("success"))
{
throw new Exception($"鎴愬搧鍏ュ簱澶辫触");
}
@@ -1946,7 +1960,7 @@
string request = _invokeERPService.ERPSemiProInUp(
new ERPProInUpModel()
{
- PB_INV_PRODUCT_IN= pRODUCT_INItems
+ PB_INV_PRODUCT_IN = pRODUCT_INItems
}) ?? throw new Exception("鍗婃垚鍝佸叆搴撴帴鍙h姹傚け璐�");
//鐢熸垚鍗婃垚鍝佸叆搴�
List<Dt_MESProInOrderInfo> semiProInOrderInfos = mESProInOrderInfos.Where(x => x.MESProInStatus == InOrderStatusEnum.鏈紑濮�.ObjToInt() && x.WarehouseId==WarehouseEnum.LLDYL.ObjToInt()).ToList();
@@ -1998,7 +2012,6 @@
{
return content.Error("浼犲叆淇℃伅涓虹┖");
}
-
List<Dt_MaterielInfo> materielInfos = _basicRepository.MaterielInfoRepository.QueryData();
List<Dt_StockInfo> stockInfos = new List<Dt_StockInfo>();
List<Dt_Task> tasks = new List<Dt_Task>();
@@ -2059,7 +2072,7 @@
NextAddress = "",
PalletCode = item.BarCode,
Roadway = "",
- SourceAddress = CheckPointCode.AGVStationCode,
+ SourceAddress = item.PointCode.StartsWith("YS") ? CheckPointCode.AGVStationCode : CheckPointCode.MESPointCode,
TargetAddress = "",
TaskType = 0,
TaskStatus = TaskStatusEnum.New.ObjToInt(),
@@ -2075,10 +2088,11 @@
nameof(StationAreaEnum.涓�妤煎嵃鍒�) => TaskTypeEnum.PrintYLInbound,
nameof(StationAreaEnum.涓�妤煎垎鍒�) => TaskTypeEnum.PartOffInbound,
nameof(StationAreaEnum.涓�妤肩焊寮犳穻鑶�) => TaskTypeEnum.PaperFilmInbound,
- nameof(StationAreaEnum.涓�妤兼棤绾烘穻鑶�) => TaskTypeEnum.WFBYLInbound,
+ nameof(StationAreaEnum.涓�妤兼棤绾虹粐甯�) => TaskTypeEnum.WFBYLInbound,
+ nameof(StationAreaEnum.涓�妤兼棤绾烘穻鑶�) => TaskTypeEnum.WFBLMYLInbound,
_ => throw new Exception("鏈壘鍒板搴斾换鍔�")
};
- if (taskTypeEnum == TaskTypeEnum.WFBYLInbound)
+ if (taskTypeEnum == TaskTypeEnum.WFBYLInbound || taskTypeEnum == TaskTypeEnum.WFBLMYLInbound)
{
Dt_AGVStationInfo? stationInfo = AssignWFBStation(_AGVStationInfos?.Select(x => x.AGVStationCode).ToList()) ?? throw new Exception("鏈壘鍒板彲鐢ㄦ棤绾哄竷鏆傚瓨鏋�");
newTask.NextAddress = stationInfo.AGVStationCode;
@@ -2144,6 +2158,10 @@
throw new Exception(ex.Message);
}
}
+ /// <summary>
+ /// 鎴愬搧缁勭洏
+ /// </summary>
+ /// <returns></returns>
public WebResponseContent BoxingInBound(string stationCode,List<string> barCodes)
{
WebResponseContent content = new WebResponseContent();
--
Gitblit v1.9.3