huangxiaoqiang
2025-02-12 4b50d62ea690e5c323c6d331a675617a320a7345
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/RequestInTaskAsync.cs
@@ -1,7 +1,9 @@
using Masuit.Tools;
using SqlSugar;
using WIDESEA_Core.Const;
using WIDESEA_DTO.MOM;
using WIDESEA_DTO.WMS;
using WIDESEAWCS_Model.Models;
namespace WIDESEA_StorageTaskServices;
@@ -61,7 +63,7 @@
            var config = _configService.GetByConfigKey("SYS_InStacker", "CW3InStacker");
            var strings = config.ConfigValue.Split(',').ToList();
            // 入库送至常温3
            var resultContent = await CreateNewTask(input, input.ProductionLine, strings);
            var resultContent = await CreateNewTask(input, input.ProductionLine, boxing.ProcessCode,strings);
            if (resultContent.Status)
            {
                await _boxingInfoRepository.AddDataNavAsync(boxing);
@@ -70,19 +72,22 @@
        }
        // TODO 判断在途数量
        var count = BaseDal.QueryData(x => x.TargetAddress == stationManagers[0].Roadway).Count;
        if (count <= 10)
        var needBarcode  = await SqlSugarHelper.DbWCS.Queryable<dt_needBarcode>().FirstAsync(x => x.productLine == input.ProductionLine);
        var needCount = needBarcode.inLineNum;
        //var count = BaseDal.QueryData(x => x.TargetAddress == stationManagers[0].Roadway).Count;
        if (needCount < 2)
        {
            // 送至包装
            List<string> strings = stationManagers.Where(x => x.stationType == 0).Select(x => x.Roadway).ToList();
            return await CreateNewTask(input, input.ProductionLine, strings, 3);
            return await CreateNewTask(input, input.ProductionLine, boxing.ProcessCode, strings, 3);
        }
        else
        {
            var config = _configService.GetByConfigKey("SYS_InStacker", "CW3InStacker");
            var strings = config.ConfigValue.Split(',').ToList();
            // 入库送至常温3
            var resultContent = await CreateNewTask(input, input.ProductionLine, strings);
            var resultContent = await CreateNewTask(input, input.ProductionLine, boxing.ProcessCode, strings);
            if (resultContent.Status)
            {
                await _boxingInfoRepository.AddDataNavAsync(boxing);
@@ -138,7 +143,7 @@
        }
        List<string> strings = stationManagers.Roadway.Split(',').ToList();
        var resultContent = await CreateNewTask(input, result.ProductionLine, strings);
        var resultContent = await CreateNewTask(input, result.ProductionLine,boxing.ProcessCode, strings);
        if (resultContent.Status)
        {
            var isBox = await _boxingInfoRepository.AddDataNavAsync(boxing);
@@ -200,7 +205,7 @@
        //    NGStation = stationManagers.stationNGChildCode.Split(',').ToList();
        //}
        List<string> NGStation = stationManagers.stationNGChildCode.Split(',').ToList();
        content = await CreateNewTask(input, input.ProductionLine, NGStation, 2);
        content = await CreateNewTask(input, input.ProductionLine,"", NGStation, 2);
        return content.Error("存在异常电芯");
    }