From ae03ec7001b6ba415fa5ccac7c6ff06c81578eb1 Mon Sep 17 00:00:00 2001 From: test <15284381150@163.com> Date: 星期五, 19 九月 2025 08:02:38 +0800 Subject: [PATCH] Merge branch 'djp' --- Pda/View/HouseDataSetting/stockQuery.html | 29 +++++---- Wms/Model/ModelDto/BllAsnDto/BoxInfoDto.cs | 46 +++++++++++++++ Wms/Wms/Controllers/PdaCrController.cs | 3 Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs | 68 +++++++++++++++++++--- Wms/WMS.IBLL/IPdaServer/IPdaCrServer.cs | 2 5 files changed, 124 insertions(+), 24 deletions(-) diff --git a/Pda/View/HouseDataSetting/stockQuery.html b/Pda/View/HouseDataSetting/stockQuery.html index cd09a14..40ef808 100644 --- a/Pda/View/HouseDataSetting/stockQuery.html +++ b/Pda/View/HouseDataSetting/stockQuery.html @@ -119,8 +119,7 @@ autocomplete="off" class="layui-input"> </div> </div> - <!-- --> - <div id="" class="layui-form-item layout-input" style="margin-top: 5px;"> + <!-- <div id="" class="layui-form-item layout-input" style="margin-top: 5px;"> <label class="layui-form-label">鐗╂枡缂栫爜</label> <div class="layui-input-block"> <input id="SkuNo" type="text" lay-verify="stock" @@ -140,7 +139,7 @@ <input id="Standard" type="text" lay-verify="stock" autocomplete="off" class="layui-input" style="border: 0px;" disabled> </div> - </div> + </div> --> <div id="" class="" style="width: 100%;height: 36px;margin-top: 15px;"> <button id="btnQuery" class="btn-ok" type="button">鏌ヨ</button> </div> @@ -172,6 +171,8 @@ <!-- <p class="box-list-title">宸茬粦瀹氱瀛愬垪琛�</p> --> <table id="tableBoxList" class="tbl-box-list" border="1px" > <tr> + <th >鐗╂枡鍚嶇О</th> + <th >鐗╂枡缂栫爜</th> <th >鐗╁搧鎵规</th> <th >搴撳瓨<br>鏁伴噺</th> <th >閿佸畾<br>鏁伴噺</th> @@ -179,7 +180,9 @@ </tr> <tr id="boxCell" style="display: none;"> - <td name="LotNo">鐗╂枡鎵规</td> + <td name="SkuName" style="word-wrap: break-word; max-width: 64px;">鐗╂枡鍚嶇О</td> + <td name="SkuNo" style="word-wrap: break-word; max-width: 48px;">鐗╂枡缂栫爜</td> + <td name="LotNo" style="word-wrap: break-word; max-width: 48px;">鐗╂枡鎵规</td> <td name="Qty">鍓╀綑鏁伴噺</td> <td name="LockQty">閿佸畾鏁伴噺</td> <td name="FrozenQty">鍐荤粨鏁伴噺</td> @@ -245,10 +248,10 @@ function clear(){ $("#LocatNo").val(''); $("#PalletNo").val(''); - $("#BoxNo").val(''); - $("#SkuNo").val(""); - $("#SkuName").val(""); - $("#Standard").val(""); + //$("#BoxNo").val(''); + //$("#SkuNo").val(""); + //$("#SkuName").val(""); + //$("#Standard").val(""); } $("#btnQuery").click(function(){ @@ -270,10 +273,10 @@ clear(); $("#LocatNo").val(res.data[0].LocatNo); $("#PalletNo").val(res.data[0].PalletNo); - $("#BoxNo").val(res.data[0].BoxNo); - $("#SkuNo").val(res.data[0].SkuNo); - $("#SkuName").val(res.data[0].SkuName); - $("#Standard").val(res.data[0].Standard); + //$("#BoxNo").val(res.data[0].BoxNo); + // $("#SkuNo").val(res.data[0].SkuNo); + // $("#SkuName").val(res.data[0].SkuName); + // $("#Standard").val(res.data[0].Standard); tableData = deepCopy(res.data) refreshTable() } else { //涓嶆垚鍔� @@ -318,6 +321,8 @@ idx++; tr.attr('index', idx) + tr.find("td[name='SkuName']").html(list[i].SkuName); + tr.find("td[name='SkuNo']").html(list[i].SkuNo); tr.find("td[name='LotNo']").html(list[i].LotNo); tr.find("td[name='Qty']").html(list[i].Qty); tr.find("td[name='LockQty']").html(list[i].LockQty); diff --git a/Wms/Model/ModelDto/BllAsnDto/BoxInfoDto.cs b/Wms/Model/ModelDto/BllAsnDto/BoxInfoDto.cs index f17d6be..971a69d 100644 --- a/Wms/Model/ModelDto/BllAsnDto/BoxInfoDto.cs +++ b/Wms/Model/ModelDto/BllAsnDto/BoxInfoDto.cs @@ -240,6 +240,52 @@ /// </summary> public string Date2 { get; set; } } + public class StockDetailWithQtyDto + { + public string LotNo { get; set; } + public string LotText { get; set; } + public string SupplierLot { get; set; } + public string OwnerNo { get; set; } + public string OwnerName { get; set; } + public string SupplierNo { get; set; } + public string SupplierName { get; set; } + public string SkuNo { get; set; } + public string SkuName { get; set; } + public string Standard { get; set; } + public decimal Qty { get; set; } // 鏉ヨ嚜DataBoxInfo鐨凲ty + public decimal? LockQty { get; set; } + public decimal? FrozenQty { get; set; } + public decimal? InspectQty { get; set; } + public string ASNNo { get; set; } + public int? ASNDetailNo { get; set; } + public string SONo { get; set; } + public string WareHouseNo { get; set; } + public string RoadwayNo { get; set; } + public string AreaNo { get; set; } + public string LocatNo { get; set; } + public string PalletNo { get; set; } + public string PalletNo2 { get; set; } + public string PalletNo3 { get; set; } + public string PalletTags { get; set; } + public DateTime? CompleteTime { get; set; } + public DateTime? ProductionTime { get; set; } + public DateTime? ExpirationTime { get; set; } + public string Status { get; set; } + public string InspectMark { get; set; } + public string BitPalletMark { get; set; } + public string InspectStatus { get; set; } + public DateTime? InspectTime { get; set; } + public string PackagNo { get; set; } + public string IsBale { get; set; } + public string IsBelt { get; set; } + public string UDF5 { get; set; } + public string IsDel { get; set; } + public DateTime CreateTime { get; set; } + public int? CreateUser { get; set; } + public DateTime? UpdateTime { get; set; } + public int? UpdateUser { get; set; } + public string Demo { get; set; } + } } diff --git a/Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs b/Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs index 2f0e325..5ce43ae 100644 --- a/Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs +++ b/Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs @@ -1,6 +1,8 @@ 锘縰sing System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; +using System.Reflection.Metadata; using System.Security.Cryptography.X509Certificates; using System.Text; using System.Threading.Tasks; @@ -9,6 +11,7 @@ using Model.ModelDto; using Model.ModelDto.BllCheckDto; using Model.ModelDto.PdaDto; +using Model.ModelDto.SysDto; using Newtonsoft.Json; using SqlSugar; using Utility; @@ -424,17 +427,62 @@ // .OrderBy(s => new { s.LotNo, s.LocatNo, s.PalletNo }) // .ToListAsync(); //} - public async Task<List<DataStockDetail>> GetStockQueryList(string locatNo, string palletNo, string boxNo) + public async Task<List<StockDetailWithQtyDto>> GetStockQueryList(string locatNo, string palletNo, string boxNo) { - return await Db.Queryable<DataStockDetail>() - .LeftJoin<DataBoxInfo>((stk, box) => stk.LotNo == box.LotNo) - .Where((stk, box) => stk.IsDel == "0") - .WhereIF(!string.IsNullOrWhiteSpace(locatNo),(stk, box) => stk.LocatNo.Contains(locatNo)) - .WhereIF(!string.IsNullOrWhiteSpace(palletNo),(stk, box) => stk.PalletNo.Contains(palletNo)) - .WhereIF(!string.IsNullOrWhiteSpace(boxNo),(stk, box) => box.BoxNo.Contains(boxNo)) - .OrderBy((stk, box) => new { stk.LotNo, stk.LocatNo, stk.PalletNo, box.BoxNo }) - .Select((stk, box) => stk) - .ToListAsync(); + return await Db.Queryable<DataStockDetail>("a") + .InnerJoin<DataBoxInfo>((a, b) => a.LotNo == b.LotNo) + .Where((a, b) => a.IsDel == "0") + .WhereIF(!string.IsNullOrWhiteSpace(locatNo), (a, b) => a.LocatNo.Contains(locatNo)) + .WhereIF(!string.IsNullOrWhiteSpace(palletNo), (a, b) => a.PalletNo.Contains(palletNo)) + .WhereIF(!string.IsNullOrWhiteSpace(boxNo), (a, b) => b.BoxNo.Contains(boxNo)) + .OrderBy((a, b) => new { a.LotNo, a.LocatNo, a.PalletNo }) + .Select((a, b) => new StockDetailWithQtyDto + { + LotNo = a.LotNo, + LotText = a.LotText, + SupplierLot = a.SupplierLot, + OwnerNo = a.OwnerNo, + OwnerName = a.OwnerName, + SupplierNo = a.SupplierNo, + SupplierName = a.SupplierName, + SkuNo = a.SkuNo, + SkuName = a.SkuName, + Standard = a.Standard, + Qty = b.Qty, // DataBoxInfo鐨凲ty瀛楁 + LockQty = a.LockQty, + FrozenQty = a.FrozenQty, + InspectQty = a.InspectQty, + ASNNo = a.ASNNo, + ASNDetailNo = a.ASNDetailNo, + SONo = a.SONo, + WareHouseNo = a.WareHouseNo, + RoadwayNo = a.RoadwayNo, + AreaNo = a.AreaNo, + LocatNo = a.LocatNo, + PalletNo = a.PalletNo, + PalletNo2 = a.PalletNo2, + PalletNo3 = a.PalletNo3, + PalletTags = a.PalletTags, + CompleteTime = a.CompleteTime, + ProductionTime = a.ProductionTime, + ExpirationTime = a.ExpirationTime, + Status = a.Status, + InspectMark = a.InspectMark, + BitPalletMark = a.BitPalletMark, + InspectStatus = a.InspectStatus, + InspectTime = a.InspectTime, + PackagNo = a.PackagNo, + IsBale = a.IsBale, + IsBelt = a.IsBelt, + UDF5 = a.UDF5, + IsDel = a.IsDel, + CreateTime = a.CreateTime, + CreateUser = a.CreateUser, + UpdateTime = a.UpdateTime, + UpdateUser = a.UpdateUser, + Demo = a.Demo + }) + .ToListAsync(); } #endregion diff --git a/Wms/WMS.IBLL/IPdaServer/IPdaCrServer.cs b/Wms/WMS.IBLL/IPdaServer/IPdaCrServer.cs index 88d203c..c4a75c5 100644 --- a/Wms/WMS.IBLL/IPdaServer/IPdaCrServer.cs +++ b/Wms/WMS.IBLL/IPdaServer/IPdaCrServer.cs @@ -65,7 +65,7 @@ /// <param name="locatNo">鍌ㄤ綅缂栧彿</param> /// <param name="palletNo">鎵樼洏鍙�</param> /// <returns></returns> - Task<List<DataStockDetail>> GetStockQueryList(string locatNo, string palletNo, string boxno); + Task<List<StockDetailWithQtyDto>> GetStockQueryList(string locatNo, string palletNo, string boxno); #endregion diff --git a/Wms/Wms/Controllers/PdaCrController.cs b/Wms/Wms/Controllers/PdaCrController.cs index 7634087..ce952b6 100644 --- a/Wms/Wms/Controllers/PdaCrController.cs +++ b/Wms/Wms/Controllers/PdaCrController.cs @@ -18,6 +18,7 @@ using Wms.Tools; using Microsoft.Extensions.Options; using Model.ModelDto.DataDto; +using Model.ModelDto; namespace Wms.Controllers { @@ -122,7 +123,7 @@ /// <returns></returns> [HttpGet] [ServiceFilter(typeof(ApiResponseActionFilter))] - public async Task<List<DataStockDetail>> GetStockQueryList(string locatNo, string palletNo, string boxno) + public async Task<List<StockDetailWithQtyDto>> GetStockQueryList(string locatNo, string palletNo, string boxno) { return await _pdaCrSvc.GetStockQueryList(locatNo, palletNo, boxno); } -- Gitblit v1.8.0