液晶标签协议对接!
This commit is contained in:
@ -8,6 +8,7 @@ using System.Threading.Tasks;
|
||||
using System.Xml.Xsl;
|
||||
using TouchSocket.Core;
|
||||
using WCS.BLL.DbModels;
|
||||
using WCS.BLL.HardWare;
|
||||
using WCS.BLL.Manager;
|
||||
using WCS.BLL.Services.IService;
|
||||
using WCS.BLL.Tool;
|
||||
@ -162,5 +163,86 @@ namespace WCS.BLL.Services.Service
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<ResponseCommon> reSetAll()
|
||||
{
|
||||
try
|
||||
{
|
||||
//1.获取所有液晶标签货架
|
||||
var shelfs = ShelfManager.Shelves.Where(t => t.ShelfTypeName == "液晶标签货架")
|
||||
.Select(t => t as MXL4Shelf)
|
||||
.ToList();
|
||||
shelfs.ForEach(t =>
|
||||
{
|
||||
t.Reset();
|
||||
});
|
||||
return new ResponseCommon
|
||||
{
|
||||
Code = 200,
|
||||
Message = "success"
|
||||
};
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new ResponseCommon
|
||||
{
|
||||
Code = 200,
|
||||
Message = "操作失败:" + ex.Message,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<ResponseCommon> defaultDisplay()
|
||||
{
|
||||
try
|
||||
{
|
||||
//1.获取所有液晶标签货架
|
||||
var shelfs = ShelfManager.Shelves.Where(t => t.ShelfTypeName == "液晶标签货架")
|
||||
.Select(t => t as MXL4Shelf)
|
||||
.ToList();
|
||||
shelfs.ForEach(t =>
|
||||
{
|
||||
t.MXL4Modules.ForEach(m =>
|
||||
{
|
||||
//发送进入入库模式
|
||||
m.GoInOutstoreMode(t.TcpCleint);
|
||||
//任务ID
|
||||
m.SendTaskId(7, t.TcpCleint);
|
||||
m.SendMatCode("A7100200300", t.TcpCleint);
|
||||
m.SendMatName("A7SESSSSSS", t.TcpCleint);
|
||||
m.SendMatSpec("7GUIGE", t.TcpCleint);
|
||||
m.SendMatBatch("202412097", t.TcpCleint);
|
||||
m.SendMatQty(999, t.TcpCleint);
|
||||
|
||||
m.SendTaskId(6, t.TcpCleint);
|
||||
m.SendMatCode("A6666666", t.TcpCleint);
|
||||
m.SendMatName("ASESSSSSS6", t.TcpCleint);
|
||||
m.SendMatSpec("GUIGE6", t.TcpCleint);
|
||||
m.SendMatBatch("202412096", t.TcpCleint);
|
||||
m.SendMatQty(222, t.TcpCleint);
|
||||
|
||||
m.SendTaskId(3, t.TcpCleint);
|
||||
m.SendMatCode("A33333", t.TcpCleint);
|
||||
m.SendMatName("3ASESSSSS", t.TcpCleint);
|
||||
m.SendMatSpec("3GUIGE3", t.TcpCleint);
|
||||
m.SendMatBatch("202412093", t.TcpCleint);
|
||||
m.SendMatQty(333, t.TcpCleint);
|
||||
});
|
||||
});
|
||||
return new ResponseCommon
|
||||
{
|
||||
Code = 200,
|
||||
Message = "success"
|
||||
};
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new ResponseCommon
|
||||
{
|
||||
Code = 200,
|
||||
Message = "操作失败:" + ex.Message,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user