schangxiang@126.com
2024-11-23 02771e1f094f82f5de81e28ad26ecf68e73549f7
修复查询库位bug
已修改5个文件
26 ■■■■■ 文件已修改
CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/Inbound/1、DataProcess_BZ39.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/Inbound/2、DataProcess_RobotBuffer_FinishTask.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareSql/DataAccess/StationHandlerV2.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareUnitTest/App.config 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareUnitTest/Task_UnitTest.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/ThreadService/02_BZ39¹¤Î»£¨²¹°åºó¹¤Î»£©/Inbound/1¡¢DataProcess_BZ39.cs
@@ -54,6 +54,8 @@
                            var qitaoReault = false;
                            using (WmsDBModel wmsDB = new WmsDBModel())
                            {
                                //不再拦截
                                /*
                                //要是有已下发的任务,就不要执行
                                var isValidate = TaskHandler.ValidateIssueTaskForRobotBuffer(wmsDB);
                                if (!isValidate)
@@ -61,6 +63,7 @@
                                    SystemWarningMsg._lbl_alert_DataProcess_BZ39 = $"{rgvLocation.ToString()}-有‘已下发’的任务,不能处理,此次循环结束";
                                    continue;
                                }
                                //*/
                                var upiObj = wmsDB.mes_batchOrderUPI_new.Where(x => x.UPI == upiCode).FirstOrDefault();
                                if (upiObj == null)
                                {
@@ -110,6 +113,8 @@
                                using (StationServiceClient client = new StationServiceClient())
                                {
                                    //不再拦截
                                    /*
                                    //首先先清理
                                    var res = await client.InboundFinishConfirmAsync((int)EDevice.Station, false, rgvLocation);
                                    if (!res.result)
@@ -121,8 +126,9 @@
                                    {
                                        Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-下发入库任务 æˆåŠŸ,InboundFinishConfirmAsync,参数: ç«™ç‚¹{rgvLocation}");
                                    }
                                    //*/
                                    res = await client.WriteInStoreTaskInfoAsync((int)EDevice.Station, rgvLocation, place.PlaceCode,
                                    var res = await client.WriteInStoreTaskInfoAsync((int)EDevice.Station, rgvLocation, place.PlaceCode,
                                       (short)upiObj.Length,
                                       (short)upiObj.Width, (short)upiObj.Thk, Convert.ToInt32(task.TaskNo));
                                    if (!res.result)
CC/iWareCC_ASRS/ThreadService/02_BZ39¹¤Î»£¨²¹°åºó¹¤Î»£©/Inbound/2¡¢DataProcess_RobotBuffer_FinishTask.cs
@@ -89,6 +89,7 @@
                                    InTime = DateTime.Now,
                                    OperReason = "入库",
                                    PackageCode = task.PackageCode,
                                    Length = task.Length,
                                    Width = task.Width,
                                    Thk = task.Thk,
                                    PlaceCode = task.PlaceCode,
CC/iWareSql/DataAccess/StationHandlerV2.cs
@@ -181,7 +181,7 @@
                    var emptyStationList = edm.V_EmptyStation.ToList();
                    //不随机排序
                    emptyStationList = emptyStationList.OrderByDescending(x => x.LaneNo).ThenByDescending(x => x.ColumnNo).ThenBy(x => x.LayerNo).ToList();
                    emptyStationList = emptyStationList.OrderBy(x => x.LaneNo).ThenBy(x => x.LayerNo).ThenBy(x => x.ColumnNo).ToList();
                    //增加该库位是否被任务占用的筛选 [EditBy shaocx,2022-06-02]
@@ -192,7 +192,7 @@
                    var my_emptyStationList = emptyStationList.Where(x => usePlaceTypeList.Contains( x.PlaceType)).OrderBy(x=>x.PlaceType).ToList();
                    if (my_emptyStationList?.Count() > 0)
                    {
                        wms_base_place toPlace = StationHandler.GetPlaceByPlaceId(emptyStationList.First().Id, edm);
                        wms_base_place toPlace = StationHandler.GetPlaceByPlaceId(my_emptyStationList.First().Id, edm);
                        return toPlace;
                    }
                    else
CC/iWareUnitTest/App.config
@@ -5,8 +5,7 @@
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
  </configSections>
  <connectionStrings>
    <!--本机-->
    <add name="DbModel" connectionString="data source=192.168.10.5;initial catalog=LA24030_LuLiPackageLine;persist security info=True;user id=sa;password=123abc.com;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient"/>
    <add name="WmsDBModel" connectionString="data source=localhost;initial catalog=LA24030_LuLiPackageLine;persist security info=True;user id=sa;password=123abc.com;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient"/>
  </connectionStrings>
  <appSettings>
    <!-- æ˜¯å¦æ¨¡æ‹ŸPLC,发布一定是 FALSE -->
CC/iWareUnitTest/Task_UnitTest.cs
@@ -6,6 +6,8 @@
using iWareModel;
using iWareCC.Common.Helper;
using iWareSql.DBModel;
using iWareSql.WmsDBModel;
using System.Linq;
namespace iWareUnitTest
{
@@ -17,9 +19,11 @@
        public void Test()
        {
            var errMsg = "";
            using (DbModel context = new DbModel())
            using (WmsDBModel context = new WmsDBModel())
            {
                var srmStore = MyExtendHelper.FindStoreForEmptySalverTo1014(context, ref errMsg);
                var obj = context.mes_batchOrderUPI_new.Where(x => x.UPI == "LS101000901100090000").FirstOrDefault();
                var place = StationHandlerV2.FindBestEmptyPlace(context, obj);
            }
        }
@@ -27,7 +31,7 @@
        [TestMethod]
        public void TestAddInStoreTask()
        {
            SysUser user = new SysUser();
            AddMainTaskPostParam param = new AddMainTaskPostParam();
            param.CargoNo = "我是货物号啊2swfsaf";
            param.SalverCode = "我是托盘号啊2swfsaf";