diff --git a/ZR.Admin.WebApi/Controllers/mes/wms/WmGoodsNowProductionController.cs b/ZR.Admin.WebApi/Controllers/mes/wms/WmGoodsNowProductionController.cs
index 9cc54e90..6c6c78c9 100644
--- a/ZR.Admin.WebApi/Controllers/mes/wms/WmGoodsNowProductionController.cs
+++ b/ZR.Admin.WebApi/Controllers/mes/wms/WmGoodsNowProductionController.cs
@@ -40,6 +40,19 @@ namespace ZR.Admin.WebApi.Controllers
}
+ ///
+ /// 批量查询 父子节点
+ ///
+ ///
+ ///
+ [HttpGet("patchsearch")]
+ public IActionResult Querypatchsearch(WmGoodsNowProductionQueryDto parm)
+ {
+ var response = _WmGoodsNowProductionService.QuerypatchsearchList(parm);
+ return SUCCESS(response);
+ }
+
+
///
/// 查询成品库当前货物表详情
///
diff --git a/ZR.Model/MES/wms/Dto/WmGoods_nodeDto.cs b/ZR.Model/MES/wms/Dto/WmGoods_nodeDto.cs
new file mode 100644
index 00000000..762492d2
--- /dev/null
+++ b/ZR.Model/MES/wms/Dto/WmGoods_nodeDto.cs
@@ -0,0 +1,58 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace ZR.Model.MES.wms.Dto
+{
+ ///
+ /// 当前仓库货物节点表
+ ///
+ public class WmGoods_nodeDto
+ {
+
+ public string Id { get; set; }
+
+
+ public string PackageCode { get; set; }
+
+ ///
+ /// 父节点 就是短批次号
+ ///
+ public string PackageCodeClient_short_parent { get; set; }
+
+ ///
+ /// 子节点 (主键)
+ ///
+ public string PackageCodeClient_son { get; set; }
+
+ ///
+ /// 箱数
+ ///
+ public int Pack_num { get; set; }
+
+ public string PackageCodeOriginal { get; set; }
+
+
+ public string LocationCode { get; set; }
+
+ public string Partnumber { get; set; }
+
+ public int? GoodsNumLogic { get; set; }
+
+ public int? GoodsNumAction { get; set; }
+
+ public DateTime? EntryWarehouseTime { get; set; }
+
+ public string Remark { get; set; }
+
+ public string UpdatedBy { get; set; }
+
+ public DateTime? UpdatedTime { get; set; }
+
+ public string CreatedBy { get; set; }
+
+ public DateTime? CreatedTime { get; set; }
+ }
+}
diff --git a/ZR.Service/mes/wms/IService/IWmGoodsNowProductionService.cs b/ZR.Service/mes/wms/IService/IWmGoodsNowProductionService.cs
index a9027a61..b3007184 100644
--- a/ZR.Service/mes/wms/IService/IWmGoodsNowProductionService.cs
+++ b/ZR.Service/mes/wms/IService/IWmGoodsNowProductionService.cs
@@ -5,6 +5,7 @@ using ZR.Model.Dto;
using System.Collections.Generic;
using ZR.Model.MES.wms;
using ZR.Model.MES.wms.Dto;
+using Aliyun.OSS;
namespace ZR.Service.mes.wms.IService
{
@@ -14,6 +15,12 @@ namespace ZR.Service.mes.wms.IService
public interface IWmGoodsNowProductionService : IBaseService
{
PagedInfo GetList(WmGoodsNowProductionQueryDto parm);
+ ///
+ /// 批量查看
+ ///
+ ///
+ ///
+ (List, int) QuerypatchsearchList(WmGoodsNowProductionQueryDto parm);
WmGoodsNowProduction GetInfo(string Id);
diff --git a/ZR.Service/mes/wms/WmAGVService.cs b/ZR.Service/mes/wms/WmAGVService.cs
index 45ada1d6..2b57a9d9 100644
--- a/ZR.Service/mes/wms/WmAGVService.cs
+++ b/ZR.Service/mes/wms/WmAGVService.cs
@@ -184,11 +184,7 @@ namespace ZR.Service.Business
Context.Updateable().SetColumns(it => it.BackTaskId == res_data.reqCode)
.Where(it => it.Id == agvTask.Id).ExecuteCommand();
}
-
-
}
-
-
return response;
}
diff --git a/ZR.Service/mes/wms/WmGoodsNowProductionService.cs b/ZR.Service/mes/wms/WmGoodsNowProductionService.cs
index 0819f86f..6ec8cb5d 100644
--- a/ZR.Service/mes/wms/WmGoodsNowProductionService.cs
+++ b/ZR.Service/mes/wms/WmGoodsNowProductionService.cs
@@ -9,6 +9,7 @@ using System.Linq;
using ZR.Model.MES.wms;
using ZR.Model.MES.wms.Dto;
using ZR.Service.mes.wms.IService;
+using System.Collections.Generic;
namespace ZR.Service.mes.wms
{
@@ -39,6 +40,64 @@ namespace ZR.Service.mes.wms
}
+ ///
+ /// 批量查看
+ ///
+ ///
+ ///
+ ///
+ public (List,int) QuerypatchsearchList(WmGoodsNowProductionQueryDto parm)
+ {
+ List list = null;
+ int total = 0;
+ var predicate = Expressionable.Create()
+ .AndIF(!string.IsNullOrEmpty(parm.Partnumber), it => it.Partnumber.Contains(parm.Partnumber))
+ .AndIF(!string.IsNullOrEmpty(parm.PackageCodeClient), it => it.PackageCodeClient.Contains(parm.PackageCodeClient));
+
+ List rawdatas = Queryable().Where(predicate.ToExpression()).ToPageList(parm.PageNum, parm.PageSize, ref total);
+ if(rawdatas!=null&&rawdatas.Count > 0)
+ {
+ //todo 对字段进行拆分
+
+ List WmGoods_nodeDto_list= rawdatas.Select(p => new WmGoods_nodeDto() {
+ Id =p.Id,
+ PackageCode =p.PackageCode,
+ PackageCodeClient_short_parent = p.PackageCodeClient.Split("_")[0],
+ PackageCodeClient_son=p.PackageCodeClient,
+ PackageCodeOriginal=p.PackageCodeClient,
+ LocationCode = p.LocationCode,
+ Partnumber = p.Partnumber,
+ GoodsNumLogic=p.GoodsNumLogic,
+ GoodsNumAction=p.GoodsNumAction,
+ EntryWarehouseTime=p.EntryWarehouseTime,
+ Remark= p.Remark,
+
+ }).ToList();
+ //todo 分组 聚合 生成父节点
+
+ List WmGoods_nodeDto_list_parent = WmGoods_nodeDto_list.GroupBy(p => p.PackageCodeClient_short_parent)
+ .Select(group => new WmGoods_nodeDto()
+ {
+ PackageCodeClient_short_parent = "",
+ PackageCodeClient_son = group.Key,
+ GoodsNumLogic = group.Sum(group => group.GoodsNumLogic),
+ GoodsNumAction = group.Sum(group => group.GoodsNumAction),
+ Partnumber = group.Max(group => group.Partnumber),
+ Pack_num = group.Count()
+ }).ToList();
+
+ //todo 合并
+
+ list = WmGoods_nodeDto_list.Concat(WmGoods_nodeDto_list_parent).ToList();
+
+
+ }
+ return (list,total);
+ }
+
+
+
+
///
/// 获取详情
///
@@ -94,5 +153,6 @@ namespace ZR.Service.mes.wms
return Update(model, true);
}
+
}
}
\ No newline at end of file