zongzhibin
2024-11-28 157f0b8a78b200bf68ce96a163d8d59432e78283
Merge branch 'master' of http://222.71.245.114:9086/r/LA24030-LuLI_PackageLine
已添加4个文件
已修改11个文件
383 ■■■■ 文件已修改
CC/iWareCC_ASRS/Common/SystemValue.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/Common/SystemWarningMsg.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/FormCC.Designer.cs 50 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/FormCC.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/ThreadService/05_BZ30(齐套验证)/DataProcess_ValidateQiTao.cs 122 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/iWareCC.csproj 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCommon/Utils/Log4Net/LogType.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCommon/log4net_iWare.config 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareModel/EnumType/WMS/AreaCodeEnum.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Enum/WmsOrder/AreaCodeEnum.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsTask/WmsOperationTaskService.cs 101 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsTask/WmsRbLineTask/Dto/ValidateLabelInput.cs 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsTask/WmsRbLineTask/Dto/ValidateQiTaoInput.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsTask/WmsRbLineTask/Dto/ValidateQiTaoOutput.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LA24030_LuLiPackageLine_Wms/Admin.NET.Core/Const/CommonConst.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
CC/iWareCC_ASRS/Common/SystemValue.cs
@@ -134,7 +134,7 @@
        /// </summary>
        public static bool isAllowRuning_DataProcess_RobotBuffer_ModeChange = false;
        public static bool isAllowRuning_PrintHandler = false;
        public static bool isAllowRuning_DataProcess_ValidateQiTao = false;
        /// <summary>
        /// æ˜¯å¦å…è®¸æ‰§è¡Œ å †åž›æœºå…¥å£æ‰«ç æ£€æµ‹çº¿ç¨‹
CC/iWareCC_ASRS/Common/SystemWarningMsg.cs
@@ -101,7 +101,7 @@
        /// <summary>
        /// è¾“送线任务完成确认的警告消息
        /// </summary>
        public static string _lbl_Alert_PrintHandler = string.Empty;
        public static string _lbl_Alert_DataProcess_ValidateQiTao = string.Empty;
        /// <summary>
        /// æ¸…理数据现场 çš„警告消息
CC/iWareCC_ASRS/FormCC.Designer.cs
@@ -244,8 +244,8 @@
            this.ckDataProcess_RobotBuffer_AutoQiTaoOutbound = new System.Windows.Forms.CheckBox();
            this.lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask = new System.Windows.Forms.Label();
            this.ck_DataProcess_RobotBuffer_IssueOutboundTask = new System.Windows.Forms.CheckBox();
            this.lbl_Alert_PrintHandler = new System.Windows.Forms.Label();
            this.ck_PrintHandler = new System.Windows.Forms.CheckBox();
            this.lbl_DataProcess_ValidateQiTao = new System.Windows.Forms.Label();
            this.ck_DataProcess_ValidateQiTao = new System.Windows.Forms.CheckBox();
            this.lbl_MainTaskDecompose = new System.Windows.Forms.Label();
            this.ckMainTaskDecompose = new System.Windows.Forms.CheckBox();
            this.lbl_Alert_DeleteData = new System.Windows.Forms.Label();
@@ -3016,8 +3016,8 @@
            this.groupBox1.Controls.Add(this.ckDataProcess_RobotBuffer_AutoQiTaoOutbound);
            this.groupBox1.Controls.Add(this.lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask);
            this.groupBox1.Controls.Add(this.ck_DataProcess_RobotBuffer_IssueOutboundTask);
            this.groupBox1.Controls.Add(this.lbl_Alert_PrintHandler);
            this.groupBox1.Controls.Add(this.ck_PrintHandler);
            this.groupBox1.Controls.Add(this.lbl_DataProcess_ValidateQiTao);
            this.groupBox1.Controls.Add(this.ck_DataProcess_ValidateQiTao);
            this.groupBox1.Controls.Add(this.lbl_MainTaskDecompose);
            this.groupBox1.Controls.Add(this.ckMainTaskDecompose);
            this.groupBox1.Controls.Add(this.lbl_Alert_DeleteData);
@@ -3286,28 +3286,28 @@
            this.ck_DataProcess_RobotBuffer_IssueOutboundTask.UseVisualStyleBackColor = true;
            this.ck_DataProcess_RobotBuffer_IssueOutboundTask.CheckedChanged += new System.EventHandler(this.CommonCheckedChanged);
            // 
            // lbl_Alert_PrintHandler
            // lbl_DataProcess_ValidateQiTao
            // 
            this.lbl_Alert_PrintHandler.AutoSize = true;
            this.lbl_Alert_PrintHandler.BackColor = System.Drawing.Color.White;
            this.lbl_Alert_PrintHandler.ForeColor = System.Drawing.Color.Red;
            this.lbl_Alert_PrintHandler.Location = new System.Drawing.Point(215, 492);
            this.lbl_Alert_PrintHandler.Name = "lbl_Alert_PrintHandler";
            this.lbl_Alert_PrintHandler.Size = new System.Drawing.Size(70, 15);
            this.lbl_Alert_PrintHandler.TabIndex = 37;
            this.lbl_Alert_PrintHandler.Text = "label11";
            this.lbl_DataProcess_ValidateQiTao.AutoSize = true;
            this.lbl_DataProcess_ValidateQiTao.BackColor = System.Drawing.Color.White;
            this.lbl_DataProcess_ValidateQiTao.ForeColor = System.Drawing.Color.Red;
            this.lbl_DataProcess_ValidateQiTao.Location = new System.Drawing.Point(215, 492);
            this.lbl_DataProcess_ValidateQiTao.Name = "lbl_DataProcess_ValidateQiTao";
            this.lbl_DataProcess_ValidateQiTao.Size = new System.Drawing.Size(70, 15);
            this.lbl_DataProcess_ValidateQiTao.TabIndex = 37;
            this.lbl_DataProcess_ValidateQiTao.Text = "label11";
            // 
            // ck_PrintHandler
            // ck_DataProcess_ValidateQiTao
            // 
            this.ck_PrintHandler.AutoSize = true;
            this.ck_PrintHandler.Location = new System.Drawing.Point(4, 492);
            this.ck_PrintHandler.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
            this.ck_PrintHandler.Name = "ck_PrintHandler";
            this.ck_PrintHandler.Size = new System.Drawing.Size(125, 19);
            this.ck_PrintHandler.TabIndex = 36;
            this.ck_PrintHandler.Text = "打印服务线程";
            this.ck_PrintHandler.UseVisualStyleBackColor = true;
            this.ck_PrintHandler.CheckedChanged += new System.EventHandler(this.CommonCheckedChanged);
            this.ck_DataProcess_ValidateQiTao.AutoSize = true;
            this.ck_DataProcess_ValidateQiTao.Location = new System.Drawing.Point(4, 492);
            this.ck_DataProcess_ValidateQiTao.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
            this.ck_DataProcess_ValidateQiTao.Name = "ck_DataProcess_ValidateQiTao";
            this.ck_DataProcess_ValidateQiTao.Size = new System.Drawing.Size(161, 19);
            this.ck_DataProcess_ValidateQiTao.TabIndex = 36;
            this.ck_DataProcess_ValidateQiTao.Text = "BZ30齐套验证线程";
            this.ck_DataProcess_ValidateQiTao.UseVisualStyleBackColor = true;
            this.ck_DataProcess_ValidateQiTao.CheckedChanged += new System.EventHandler(this.CommonCheckedChanged);
            // 
            // lbl_MainTaskDecompose
            // 
@@ -6152,8 +6152,8 @@
        private System.Windows.Forms.CheckBox ckDeleteData;
        private System.Windows.Forms.Label lbl_MainTaskDecompose;
        private System.Windows.Forms.CheckBox ckMainTaskDecompose;
        private System.Windows.Forms.Label lbl_Alert_PrintHandler;
        private System.Windows.Forms.CheckBox ck_PrintHandler;
        private System.Windows.Forms.Label lbl_DataProcess_ValidateQiTao;
        private System.Windows.Forms.CheckBox ck_DataProcess_ValidateQiTao;
        private System.Windows.Forms.Label lbl_Alert_DataProcess_RobotBuffer_IssueOutboundTask;
        private System.Windows.Forms.CheckBox ck_DataProcess_RobotBuffer_IssueOutboundTask;
        private System.Windows.Forms.Button btn_1007;
CC/iWareCC_ASRS/FormCC.cs
@@ -1549,7 +1549,7 @@
            DoCommonCheckedChanged(ref SystemValue.isAllowRuning_DataProcess_RobotBuffer_ModeChange, ck_DataProcess_RobotBuffer_ModeChange);
            DoCommonCheckedChanged(ref SystemValue.isAllowRuning_PrintHandler, ck_PrintHandler);
            DoCommonCheckedChanged(ref SystemValue.isAllowRuning_DataProcess_ValidateQiTao, ck_DataProcess_ValidateQiTao);
            DoCommonCheckedChanged(ref SystemValue.isAllowRuning_DataProcess_RobotBuffer_FinishTaskForOutbound, checkBox_DataProcess_RobotBuffer_FinishTaskForOutbound);
CC/iWareCC_ASRS/ThreadService/05_BZ30(ÆëÌ×ÑéÖ¤)/DataProcess_ValidateQiTao.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,122 @@
using Admin.NET.Application;
using iWareCC.Common.Helper;
using iWareCC.StationService;
using iWareCommon.Common.Globle;
using iWareCommon.Utils;
using iWareModel;
using iWareSql.DataAccess;
using iWareSql.DBModel;
using iWareSql.WmsDBModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel.Configuration;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using WZ.Useful.Commons;
using XiGang.Core.Model;
namespace iWareCC.ThreadService
{
    /// <summary>
    /// BZ30齐套验证
    /// </summary>
    public static class DataProcess_ValidateQiTao
    {
        public static async void Handler()
        {
            var alertMsg = "";
            LogType logType = LogType.DataProcess_ValidateQiTao;
            while (true)
            {
                Thread.Sleep(2000);//休眠2秒,将休眠写到前面,是为了下面的continue方法执行后不显示错误信息的提示!!!【EditBy shaocx,2022-05-24】
                SystemWarningMsg._lbl_Alert_DataProcess_ValidateQiTao = string.Empty;
                try
                {
                    if (SystemValue.isAllowRuning_DataProcess_ValidateQiTao && SystemValue.isStartedModel)
                    {
                        var rgvLocation = StationLocationEnum.BZ39.ToString();
                        using (WmsDBModel wmsDB = new WmsDBModel())
                        {
                            var bz30Config = wmsDB.SysConfig.Where(x => x.Code == "wms_bz30_qitao").FirstOrDefault();
                            if (bz30Config == null)
                            {
                                SystemWarningMsg._lbl_Alert_DataProcess_ValidateQiTao = $"没有配置 wms_bz30_qitao å€¼";
                                continue;
                            }
                            var configValue = bz30Config.Value;
                            if (string.IsNullOrEmpty(configValue) || configValue.IndexOf('|') <= -1)
                            {
                                SystemWarningMsg._lbl_Alert_DataProcess_ValidateQiTao = $"配置 wms_bz30_qitao å€¼{configValue}为空或不正确";
                                continue;
                            }
                            var configValues = configValue.Split('|');
                            var packageCode = configValues[0];
                            var qitaoValue = configValues[1];//齐套  ä¸é½å¥—
                            //TODO:推送给PLC åŽ»å“ªä¸ªæ–¹å‘ï¼Ÿ
                            /*
                            using (StationServiceClient client = new StationServiceClient())
                            {
                                var res = await client.ChangeModeAsync((int)EDevice.Station, (int)RbRunModeEnum.入库模式, rgvLocation);
                                if (!res.result)
                                {
                                    SystemWarningMsg._lbl_Alert_DataProcess_ValidateQiTao = $"{rgvLocation.ToString()}-推送给PLC切换模式 å¤±è´¥,ChangeModeAsync è¿”回:{res.resMsg}";
                                    continue;
                                }
                                else
                                {
                                    Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-推送给PLC切换模式 æˆåŠŸ,ChangeModeAsync,参数: ç«™ç‚¹{rgvLocation}");
                                }
                            }
                            //*/
                            //更新值
                            bz30Config.Value = "";
                            var gahter = wmsDB.mes_package_gather.Where(x => x.PackageCode == packageCode).FirstOrDefault();
                            if (gahter != null)
                            {
                                gahter.UpiStatus = (int)UpiStatusEnum.已下线;
                                gahter.AreaCode = (int)AreaCodeEnum.下线区域;
                            }
                            var upiList = wmsDB.mes_batchOrderUPI_new.Where(x => x.PackageCode == packageCode).ToList();
                            foreach (var item in upiList)
                            {
                                item.UpiStatus = (int)UpiStatusEnum.已下线;
                                item.AreaCode = (int)AreaCodeEnum.下线区域;
                                item.UpdateTime = DateTime.Now;
                            }
                            //删除队列信息
                            var lineQueue = wmsDB.mes_package_linequeue.Where(x => x.PackageCode == packageCode).FirstOrDefault();
                            if (lineQueue != null)
                            {
                                wmsDB.mes_package_linequeue.Remove(lineQueue);
                            }
                            //新增下线记录
                            mes_package_unline_record record = new mes_package_unline_record();
                            record = ClassHelper.RotationMapping<mes_package_unline_record, mes_package_gather>(gahter);
                            record.Id = Yitter.IdGenerator.YitIdHelper.NextId();
                            record.CreateTime = DateTime.Now;
                            record.UpdateTime = DateTime.Now;
                            record.OpRemark = "下线";
                            wmsDB.mes_package_unline_record.Add(record);
                            wmsDB.SaveChanges();
                        }
                    }
                }
                catch (Exception ex)
                {
                    SystemWarningMsg._lbl_Alert_DataProcess_ValidateQiTao += " å‡ºçް异叏:" + ex.Message + SysGloble.SPLIT_STR;
                    Log4NetHelper.WriteErrorLog(logType, " å‡ºçŽ°å¼‚å¸¸ï¼š" + ex.Message, ex);
                }
            }
        }
    }
}
CC/iWareCC_ASRS/iWareCC.csproj
@@ -171,6 +171,7 @@
    <Compile Include="ThreadService\03_BZ12%28机器人码包工位%29\DataProcess_BZ12_FinishTask.cs" />
    <Compile Include="ThreadService\04_BZ21(搬运整垛机器人)\DataProcess_BZ21.cs" />
    <Compile Include="ThreadService\04_BZ21(搬运整垛机器人)\DataProcess_BZ21_FinishTask.cs" />
    <Compile Include="ThreadService\05_BZ30%28齐套验证%29\DataProcess_ValidateQiTao.cs" />
    <Compile Include="WCF\CCWcfService.cs" />
    <Compile Include="WCF\ICCWcfService.cs" />
    <Compile Include="WmsTask\AutoUpdateEngineInfoTask.cs" />
CC/iWareCommon/Utils/Log4Net/LogType.cs
@@ -62,7 +62,7 @@
        /// <summary>
        /// å‡ºåº“计划
        /// </summary>
        PrintHandler = 300,
        DataProcess_ValidateQiTao = 300,
        /// <summary>
        /// MES服务
CC/iWareCommon/log4net_iWare.config
@@ -262,8 +262,8 @@
      <filter type="log4net.Filter.DenyAllFilter" />
    </appender>
    <!--出库计划【信息】日志-->
    <appender name="PrintHandler_Info" type="log4net.Appender.RollingFileAppender">
      <file value="d:\\Log\\LuLiMuYe\\iWareCC\\PrintHandler_Info\\" />
    <appender name="DataProcess_ValidateQiTao_Info" type="log4net.Appender.RollingFileAppender">
      <file value="d:\\Log\\LuLiMuYe\\iWareCC\\DataProcess_ValidateQiTao_Info\\" />
      <appendToFile value="true" />
      <rollingStyle value="Date" />
      <staticLogFileName value="false" />
@@ -273,13 +273,13 @@
        <param name="ConversionPattern" value="%n消息时间:%d [%t] %n消息级别:%-5p %n消 æ¯ ç±»ï¼š%c [%x] %n%m %n "/>
      </layout>
      <filter type="log4net.Filter.LoggerMatchFilter">
        <loggerToMatch value="PrintHandler_Info" />
        <loggerToMatch value="DataProcess_ValidateQiTao_Info" />
      </filter>
      <filter type="log4net.Filter.DenyAllFilter" />
    </appender>
    <!--出库计划【错误】日志-->
    <appender name="PrintHandler_Error" type="log4net.Appender.RollingFileAppender">
      <file value="d:\\Log\\LuLiMuYe\\iWareCC\\PrintHandler_Error\\" />
    <appender name="DataProcess_ValidateQiTao_Error" type="log4net.Appender.RollingFileAppender">
      <file value="d:\\Log\\LuLiMuYe\\iWareCC\\DataProcess_ValidateQiTao_Error\\" />
      <appendToFile value="true" />
      <rollingStyle value="Date" />
      <staticLogFileName value="false" />
@@ -289,7 +289,7 @@
        <param name="ConversionPattern" value="%n异常时间:%d [%t] %n异常级别:%-5p %n异 å¸¸ ç±»ï¼š%c [%x] %n%m %n "/>
      </layout>
      <filter type="log4net.Filter.LoggerMatchFilter">
        <loggerToMatch value="PrintHandler_Error" />
        <loggerToMatch value="DataProcess_ValidateQiTao_Error" />
      </filter>
      <filter type="log4net.Filter.DenyAllFilter" />
    </appender>
@@ -640,8 +640,8 @@
      <appender-ref ref="DataProcess_RobotBuffer_AutoQiTaoOutbound_Error"/>
      <appender-ref ref="DataProcess_RobotBuffer_ModeChange_Info"/>
      <appender-ref ref="DataProcess_RobotBuffer_ModeChange_Error"/>
      <appender-ref ref="PrintHandler_Info"/>
      <appender-ref ref="PrintHandler_Error"/>
      <appender-ref ref="DataProcess_ValidateQiTao_Info"/>
      <appender-ref ref="DataProcess_ValidateQiTao_Error"/>
      <!--堆垛机任务线程日志-->
      <appender-ref ref="SrmTheadService_Info"/>
      <appender-ref ref="SrmTheadService_Error"/>
CC/iWareModel/EnumType/WMS/AreaCodeEnum.cs
@@ -54,8 +54,15 @@
        /// </summary>
        [Description("包装线区域")]
        åŒ…装线区域 = 6
        åŒ…装线区域 = 6,
        /// <summary>
        /// ä¸‹çº¿åŒºåŸŸ
        /// </summary>
        [Description("下线区域")]
        ä¸‹çº¿åŒºåŸŸ = 7
    }
}
LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Enum/WmsOrder/AreaCodeEnum.cs
@@ -52,6 +52,12 @@
    /// </summary>
    [Description("包装线区域")]
    åŒ…装线区域 = 6
    åŒ…装线区域 = 6,
    /// <summary>
    /// ä¸‹çº¿åŒºåŸŸ
    /// </summary>
    [Description("下线区域")]
    ä¸‹çº¿åŒºåŸŸ = 7
}
LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsTask/WmsOperationTaskService.cs
@@ -4,6 +4,9 @@
using System.Data;
using System.Web;
using System.Text;
using DocumentFormat.OpenXml.Office.CustomUI;
using Microsoft.CodeAnalysis.Operations;
namespace Admin.NET.Application;
/// <summary>
/// æ“ä½œä»»åŠ¡æœåŠ¡
@@ -13,10 +16,20 @@
{
    private readonly SqlSugarRepository<WmsRbLineTask> _rep;
    private readonly SqlSugarRepository<WmsStockQuan> _wmsStockQuanRep;
    public WmsOperationTaskService(SqlSugarRepository<WmsRbLineTask> rep, SqlSugarRepository<WmsStockQuan> wmsStockQuanRep)
    private readonly SqlSugarRepository<Mes_Package_Gather> _mesPackageGatherRep;
    private readonly SqlSugarRepository<SysConfig> _sysConfigRep;
    private readonly SqlSugarRepository<Mes_BatchOrderUPI_New> _mesBatchOrderUpiRep;
    public WmsOperationTaskService(SqlSugarRepository<WmsRbLineTask> rep, SqlSugarRepository<WmsStockQuan> wmsStockQuanRep
        , SqlSugarRepository<Mes_Package_Gather> mesPackageGatherRep
        , SqlSugarRepository<SysConfig> sysConfigRep
        , SqlSugarRepository<Mes_BatchOrderUPI_New> mesBatchOrderUpiRep
        )
    {
        _sysConfigRep = sysConfigRep;
        _mesPackageGatherRep = mesPackageGatherRep;
        _rep = rep;
        _wmsStockQuanRep = wmsStockQuanRep;
        _mesBatchOrderUpiRep = mesBatchOrderUpiRep;
    }
@@ -59,6 +72,92 @@
    }
    /// <summary>
    /// åˆ¤æ–­é½å¥—
    /// </summary>
    /// <param name="input"></param>
    /// <returns></returns>
    [HttpPost]
    [ApiDescriptionSettings(Name = "ValdateQiTao")]
    [Description("WmsOperationTask/ValdateQiTao")]
    public async Task<ValidateQiTaoOutput> ValdateQiTao(ValidateQiTaoInput input)
    {
        ValidateQiTaoOutput output = new ValidateQiTaoOutput();
        if (input == null || input.PackageCode == null)
        {
            throw Oops.Oh("参数不能为空");
        }
        var singlePackage = await _mesPackageGatherRep.AsQueryable().Where(x => x.PackageCode == input.PackageCode).FirstAsync();
        if (singlePackage == null)
        {
            throw Oops.Oh($"没有找到包号{input.PackageCode}的汇总数据");
        }
        var setValue = "";
        var _QiTaoReuslt = "";
        var other_orderList = await _mesPackageGatherRep.AsQueryable().Where(x => x.Info5 == singlePackage.Info5 && x.PackageCode != input.PackageCode).ToListAsync();
        var num = other_orderList.Where(x => x.UpiStatus == UpiStatusEnum.初始 || x.UpiStatus == UpiStatusEnum.不齐包).Count();
        if (num > 0)
        {
            //不齐套
            setValue = $"{input.PackageCode}|不齐套";
            _QiTaoReuslt = "不齐套";
        }
        else
        {
            setValue = $"{input.PackageCode}|齐套";
            _QiTaoReuslt = "齐套";
        }
        var sysConfig = await _sysConfigRep.GetFirstAsync(x => x.Code == CommonConst.WmsBZ30_QiTao);
        if (sysConfig == null)
        {
            throw Oops.Oh($"没有配置 åˆ¤æ–­é½å¥— å€¼");
        }
        if (!string.IsNullOrEmpty(sysConfig.Value))
        {
            throw Oops.Oh($"判断齐套值已经存在值{sysConfig.Value},不允许操作");
        }
        sysConfig.Value = setValue;
        await _sysConfigRep.UpdateAsync(sysConfig);
        output = singlePackage.Adapt<ValidateQiTaoOutput>();
        output.QiTaoReuslt = _QiTaoReuslt;
        return output;
    }
    /// <summary>
    /// æ ¸å¯¹æ ‡ç­¾
    /// </summary>
    /// <param name="input"></param>
    /// <returns></returns>
    [HttpPost]
    [ApiDescriptionSettings(Name = "ValdateLabel")]
    [Description("WmsOperationTask/ValdateLabel")]
    public async Task<Mes_Package_Gather> ValdateLabel(ValidateLabelInput input)
    {
        if (input == null || input.PackageCode == null || input.Upi == null)
        {
            throw Oops.Oh("参数不能为空");
        }
        var singleUpi = await _mesBatchOrderUpiRep.AsQueryable().Where(x => x.UPI == input.Upi).FirstAsync();
        if (singleUpi == null)
        {
            throw Oops.Oh($"没有找到部件条码{input.Upi}的数据");
        }
        if (singleUpi.PackageCode != input.PackageCode)
        {
            throw Oops.Oh($"部件条码{input.Upi}所属包是{singleUpi.PackageCode},跟扫描的包号{input.PackageCode}不符");
        }
        var singlePackage = await _mesPackageGatherRep.AsQueryable().Where(x => x.PackageCode == input.PackageCode).FirstAsync();
        if (singlePackage == null)
        {
            throw Oops.Oh($"没有找到包号{input.PackageCode}的汇总数据");
        }
        return singlePackage;
    }
}
LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsTask/WmsRbLineTask/Dto/ValidateLabelInput.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,25 @@
using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;
namespace Admin.NET.Application;
/// <summary>
/// æ ¸å¯¹æ ‡ç­¾è¾“入参数
/// </summary>
public class ValidateLabelInput
{
    /// <summary>
    /// åŒ…装号
    /// </summary>
    public virtual string PackageCode { get; set; }
    /// <summary>
    /// éƒ¨ä»¶æ¡ç 
    /// </summary>
    public virtual string Upi { get; set; }
}
LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsTask/WmsRbLineTask/Dto/ValidateQiTaoInput.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;
namespace Admin.NET.Application;
/// <summary>
/// åˆ¤æ–­é½å¥—输入参数
/// </summary>
public class ValidateQiTaoInput
{
    /// <summary>
    /// åŒ…装号
    /// </summary>
    public virtual string PackageCode { get; set; }
}
LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/WmsTask/WmsRbLineTask/Dto/ValidateQiTaoOutput.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,20 @@
using Admin.NET.Application.Entity;
using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;
namespace Admin.NET.Application;
/// <summary>
/// åˆ¤æ–­é½å¥—输出参数
/// </summary>
public class ValidateQiTaoOutput: Mes_Package_Gather
{
    /// <summary>
    /// é½å¥—结果
    /// </summary>
    public virtual string QiTaoReuslt { get; set; }
}
LA24030_LuLiPackageLine_Wms/Admin.NET.Core/Const/CommonConst.cs
@@ -99,9 +99,9 @@
    public const string SysAddQCOrder = "sys_add_qc_order";
    /// <summary>
    /// ASN单创建生成跟踪码类型    :一维码、二维码
    /// BZ30下线点齐套判断 ã€Editby shaocx,2024-11-28】
    /// </summary>
    public const string SysCreateSnCodeType = "sys_create_sncode_type";
    public const string WmsBZ30_QiTao = "wms_bz30_qitao";
    /// <summary>