huangxiaoqiang
2 天以前 74d731cd8ac6bd995fbda485ee3371300af29a74
优化时间段查询不出数据问题,PDA出库抽检出库任务卡控
已修改4个文件
130 ■■■■ 文件已修改
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_Core/Helper/UtilConvert.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs 101 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/AGVController.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/WIDESEA_Core/BaseServices/ServiceBase.cs
@@ -157,10 +157,27 @@
                }
                else
                {
                    if (string.IsNullOrEmpty(where))
                        where += $"{searchParametersList[i].Name} {searchParametersList[i].DisplayType} '{searchParametersList[i].Value}'";
                    if (searchParametersList[i].DisplayType.GetLinqCondition() == LinqExpressionType.ThanOrEqual)
                    {
                        if (string.IsNullOrEmpty(where))
                            where += $"{searchParametersList[i].Name} >= '{searchParametersList[i].Value}'";
                        else
                            where += $" and {searchParametersList[i].Name} {searchParametersList[i].DisplayType.GetLinqCondition()} '{searchParametersList[i].Value}'";
                    }
                    else if (searchParametersList[i].DisplayType.GetLinqCondition() == LinqExpressionType.LessThanOrEqual)
                    {
                        if (string.IsNullOrEmpty(where))
                            where += $"{searchParametersList[i].Name} <= '{searchParametersList[i].Value}'";
                        else
                            where += $" and {searchParametersList[i].Name} <= '{searchParametersList[i].Value}'";
                    }
                    else
                        where += $" and {searchParametersList[i].Name} {searchParametersList[i].DisplayType} '{searchParametersList[i].Value}'";
                    {
                        if (string.IsNullOrEmpty(where))
                            where += $"{searchParametersList[i].Name} {searchParametersList[i].DisplayType} '{searchParametersList[i].Value}'";
                        else
                            where += $" and {searchParametersList[i].Name} {searchParametersList[i].DisplayType} '{searchParametersList[i].Value}'";
                    }
                }
            }
            return where;
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/WIDESEA_Core/Helper/UtilConvert.cs
@@ -945,10 +945,10 @@
                case HtmlElementType.Contains:
                    linqExpression = LinqExpressionType.In;
                    break;
                case HtmlElementType.ThanOrEqual:
                case HtmlElementType.thanorequal:
                    linqExpression = LinqExpressionType.ThanOrEqual;
                    break;
                case HtmlElementType.LessOrequal:
                case HtmlElementType.lessorequal:
                    linqExpression = LinqExpressionType.LessThanOrEqual;
                    break;
                case HtmlElementType.GT:
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
@@ -205,20 +205,52 @@
            Dt_StationManager station;
            if (stationOut.WorkstationO == "0")
            {
                station = _stationManagerRepository.QueryFirst(x => x.stationName == "B001::1" && x.stationType == 2);
                var hasTaskOne = BaseDal.QueryFirst(x => x.TargetAddress == "B001::1");
                if (hasTaskOne == null)
                {
                    station = _stationManagerRepository.QueryFirst(x => x.stationName == "B001::1" && x.stationType == 2);
                }
                else
                {
                    if (stationOut.WorkstationT == "0")
                    {
                        var hasTaskTwo = BaseDal.QueryFirst(x => x.TargetAddress == "B001::2");
                        if (hasTaskTwo == null)
                        {
                            station = _stationManagerRepository.QueryFirst(x => x.stationName == "B001::2" && x.stationType == 2);
                        }
                        else
                        {
                            return content.Error("未找到可用站台,请查看站台是否存在任务");
                        }
                    }
                    else
                    {
                        return content.Error("出库站台状态不是空闲,请确认再下发出库任务");
                    }
                }
            }
            else if (stationOut.WorkstationT == "0")
            {
                station = _stationManagerRepository.QueryFirst(x => x.stationName == "B001::2" && x.stationType == 2);
                var hasTaskOne = BaseDal.QueryFirst(x => x.TargetAddress == "B001::2");
                if (hasTaskOne == null)
                {
                    station = _stationManagerRepository.QueryFirst(x => x.stationName == "B001::2" && x.stationType == 2);
                }
                else
                {
                    return content.Error("未找到可用站台,请查看站台是否存在任务");
                }
            }
            else
            {
                return content.Error("出库站台状态不是空闲,请确认再下发出库任务");
            }
            if (station == null)
            {
                return content.Error("未找到出库站台信息");
            }
            //if (station == null)
            //{
            //    return content.Error("未找到出库站台信息");
            //}
            Dt_Task task = BaseDal.QueryFirst(x => x.PalletCode == taskDTO.PalletCode);
            if (task != null)
@@ -272,22 +304,67 @@
                return content.Error("获取出库站台信息失败,请重新出库");
            }
            Dt_StationManager station;
            //if (stationOut.WorkstationO == "0")
            //{
            //    station = _stationManagerRepository.QueryFirst(x => x.stationName == "B002::1" && x.stationType == 1);
            //}
            //else if (stationOut.WorkstationT == "0")
            //{
            //    station = _stationManagerRepository.QueryFirst(x => x.stationName == "B002::2" && x.stationType == 1);
            //}
            //else
            //{
            //    return content.Error("出库站台状态不是空闲,请确认再下发出库任务");
            //}
            //if (station == null)
            //{
            //    return content.Error("未找到出库站台信息");
            //}
            if (stationOut.WorkstationO == "0")
            {
                station = _stationManagerRepository.QueryFirst(x => x.stationName == "B002::1" && x.stationType == 1);
                var hasTaskOne = BaseDal.QueryFirst(x => x.TargetAddress == "B001::1");
                if (hasTaskOne == null)
                {
                    station = _stationManagerRepository.QueryFirst(x => x.stationName == "B001::1" && x.stationType == 2);
                }
                else
                {
                    if (stationOut.WorkstationT == "0")
                    {
                        var hasTaskTwo = BaseDal.QueryFirst(x => x.TargetAddress == "B001::2");
                        if (hasTaskTwo == null)
                        {
                            station = _stationManagerRepository.QueryFirst(x => x.stationName == "B001::2" && x.stationType == 2);
                        }
                        else
                        {
                            return content.Error("未找到可用站台,请查看站台是否存在任务");
                        }
                    }
                    else
                    {
                        return content.Error("出库站台状态不是空闲,请确认再下发出库任务");
                    }
                }
            }
            else if (stationOut.WorkstationT == "0")
            {
                station = _stationManagerRepository.QueryFirst(x => x.stationName == "B002::2" && x.stationType == 1);
                var hasTaskOne = BaseDal.QueryFirst(x => x.TargetAddress == "B001::2");
                if (hasTaskOne == null)
                {
                    station = _stationManagerRepository.QueryFirst(x => x.stationName == "B001::2" && x.stationType == 2);
                }
                else
                {
                    return content.Error("未找到可用站台,请查看站台是否存在任务");
                }
            }
            else
            {
                return content.Error("出库站台状态不是空闲,请确认再下发出库任务");
            }
            if (station == null)
            {
                return content.Error("未找到出库站台信息");
            }
            var stock = _stockInfoRepository.QueryFirst(x => x.LocationCode == taskDTO.SourceAddress);
            if (stock == null)
            {
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/AGVController.cs
@@ -85,7 +85,7 @@
                    Islock = false;
                    try
                    {
                        return await _service.DeviceWarning(DTO);
                        return await Task.Run(()=> _service.DeviceWarning(DTO));
                    }
                    finally
                    {