From 603ec6242dd3a46bda3ea54082e06240b21c673e Mon Sep 17 00:00:00 2001 From: bklLiudl <673013083@qq.com> Date: 星期六, 19 十月 2024 19:07:37 +0800 Subject: [PATCH] 问题修改 --- Wms/WMS.BLL/DataServer/StockServer.cs | 47 +++++++++++++++++++++++++++++++++++------------ 1 files changed, 35 insertions(+), 12 deletions(-) diff --git a/Wms/WMS.BLL/DataServer/StockServer.cs b/Wms/WMS.BLL/DataServer/StockServer.cs index 76b0595..a527d2c 100644 --- a/Wms/WMS.BLL/DataServer/StockServer.cs +++ b/Wms/WMS.BLL/DataServer/StockServer.cs @@ -7,6 +7,7 @@ using System.Text; using Model.ModelDto; using Model.ModelDto.DataDto; +using Model.ModelDto.SysDto; using Model.ModelVm.DataVm; using SqlSugar; using WMS.DAL; @@ -129,16 +130,22 @@ /// <param name="palletNo">鎵樼洏鏉$爜</param> /// <param name="status">搴撳瓨鐘舵��</param> /// <param name="inspectStatus">璐ㄦ鐘舵��</param> + /// <param name="houseNo">鎵�灞炰粨搴�</param> + /// <param name="areaNo">鎵�灞炲尯鍩�</param> + /// <param name="type">鐗╂枡绫诲瀷</param> + /// <param name="ownerNo">璐т富缂栧彿</param> + /// <param name="ownerName">璐т富鍚嶇О</param> /// <returns></returns> public List<StockDetailDto> GetInventoryList1(string skuNo, string skuName, string lotNo, string locatNo, string palletNo, - string status, string inspectStatus, string ownerNo, string ownerName) + string status, string inspectStatus, string ownerNo, string ownerName, string houseNo, string areaNo, string type) { - string str = "select detail.*,house.WareHouseNo + '-' + house.WareHouseName as WareHouseName," + + string str = "select detail.*,sku.Type,house.WareHouseNo + '-' + house.WareHouseName as WareHouseName," + "roadway.RoadwayNo + '-' + roadway.RoadwayName as RoadwayName,area.AreaNo + '-' + area.AreaName as AreaName " + "from DataStockDetail detail " + "left join SysStorageRoadway roadway on detail.RoadwayNo = roadway.RoadwayNo " + "left join SysWareHouse house on detail.WareHouseNo = house.WareHouseNo " + "left join SysStorageArea area on detail.AreaNo = area.AreaNo " + + "left join SysMaterials as sku on detail.skuNo = sku.skuNo " + "Where detail.IsDel = @isdel"; //鍒ゆ柇鐗╂枡缂栫爜鏄惁涓虹┖ if (!string.IsNullOrEmpty(skuNo)) @@ -184,21 +191,37 @@ if (!string.IsNullOrEmpty(ownerName)) { str += " and detail.OwnerName like @ownerName"; + } + if (!string.IsNullOrEmpty(houseNo)) + { + str += " and house.WareHouseNo = @wareHouseNo"; } + if (!string.IsNullOrEmpty(areaNo)) + { + str += " and area.AreaNo = @areaNo"; + } + if (!string.IsNullOrEmpty(type)) + { + str += " and sku.Type = @type"; + } + //鎺掑簭 str += " order by detail.SkuNo,detail.PalletNo,detail.LotNo"; List<StockDetailDto> stockDetailsList = Db.Ado.SqlQuery<StockDetailDto>(str, new { - isdel = "0", //鏄惁鍒犻櫎 - skuno = "%" + skuNo + "%", //鐗╂枡缂栫爜 - skuname = "%" + skuName + "%", //鐗╂枡鍚嶇О - lotno = "%" + lotNo + "%", //鎵规 - locatno = "%" + locatNo + "%", //鍌ㄤ綅鍦板潃 - palletno = "%" + palletNo + "%", //鎵樼洏鏉$爜 - status = status, //搴撳瓨鐘舵�� - inspectstatus = inspectStatus, //璐ㄦ鐘舵�� - ownerNo = "%" + ownerNo + "%", //璐т富缂栫爜 - ownerName = "%" + ownerName + "%" //璐т富鍚嶇О + isdel = "0", //鏄惁鍒犻櫎 + skuno = "%" + skuNo + "%", //鐗╂枡缂栫爜 + skuname = "%" + skuName + "%", //鐗╂枡鍚嶇О + lotno = "%" + lotNo + "%", //鎵规 + locatno = "%" + locatNo + "%", //鍌ㄤ綅鍦板潃 + palletno = "%" + palletNo + "%", //鎵樼洏鏉$爜 + status = status, //搴撳瓨鐘舵�� + inspectstatus = inspectStatus, //璐ㄦ鐘舵�� + ownerNo = "%" + ownerNo + "%", //璐т富缂栫爜 + ownerName = "%" + ownerName + "%", //璐т富鍚嶇О + wareHouseNo = houseNo, + areaNo = areaNo, //鎵�灞炲尯鍩� + type = type }); return stockDetailsList; } -- Gitblit v1.8.0