处理同托盘再次绑定同物料批次不增加库存问题;修改同物料批次拣货异常问题
7个文件已修改
93 ■■■■ 已修改文件
HTML/js/public.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/views/home/console2.html 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Pda/js/public.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/WMS.BLL/DataServer/StockServer.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Wms/Wms/appsettings.json 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HTML/js/public.js
@@ -7,9 +7,9 @@
//var IP = "http://192.168.1.226:8086";  
//var IP = "http://192.168.62.200:8888/api";//bkl服务器
//运行
//var IP="https://localhost:44363/api";
var IP="https://localhost:44363/api";
//本地发布
var IP="http://localhost:8034/api";
//var IP="http://localhost:8034/api";
HTML/views/home/console2.html
@@ -231,7 +231,7 @@
            <!-- 左 -->
            <div class="layui-col-md4" style="height: 100%;margin-top: 10px;">
                <div class="layui-card" style="height: 100%;border-radius: 15px;box-shadow: 0px 0px 10px 1px #a4a3a3;">
                    <div style="width: 100%;height: 23.33%;">
                    <!-- <div style="width: 100%;height: 23.33%;">
                        <div class="layui-card-header">
                            <img src="../../img/console/xiexian.png" style="height: 20px;">
                            系统监控
@@ -263,7 +263,7 @@
                                <label style="font-size: 32px;color: #009688;">109</label>
                            </div>
                        </div>
                    </div>
                    </div> -->
                    <div style="width: 100%;height: 38.33%;">
                        <div class="layui-card-header">
                            <img src="../../img/console/xiexian.png" style="height: 20px;">
Pda/js/public.js
@@ -7,9 +7,9 @@
//var IP = "http://192.168.1.226:8086";
//var IP = "http://192.168.62.200:8888/api";  
//运行
//var IP = "https://localhost:44363/api";
var IP = "https://localhost:44363/api";
//本地发布
var IP = "http://localhost:8034/api";
//var IP = "http://localhost:8034/api";
Wms/WMS.BLL/BllPdaServer/PdaAsnServer.cs
@@ -274,19 +274,8 @@
                    // 判断库存明细是否已有此托盘信息  
                    var sd1 = Db.Queryable<DataStockDetail>().First(m => m.IsDel == "0" && m.PalletNo == model.PalletNo && m.LotNo == detail.LotNo && m.SkuNo == detail.SkuNo);// && m.ASNDetailNo == bind.ASNDetailNo
                    var sdId1 = 0;
                    if (sd1 != null)
                    if (sd1 == null)
                    {
                        sdId1 = sd1.Id;
                        // 库存已存在 更新数据
                        sd1.Qty += bind.Qty;
                        sd1.CompleteTime = comTime;
                        sd1.UpdateUser = userId;
                        sd1.UpdateTime = comTime;
                        Db.Updateable(sd1).ExecuteCommand();
                    }
                    else
                    {
                        // 库存不存在 插入数据
                        sd1 = new DataStockDetail()
                        {
@@ -296,7 +285,7 @@
                            SkuNo = sku.SkuNo,
                            SkuName = sku.SkuName,
                            Standard = sku.Standard,
                            Qty = bind.Qty,
                            Qty = 0,
                            LockQty = 0,
                            FrozenQty = 0,
                            InspectQty = 0,
@@ -317,7 +306,7 @@
                            InspectMark = bind.InspectMark,
                            InspectStatus = sku.IsInspect,
                            BitPalletMark = bind.BitPalletMark,
                            PackagNo = sku.PackagNo,
                            PackagNo = sku.PackagNo,
                            IsBale = bind.IsBale,
                            IsBelt = bind.IsBelt,
@@ -358,20 +347,19 @@
                            //修改合格不合格数量
                            if (quality.IsQualified == "1") //合格
                            {
                                //增加合格数量
                                quality.PassQty += bind.Qty;
                                sd1.InspectStatus = "1";
                            }
                            else if (quality.IsQualified == "0") //不合格
                            {
                                //增加不合格数量
                                quality.FailQty += bind.Qty;
                                sd1.InspectStatus = "2";
                            }
                            Db.Updateable(quality).ExecuteCommand(); //修改质检信息
                        }
                        //添加库存明细
                        sdId1 = Db.Insertable(sd1).ExecuteReturnIdentity();
                    }
                    else
                    {
                        sdId1 = sd1.Id;
                    }
                    #endregion
@@ -524,10 +512,13 @@
                    #endregion
                    #region 库存明细
                    if (sd1.Qty <= 0)
                    {
                        sd1.Qty = bind.Qty;
                    }
                    // 库存已存在 更新数据
                    sd1.Qty += bind.Qty;
                    sd1.CompleteTime = comTime;
                    sd1.UpdateUser = userId;
                    sd1.UpdateTime = comTime;
                    //更改库存明细数量
                    Db.Updateable(sd1).Where(m => m.Id == sdId1).ExecuteCommand();
                    #endregion
Wms/WMS.BLL/BllPdaServer/PdaSoServer.cs
@@ -446,22 +446,26 @@
                        var locateStr = stockDetail.LocatNo;
                        await Db.Deleteable(stockDetail).ExecuteCommandAsync();
                        //改变托盘状态
                        var pallet = await Db.Queryable<SysPallets>().FirstAsync(m => m.PalletNo == palletNo && m.IsDel == "0");
                        if (pallet == null)
                        var detailOther = Db.Queryable<DataStockDetail>().Where(w => w.IsDel == "0" && w.PalletNo == stockDetail.PalletNo && w.Id != stockDetail.Id).ToList();
                        if (detailOther.Count <= 0)
                        {
                            throw Oops.Bah("未在托盘表中查询到托盘信息");
                        }
                        pallet.Status = "0";
                        await Db.Updateable(pallet).ExecuteCommandAsync();
                            //改变托盘状态
                            var pallet = await Db.Queryable<SysPallets>().FirstAsync(m => m.PalletNo == palletNo && m.IsDel == "0");
                            if (pallet == null)
                            {
                                throw Oops.Bah("未在托盘表中查询到托盘信息");
                            }
                            pallet.Status = "0";
                            await Db.Updateable(pallet).ExecuteCommandAsync();
                        //更改储位状态为空储位
                        var locate = Db.Queryable<SysStorageLocat>().First(m => m.IsDel == "0" && m.LocatNo == locateStr);
                        if (locate != null)
                        {
                            locate.Status = "0";
                            Db.Updateable(locate).ExecuteCommand();
                        }
                            //更改储位状态为空储位
                            var locate = Db.Queryable<SysStorageLocat>().First(m => m.IsDel == "0" && m.LocatNo == locateStr);
                            if (locate != null)
                            {
                                locate.Status = "0";
                                Db.Updateable(locate).ExecuteCommand();
                            }
                        }
                    }
                    else
                    {
Wms/WMS.BLL/DataServer/StockServer.cs
@@ -164,8 +164,8 @@
        {
            string stockUseSql = $@"select a.Id,a.WareHouseNo,a.WareHouseName,b.num as stockNum,c.num as useNum
    from SysWareHouse a
    left join (select WareHouseNo,count(Id) as num from SysStorageLocat where IsDel='0' group by WareHouseNo) b on b.WareHouseNo=a.WareHouseNo
    left join (select WareHouseNo,count(Id) as num from SysStorageLocat where IsDel='0' and Status='1' group by WareHouseNo) c on c.WareHouseNo=a.WareHouseNo
    left join (select WareHouseNo,count(Id) as num from SysStorageLocat where IsDel='0' and Make=1 group by WareHouseNo) b on b.WareHouseNo=a.WareHouseNo
    left join (select WareHouseNo,count(Id) as num from SysStorageLocat where IsDel='0' and Make=1 and Status='1' group by WareHouseNo) c on c.WareHouseNo=a.WareHouseNo
    where a.IsDel='0'
    order by a.WareHouseNo";
            DataTable stockUseDt = Db.Ado.GetDataTable(stockUseSql);
Wms/Wms/appsettings.json
@@ -15,9 +15,9 @@
    //"ConnectionString": "Server=192.168.62.200;Database=WMS_JC34;User ID=sa;Password=sql2019;Integrated Security=False;"
    //"ConnectionString": "Server=.;Database=WMS_JC09;User ID=sa;Password=sql2019;Integrated Security=False;"
    //"ConnectionString": "Data Source=DESKTOP-0EJDG95\\MSSQLSERVER1;Initial Catalog=WMS_V01;Integrated Security=True;"
    //"ConnectionString": "Server=.\\MSSQLSERVER2019;Database=WMS_JC34;User ID=sa;Password=admin2023@;Integrated Security=False;",
    "ConnectionString": "Server=.\\MSSQLSERVER2019;Database=WMS_JC34;User ID=sa;Password=admin2023@;Integrated Security=False;",
    //本地地址
    "ConnectionString": "Server=localhost;Database=WMS_JC34;User ID=sa;Password=root1234;Integrated Security=False;"
    //"ConnectionString": "Server=localhost;Database=WMS_JC34;User ID=sa;Password=root1234;Integrated Security=False;"
  },
  "JWTConfig": {
    "Issuer": "WYY", //Token      
@@ -54,9 +54,9 @@
  },
  "Quartz": {
    "dbProviderName": "SqlServer",
    //"ConnectionString": "Server=.\\MSSQLSERVER2019;Database=QRTZ;User ID=sa;Password=admin2023@;Integrated Security=False;"
    "ConnectionString": "Server=.\\MSSQLSERVER2019;Database=QRTZ;User ID=sa;Password=admin2023@;Integrated Security=False;"
    //本地地址
    "ConnectionString": "Server=localhost;Database=WMS_JC34QRTZ;User ID=sa;Password=root1234;Integrated Security=False;"
    //"ConnectionString": "Server=localhost;Database=WMS_JC34QRTZ;User ID=sa;Password=root1234;Integrated Security=False;"
    //"connectionString": "Server=192.168.62.200;Database=WMS_JC34QRTZ;User ID=sa;Password=sql2019;Integrated Security=False;"
    //"connectionString": "Server=10.26.200.29;Database=WMS_JC34QRTZ;User ID=sa;Password=boxline@2016;Integrated Security=False;"
  }