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 {
|
/// <summary>
|
/// [ 具体业务 ] 帮助类
|
/// </summary>
|
public class WMSHelper {
|
/// <summary>
|
/// 检查容器类型
|
/// </summary>
|
/// <param name="cntrCode"></param>
|
/// <param name="cntrType"></param>
|
/// <param name="cntr"></param>
|
/// <returns></returns>
|
public static (bool, string) CheckCntrType(string cntrCode, string cntrType, out TN_Container cntr) {
|
var db = new SqlHelper<object>().GetInstance();
|
|
cntr = db.Queryable<TN_Container>().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, "检查容器类型成功!!");
|
}
|
}
|
}
|