using System; using System.Collections.Generic; using System.Linq; using System.Security.Cryptography; using System.Text; using System.Threading.Tasks; using HH.WCS.Mobox3.DSZSH.models; using HH.WCS.Mobox3.DSZSH.util; using Newtonsoft.Json; using static HH.WCS.Mobox3.DSZSH.api.ApiModel; namespace HH.WCS.Mobox3.DSZSH.wms { /// /// [ 具体业务 ] 帮助类 /// public class WMSHelper { /// /// 检查容器类型 /// /// /// /// /// public static (bool, string) CheckCntrType(string cntrCode, string cntrType, out TN_Container cntr) { var db = new SqlHelper().GetInstance(); cntr = db.Queryable().Where(c => c.S_CODE == cntrCode).First(); if (cntr == null) { return (false, $"容器'{cntrCode}'在[容器表]中不存在,请在前台页面中维护!!"); } if (cntr.S_TYPE != cntrType) { return (false, $"容器'{cntrCode}'在[容器表]中的类型为'{cntr.S_TYPE}',与当前流程所需容器类型'{cntrType}'不同!!"); } return (true, "检查容器类型成功!!"); } } }