wangxinhui
2026-03-10 c19955c0d1e21469691059290870ce42a9d46f3a
更新优先级和出库优化
已修改8个文件
78 ■■■■■ 文件已修改
项目代码/BigScreen/package-lock.json 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/BigScreen/src/views/1.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WCS/WCSServices/WIDESEAWCS_Tasks/成品仓/ConveyorLineJob_CPB.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_OutboundService/OutLineViewService.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_OutboundService/OutSGOrderDetailService.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService.cs 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ÏîÄ¿´úÂë/BigScreen/package-lock.json
@@ -2349,11 +2349,6 @@
        "fastq": "^1.6.0"
      }
    },
    "@popperjs/core": {
      "version": "npm:@sxzz/popperjs-es@2.11.7",
      "resolved": "https://registry.npmmirror.com/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz",
      "integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ=="
    },
    "@sideway/address": {
      "version": "4.1.5",
      "resolved": "https://registry.npmmirror.com/@sideway/address/-/address-4.1.5.tgz",
@@ -7396,6 +7391,13 @@
        "lodash-unified": "^1.0.2",
        "memoize-one": "^6.0.0",
        "normalize-wheel-es": "^1.2.0"
      },
      "dependencies": {
        "@popperjs/core": {
          "version": "npm:@sxzz/popperjs-es@2.11.8",
          "resolved": "https://registry.npmmirror.com/@sxzz/popperjs-es/-/popperjs-es-2.11.8.tgz",
          "integrity": "sha512-wOwESXvvED3S8xBmcPWHs2dUuzrE4XiZeFu7e1hROIJkm02a49N120pmOXxY33sBb6hArItm5W5tcg1cBtV+HQ=="
        }
      }
    },
    "element-ui": {
ÏîÄ¿´úÂë/BigScreen/src/views/1.vue
@@ -173,6 +173,12 @@
                    // 1. æŒ‰çº¸å·æ¡ç åˆ†ç»„
                    const groupedData = {};
                    res.data.data.forEach((x) => {
                        //判断x.taskNum是空对x.palletCode进行处理
                        if (x.taskNum == null || x.taskNum == "") {
                            x.palletCode = "老厂"+x.palletCode;
                        }else {
                            x.palletCode = "立库"+x.palletCode;
                        }
                        if (!groupedData[x.palletCode]) {
                            groupedData[x.palletCode] = [];
                        }
@@ -207,7 +213,7 @@
                        
                        // åˆ›å»ºåˆå¹¶åŽçš„单条记录
                        var item = [
                            '<span style="color:#FF4500; font-size:75px;">' + palletCode + '</span>',
                            '<span style="color:#FF4500; font-size:75px;">' +firstItem.taskNum ? "立库" + palletCode : "老厂" + palletCode + '</span>',
                            //'<span style="color:#FF4500; font-size:55px;">' + orderNos + '</span>',
                            '<span style="color:#FF4500; font-size:75px;">' + firstItem.materielCode + '</span>',
                            '<span style="color:#FF4500; font-size:75px;">' + machineLastChar + '</span>',
ÏîÄ¿´úÂë/WCS/WCSServices/WIDESEAWCS_Tasks/³ÉÆ·²Ö/ConveyorLineJob_CPB.cs
@@ -1,7 +1,6 @@
using Microsoft.AspNetCore.Components.Routing;
using Newtonsoft.Json;
using Quartz;
using SqlSugar.Extensions;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -11,6 +10,7 @@
using WIDESEAWCS_Common.TaskEnum;
using WIDESEAWCS_Communicator;
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.Helper;
using WIDESEAWCS_DTO.TaskInfo;
using WIDESEAWCS_IBasicInfoRepository;
using WIDESEAWCS_ITaskInfoRepository;
@@ -134,7 +134,7 @@
                            R_ConveyorLineCPInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_ConveyorLineCPInfo>(deviceProRead.DeviceProAddress);
                            if (conveyorLineInfoRead != null)
                            {
                                WriteInfo(item.StationName, $"状态{conveyorLineInfoRead}");
                                WriteInfo(item.StationName, $"状态{conveyorLineInfoRead.Serialize()}");
                            }
                            if (conveyorLineInfoRead != null && conveyorLineInfoRead.Command == 4 && conveyorLineInfoRead.TaskNo > 0)
                            {
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_OutboundService/OutLineViewService.cs
@@ -61,22 +61,8 @@
            {
                //获取当前老厂缓存所有纸卷信息
                List<Dt_OutLineView> outLineViews = BaseDal.QueryData();
                //获取当前纸卷个数
                int? outLineCount = outLineViews?.Select(x => x.PalletCode).Distinct().Count();
                if (outLineViews==null || outLineViews.Count<=0 || outLineCount<=2)
                {
                    List<Dt_OutLineView> outLineViewsAdd = outStockLockInfos.Select(x => _mapper.Map<Dt_OutLineView>(x)).ToList();
                    BaseDal.AddData(outLineViewsAdd);
                }
                else
                {
                    //获取最早的纸卷信息
                    string? code= outLineViews.FirstOrDefault()?.PalletCode;
                    List<Dt_OutLineView> outLineViewsDel = outLineViews.Where(x=>x.PalletCode==code).ToList();
                    List<Dt_OutLineView> outLineViewsAdd = outStockLockInfos.Select(x => _mapper.Map<Dt_OutLineView>(x)).ToList();
                    BaseDal.DeleteData(outLineViewsDel);
                    BaseDal.AddData(outLineViewsAdd);
                }
                content.OK("成功");
            }
            catch (Exception ex)
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_OutboundService/OutSGOrderDetailService.cs
@@ -94,7 +94,11 @@
                });
                for (int i = 0; i < details.Count; i++)
                {
                    //订单数量
                    ////订单数量
                    //if ((details.Count-1) == i)
                    //{
                    //}
                    decimal orderQuantity = details[i].XqLen;
                    bool assignStop = true;
                    while (assignStop)
@@ -167,6 +171,9 @@
                    }
                    _outStockLockInfoService.Repository.AddData(addOutStockLockInfos);
                    List<Dt_OutStockLockInfo> addOutCacheInfos = addOutStockLockInfos.Where(x => x.LocationCode.Contains("老厂缓存区")).ToList();
                    List<Dt_OutLineView> outLineViewsAdd = addOutCacheInfos.Select(x => _mapper.Map<Dt_OutLineView>(x)).ToList();
                    _outboundRepository.OutLineViewRepository.AddData(outLineViewsAdd);
                }
                List<Dt_OutStockLockInfo> updateOutStockLockInfos = outStockLockInfos.Where(x => x.Id > 0).ToList();
                if (updateOutStockLockInfos != null && updateOutStockLockInfos.Any())
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService.cs
@@ -195,11 +195,11 @@
                        return content;
                    }
                    //获取所有的出库详情判断是否满足出库量小于5万且小于17卷
                    List<Dt_OutStockLockInfo> outStockLockInfos = _outboundRepository.OutStockLockInfoRepository.QueryData(x=>x.OrderType==OutOrderTypeEnum.OutSGPick.ObjToInt() && x.Status<OutLockStockStatusEnum.关闭.ObjToInt());
                    decimal sumAssignQty = outStockLockInfos.Sum(x => x.AssignQuantity);
                    int outCount= outStockLockInfos.Select(x=>x.PalletCode).Distinct().Count();
                    if (sumAssignQty < AppSettings.Get("OutSGLength").ObjToInt() && outCount < AppSettings.Get("OutSGCount").ObjToInt())
                    {
                    //List<Dt_OutStockLockInfo> outStockLockInfos = _outboundRepository.OutStockLockInfoRepository.QueryData(x=>x.OrderType==OutOrderTypeEnum.OutSGPick.ObjToInt() && x.Status<OutLockStockStatusEnum.关闭.ObjToInt());
                    //decimal sumAssignQty = outStockLockInfos.Sum(x => x.AssignQuantity);
                    //int outCount= outStockLockInfos.Select(x=>x.PalletCode).Distinct().Count();
                    //if (sumAssignQty < AppSettings.Get("OutSGLength").ObjToInt() && outCount < AppSettings.Get("OutSGCount").ObjToInt())
                    //{
                        List<int> ints = _outboundRepository.OutSGOrderDetailRepository.QueryData(x => x.Id > outDetailId).Select(x => x.Id).ToList();
                        int[] reseponse = new int[ints.Count];
                        for (int i = 0; i < ints.Count; i++)
@@ -207,11 +207,11 @@
                            reseponse[i] = ints[i];
                        }
                        content.Message = CreateSGOutboundTasks(reseponse).Message;
                    }
                    else
                    {
                        return content.Error($"当前出库量:{sumAssignQty},当前出库卷数:{outCount},不满足小于5万且小于17卷出库条件");
                    }
                    //}
                    //else
                    //{
                    //    return content.Error($"当前出库量:{sumAssignQty},当前出库卷数:{outCount},不满足小于5万且小于17卷出库条件");
                    //}
                }
            }
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Inbound.cs
@@ -398,6 +398,11 @@
                stockInfoOld.StockLength = stockLength;
                stockInfoOld.StockOutLength = 0;
                stockInfoOld.WarehouseId = WarehouseEnum.LLDYL.ObjToInt();
                List<Dt_OutLineView> outLineViewsDel = _outboundRepository.OutLineViewRepository.QueryData(x=>x.PalletCode==stockInfoOld.PalletCode);
                if (outLineViewsDel.Count>0)
                {
                    _outboundRepository.OutLineViewRepository.DeleteData(outLineViewsDel);
                }
                content.OK("成功",data:stockInfoOld);
            }
            catch (Exception ex)
ÏîÄ¿´úÂë/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs
@@ -59,6 +59,10 @@
                {
                    return content.Error($"生成任务失败");
                }
                tasks.ForEach(x =>
                {
                    x.Grade = 99;
                });
                stockInfos.ForEach(x =>
                {
                    x.StockStatus = StockStatusEmun.出库锁定.ObjToInt();
@@ -893,11 +897,13 @@
                    }
                }
                #endregion
                List<Dt_OutLineView> outLineViewsDel = _outboundRepository.OutLineViewRepository.QueryData(x => stockInfos.Select(x=>x.PalletCode).Contains(x.PalletCode));
                _unitOfWorkManage.BeginTran();
                _stockRepository.StockInfoRepository.UpdateData(stockInfos);
                _outboundRepository.OutStockLockInfoRepository.UpdateData(outStockLockInfos);
                _outboundRepository.OutSGOrderRepository.UpdateData(outSGOrders);
                _outboundRepository.OutSGOrderDetailRepository.UpdateData(orderDetails);
                _outboundRepository.OutLineViewRepository.DeleteData(outLineViewsDel);
                _unitOfWorkManage.CommitTran();
                content.OK(ExistNoCodes.Count>0 ? string.Join(",", ExistNoCodes)+"老厂可扣库存不存在" : "");
            }