wxw
7 小时以前 fef4a39d606932ebb2f7ae7d58c8ddcdd3e3b9db
PDA-AGV转运功能增加指定目标储位功能
6个文件已修改
124 ■■■■■ 已修改文件
Pda/View/HouseDataSetting/agvTransport.html 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/Model/ModelVm/PdaVm/PdaCrVm.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.IBLL/IPdaServer/IPdaCrServer.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/Wms/Controllers/PdaCrController.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Pda/View/HouseDataSetting/agvTransport.html
@@ -138,6 +138,15 @@
                                <img src="/assets/down_arraw.png">
                            </div>
                        </div>
                         <div id="" class="layui-form-item layout-dropdownlist">
                            <label class="layui-form-label" lang>目标储位:</label>
                            <div class="layui-input-block" id="selectLocatNoEnd">
                                <select id="LocatNoEnd" lay-filter="getLocatNoEnd" lay-search>
                                    <option value=""></option>
                                </select>
                                <img src="/assets/down_arraw.png">
                            </div>
                        </div>
                        <div id="" class="layui-form-item layout-dropdownlist">
                            <label class="layui-form-label" lang>入库口:</label>
                            <div class="layui-input-block" id="selectRuku">
@@ -447,6 +456,45 @@
                    }
                });
            }
             //选中出库单事件
             form.on('select(getQuyu)', function (data) {
                  //先更新一下目标区域
                updateLocatNoEndList()
            });
            //点击目标储位下拉框事件
            $("#selectLocatNoEnd").click(function () {
                if ($("#Quyu").val() == "") {
                    layer.msg('请先选择目标区域', {
                        icon: 2,
                        time: 2000 //2秒关闭(如果不配置,默认是3秒)
                    });
                    return
                }
            })
            /* 绑定目标储位信息 */
            function updateLocatNoEndList() {
                $("#LocatNoEnd").empty()
                $("#LocatNoEnd").append('<option value =>' + '</option>');
                form.render('select');
                var param = {
                    "AreaNo": $("#Quyu").val()
                };
                sendData(IP + "/PdaCr/GetLocatByArea", param, 'get', function (res) {
                    if (res.code == 0) { //成功
                        for (var i = 0; i < res.data.length; i++) {
                            $("#LocatNoEnd").append('<option value =' + res.data[i] + '>' + res.data[i]+ '</option>');
                        }
                        form.render('select');
                    } else { //不成功
                        layer.msg(res.msg, {
                            icon: 2,
                            time: 2000 //2秒关闭(如果不配置,默认是3秒)
                        }, function() {});
                    }
                });
            }
            //点击出库单据下拉框事件
            $("#selectOutNo").click(function () {
@@ -652,6 +700,7 @@
                    var param = {
                        PalletNo: $("#STOCKCODE").val(),
                        AreaNo: $("#Quyu").val(),
                        LocatNoEnd: $("#LocatNoEnd").val(),
                        Ruku: $("#Ruku").val()
                    }
                    //呼叫小车
Wms/Model/ModelVm/PdaVm/PdaCrVm.cs
@@ -65,6 +65,10 @@
        /// </summary>
        public string AreaNo { get; set; }
        /// <summary>
        /// 目标储位
        /// </summary>
        public string LocatNoEnd { get; set; }
        /// <summary>
        /// 入库口
        /// </summary>
        public string Ruku { get; set; }
Wms/WMS.BLL/BllPdaServer/PdaCrServer.cs
@@ -802,6 +802,29 @@
            return storageArea;
        }
        /// <summary>
        /// 根据区域号获取储位地址集合
        /// </summary>
        /// <param name="areaNo"></param>
        /// <returns></returns>
        /// <exception cref="Exception"></exception>
        public List<string> GetLocatByArea(string areaNo)
        {
            try
            {
                if (string.IsNullOrEmpty(areaNo))
                {
                    throw new Exception("请选择区域");
                }
                var _list = Db.Queryable<SysStorageLocat>().Where(w => w.IsDel == "0" && w.AreaNo == areaNo && w.WareHouseNo == "W04").Select(s => s.LocatNo).ToList();
                return _list;
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
        /// <summary>
        /// 获取已分配的出库单据
        /// </summary>
        /// <returns></returns>
@@ -1011,7 +1034,7 @@
            }
        }*/
        public async Task AgvTransport(string palletNo, string areaNo, string ruku, string url, int userId)
        public async Task AgvTransport(string palletNo, string areaNo,string locatNoEnd, string ruku, string url, int userId)
        {
            try
            {
@@ -1046,7 +1069,14 @@
                    {
                        throw Oops.Bah("所选区域信息不存在,请检查!");
                    }
                    EndLocat = await GetLocat(areaNo);
                    if (!string.IsNullOrEmpty(locatNoEnd))
                    {
                        EndLocat = locatNoEnd;//指定储位地址
                    }
                    else
                    {
                        EndLocat = await GetLocat(areaNo);//系统分配储位地址
                    }
                }
                else
                {
@@ -1075,7 +1105,7 @@
                //目标储位信息
                //var storageLocatEnd = new SysStorageLocat();
                var storageLocatEnd = await Db.Queryable<SysStorageLocat>().FirstAsync(w => w.IsDel == "0" && w.LocatNo == EndLocat && w.Flag == "0");
                var storageLocatEnd = await Db.Queryable<SysStorageLocat>().FirstAsync(w => w.IsDel == "0" && w.LocatNo == EndLocat && w.Flag == "0" && w.WareHouseNo == "W04" && w.AreaNo == areaNo);
                if (storageLocatEnd == null)
                {
                    throw Oops.Bah("目标储位信息不存在,请检查!");
Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs
@@ -3718,7 +3718,7 @@
            {
                throw Oops.Bah("未获取到对应储位信息,请检查!");
            }
            if (locat.Status != "3")
            if (locat.Status != "1")
            {
                throw Oops.Bah("当前储位不是有物品,请检查!");
            }
@@ -3801,7 +3801,7 @@
                #region 添加出库操作日志记录信息
                //添加操作日志记录
                var k = new OperationSOServer().AddLogOperationSo("出库作业", "拣货明细", soNo, "完成", $"用PDA完成了单据号为{soNo}的平库出库", userId);
                var k = new OperationSOServer().AddLogOperationSo("出库作业", "拣货明细", palletNo, "完成", $"用PDA完成了托盘号为{palletNo}的平库出库", userId);
                #endregion
Wms/WMS.IBLL/IPdaServer/IPdaCrServer.cs
@@ -110,6 +110,13 @@
        /// <returns></returns>
        Task<List<SysStorageArea>> GetStorageArea(string palletNo);
        /// <summary>
        /// 根据区域号获取储位地址集合
        /// </summary>
        /// <param name="areaNo"></param>
        /// <returns></returns>
        /// <exception cref="Exception"></exception>
        List<string> GetLocatByArea(string areaNo);
        /// <summary>
        /// 获取已分配的出库单据
        /// </summary>
        /// <returns></returns>
@@ -133,7 +140,7 @@
        /// <param name="areaNo"></param>
        /// <param name="ruku"></param>
        /// <param name="url"></param>
        Task AgvTransport(string palletNo, string areaNo, string ruku, string url, int userId);
        Task AgvTransport(string palletNo, string areaNo, string locatNoEnd, string ruku, string url, int userId);
        /// <summary>
        /// 呼叫agv转运空托盘
        /// </summary>
Wms/Wms/Controllers/PdaCrController.cs
@@ -19,6 +19,7 @@
using Microsoft.Extensions.Options;
using Model.ModelDto.DataDto;
using Model.ModelDto;
using Model.ModelVm.BllSoVm;
namespace Wms.Controllers
{
@@ -237,7 +238,26 @@
        [UnitOfWork]
        public async Task AgvTransport(PdaAgvTransportVm model)
        {
            await _pdaCrSvc.AgvTransport(model.PalletNo, model.AreaNo, model.Ruku, _config.WcsHost+ _config.IssueComApiUrl, _userManager.UserId);
            await _pdaCrSvc.AgvTransport(model.PalletNo, model.AreaNo, model.LocatNoEnd, model.Ruku, _config.WcsHost + _config.IssueComApiUrl, _userManager.UserId);
        }
        /// <summary>
        /// 根据区域号获取储位地址集合
        /// </summary>
        /// <param name="areaNo"></param>
        /// <returns></returns>
        [HttpGet]
        public IActionResult GetLocatByArea(string areaNo)
        {
            try
            {
                var _list = _pdaCrSvc.GetLocatByArea(areaNo);
                return Ok(new { code = 0, count = 0, msg = "获取成功", data = _list });
            }
            catch (Exception e)
            {
                return Ok(new { code = 1, msg = e.Message });
            }
        }
        /// <summary>
        /// 呼叫agv转运空托盘