dep_wangsr
liulb@mesnac.com 1 year ago
parent a724dbbe6e
commit 65bc307f3b

@ -4222,7 +4222,7 @@
地磅名称
</summary>
</member>
<member name="P:Admin.Core.Model.ViewModels.VerifyView.IsRate">
<member name="P:Admin.Core.Model.ViewModels.VerifyView.Exist">
<summary>
是否有固含
</summary>
@ -4352,7 +4352,7 @@
待执行物料是否执行过
</summary>
</member>
<member name="P:Admin.Core.Model.ViewModels.WaitePlanView.IsRate">
<member name="P:Admin.Core.Model.ViewModels.WaitePlanView.Exist">
<summary>
是否有固含 1:有0:无
</summary>

@ -112,6 +112,8 @@ namespace Admin.Core.Api
#region 执行PLC
///<summary>
///执行PLC
/// <summary>
/// <param name="code">料仓排序Bin_Serial</param>
/// <param name="state">匹配状态条码匹配写“1”不匹配时写“2”</param>
/// <param name="materialCode">物料编码</param>

@ -167,7 +167,7 @@
{
"Id": 1,
"EquipName": "小料PLC",
"IP": "127.0.0.1",
"IP": "192.168.10.100",
"Port": 102
},
{

@ -12,6 +12,13 @@ namespace Admin.Core.IService
public interface Ixl_materialServices :IBaseServices<xl_material>
{
Task<xl_material> GetByMaterialCode(string code);
/// <summary>
/// 执行类型防差错
/// </summary>
/// <param name="binSerial">料仓号</param>
/// <param name="state">状态</param>
/// <param name="materialCode">物料编码</param>
/// <param name="weight">物料重量</param>
Task<MessageModel<bool>> ExecPlcState(int binSerial, int state,string materialCode,decimal weight);
/// <summary>
/// 绑定料桶信息

@ -130,7 +130,7 @@ namespace Admin.Core.Model.ViewModels
/// <summary>
/// 是否有固含
/// </summary>
public bool IsRate { get; set; }
public bool Exist { get; set; }
/// <summary>
/// 固含率
/// </summary>

@ -106,7 +106,7 @@ namespace Admin.Core.Model.ViewModels
/// <summary>
/// 是否有固含 1:有0:无
/// </summary>
public bool IsRate { get; set; }
public bool Exist { get; set; }
/// <summary>
/// 固含率
/// </summary>

@ -75,7 +75,7 @@ namespace Admin.Core.PlcServer
/// <returns></returns>
public bool Connect(string iP, int port)
{
//siemensS7Net.IpAddress = iP;//正式环境开启
siemensS7Net.IpAddress = iP;//正式环境开启
siemensS7Net.Port = port;
try
{

@ -18,7 +18,7 @@ namespace Admin.Core.Repository
public async Task<List<WaitePlanView>> GetWaiteMaterial(string planId)
{
string sql = @"select w.Weight_Id MID,p.Plan_Id,p.Plan_Num,p.Real_Num,p.Plan_Serial,p.Plan_State,p.Plan_Date,p.Plan_StateText,r.ID as RecipeID,r.Recipe_Serial,r.Recipe_Name,r.Version,r.Recipe_Verify,r.Total_Weight,r.Total_Error,m.ID as MaterialID,m.Material_name,m.Material_code,w.Set_Weight,w.Set_Error,
hw.Plan_ID MaterialPlan,ISNULL(w.IsRate,0) as IsRate from RT_plan p left join Pmt_recipe r on p.Recipe_ID=r.ID left join Pmt_weigh w on r.ID=w.Recipe_ID
hw.Plan_ID MaterialPlan,ISNULL(w.IsRate,0) as Exist from RT_plan p left join Pmt_recipe r on p.Recipe_ID=r.ID left join Pmt_weigh w on r.ID=w.Recipe_ID
left join Pmt_material m on w.Material_ID=m.ID
left join Hw_weigh hw on hw.Material_ID=m.ID and p.Real_Num=hw.Dosing_ID where p.Plan_State=3 and p.Plan_Id=@Plan_Id ORDER BY w.Weight_Id";

@ -54,6 +54,7 @@ namespace Admin.Core.Service
public async Task<MessageModel<bool>> ExecPlcState(int binSerial, int state, string materialCode, decimal weight)
{
MessageModel<bool> mesage=new MessageModel<bool>();
log.Info(materialCode + "|" + weight);
string station = string.Empty;
try
{

Loading…
Cancel
Save