From 975ea3c28b1661b3b6eabee5277cc98d853736d3 Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <1247017146@qq.com>
Date: 星期二, 03 六月 2025 11:12:40 +0800
Subject: [PATCH] 合并
---
CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 55 insertions(+), 5 deletions(-)
diff --git a/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs b/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
index c19ff24..b8b4805 100644
--- a/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
+++ b/CodeManagement/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
@@ -1086,11 +1086,11 @@
.ToList().Select(x => x.DeviceCode).ToList();
var result = await _stockInfoRepository.Db.Queryable<DtStockInfo>()
- .Where(x => x.ProductionLine == station.productLine)
+ .WhereIF(!station.Roadway.Contains("JZSC"), x => x.ProductionLine == station.productLine)
.Where(x => x.AreaCode == areaCode && x.IsFull == false)
- .Includes(x=>x.StockInfoDetails)
+ .Includes(x => x.StockInfoDetails)
.Where(x => x.StockInfoDetails.Any(y => y.MaterielCode == "绌烘墭鐩�"))
- .Includes(x=>x.LocationInfo)
+ .Includes(x => x.LocationInfo)
.WhereIF(!deviceCode.IsNullOrEmpty(), x => deviceCode.Contains(x.LocationInfo.RoadwayNo))
.Where(x => x.LocationInfo.LocationStatus == (int)LocationEnum.InStock && x.LocationInfo.AreaId == area.AreaID && x.LocationInfo.EnalbeStatus == (int)EnableEnum.Enable) // 杩囨护鏉′欢
.OrderBy(x => x.CreateDate) // 鎺掑簭
@@ -1115,7 +1115,7 @@
{
return new Dt_Task
{
- Grade = tag == 104 ? (stockInfo.LocationInfo.RoadwayNo.Contains("CWSC") ? 1 : 2) : (stockInfo.LocationInfo.RoadwayNo.Contains("CWSC") ? 2 : 1),
+ Grade = tag == 104 ? (stockInfo.LocationInfo.RoadwayNo.Contains("CWSC")|| stockInfo.LocationInfo.RoadwayNo.Contains("JZSC") ? 1 : 2) : (stockInfo.LocationInfo.RoadwayNo.Contains("CWSC") || stockInfo.LocationInfo.RoadwayNo.Contains("JZSC") ? 2 : 1),
Roadway = stockInfo.LocationInfo.RoadwayNo,
TargetAddress = position,
Dispatchertime = DateTime.Now,
@@ -1658,7 +1658,7 @@
{
var result = _locationRepository.QueryData(x => x.EnalbeStatus != (int)EnableEnum.Disable && x.LocationStatus == (int)LocationEnum.Free && x.RoadwayNo.Contains("JZSC"));
LogFactory.GetLog($"闈欑疆{RoadwayNo}鏌ヨ绌洪棽搴撲綅").Info(true, $"{JsonConvert.SerializeObject(result)}");
- if (result.Count > 0)
+ if (result.Count > 5)
{
return content.OK();
}
@@ -1735,9 +1735,59 @@
return content.Error(ex.Message);
}
}
+ /// <summary>
+ /// 鑾峰彇璐т綅鐘舵��
+ /// </summary>
+ /// <returns></returns>
+ public WebResponseContent GetStockQuantity()
+ {
+ WebResponseContent content = new WebResponseContent();
+ try
+ {
+ var location = _locationRepository.Db.Queryable<DtLocationInfo>().ToList();
+ return content.OK(data: location);
+ }
+ catch (Exception ex)
+ {
+ return content.Error(ex.Message);
+ }
+ }
+ public WebResponseContent Getproductionvolume()
+ {
+ WebResponseContent content = new WebResponseContent();
+ try
+ {
+ var now = DateTime.Now;
+ var startOfDay = new DateTime(now.Year, now.Month, now.Day);
+ var endOfDay1 = startOfDay.AddDays(-7);
+ var taskHty = _task_HtyRepository.Db.Queryable<Dt_Task_Hty>().Where(it => it.CreateDate > endOfDay1).ToList();
+ return content.OK(data: taskHty);
+ }
+ catch (Exception ex)
+ {
+ return content.Error(ex.Message);
+ }
+ }
+
+ public WebResponseContent Getoutput()
+ {
+ WebResponseContent content = new WebResponseContent();
+ try
+ {
+ var now = DateTime.Now;
+ var firstDayOfYear = new DateTime(now.Year, 1, 1);
+ var taskHty = _task_HtyRepository.Db.Queryable<Dt_Task_Hty>().Where(it => it.CreateDate > firstDayOfYear&&it.TaskType==100).ToList();
+ return content.OK(data: taskHty);
+ }
+ catch (Exception ex)
+ {
+ return content.Error(ex.Message);
+ }
+
+ }
#endregion
#endregion 澶栭儴鎺ュ彛鏂规硶
--
Gitblit v1.9.3