海波 张
2 天以前 89943f29476e3de04c638cc7aefbdf2dd24d00c7
wms/ContainerHelper.cs
@@ -1,10 +1,12 @@
using HH.WCS.ZhongCeJinTan.util;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Services.Configuration;
using Top.Api;
namespace HH.WCS.ZhongCeJinTan.wms
{
@@ -52,9 +54,11 @@
       
        internal static bool delCntrItem(string cntrCode)
        {
            LogHelper.Info($"删除容器{cntrCode}", "Mes任务下发");
            LogHelper.Info($"删除容器{cntrCode}");
            var db = new SqlHelper<object>().GetInstance();
            var tp = db.Queryable<CntrItemRel>().Where(it => it.S_CNTR_CODE == cntrCode).First();
@@ -67,6 +71,24 @@
                return db.Deleteable<CntrItemRel>().Where(it => it.S_CNTR_CODE == cntrCode).ExecuteCommand() > 0;
            }
        }
        internal static bool delCntrLoc(string cntrCode)
        {
            LogHelper.Info($"删除货位容器{cntrCode}");
            var db = new SqlHelper<object>().GetInstance();
            var tp = db.Queryable<LocCntrRel>().Where(it => it.S_CNTR_CODE == cntrCode).First();
            if (tp == null)
            {
                return true;
            }
            else
            {
                return db.Deleteable<CntrItemRel>().Where(it => it.S_CNTR_CODE == cntrCode).ExecuteCommand() > 0;
            }
        }
        internal static bool delCntr(string cntrCode)
        {
            var db = new SqlHelper<object>().GetInstance();