From 45490d814b84159f269813e6cff3c79fab6e170b Mon Sep 17 00:00:00 2001 From: chengsc <Demo@DESKTOP-CPA90BF> Date: 星期日, 21 七月 2024 09:59:27 +0800 Subject: [PATCH] 添加上架任务记录 --- HTML/views/ASNSetting/PalletUpShelf.html | 431 +++++++++++++++++++++++++++++++++ Wms/WMS.BLL/BllAsnServer/PalletUpShelfServer.cs | 71 +++++ Wms/WMS.IBLL/IBllAsnServer/IPalletUpShelfServer.cs | 41 +++ Wms/Wms/Controllers/BllAsnController.cs | 23 + HTML/views/ASNSetting/ArrivalNotice.html | 2 Wms/Model/ModelDto/BllAsnDto/PalletUpShelfDto.cs | 89 ++++++ Wms/Model/ModelVm/BllAsnVm/PalletUpShelfVm.cs | 43 +++ Wms/WMS.Entity/BllAsnEntity/BllPalletUpShelf.cs | 63 ++++ 8 files changed, 761 insertions(+), 2 deletions(-) diff --git a/HTML/views/ASNSetting/ArrivalNotice.html b/HTML/views/ASNSetting/ArrivalNotice.html index 3d4ae65..a47b6b5 100644 --- a/HTML/views/ASNSetting/ArrivalNotice.html +++ b/HTML/views/ASNSetting/ArrivalNotice.html @@ -401,7 +401,7 @@ base: '../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰� }).extend({ index: 'lib/index' //涓诲叆鍙fā鍧� - }).use(['index', 'table', 'laypage', 'layer', 'laydate'], function () { + }).use(['index', 'form','table', 'laypage', 'layer', 'laydate'], function () { var doing = true; diff --git a/HTML/views/ASNSetting/PalletUpShelf.html b/HTML/views/ASNSetting/PalletUpShelf.html new file mode 100644 index 0000000..0355c9d --- /dev/null +++ b/HTML/views/ASNSetting/PalletUpShelf.html @@ -0,0 +1,431 @@ +<!DOCTYPE html> +<html> + +<head> + <meta charset="utf-8"> + <title>鎵樼洏涓婃灦</title> + <meta name="renderer" content="webkit"> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> + <meta name="viewport" + content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"> + <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all"> + <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all"> + <link rel="stylesheet" href="../../css/public.css" media="all"> + <style> + .rightMargin { + margin-right: 0px; + } + + .buJu { + margin-top: 10px; + display: flex; + flex-direction: row-reverse; + } + + .beiJing { + background-color: #fafafa; + padding-top: 5px; + border-radius: 3px; + box-shadow: inset 0 0 3px 1px #ccc; + } + + /* 琛ㄦ牸涓嬫媺灏忕澶撮殣钘� */ + .layui-table-grid-down { + display: none; + } + </style> + <script> + // 杩欓噷鏄渶瑕佸湪椤甸潰娓叉煋涔嬪墠鎵ц鐨勪唬鐮� + document.addEventListener("DOMContentLoaded", function () { + + //鑾峰彇table榛樿鏄剧ず鏁� + pageCntFirst(); + //鍒ゆ柇鏄惁寮�鍚痶able鍒楄〃鍒楀璋冩暣鍔熻兘銆� + GetIsSetColW(); + }); + </script> +</head> + + +<body> + + <div class="layui-fluid" style="padding: 3px;"> + <div class="layui-card"> + <div class="layui-form layui-card-header layuiadmin-card-header-auto"> + <div class="layui-form-item"> + <div class="layui-inline" style="margin-right: 0;"> + <label class="layui-form-label" style="width: 60px;">杩芥函鍙�</label> + <div class="layui-input-inline" style="margin-right: 0;"> + <input type="text" id="TraceNo" name="TraceNo" placeholder="杩芥函鍙�" autocomplete="off" + class="layui-input"> + </div> + </div> + <div class="layui-inline" style="margin-right: 0;"> + <label class="layui-form-label" style="width: 60px;">浠诲姟鍙�</label> + <div class="layui-input-inline" style="margin-right: 0;"> + <input type="text" id="TaskNo" name="TaskNo" placeholder="浠诲姟鍙�" autocomplete="off" + class="layui-input"> + </div> + </div> + <div class="layui-inline" style="margin-right: 0;"> + <label class="layui-form-label" style="width: 60px;">鎵樼洏鍙�</label> + <div class="layui-input-inline" style="margin-right: 0;"> + <div class="layui-input-inline" style="margin-right: 0;"> + <input type="text" id="PalletNo" name="PalletNo" placeholder="鎵樼洏鍙�" + autocomplete="off" class="layui-input"> + </div> + </div> + </div> + <div class="layui-inline" style="margin-right: 0;"> + <label class="layui-form-label" style="width: 60px;">鐗╁搧缂栫爜</label> + <div class="layui-input-inline" style="margin-right: 0;"> + <input type="text" id="SkuNo" name="SkuNo" placeholder="鐗╂枡缂栫爜" autocomplete="off" + class="layui-input"> + </div> + </div> + <div class="layui-inline" style="margin-right: 0;"> + <label class="layui-form-label" style="width: 60px;">鐗╁搧鍚嶇О</label> + <div class="layui-input-inline" style="margin-right: 0;"> + <input type="text" id="SkuName" name="SkuName" placeholder="鐗╂枡鍚嶇О" autocomplete="off" + class="layui-input"> + </div> + </div> + <div class="layui-inline" style="margin-right: 0;"> + <label class="layui-form-label" style="width: 60px;">鎵规鍙�</label> + <div class="layui-input-inline" style="margin-right: 0;"> + <div class="layui-input-inline" style="margin-right: 0;"> + <input type="text" id="LotNo" name="LotNo" placeholder="鎵规鍙�" autocomplete="off" + class="layui-input"> + </div> + </div> + </div> + + + <div class="layui-inline" style="margin-right: 0;"> + <label class="layui-form-label">鐘舵��</label> + <div class="layui-input-inline" style="margin-right: 0;"> + <div class="layui-input-inline" style="margin-right: 0;"> + <select name="Status" id="Status" lay-filter="Status" lay-search> + <option value=""></option> + <option value="0">绛夊緟鎵ц</option> + <option value="1">姝e湪鎵ц</option> + <option value="2">鎵ц瀹屾垚</option> + <option value="4">宸插彇娑�</option> + + </select> + </div> + </div> + </div> + + <div class="layui-inline"> + <button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit + lay-filter="LAY-app-contlist-search"> + <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>鎼滅储 + </button> + <!-- <button class="layui-btn layui-btn-sm layuiadmin-btn-list layui-btn-normal buDaLabelClass" style="margin-left: 5px;" lay-event="BuDaLabel" id="BuDaLabel"> + <i class="layui-icon layui-icon-print layuiadmin-button-btn"></i>琛ユ墦鏍囩 + </button> + <button class="layui-btn layui-btn-sm layuiadmin-btn-list layui-btn-danger delLabelClass" style="margin-left: 5px;" lay-event="delLabel" id="delLabel"> + <i class="layui-icon layui-icon-delete layuiadmin-button-btn"></i>鍒犻櫎鏍囩 + </button> --> + </div> + <!-- 纭鍑哄簱鍙e脊绐� --> + <!-- <div class="layui-inline" id="divDelLotNo" style="display: none; padding-top: 10px;"> + <div class="layui-inline"> + <label class="layui-form-label">鍏ュ簱鍗曟嵁</label> + <div class="layui-input-inline" style="width: 220px;"> + <input type="text" id="AsnNoSelect" name="AsnNoSelect" placeholder="鍏ュ簱鍗曟嵁" autocomplete="off" class="layui-input"> + + </div> + </div> + <div class="layui-inline DivLoadingArea" style="margin-top: 10px;"> + <label class="layui-form-label">鎵规鍙�</label> + <div class="layui-input-inline" style="width: 220px;"> + <select name="LotNoSelect" id="LotNoSelect" lay-search> + <option value=""></option> + </select> + </div> + </div> + + </div> --> + </div> + </div> + <div class="layui-card-body"> + <div class="position-relative"> + <table id="Box-list" lay-filter="Box-list"></table> + + <div class="headerSetIcon"> + <button class="layui-btn layui-btn-primary layui-btn-sm" data-type="customCols"> + <i class="layui-icon"></i> + </button> + </div> + + + + <script type="text/html" id="templetStatus"> + {{# function GetBtn1(d){ + switch (d.Status) { + case "0": return '<button class="layui-btn layui-btn-radius layui-btn-xs">绛夊緟鎵ц</button>'; + case "1": return '<button class="layui-btn layui-btn-radius layui-btn-xs layui-btn-danger ">姝e湪鎵ц</button>'; + case "2": return '<button class="layui-btn layui-btn-radius layui-btn-xs layui-btn-normal ">鎵ц瀹屾垚</button>'; + case "3": return '<button class="layui-btn layui-btn-radius layui-btn-xs layui-btn-normal ">宸插彇娑�</button>'; + default: return ""; + } + } + }} + {{ GetBtn1(d) }} + </script> + + <script type="text/html" id="templetCreateTime"> + {{# function GetBtn2(d){ + return formatDate(d.CreateTime); + } + }} + {{ GetBtn2(d) }} + </script> + <script type="text/html" id="templetUpdateTime"> + {{# function GetBtn3(d){ + return formatDate(d.UpdateTime); + } + }} + {{ GetBtn3(d) }} + </script> + + </div> + + <script type="text/html" id="toolbarDemoList"> + {{# function GetBtn2(d){ + var html = ''; + if(d.Origin == "WMS鐢熸垚" || d.Status == "0"){ + html = `<a class="layui-btn layui-btn-danger layui-btn-xs delClass" lay-event="del"> + <i class="layui-icon layui-icon-delete"></i>鍒犻櫎</a>`; + + } + return html; + } + }} + {{ GetBtn2(d) }} + </script> + </div> + + </div> + </div> + + + <script src="../../layuiadmin/layui/layui.js"></script> + <script src="../../js/public.js"></script> + <script src="../../js/jquery-3.5.1.min.js"></script> + <script src="../../js/jquery.cookie.js"></script> + <script> + // layui.extend({ + // excel: '../../layuiadmin/layui/layui_exts/excel' // {/}鐨勬剰鎬濆嵆浠h〃閲囩敤鑷湁璺緞锛屽嵆涓嶈窡闅� base 璺緞 + // }) + + layui.config({ + base: '../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰� + }).extend({ + index: 'lib/index' //涓诲叆鍙fā鍧� + }).use(['index', 'form', 'layer', 'table', 'laydate',], function () { + var form = layui.form, + table = layui.table, + layer = layui.layer, + laydate = layui.laydate; + + // 鎼滅储鏂规硶 + form.on('submit(LAY-app-contlist-search)', function (data) { + bindTable(); + + }); + + // 椤甸潰鍔犺浇缁戝畾Table + bindTable(); + + //鐢熸垚 + $('#BuDaLabel').on('click', function () { + layer.open({ + type: 2, + title: '鎵撳嵃', + content: 'LabelBoxBuDa.html', + maxmin: true, + area: ['430px', '390px'], + // btn: ['鍙栨秷'] + }); + }); + $("#AsnNoSelect").on('input', function () { + + if ($("#AsnNoSelect").val() == "" || $("#AsnNoSelect").val().length < 16) { + return + } + if ($("#AsnNoSelect").val().length >= 16) { + $("#AsnNoSelect").val($("#AsnNoSelect").val().substr(-16)) + } + GetLotNoByAsnNo() + }) + function GetLotNoByAsnNo() { + + $("#LotNoSelect").empty() + $("#LotNoSelect").append('<option value =>' + '</option>'); + form.render('select'); + var param = { + asnNo: $("#AsnNoSelect").val(), + }; + sendData(IP + "/BllAsn/GetLotNoListByAsn", param, 'get', function(res) { + if (res.code == 0) { //鎴愬姛 + for (var i = 0; i < res.data.length; i++) { + $("#LotNoSelect").append('<option value =' + res.data[i] + '>' + res.data[i] + '</option>'); + } + form.render('select'); + } else { //涓嶆垚鍔� + layer.msg(res.msg, { + icon: 2, + time: 3000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function() { + + }); + } + }); + } + + //鍒犻櫎鏍囩 + $('#delLabel').on('click', function () { + + layer.open({ + type: 1, + title: '鍒犻櫎鏍囩', + content: $('#divDelLotNo'), + maxmin: false, + area: ['350px','340px'], + btn: ['纭畾', '鍙栨秷'], + yes: function(index, layero) { + var param = { + AsnNo: $('#AsnNoSelect').val(), + LotNo: $('#LotNoSelect').val(), + }; + sendData(IP + "/BllAsn/DelLabelByAsnNo", param, 'post', function(res) { + if (res.code == 0) { //鎴愬姛 + bindTable(); + layer.msg(res.msg, { + icon: 1, + time: 1500 //1绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function() { + $('#AsnNoSelect').val(""); + $("#LotNoSelect").empty() + $("#LotNoSelect").append('<option value =>' + '</option>'); + form.render('select'); + }); + } else { //涓嶆垚鍔� + layer.msg(res.msg, { + icon: 2, + time: 3000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級 + }, function() { + bindTable(); + $('#AsnNoSelect').val(""); + $("#LotNoSelect").empty() + $("#LotNoSelect").append('<option value =>' + '</option>'); + form.render('select'); + }); + } + layer.close(index); + }); + } + }); + }); + + + //鑷畾涔夎〃澶� + var TotalColsArr = [[ + + { field: 'TraceNo', title: '杩芥函鍙�', align: 'center',fixed: 'left', width: 180, "disabled": true }, + { field: 'TaskNo', title: '浠诲姟鍙�', align: 'center', fixed: 'left', width: 220, "disabled": true }, + { field: 'PalletNo', title: '鎵樼洏鍙�', align: 'center', fixed: 'left', width: 220, "disabled": true }, + { field: 'Status', title: '鐘舵��', align: 'center', templet: '#templetStatus', width: 90 }, + { field: 'SkuNo', title: '鐗╂枡缂栫爜', align: 'center', width: 140}, + { field: 'SkuName', title: '鐗╂枡鍚嶇О', align: 'center'}, + { field: 'LotNo', title: '鎵规鍙�', align: 'center', width: 155}, + + { field: 'LocatName', title: '鍌ㄤ綅鍦板潃', align: 'center', width: 90 }, + { field: 'RoadwayName', title: '鎵�灞炲贩閬�', align: 'center', width: 90 }, + { field: 'WareHouseName', title: '鎵�灞炰粨搴�', align: 'center', width: 90 }, + + { field: 'CreateUserName', title: '鍒涘缓浜�', align: 'center', width: 100 }, + { field: 'CreateTime', title: '鍒涘缓鏃堕棿', align: 'center', width: 160, templet: '#templetCreateTime' }, + + { field: 'UpdateUserName', title: '鏇存柊浜�', align: 'center', width: 100 }, + { field: 'UpdateTime', title: '鏇存柊鏃堕棿', align: 'center', width: 160, templet: '#templetUpdateTime' }, + //{ field: 'caozuo', title: '鎿嶄綔', fixed: 'right', width: 100, align: 'center', toolbar: '#toolbarDemoList', "disabled": true } + ]]; + //url缂栫爜 + var TotalColsSysArr = encodeURIComponent(encodeURIComponent(JSON.stringify(TotalColsArr)))//灏嗚〃澶存暟鎹繘琛寀rl缂栫爜 + //#endregion + function bindTable() { + + var colsJson + var param1 = { + Href: 'BllAsn/GetPalletUpShelfList' + }; + sendData(IP + "/Sys/GetTableColsByUserId", param1, 'post', function (res) { + if (res.code == 0) { + if (res.data == '' || res.data == undefined || res.data == null) { + colsJson = TotalColsArr + } else { + colsJson = eval(res.data); + } + } else { + colsJson = TotalColsArr + } + var param = { + TraceNo:$("#ASNNo").val(), + TaskNo: $("#BoxNo").val(), + PalletNo: $("#PalletNo").val(), + SkuNo: $("#SkuNo").val(), + SkuName: $("#SkuName").val(), + LotNo: $("#LotNo").val(), + Status: $("#Status").val(), + }; + table.render({ + elem: '#Box-list', + url: IP + "/BllAsn/GetPalletUpShelfList", + method: 'POST', + height: 'full-96', + id: 'Box-list', + where: param, + contentType: 'application/json', + headers: { ToKen: $.cookie('token') }, + page: true, + even: true, + limit: pageCnt, + limits: pageLimits, + cellMinWidth: 60, //鍏ㄥ眬瀹氫箟甯歌鍗曞厓鏍肩殑鏈�灏忓搴︼紝layui 2.2.1 鏂板 + done: function (res) { + + //鑷畾涔夊垪瀹� + SetTableColW('Box-list', 'BllAsn/GetPalletUpShelfList', TotalColsSysArr); + }, + cols: colsJson + }); + }); + //#endregion + } + + //鑷畾涔夎〃澶� + active = { + customCols: function () { + layer.open({ + type: 2, + title: '鑷畾涔夊垪', + content: '../SystemSettings/HeaderSetting.html?Href=BllAsn/GetPalletUpShelfList&ColsSysArr=' + TotalColsSysArr, + maxmin: false, + resize: false, + area: ['970px', '650px'] + }); + }, + }; + $('.layui-btn').on('click', function () { + var type = $(this).data('type'); + active[type] ? active[type].call(this) : ''; + }); + }) + </script> +</body> + +</html> \ No newline at end of file diff --git a/Wms/Model/ModelDto/BllAsnDto/PalletUpShelfDto.cs b/Wms/Model/ModelDto/BllAsnDto/PalletUpShelfDto.cs new file mode 100644 index 0000000..268a877 --- /dev/null +++ b/Wms/Model/ModelDto/BllAsnDto/PalletUpShelfDto.cs @@ -0,0 +1,89 @@ +锘縰sing Model.ModelDto.SysDto; +using System; +using System.Collections.Generic; +using System.Text; + +namespace Model.ModelDto.BllAsnDto +{ + public class PalletUpShelfDto + { + public int Id { get; set; } + /// <summary> + /// 杩芥函鍙� --鍏ュ簱鍗曞彿 + /// </summary> + public string TraceNo { get; set; } + + /// <summary> + /// 浠诲姟鍙� + /// </summary> + public string TaskNo { get; set; } + /// <summary> + /// 鎵樼洏鍙� + /// </summary> + public string PalletNo { get; set; } + /// <summary> + /// 鐗╂枡缂栫爜 + /// </summary> + public string SkuNo { get; set; } + /// <summary> + /// 鐗╂枡鍚嶇О + /// </summary> + public string SkuName { get; set; } + /// <summary> + /// 鎵规鍙� + /// </summary> + public string LotNo { get; set; } + /// <summary> + /// 鐘舵�� + /// </summary> + public string Status { get; set; } + /// <summary> + /// 浠撳簱 + /// </summary> + public string WareHouseNo { get; set; } + + /// <summary> + /// 浠撳簱鍚嶇О + /// </summary> + public string WareHouseName { get; set; } + /// <summary> + /// 宸烽亾 + /// </summary> + public string RoadwayNo { get; set; } + /// <summary> + /// 宸烽亾鍚嶇О + /// </summary> + public string RoadwayName { get; set; } + /// <summary> + /// 鍖哄煙 + /// </summary> + public string AreaNo { get; set; } + /// <summary> + /// 鍖哄煙鍚嶇О + /// </summary> + public string AreaName { get; set; } + /// <summary> + /// 鍌ㄤ綅 + /// </summary> + public string LocatNo { get; set; } + + + /// <summary> + /// 鍒涘缓鏃堕棿 + /// </summary> + public DateTime CreateTime { get; set; } + /// <summary> + /// 鍒涘缓浜哄悕绉� + /// </summary> + public string CreateUserName { get; set; } + + /// <summary> + /// 淇敼鏃堕棿 + /// </summary> + public DateTime? UpdateTime { get; set; } + /// <summary> + /// 淇敼浜哄悕绉� + /// </summary> + public string UpdateUserName { get; set; } + } +} diff --git a/Wms/Model/ModelVm/BllAsnVm/PalletUpShelfVm.cs b/Wms/Model/ModelVm/BllAsnVm/PalletUpShelfVm.cs new file mode 100644 index 0000000..8958280 --- /dev/null +++ b/Wms/Model/ModelVm/BllAsnVm/PalletUpShelfVm.cs @@ -0,0 +1,43 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; + +namespace Model.ModelVm.BllAsnVm +{ + /// <summary> + /// 涓婃灦浠诲姟璁板綍Vm + /// </summary> + public class PalletUpShelfVm : IndexPage + { + /// <summary> + /// 杩芥函鍙� --鍏ュ簱鍗曞彿 + /// </summary> + public string TraceNo { get; set; } + + /// <summary> + /// 浠诲姟鍙� + /// </summary> + public string TaskNo { get; set; } + /// <summary> + /// 鎵樼洏鍙� + /// </summary> + public string PalletNo { get; set; } + /// <summary> + /// 鐗╂枡缂栫爜 + /// </summary> + public string SkuNo { get; set; } + /// <summary> + /// 鐗╂枡鍚嶇О + /// </summary> + public string SkuName { get; set; } + /// <summary> + /// 鎵规鍙� + /// </summary> + public string LotNo { get; set; } + /// <summary> + /// 鐘舵�� + /// </summary> + public string Status { get; set; } + + } +} diff --git a/Wms/WMS.BLL/BllAsnServer/PalletUpShelfServer.cs b/Wms/WMS.BLL/BllAsnServer/PalletUpShelfServer.cs new file mode 100644 index 0000000..72e3d9b --- /dev/null +++ b/Wms/WMS.BLL/BllAsnServer/PalletUpShelfServer.cs @@ -0,0 +1,71 @@ +锘縰sing Model.ModelDto.BllAsnDto; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using System.Text; +using System.Threading.Tasks; +using WMS.DAL; +using WMS.Entity.BllAsnEntity; +using WMS.Entity.Context; +using WMS.Entity.SysEntity; +using WMS.IBLL.IBllAsnServer; + +namespace WMS.BLL.BllAsnServer +{ + public class PalletUpShelfServer : DbHelper<BllPalletUpShelf>, IPalletUpShelfServer + { + private static readonly SqlSugarScope Db = DataContext.Db; + public PalletUpShelfServer() : base(Db) + { + } + + public async Task<List<PalletUpShelfDto>> GetPalletUpShelfList(string traceNo, string taskNo, string palletNo, string skuNo, string skuName, string lotNo, string status, int page, int limit, RefAsync<int> count) + { + Expression<Func<BllPalletUpShelf, bool>> item = Expressionable.Create<BllPalletUpShelf>() + .AndIF(!string.IsNullOrWhiteSpace(traceNo), it => it.TraceNo.Contains(traceNo.Trim())) + .AndIF(!string.IsNullOrWhiteSpace(taskNo), it => it.TaskNo.Contains(taskNo.Trim())) + .AndIF(!string.IsNullOrWhiteSpace(palletNo), it => it.PalletNo.Contains(palletNo.Trim())) + .AndIF(!string.IsNullOrWhiteSpace(skuNo), it => it.SkuNo.Contains(skuNo.Trim())) + .AndIF(!string.IsNullOrWhiteSpace(skuName), it => it.SkuName.Contains(skuName.Trim())) + .AndIF(!string.IsNullOrWhiteSpace(lotNo), it => it.LotNo.Contains(lotNo.Trim())) + .AndIF(!string.IsNullOrWhiteSpace(status), it => it.Status == status) + .And(it => it.IsDel == "0") + .ToExpression();//娉ㄦ剰 杩欎竴鍙� 涓嶈兘灏� + + + var list = await Db.Queryable<BllPalletUpShelf>().Where(item) + .LeftJoin<SysUserInfor>((a, b) => a.CreateUser == b.Id) + .LeftJoin<SysUserInfor>((a, b, c) => a.UpdateUser == c.Id) + .LeftJoin<SysWareHouse>((a,b,c,d)=> a.WareHouseNo == d.WareHouseNo) + .LeftJoin<SysStorageRoadway>((a,b,c,d,e) => a.RoadwayNo == e.RoadwayNo) + .LeftJoin<SysStorageArea>((a,b,c,d,e,f) => a.AreaNo == f.AreaNo) + .Select((a, b,c,d,e,f) => new PalletUpShelfDto + { + Id = a.Id, + TraceNo = a.TraceNo, + TaskNo = a.TaskNo, + PalletNo = a.PalletNo, + SkuNo = a.SkuNo, + SkuName = a.SkuName, + LotNo = a.LotNo, + Status = a.Status, + WareHouseNo = a.WareHouseNo, + WareHouseName = d.WareHouseName, + RoadwayNo = a.RoadwayNo, + RoadwayName = e.RoadwayName, + AreaNo = a.AreaNo, + AreaName = f.AreaName, + LocatNo = a.LocatNo, + + CreateTime = a.CreateTime, + CreateUserName = b.RealName, + UpdateTime = a.UpdateTime, + UpdateUserName = c.RealName, + + }).OrderByDescending(a => a.CreateTime).ToOffsetPageAsync(page, limit, count); + + return list; + } + } +} diff --git a/Wms/WMS.Entity/BllAsnEntity/BllPalletUpShelf.cs b/Wms/WMS.Entity/BllAsnEntity/BllPalletUpShelf.cs new file mode 100644 index 0000000..bb7459c --- /dev/null +++ b/Wms/WMS.Entity/BllAsnEntity/BllPalletUpShelf.cs @@ -0,0 +1,63 @@ +锘縰sing SqlSugar; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Text; + +namespace WMS.Entity.BllAsnEntity +{ + /// <summary> + /// 鎵樼洏涓婃灦璁板綍 + /// </summary> + [SugarTable("BllPalletUpShelf")] + public class BllPalletUpShelf:BaseEntity + { + /// <summary> + /// 杩芥函鍙� --鍏ュ簱鍗曞彿 + /// </summary> + public string TraceNo { get; set; } + + /// <summary> + /// 浠诲姟鍙� + /// </summary> + public string TaskNo { get; set; } + /// <summary> + /// 鎵樼洏鍙� + /// </summary> + public string PalletNo { get; set; } + /// <summary> + /// 鐗╂枡缂栫爜 + /// </summary> + public string SkuNo { get; set; } + /// <summary> + /// 鐗╂枡鍚嶇О + /// </summary> + public string SkuName { get; set; } + /// <summary> + /// 鎵规鍙� + /// </summary> + public string LotNo { get; set; } + /// <summary> + /// 鐘舵�� + /// </summary> + public string Status { get; set; } + + /// <summary> + /// 浠撳簱 + /// </summary> + public string WareHouseNo { get; set; } + /// <summary> + /// 宸烽亾 + /// </summary> + public string RoadwayNo { get; set; } + /// <summary> + /// 鍖哄煙 + /// </summary> + public string AreaNo { get; set; } + /// <summary> + /// 鍌ㄤ綅 + /// </summary> + public string LocatNo { get; set; } + + } +} diff --git a/Wms/WMS.IBLL/IBllAsnServer/IPalletUpShelfServer.cs b/Wms/WMS.IBLL/IBllAsnServer/IPalletUpShelfServer.cs new file mode 100644 index 0000000..8a96940 --- /dev/null +++ b/Wms/WMS.IBLL/IBllAsnServer/IPalletUpShelfServer.cs @@ -0,0 +1,41 @@ +锘縰sing Model.ModelDto; +using Model.ModelDto.BllAsnDto; +using Model.ModelDto.SysDto; +using Model.ModelVm; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Text; +using System.Threading.Tasks; +using WMS.Entity.BllAsnEntity; + +namespace WMS.IBLL.IBllAsnServer +{ + public interface IPalletUpShelfServer + { + /// <summary> + /// 鑾峰彇涓婃灦浠诲姟璁板綍淇℃伅 + /// </summary> + /// <param name="traceNo">杩芥函鍙�--鍏ュ簱鍗曞彿</param> + /// <param name="taskNo">浠诲姟鍙�</param> + /// <param name="palletNo">鎵樼洏鍙�</param> + /// <param name="skuNo">鐗╂枡鍙�</param> + /// <param name="skuName"></param> + /// <param name="lotNo"></param> + /// <param name="status"></param> + /// <param name="page"></param> + /// <param name="limit"></param> + /// <param name="count"></param> + /// <returns></returns> + Task<List<PalletUpShelfDto>> GetPalletUpShelfList(string traceNo, string taskNo, string palletNo, string skuNo, string skuName,string lotNo,string status, int page, int limit, RefAsync<int> count); + + + + + + + + + } +} diff --git a/Wms/Wms/Controllers/BllAsnController.cs b/Wms/Wms/Controllers/BllAsnController.cs index d92a29a..020add9 100644 --- a/Wms/Wms/Controllers/BllAsnController.cs +++ b/Wms/Wms/Controllers/BllAsnController.cs @@ -14,12 +14,15 @@ using System.Threading.Tasks; using SqlSugar; using System.Diagnostics; +using Model.ModelDto.SysDto; +using static System.Reflection.Metadata.BlobBuilder; namespace Wms.Controllers { [Route("api/[controller]/[action]")] [ApiController] [Authorize] + [ServiceFilter(typeof(ApiResponseActionFilter))] public class BllAsnController : ControllerBase { @@ -33,10 +36,11 @@ private readonly IAuditLogServer _auditLog; // 瀹℃牳璁板綍 private readonly IBllLabelBoxNoServer _labelBox; // 绠辩爜鏍囩 private readonly IProcurePlanServer _procurePlanSvc; // 绠辩爜鏍囩 + private readonly IPalletUpShelfServer _palletUpShelfSvc; // 涓婃灦璁板綍 #endregion #region 鏋勯�犲嚱鏁� - public BllAsnController(IArrivalNoticeServer arrivalNoticeSvc, IPalletBindServer palletBindSvc, IBllBoxInfoServer bllBoxInfoSvc, ITaskServer taskSvc, IOperationASNServer logSvc, IPalletUnbindServer palletUnbind, IAuditLogServer auditLog, IBllLabelBoxNoServer labelBox, IProcurePlanServer procurePlanSvc) + public BllAsnController(IArrivalNoticeServer arrivalNoticeSvc, IPalletBindServer palletBindSvc, IBllBoxInfoServer bllBoxInfoSvc, ITaskServer taskSvc, IOperationASNServer logSvc, IPalletUnbindServer palletUnbind, IAuditLogServer auditLog, IBllLabelBoxNoServer labelBox, IProcurePlanServer procurePlanSvc, IPalletUpShelfServer palletUpShelfSvc) { _arrivalNoticeSvc = arrivalNoticeSvc; _PalletBindSvc = palletBindSvc; @@ -47,6 +51,7 @@ _auditLog = auditLog; _labelBox = labelBox; _procurePlanSvc = procurePlanSvc; + _palletUpShelfSvc = palletUpShelfSvc; } #endregion @@ -1257,6 +1262,22 @@ } } #endregion + + #region 涓婃灦浠诲姟璁板綍 + + /// <summary> + /// 鑾峰彇涓婃灦浠诲姟璁板綍淇℃伅鍒嗛〉闆嗗悎 + /// </summary> + /// <param name="model"></param> + /// <returns></returns> + [HttpPost] + public async Task<SqlSugarPagedList> GetPalletUpShelfList(PalletUpShelfVm model) + { + RefAsync<int> count = new RefAsync<int>(); + var data = await _palletUpShelfSvc.GetPalletUpShelfList(model.TraceNo, model.TaskNo,model.PalletNo,model.SkuNo,model.SkuName,model.LotNo,model.Status,model.Page,model.Limit, count); + return new SqlSugarPagedList() { Items = data, Total = count }; + } + #endregion } } -- Gitblit v1.8.0