|
|
|
@ -68,6 +68,12 @@ namespace SlnMesnac.Business
|
|
|
|
|
|
|
|
|
|
private readonly ConfigInfoBusiness _configInfoBusiness;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 消息弹框提示
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="msg"></param>
|
|
|
|
|
public delegate void MsgHandler(string message, int msgtype, int outTime = 3);
|
|
|
|
|
public static event MsgHandler MsgHandlerEvent;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private ISqlSugarClient sqlSugarClient;
|
|
|
|
@ -82,7 +88,6 @@ namespace SlnMesnac.Business
|
|
|
|
|
_basePalletInfoService = basePalletInfoService;
|
|
|
|
|
_baseRealTaskService = baseRealTaskService;
|
|
|
|
|
_mesPrdBarCodeService = serviceProvider.GetRequiredService<IMesPrdBarCodeService>();
|
|
|
|
|
|
|
|
|
|
_configInfoBusiness = configInfoBusiness;
|
|
|
|
|
|
|
|
|
|
// TestTran();
|
|
|
|
@ -193,6 +198,7 @@ namespace SlnMesnac.Business
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
RefreshMesProdList();
|
|
|
|
|
var plc = base.GetPlcByKey("plc");
|
|
|
|
|
|
|
|
|
@ -517,11 +523,27 @@ namespace SlnMesnac.Business
|
|
|
|
|
bool result = false;
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
//判断当前模式,手动需从出库队列叫料,如果没有出库队列,弹框提醒;自动模式,库位参数为Null
|
|
|
|
|
string targetLocationCode = null;
|
|
|
|
|
if(debugConfig.ProductMode== "1")
|
|
|
|
|
{
|
|
|
|
|
// 手动模式出库队列
|
|
|
|
|
WmsRawPreferredOut? PreferredOut = sqlSugarClient.AsTenant().GetConnection("mes").Queryable<WmsRawPreferredOut>().OrderBy(x=>x.RawPreferredOutId).First();
|
|
|
|
|
if (PreferredOut == null)
|
|
|
|
|
{
|
|
|
|
|
MsgHandlerEvent?.Invoke("当前投料手动模式,无出库队列,请在投料管理添加出库队列,或修改为自动投料模式", 2, 4);
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
targetLocationCode = PreferredOut.LocationCode;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var content = new
|
|
|
|
|
{
|
|
|
|
|
rawOutstockId = taskId,
|
|
|
|
|
locationCode = targetLocationCode,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
string message = JsonConvert.SerializeObject(content);
|
|
|
|
|