liulb@mesnac.com 1 year ago
parent 80bbcd062e
commit 608628be23

@ -461,61 +461,6 @@
接收从条码系统获取的校验字符串 接收从条码系统获取的校验字符串
</summary> </summary>
</member> </member>
<member name="T:Admin.Core.Model.Model_New.BoxFoamData">
<summary>
箱体发泡数据
</summary>
</member>
<member name="P:Admin.Core.Model.Model_New.BoxFoamData.ObjId">
<summary>
主键标识
</summary>
</member>
<member name="P:Admin.Core.Model.Model_New.BoxFoamData.BoxFixturetype">
<summary>
夹具类型
</summary>
</member>
<member name="P:Admin.Core.Model.Model_New.BoxFoamData.BoxFixturestatus">
<summary>
夹具状态;1正常生产、0暂停生产
</summary>
</member>
<member name="P:Admin.Core.Model.Model_New.BoxFoamData.BoxFixtureproduction">
<summary>
夹具产量
</summary>
</member>
<member name="P:Admin.Core.Model.Model_New.BoxFoamData.BoxFixturesideplate">
<summary>
侧板温度
</summary>
</member>
<member name="P:Admin.Core.Model.Model_New.BoxFoamData.BoxClosebetatemperature">
<summary>
内模温度
</summary>
</member>
<member name="P:Admin.Core.Model.Model_New.BoxFoamData.BoxBeat">
<summary>
节拍
</summary>
</member>
<member name="P:Admin.Core.Model.Model_New.BoxFoamData.FoamVolume">
<summary>
发泡量
</summary>
</member>
<member name="P:Admin.Core.Model.Model_New.BoxFoamData.Createtime">
<summary>
创建时间
</summary>
</member>
<member name="P:Admin.Core.Model.Model_New.BoxFoamData.UpdateTime">
<summary>
创建时间
</summary>
</member>
<member name="T:Admin.Core.Model.Model_New.MaterialCompletion"> <member name="T:Admin.Core.Model.Model_New.MaterialCompletion">
<summary> <summary>
物料完成记录 物料完成记录
@ -1121,6 +1066,286 @@
所属工厂 所属工厂
</summary> </summary>
</member> </member>
<member name="T:Admin.Core.Model.BoxDeviceInfo">
<summary>
设备
</summary>
</member>
<member name="P:Admin.Core.Model.BoxDeviceInfo.ObjId">
<summary>
主键
</summary>
</member>
<member name="P:Admin.Core.Model.BoxDeviceInfo.ProductLineCode">
<summary>
产品线 1、2
</summary>
</member>
<member name="P:Admin.Core.Model.BoxDeviceInfo.EquipmentCode">
<summary>
设备编码
</summary>
</member>
<member name="P:Admin.Core.Model.BoxDeviceInfo.Sort">
<summary>
排序
</summary>
</member>
<member name="T:Admin.Core.Model.BoxFoamData">
<summary>
每班发泡信息
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamData.ObjId">
<summary>
主键
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamData.MainId">
<summary>
设备表主键
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamData.OrderCode">
<summary>
SAP订单
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamData.ProductLineCode">
<summary>
产品线 1、2
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamData.Fixtureboxtype">
<summary>
夹具箱型
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamData.Fixturestatus">
<summary>
夹具状态:0:停止1生产
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamData.Production">
<summary>
产量
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamData.CuringTimeSettingValue">
<summary>
固化时间设定值
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamData.ActualValue">
<summary>
固化时间实际值
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamData.AnHour">
<summary>
1小时
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamData.TwoHour">
<summary>
2小时
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamData.ThreeHour">
<summary>
3小时
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamData.FourHour">
<summary>
4小时
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamData.FiveHour">
<summary>
5小时
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamData.SixHour">
<summary>
6小时
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamData.SevenHour">
<summary>
7小时
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamData.EightHour">
<summary>
8小时
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamData.NineHour">
<summary>
9小时
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamData.TenHour">
<summary>
10小时
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamData.ElevenHour">
<summary>
11小时
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamData.TwelveHour">
<summary>
12小时
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamData.BoxFixturesideplate">
<summary>
侧板温度
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamData.BoxClosebetatemperature">
<summary>
内模温度
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamData.BoxBeat">
<summary>
节拍
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamData.UpdatedTime">
<summary>
更新时间
</summary>
</member>
<member name="T:Admin.Core.Model.BoxFoamDataRecord">
<summary>
每日发泡信息数据记录表
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamDataRecord.Obj_Id">
<summary>
主键
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamDataRecord.ProductLineCode">
<summary>
产线 1、2
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamDataRecord.OrderCode">
<summary>
订单编码
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamDataRecord.Fixtureboxtype">
<summary>
夹具箱型
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamDataRecord.Fixturestatus">
<summary>
夹具状态:0:停止1生产
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamDataRecord.Production">
<summary>
产量
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamDataRecord.CuringTimeSettingValue">
<summary>
固化时间设定值
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamDataRecord.ActualValue">
<summary>
固化时间实际值
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamDataRecord.AnHour">
<summary>
1小时
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamDataRecord.TwoHour">
<summary>
2小时
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamDataRecord.ThreeHour">
<summary>
3小时
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamDataRecord.FourHour">
<summary>
4小时
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamDataRecord.FiveHour">
<summary>
5小时
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamDataRecord.SixHour">
<summary>
6小时
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamDataRecord.SevenHour">
<summary>
7小时
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamDataRecord.EightHour">
<summary>
8小时
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamDataRecord.NineHour">
<summary>
9小时
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamDataRecord.TenHour">
<summary>
10小时
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamDataRecord.ElevenHour">
<summary>
11小时
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamDataRecord.TwelveHour">
<summary>
12小时
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamDataRecord.BoxFixturesideplate">
<summary>
侧板温度
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamDataRecord.BoxClosebetatemperature">
<summary>
内模温度
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamDataRecord.BoxBeat">
<summary>
节拍
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamDataRecord.CreateTime">
<summary>
更新时间
</summary>
</member>
<member name="T:Admin.Core.Model.BoxFoamPlan"> <member name="T:Admin.Core.Model.BoxFoamPlan">
<summary> <summary>
发泡计划 发泡计划
@ -1131,11 +1356,6 @@
主键标识 主键标识
</summary> </summary>
</member> </member>
<member name="P:Admin.Core.Model.BoxFoamPlan.BoxPlanId">
<summary>
BOM编号
</summary>
</member>
<member name="P:Admin.Core.Model.BoxFoamPlan.MaterialCode"> <member name="P:Admin.Core.Model.BoxFoamPlan.MaterialCode">
<summary> <summary>
物料编号 物料编号
@ -1351,6 +1571,31 @@
plc放行标志2为放行通过1为pda提示需要放行记录 plc放行标志2为放行通过1为pda提示需要放行记录
</summary> </summary>
</member> </member>
<member name="T:Admin.Core.Model.CurrentTeamTime">
<summary>
存储当班班组
</summary>
</member>
<member name="P:Admin.Core.Model.CurrentTeamTime.Obj_Id">
<summary>
主键
</summary>
</member>
<member name="P:Admin.Core.Model.CurrentTeamTime.TeamName">
<summary>
班组名称
</summary>
</member>
<member name="P:Admin.Core.Model.CurrentTeamTime.StartTime">
<summary>
开始时间
</summary>
</member>
<member name="P:Admin.Core.Model.CurrentTeamTime.EndTime">
<summary>
结束时间
</summary>
</member>
<member name="T:Admin.Core.Model.DetailElectricalinspection"> <member name="T:Admin.Core.Model.DetailElectricalinspection">
<summary> <summary>
电检数据明细 电检数据明细
@ -1561,51 +1806,6 @@
所属产线 所属产线
</summary> </summary>
</member> </member>
<member name="T:Admin.Core.Model.OldBoxFoamData">
<summary>
拆分的SAP BOM 信息
</summary>
</member>
<member name="P:Admin.Core.Model.OldBoxFoamData.ObjId">
<summary>
主键
</summary>
</member>
<member name="P:Admin.Core.Model.OldBoxFoamData.Fixtureboxtype">
<summary>
夹具箱型
</summary>
</member>
<member name="P:Admin.Core.Model.OldBoxFoamData.Fixturestatus">
<summary>
夹具状态
</summary>
</member>
<member name="P:Admin.Core.Model.OldBoxFoamData.Production">
<summary>
产量
</summary>
</member>
<member name="P:Admin.Core.Model.OldBoxFoamData.CuringTimeSettingValue">
<summary>
固化时间设定值
</summary>
</member>
<member name="P:Admin.Core.Model.OldBoxFoamData.ActualValue">
<summary>
固化时间实际值
</summary>
</member>
<member name="P:Admin.Core.Model.OldBoxFoamData.CreatedTime">
<summary>
创建时间
</summary>
</member>
<member name="P:Admin.Core.Model.OldBoxFoamData.UpdatedTime">
<summary>
更新时间
</summary>
</member>
<member name="T:Admin.Core.Model.Perfusion_Alarm"> <member name="T:Admin.Core.Model.Perfusion_Alarm">
<summary> <summary>
灌注告警 灌注告警
@ -3801,6 +4001,36 @@
数量 数量
</summary> </summary>
</member> </member>
<member name="T:Admin.Core.Model.ViewModels.CurrentTeamTimeView">
<summary>
获取每日班组时间
</summary>
</member>
<member name="P:Admin.Core.Model.ViewModels.CurrentTeamTimeView.Seq">
<summary>
开始时间
</summary>
</member>
<member name="P:Admin.Core.Model.ViewModels.CurrentTeamTimeView.StartTime">
<summary>
开始时间
</summary>
</member>
<member name="P:Admin.Core.Model.ViewModels.CurrentTeamTimeView.EndTime">
<summary>
结束时间
</summary>
</member>
<member name="P:Admin.Core.Model.ViewModels.CurrentTeamTimeView.HourTime">
<summary>
小时
</summary>
</member>
<member name="P:Admin.Core.Model.ViewModels.CurrentTeamTimeView.TeamName">
<summary>
班组
</summary>
</member>
<member name="T:Admin.Core.Model.ViewModels.EnterLibView"> <member name="T:Admin.Core.Model.ViewModels.EnterLibView">
<summary> <summary>
泡前库入库相信展示 泡前库入库相信展示

@ -43,5 +43,24 @@ namespace Admin.Core.Common
//} //}
//return resultStr; //return resultStr;
} }
/// <summary>
/// Bytes转16进制字符
/// </summary>
/// <param name="bytes"></param>
/// <param name="iLen"></param>
/// <returns></returns>
public static string BytesToHexStr(byte[] bytes, int iLen)//e.g. { 0x01, 0x01} ---> " 01 01"
{
string returnStr = "";
if (bytes != null)
{
for (int i = 0; i < iLen; i++)
{
returnStr += bytes[i].ToString("X2");
}
}
return returnStr;
}
} }
} }

@ -0,0 +1,14 @@
using Admin.Core.Model;
using Admin.Core.Model.Model_New;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Admin.Core.IRepository
{
/// <summary>
/// IBoxDeviceInfoRepository
/// </summary>
public interface IBoxDeviceInfoRepository : IBaseRepository<BoxDeviceInfo>
{
}
}

@ -0,0 +1,15 @@
using Admin.Core.Model;
using Admin.Core.Model.Model_New;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Admin.Core.IRepository
{
/// <summary>
/// IBoxFoamDataRecordRepository
/// </summary>
public interface IBoxFoamDataRecordRepository : IBaseRepository<BoxFoamDataRecord>
{
}
}

@ -0,0 +1,20 @@
using Admin.Core.Model;
using Admin.Core.Model.Model_New;
using Admin.Core.Model.ViewModels;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Admin.Core.IRepository
{
/// <summary>
/// ICurrentTeamTimeRepository
/// </summary>
public interface ICurrentTeamTimeRepository : IBaseRepository<CurrentTeamTime>
{
/// <summary>
/// 获取班组数据
/// </summary>
/// <returns></returns>
// Task<List<CurrentTeamTimeView>> GetTeamData();
}
}

@ -1,12 +0,0 @@
using Admin.Core.Model;
using Admin.Core.Model.Model_New;
namespace Admin.Core.IRepository
{
/// <summary>
/// IOldBoxFoamDataRepository
/// </summary>
public interface IOldBoxFoamDataRepository : IBaseRepository<OldBoxFoamData>
{
}
}

@ -1,5 +1,8 @@
using Admin.Core.Model; using Admin.Core.Model;
using Admin.Core.Model.Model_New; using Admin.Core.Model.Model_New;
using Admin.Core.Model.ViewModels;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Admin.Core.IRepository namespace Admin.Core.IRepository
{ {
@ -8,6 +11,10 @@ namespace Admin.Core.IRepository
/// </summary> /// </summary>
public interface ISysUserInfoRepository : IBaseRepository<SysUserInfo> public interface ISysUserInfoRepository : IBaseRepository<SysUserInfo>
{ {
/// <summary>
/// 获取班组数据
/// </summary>
/// <returns></returns>
Task<List<CurrentTeamTimeView>> GetTeamData();
} }
} }

@ -7,9 +7,9 @@ using System.Threading.Tasks;
namespace Admin.Core.IService namespace Admin.Core.IService
{ {
/// <summary> /// <summary>
/// IOldBoxFoamDataServices /// IBoxDeviceInfoServices
/// </summary> /// </summary>
public interface IOldBoxFoamDataServices : IBaseServices<OldBoxFoamData> public interface IBoxDeviceInfoServices : IBaseServices<BoxDeviceInfo>
{ {
} }

@ -0,0 +1,16 @@
using Admin.Core.IService;
using Admin.Core.Model;
using Admin.Core.Model.ViewModels;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Admin.Core.IService
{
/// <summary>
/// IBoxFoamDataRecordServices
/// </summary>
public interface IBoxFoamDataRecordServices : IBaseServices<BoxFoamDataRecord>
{
}
}

@ -0,0 +1,17 @@
using Admin.Core.IService;
using Admin.Core.Model;
using Admin.Core.Model.ViewModels;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Admin.Core.IService
{
/// <summary>
/// ISysUserInfoServices
/// </summary>
public interface ICurrentTeamTimeServices : IBaseServices<CurrentTeamTime>
{
}
}

@ -1,5 +1,7 @@
using Admin.Core.IService; using Admin.Core.IService;
using Admin.Core.Model; using Admin.Core.Model;
using Admin.Core.Model.ViewModels;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
@ -10,5 +12,11 @@ namespace Admin.Core.IService
/// </summary> /// </summary>
public interface ISysUserInfoServices : IBaseServices<SysUserInfo> public interface ISysUserInfoServices : IBaseServices<SysUserInfo>
{ {
/// <summary>
/// 获取当前班组
/// </summary>
/// <param name="nowDate"></param>
/// <returns></returns>
Task<CurrentTeamTimeView> GetTeamData(DateTime nowDate);
} }
} }

@ -0,0 +1,38 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Admin.Core.Model
{
/// <summary>
/// 设备
/// </summary>
[SugarTable("BOX_DEVICEINFO", "AUCMA_SCADA")]
public class BoxDeviceInfo
{
/// <summary>
/// 主键
/// </summary>
[SugarColumn(ColumnName = "OBJ_ID", IsIdentity = true, IsPrimaryKey = true)]
public int ObjId { get; set; }
/// <summary>
/// 产品线 1、2
/// </summary>
[SugarColumn(ColumnName = "PRODUCT_LINE_CODE")]
public string ProductLineCode { get; set; }
/// <summary>
/// 设备编码
/// </summary>
[SugarColumn(ColumnName = "EQUIPMENT_CODE")]
public string EquipmentCode { get; set; }
/// <summary>
/// 排序
/// </summary>
[SugarColumn(ColumnName = "SORT")]
public int Sort { get; set; }
}
}

@ -1,41 +1,122 @@
using SqlSugar; using SqlSugar;
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Admin.Core.Model.Model_New namespace Admin.Core.Model
{ {
/// <summary> /// <summary>
/// 箱体发泡数据 /// 每班发泡信息
/// </summary> /// </summary>
[SugarTable("BOX_FOAMDATA", "AUCMA_SCADA")] [SugarTable("BOX_FOAMDATA", "AUCMA_SCADA")]
public class BoxFoamData public class BoxFoamData
{ {
/// <summary> /// <summary>
/// 主键标识 /// 主键
/// </summary> /// </summary>
[SugarColumn(ColumnName = "OBJ_ID", IsPrimaryKey = true)] [SugarColumn(ColumnName = "OBJ_ID", IsIdentity = true, IsPrimaryKey = true)]
public int ObjId { get; set; } public int ObjId { get; set; }
/// <summary>
/// 设备表主键
/// </summary>
[SugarColumn(ColumnName = "MAINID")]
public int MainId { get; set; }
/// <summary>
/// SAP订单
/// </summary>
[SugarColumn(ColumnName = "ORDER_CODE")]
public string OrderCode { get; set; }
/// <summary> /// <summary>
/// 夹具类型 /// 产品线 1、2
/// </summary>
[SugarColumn(ColumnName = "PRODUCT_LINE_CODE")]
public string ProductLineCode { get; set; }
/// <summary>
/// 夹具箱型
/// </summary> /// </summary>
[SugarColumn(ColumnName = "BOX_FIXTURETYPE")] [SugarColumn(ColumnName = "FIXTUREBOXTYPE")]
public string BoxFixturetype { get; set; } public string Fixtureboxtype { get; set; }
/// <summary> /// <summary>
/// 夹具状态;1正常生产、0暂停生产 /// 夹具状态:0:停止1生产
/// </summary>
[SugarColumn(ColumnName = "FIXTURESTATUS")]
public int Fixturestatus { get; set; }
/// <summary>
/// 产量
/// </summary>
[SugarColumn(ColumnName = "PRODUCTION")]
public int Production { get; set; }
/// <summary>
/// 固化时间设定值
/// </summary> /// </summary>
[SugarColumn(ColumnName = "BOX_FIXTURESTATUS")] [SugarColumn(ColumnName = "CURINGTIMESETTINGVALUE")]
public int BoxFixturestatus { get; set; } public string CuringTimeSettingValue { get; set; }
/// <summary>
/// 固化时间实际值
/// </summary>
[SugarColumn(ColumnName = "ACTUALVALUE")]
public string ActualValue { get; set; }
/// <summary> /// <summary>
/// 夹具产量 /// 1小时
/// </summary>
[SugarColumn(ColumnName = "ANHOUR")]
public int AnHour { get; set; }
/// <summary>
/// 2小时
/// </summary>
[SugarColumn(ColumnName = "TWOHOUR")]
public int TwoHour { get; set; }
/// <summary>
/// 3小时
/// </summary>
[SugarColumn(ColumnName = "THREEHOUR")]
public int ThreeHour { get; set; }
/// <summary>
/// 4小时
/// </summary>
[SugarColumn(ColumnName = "FOURHOUR")]
public int FourHour { get; set; }
/// <summary>
/// 5小时
/// </summary> /// </summary>
[SugarColumn(ColumnName = "BOX_FIXTUREPRODUCTION")] [SugarColumn(ColumnName = "FIVEHOUR")]
public int BoxFixtureproduction { get; set; } public int FiveHour { get; set; }
/// <summary>
/// 6小时
/// </summary>
[SugarColumn(ColumnName = "SIXHOUR")]
public int SixHour { get; set; }
/// <summary>
/// 7小时
/// </summary>
[SugarColumn(ColumnName = "SEVENHOUR")]
public int SevenHour { get; set; }
/// <summary>
/// 8小时
/// </summary>
[SugarColumn(ColumnName = "EIGHTHOUR")]
public int EightHour { get; set; }
/// <summary>
/// 9小时
/// </summary>
[SugarColumn(ColumnName = "NINEHOUR")]
public int NineHour { get; set; }
/// <summary>
/// 10小时
/// </summary>
[SugarColumn(ColumnName = "TENHOUR")]
public int TenHour { get; set; }
/// <summary>
/// 11小时
/// </summary>
[SugarColumn(ColumnName = "ELEVENHOUR")]
public int ElevenHour { get; set; }
/// <summary>
/// 12小时
/// </summary>
[SugarColumn(ColumnName = "TWELVEHOUR")]
public int TwelveHour { get; set; }
/// <summary> /// <summary>
/// 侧板温度 /// 侧板温度
@ -55,19 +136,9 @@ namespace Admin.Core.Model.Model_New
[SugarColumn(ColumnName = "BOX_BEAT")] [SugarColumn(ColumnName = "BOX_BEAT")]
public int BoxBeat { get; set; } public int BoxBeat { get; set; }
/// <summary> /// <summary>
///发泡量 /// 更新时间
/// </summary>
[SugarColumn(ColumnName = "BOX_BEAT")]
public int FoamVolume { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[SugarColumn(ColumnName = "CREATETIME")]
public DateTime Createtime { get; set; }
/// <summary>
/// 创建时间
/// </summary> /// </summary>
[SugarColumn(ColumnName = "CREATETIME")] [SugarColumn(ColumnName = "UPDATETIME")]
public DateTime UpdateTime { get; set; } public DateTime UpdatedTime { get; set; }
} }
} }

@ -0,0 +1,142 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Admin.Core.Model
{
/// <summary>
/// 每日发泡信息数据记录表
/// </summary>
[SugarTable("BOX_FOAMDATARECORD", "AUCMA_SCADA")]
public class BoxFoamDataRecord
{
/// <summary>
/// 主键
/// </summary>
[SugarColumn(ColumnName = "OBJ_ID", IsPrimaryKey = true, IsIdentity = true)]
public int Obj_Id { get; set; }
/// <summary>
/// 产线 1、2
/// </summary>
[SugarColumn(ColumnName = "PRODUCT_LINE_CODE")]
public string ProductLineCode { get; set; }
/// <summary>
/// 订单编码
/// </summary>
[SugarColumn(ColumnName = "ORDER_CODE")]
public string OrderCode { get; set; }
/// <summary>
/// 夹具箱型
/// </summary>
[SugarColumn(ColumnName = "FIXTUREBOXTYPE")]
public string Fixtureboxtype { get; set; }
/// <summary>
/// 夹具状态:0:停止1生产
/// </summary>
[SugarColumn(ColumnName = "FIXTURESTATUS")]
public int Fixturestatus { get; set; }
/// <summary>
/// 产量
/// </summary>
[SugarColumn(ColumnName = "PRODUCTION")]
public int Production { get; set; }
/// <summary>
/// 固化时间设定值
/// </summary>
[SugarColumn(ColumnName = "CURINGTIMESETTINGVALUE")]
public string CuringTimeSettingValue { get; set; }
/// <summary>
/// 固化时间实际值
/// </summary>
[SugarColumn(ColumnName = "ACTUALVALUE")]
public string ActualValue { get; set; }
/// <summary>
/// 1小时
/// </summary>
[SugarColumn(ColumnName = "ANHOUR")]
public int AnHour { get; set; }
/// <summary>
/// 2小时
/// </summary>
[SugarColumn(ColumnName = "TWOHOUR")]
public int TwoHour { get; set; }
/// <summary>
/// 3小时
/// </summary>
[SugarColumn(ColumnName = "THREEHOUR")]
public int ThreeHour { get; set; }
/// <summary>
/// 4小时
/// </summary>
[SugarColumn(ColumnName = "FOURHOUR")]
public int FourHour { get; set; }
/// <summary>
/// 5小时
/// </summary>
[SugarColumn(ColumnName = "FIVEHOUR")]
public int FiveHour { get; set; }
/// <summary>
/// 6小时
/// </summary>
[SugarColumn(ColumnName = "SIXHOUR")]
public int SixHour { get; set; }
/// <summary>
/// 7小时
/// </summary>
[SugarColumn(ColumnName = "SEVENHOUR")]
public int SevenHour { get; set; }
/// <summary>
/// 8小时
/// </summary>
[SugarColumn(ColumnName = "EIGHTHOUR")]
public int EightHour { get; set; }
/// <summary>
/// 9小时
/// </summary>
[SugarColumn(ColumnName = "NINEHOUR")]
public int NineHour { get; set; }
/// <summary>
/// 10小时
/// </summary>
[SugarColumn(ColumnName = "TENHOUR")]
public int TenHour { get; set; }
/// <summary>
/// 11小时
/// </summary>
[SugarColumn(ColumnName = "ELEVENHOUR")]
public int ElevenHour { get; set; }
/// <summary>
/// 12小时
/// </summary>
[SugarColumn(ColumnName = "TWELVEHOUR")]
public int TwelveHour { get; set; }
/// <summary>
/// 侧板温度
/// </summary>
[SugarColumn(ColumnName = "BOX_FIXTURESIDEPLATE")]
public string BoxFixturesideplate { get; set; }
/// <summary>
/// 内模温度
/// </summary>
[SugarColumn(ColumnName = "BOX_CLOSEBETATEMPERATURE")]
public string BoxClosebetatemperature { get; set; }
/// <summary>
/// 节拍
/// </summary>
[SugarColumn(ColumnName = "BOX_BEAT")]
public int BoxBeat { get; set; }
/// <summary>
/// 更新时间
/// </summary>
[SugarColumn(ColumnName = "CREATETIME")]
public DateTime CreateTime { get; set; }
}
}

@ -14,13 +14,6 @@ namespace Admin.Core.Model
///</summary> ///</summary>
[SugarColumn(ColumnName = "OBJ_ID", IsPrimaryKey = true, IsIdentity = true)] [SugarColumn(ColumnName = "OBJ_ID", IsPrimaryKey = true, IsIdentity = true)]
public int ObjId { get; set; } public int ObjId { get; set; }
/// <summary>
/// BOM编号
/// </summary>
[SugarColumn(ColumnName = "BOX_PLANID")]
public string BoxPlanId { get; set; }
/// <summary> /// <summary>
/// 物料编号 /// 物料编号
/// </summary> /// </summary>

@ -0,0 +1,33 @@
using SqlSugar;
using System;
namespace Admin.Core.Model
{
/// <summary>
/// 存储当班班组
/// </summary>
[SugarTable("CURRENTTEAMTIME", "AUCMA_SCADA")]
public class CurrentTeamTime
{
/// <summary>
/// 主键
/// </summary>
[SugarColumn(ColumnName = "OBJ_ID", IsPrimaryKey = true, IsIdentity = true)]
public int Obj_Id { get; set; }
/// <summary>
/// 班组名称
/// </summary>
[SugarColumn(ColumnName = "TEAMNAME")]
public string TeamName { get; set; }
/// <summary>
/// 开始时间
/// </summary>
[SugarColumn(ColumnName = "STARTTIME")]
public DateTime StartTime { get; set; }
/// <summary>
/// 结束时间
/// </summary>
[SugarColumn(ColumnName = "ENDTIME")]
public DateTime EndTime { get; set; }
}
}

@ -1,59 +0,0 @@
using SqlSugar;
using System;
namespace Admin.Core.Model
{
/// <summary>
/// 拆分的SAP BOM 信息
/// </summary>
[SugarTable("OLDBOX_FOAMDATA", "AUCMA_SCADA")]
public class OldBoxFoamData
{
/// <summary>
/// 主键
/// </summary>
[SugarColumn(ColumnName = "OBJ_ID", IsIdentity = true, IsPrimaryKey = true)]
public int ObjId { get; set; }
/// <summary>
/// 夹具箱型
/// </summary>
[SugarColumn(ColumnName = "FIXTUREBOXTYPE")]
public string Fixtureboxtype { get; set; }
/// <summary>
/// 夹具状态
/// </summary>
[SugarColumn(ColumnName = "FIXTURESTATUS")]
public string Fixturestatus { get; set; }
/// <summary>
/// 产量
/// </summary>
[SugarColumn(ColumnName = "PRODUCTION")]
public float Production { get; set; }
/// <summary>
/// 固化时间设定值
/// </summary>
[SugarColumn(ColumnName = "CURINGTIMESETTINGVALUE")]
public string CuringTimeSettingValue { get; set; }
/// <summary>
/// 固化时间实际值
/// </summary>
[SugarColumn(ColumnName = "ACTUALVALUE")]
public string ActualValue { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[SugarColumn(ColumnName = "CREATED_TIME")]
public DateTime CreatedTime { get; set; }
/// <summary>
/// 更新时间
/// </summary>
[SugarColumn(ColumnName = "UPDATED_TIME")]
public DateTime UpdatedTime { get; set; }
}
}

@ -0,0 +1,41 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Admin.Core.Model.ViewModels
{
/// <summary>
/// 获取每日班组时间
/// </summary>
public class CurrentTeamTimeView
{
/// <summary>
/// 开始时间
/// </summary>
[SugarColumn(ColumnName = "SEQ")]
public int Seq { get; set; }
/// <summary>
/// 开始时间
/// </summary>
[SugarColumn(ColumnName = "START_TIME")]
public DateTime StartTime { get; set; }
/// <summary>
/// 结束时间
/// </summary>
[SugarColumn(ColumnName = "END_TIME")]
public DateTime EndTime { get; set; }
/// <summary>
/// 小时
/// </summary>
[SugarColumn(ColumnName = "HOUR_TIME")]
public string HourTime { get; set; }
/// <summary>
/// 班组
/// </summary>
[SugarColumn(ColumnName = "TEAM_NAME")]
public string TeamName { get; set; }
}
}

@ -0,0 +1,19 @@
using Admin.Core.IRepository;
using Admin.Core.Model;
using Admin.Core.Model.Model_New;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Admin.Core.Repository
{
/// <summary>
/// BoxDeviceInfoRepository
/// </summary>
public class BoxDeviceInfoRepository : BaseRepository<BoxDeviceInfo>, IBoxDeviceInfoRepository
{
public BoxDeviceInfoRepository(IUnitOfWork unitOfWork) : base(unitOfWork)
{
}
}
}

@ -0,0 +1,16 @@
using Admin.Core.IRepository;
using Admin.Core.Model;
namespace Admin.Core.Repository
{
/// <summary>
/// BoxFoamDataRecordRepository
/// </summary>
public class BoxFoamDataRecordRepository : BaseRepository<BoxFoamDataRecord>, IBoxFoamDataRecordRepository
{
public BoxFoamDataRecordRepository(IUnitOfWork unitOfWork) : base(unitOfWork)
{
}
}
}

@ -0,0 +1,23 @@
using Admin.Core.Model;
using Admin.Core.IRepository;
using System.Threading.Tasks;
using Admin.Core.Model.ViewModels;
using Admin.Core.Model.Model_New;
using System.Collections.Generic;
using System;
namespace Admin.Core.Repository
{
/// <summary>
/// CurrentTeamTimeRepository
/// </summary>
public class CurrentTeamTimeRepository : BaseRepository<CurrentTeamTime>, ICurrentTeamTimeRepository
{
public CurrentTeamTimeRepository(IUnitOfWork unitOfWork) : base(unitOfWork)
{
}
}
}

@ -1,15 +0,0 @@
using Admin.Core.IRepository;
using Admin.Core.Model;
namespace Admin.Core.Repository
{
/// <summary>
/// OldBoxFoamDataRepository
/// </summary>
public class OldBoxFoamDataRepository : BaseRepository<OldBoxFoamData>, IOldBoxFoamDataRepository
{
public OldBoxFoamDataRepository(IUnitOfWork unitOfWork) : base(unitOfWork)
{
}
}
}

@ -14,14 +14,17 @@ using System.Threading.Tasks;
namespace Admin.Core.Service namespace Admin.Core.Service
{ {
public class OldBoxFoamDataServices : BaseServices<OldBoxFoamData>, IOldBoxFoamDataServices public class BoxDeviceInfoServices : BaseServices<BoxDeviceInfo>, IBoxDeviceInfoServices
{ {
private static readonly log4net.ILog logHelper = LogManager.GetLogger(typeof(OldBoxFoamDataServices)); private static readonly log4net.ILog logHelper = LogManager.GetLogger(typeof(BoxDeviceInfoServices));
private readonly IBaseRepository<OldBoxFoamData> _dal; private readonly IBaseRepository<BoxDeviceInfo> _dal;
public OldBoxFoamDataServices(IBaseRepository<OldBoxFoamData> dal) private readonly IBoxDeviceInfoRepository _boxDeviceInfoRepository;
public BoxDeviceInfoServices(IBaseRepository<BoxDeviceInfo> dal, IBoxDeviceInfoRepository boxDeviceInfoRepository)
{ {
this._dal = dal; this._dal = dal;
base.BaseDal = dal; base.BaseDal = dal;
_boxDeviceInfoRepository = boxDeviceInfoRepository;
} }
} }

@ -0,0 +1,31 @@
using Admin.Core.IRepository;
using Admin.Core.IService;
using Admin.Core.Model;
using Admin.Core.Model.Model_New;
using Admin.Core.Model.ViewModels;
using log4net;
using Microsoft.AspNetCore.Razor.TagHelpers;
using Microsoft.IdentityModel.Logging;
using NPOI.XSSF.UserModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Admin.Core.Service
{
public class BoxFoamDataRecordServices : BaseServices<BoxFoamDataRecord>, IBoxFoamDataRecordServices
{
private static readonly log4net.ILog logHelper = LogManager.GetLogger(typeof(BoxFoamDataRecordServices));
private readonly IBaseRepository<BoxFoamDataRecord> _dal;
private readonly IBoxFoamDataRecordRepository _boxFoamDataRecordRepository;
public BoxFoamDataRecordServices(IBaseRepository<BoxFoamDataRecord> dal, IBoxFoamDataRecordRepository boxFoamDataRecordRepository)
{
this._dal = dal;
base.BaseDal = dal;
_boxFoamDataRecordRepository = boxFoamDataRecordRepository;
}
}
}

@ -1,5 +1,6 @@
using Admin.Core.IRepository; using Admin.Core.IRepository;
using Admin.Core.IService; using Admin.Core.IService;
using Admin.Core.Model;
using Admin.Core.Model.Model_New; using Admin.Core.Model.Model_New;
using log4net; using log4net;
namespace Admin.Core.Service namespace Admin.Core.Service

@ -7,7 +7,6 @@ namespace Admin.Core.Service
{ {
public class BoxFoamPlanServices : BaseServices<BoxFoamPlan>, IBoxFoamPlanServices public class BoxFoamPlanServices : BaseServices<BoxFoamPlan>, IBoxFoamPlanServices
{ {
private static readonly log4net.ILog logHelper = LogManager.GetLogger(typeof(BoxFoamPlanServices));
private readonly IBaseRepository<BoxFoamPlan> _dal; private readonly IBaseRepository<BoxFoamPlan> _dal;
public BoxFoamPlanServices(IBaseRepository<BoxFoamPlan> dal) public BoxFoamPlanServices(IBaseRepository<BoxFoamPlan> dal)
{ {

@ -0,0 +1,27 @@
using Admin.Core.IRepository;
using Admin.Core.IService;
using Admin.Core.Model;
using Admin.Core.Model.ViewModels;
using Admin.Core.Service;
using log4net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Admin.Core.IService
{
/// <summary>
/// SysUserInfoServices
/// </summary>
public class CurrentTeamTimeServices : BaseServices<CurrentTeamTime>, ICurrentTeamTimeServices
{
private readonly IBaseRepository<CurrentTeamTime> _dal;
public CurrentTeamTimeServices(IBaseRepository<CurrentTeamTime> dal)
{
this._dal = dal;
base.BaseDal = dal;
}
}
}

@ -1,9 +1,12 @@
using Admin.Core.IRepository; using Admin.Core.IRepository;
using Admin.Core.IService; using Admin.Core.IService;
using Admin.Core.Model; using Admin.Core.Model;
using Admin.Core.Model.ViewModels;
using Admin.Core.Service; using Admin.Core.Service;
using log4net; using log4net;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Admin.Core.IService namespace Admin.Core.IService
@ -14,10 +17,24 @@ namespace Admin.Core.IService
public class SysUserInfoServices : BaseServices<SysUserInfo>, ISysUserInfoServices public class SysUserInfoServices : BaseServices<SysUserInfo>, ISysUserInfoServices
{ {
private readonly IBaseRepository<SysUserInfo> _dal; private readonly IBaseRepository<SysUserInfo> _dal;
public SysUserInfoServices(IBaseRepository<SysUserInfo> dal) private readonly ISysUserInfoRepository _sysUserInfoRepository;
public SysUserInfoServices(IBaseRepository<SysUserInfo> dal, ISysUserInfoRepository sysUserInfoRepository)
{ {
this._dal = dal; this._dal = dal;
base.BaseDal = dal; base.BaseDal = dal;
_sysUserInfoRepository = sysUserInfoRepository;
}
public async Task<CurrentTeamTimeView> GetTeamData(DateTime nowDate)
{
var list= await _sysUserInfoRepository.GetTeamData();
if (list.Count() == 0) return null;
CurrentTeamTimeView view = list.SingleOrDefault(d=>d.StartTime<= nowDate && nowDate <= d.EndTime);
if (view != null)
return view;
else
return null;
} }
} }
} }

@ -21,10 +21,10 @@ namespace Admin.Core.Tasks
private static readonly log4net.ILog logHelper = LogManager.GetLogger(typeof(Job_BoxFoamData_Quartz)); private static readonly log4net.ILog logHelper = LogManager.GetLogger(typeof(Job_BoxFoamData_Quartz));
private readonly IBoxFoamDataServices _boxFoamDataServices; private readonly IBoxFoamDataServices _boxFoamDataServices;
private readonly IOldBoxFoamDataServices _oldBoxFoamDataServices; private readonly IBoxFoamDataServices _oldBoxFoamDataServices;
public Job_BoxFoamData_Quartz(ISysTasksQzService SysTasksQzService, ISysJobLogService sysJobLogService, public Job_BoxFoamData_Quartz(ISysTasksQzService SysTasksQzService, ISysJobLogService sysJobLogService,
IBoxFoamDataServices boxFoamDataServices, IOldBoxFoamDataServices oldBoxFoamDataServices) IBoxFoamDataServices boxFoamDataServices, IBoxFoamDataServices oldBoxFoamDataServices)
{ {
_SysTasksQzService = SysTasksQzService; _SysTasksQzService = SysTasksQzService;
_boxFoamDataServices = boxFoamDataServices; _boxFoamDataServices = boxFoamDataServices;
@ -80,149 +80,149 @@ namespace Admin.Core.Tasks
try try
{ {
#region 更新PLC数据 //#region 更新PLC数据
if (item.ObjId == 1) //if (item.ObjId == 1)
{ //{
item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0"); // item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0");
if (obj.plc.ReadInt16("DB8.DBW122.0") == 1) item.BoxFixturestatus = 1; // if (obj.plc.ReadInt16("DB8.DBW122.0") == 1) item.BoxFixturestatus = 1;
if (obj.plc.ReadInt16("DB8.DBW122.1") == 1) item.BoxFixturestatus = 0; // if (obj.plc.ReadInt16("DB8.DBW122.1") == 1) item.BoxFixturestatus = 0;
item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD146"); // item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD146");
item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD294"); // item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD294");
item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD310"); // item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD310");
item.BoxBeat = obj.plc.ReadInt16("DB8.DBD578"); // item.BoxBeat = obj.plc.ReadInt16("DB8.DBD578");
item.UpdateTime = DateTime.Now; // item.UpdateTime = DateTime.Now;
} //}
if (item.ObjId == 2) //if (item.ObjId == 2)
{ //{
item.BoxFixturetype = obj.plc.ReadString("DB8.DBX12.0"); // item.BoxFixturetype = obj.plc.ReadString("DB8.DBX12.0");
if (obj.plc.ReadInt16("DB8.DBW124.0") == 1) item.BoxFixturestatus = 1; // if (obj.plc.ReadInt16("DB8.DBW124.0") == 1) item.BoxFixturestatus = 1;
if (obj.plc.ReadInt16("DB8.DBW124.1") == 1) item.BoxFixturestatus = 0; // if (obj.plc.ReadInt16("DB8.DBW124.1") == 1) item.BoxFixturestatus = 0;
item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD150"); // item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD150");
item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD318"); // item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD318");
item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD334"); // item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD334");
item.BoxBeat = obj.plc.ReadInt16("DB8.DBD582"); // item.BoxBeat = obj.plc.ReadInt16("DB8.DBD582");
item.UpdateTime = DateTime.Now; // item.UpdateTime = DateTime.Now;
} //}
if (item.ObjId == 3) //if (item.ObjId == 3)
{ //{
item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0"); // item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0");
if (obj.plc.ReadInt16("DB8.DBW126.0") == 1) item.BoxFixturestatus = 1; // if (obj.plc.ReadInt16("DB8.DBW126.0") == 1) item.BoxFixturestatus = 1;
if (obj.plc.ReadInt16("DB8.DBW126.1") == 1) item.BoxFixturestatus = 0; // if (obj.plc.ReadInt16("DB8.DBW126.1") == 1) item.BoxFixturestatus = 0;
item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD154"); // item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD154");
item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD342"); // item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD342");
item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD358"); // item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD358");
item.BoxBeat = obj.plc.ReadInt16("DB8.DBD586"); // item.BoxBeat = obj.plc.ReadInt16("DB8.DBD586");
item.UpdateTime = DateTime.Now; // item.UpdateTime = DateTime.Now;
} //}
if (item.ObjId == 4) //if (item.ObjId == 4)
{ //{
item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0"); // item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0");
if (obj.plc.ReadInt16("DB8.DBW128.0") == 1) item.BoxFixturestatus = 1; // if (obj.plc.ReadInt16("DB8.DBW128.0") == 1) item.BoxFixturestatus = 1;
if (obj.plc.ReadInt16("DB8.DBW128.1") == 1) item.BoxFixturestatus = 0; // if (obj.plc.ReadInt16("DB8.DBW128.1") == 1) item.BoxFixturestatus = 0;
item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD158"); // item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD158");
item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD366"); // item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD366");
item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD382"); // item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD382");
item.BoxBeat = obj.plc.ReadInt16("DB8.DBD590"); // item.BoxBeat = obj.plc.ReadInt16("DB8.DBD590");
item.UpdateTime = DateTime.Now; // item.UpdateTime = DateTime.Now;
} //}
if (item.ObjId == 5) //if (item.ObjId == 5)
{ //{
item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0"); // item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0");
if (obj.plc.ReadInt16("DB8.DBW130.0") == 1) item.BoxFixturestatus = 1; // if (obj.plc.ReadInt16("DB8.DBW130.0") == 1) item.BoxFixturestatus = 1;
if (obj.plc.ReadInt16("DB8.DBW130.1") == 1) item.BoxFixturestatus = 0; // if (obj.plc.ReadInt16("DB8.DBW130.1") == 1) item.BoxFixturestatus = 0;
item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD162"); // item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD162");
item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD390"); // item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD390");
item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD406"); // item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD406");
item.BoxBeat = obj.plc.ReadInt16("DB8.DBD594"); // item.BoxBeat = obj.plc.ReadInt16("DB8.DBD594");
item.UpdateTime = DateTime.Now; // item.UpdateTime = DateTime.Now;
} //}
if (item.ObjId == 6) //if (item.ObjId == 6)
{ //{
item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0"); // item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0");
if (obj.plc.ReadInt16("DB8.DBW122.0") == 1) item.BoxFixturestatus = 1; // if (obj.plc.ReadInt16("DB8.DBW122.0") == 1) item.BoxFixturestatus = 1;
if (obj.plc.ReadInt16("DB8.DBW122.1") == 1) item.BoxFixturestatus = 0; // if (obj.plc.ReadInt16("DB8.DBW122.1") == 1) item.BoxFixturestatus = 0;
item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD166"); // item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD166");
item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD414"); // item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD414");
item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD430"); // item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD430");
item.BoxBeat = obj.plc.ReadInt16("DB8.DBD598"); // item.BoxBeat = obj.plc.ReadInt16("DB8.DBD598");
item.UpdateTime = DateTime.Now; // item.UpdateTime = DateTime.Now;
} //}
if (item.ObjId == 7) //if (item.ObjId == 7)
{ //{
item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0"); // item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0");
if (obj.plc.ReadInt16("DB8.DBW134.0") == 1) item.BoxFixturestatus = 1; // if (obj.plc.ReadInt16("DB8.DBW134.0") == 1) item.BoxFixturestatus = 1;
if (obj.plc.ReadInt16("DB8.DBW134.1") == 1) item.BoxFixturestatus = 0; // if (obj.plc.ReadInt16("DB8.DBW134.1") == 1) item.BoxFixturestatus = 0;
item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD170"); // item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD170");
item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD438"); // item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD438");
item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD454"); // item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD454");
item.BoxBeat = obj.plc.ReadInt16("DB8.DBD602"); // item.BoxBeat = obj.plc.ReadInt16("DB8.DBD602");
item.UpdateTime = DateTime.Now; // item.UpdateTime = DateTime.Now;
} //}
if (item.ObjId == 8) //if (item.ObjId == 8)
{ //{
item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0"); // item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0");
if (obj.plc.ReadInt16("DB8.DBW136.0") == 1) item.BoxFixturestatus = 1; // if (obj.plc.ReadInt16("DB8.DBW136.0") == 1) item.BoxFixturestatus = 1;
if (obj.plc.ReadInt16("DB8.DBW136.1") == 1) item.BoxFixturestatus = 0; // if (obj.plc.ReadInt16("DB8.DBW136.1") == 1) item.BoxFixturestatus = 0;
item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD174"); // item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD174");
item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD462"); // item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD462");
item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD478"); // item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD478");
item.BoxBeat = obj.plc.ReadInt16("DB8.DBD606"); // item.BoxBeat = obj.plc.ReadInt16("DB8.DBD606");
item.UpdateTime = DateTime.Now; // item.UpdateTime = DateTime.Now;
} //}
if (item.ObjId == 9) //if (item.ObjId == 9)
{ //{
item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0"); // item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0");
if (obj.plc.ReadInt16("DB8.DBW138.0") == 1) item.BoxFixturestatus = 1; // if (obj.plc.ReadInt16("DB8.DBW138.0") == 1) item.BoxFixturestatus = 1;
if (obj.plc.ReadInt16("DB8.DBW138.1") == 1) item.BoxFixturestatus = 0; // if (obj.plc.ReadInt16("DB8.DBW138.1") == 1) item.BoxFixturestatus = 0;
item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD178"); // item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD178");
item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD486"); // item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD486");
item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD502"); // item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD502");
item.BoxBeat = obj.plc.ReadInt16("DB8.DBD610"); // item.BoxBeat = obj.plc.ReadInt16("DB8.DBD610");
item.UpdateTime = DateTime.Now; // item.UpdateTime = DateTime.Now;
} //}
if (item.ObjId == 10) //if (item.ObjId == 10)
{ //{
item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0"); // item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0");
if (obj.plc.ReadInt16("DB8.DBW140.0") == 1) item.BoxFixturestatus = 1; // if (obj.plc.ReadInt16("DB8.DBW140.0") == 1) item.BoxFixturestatus = 1;
if (obj.plc.ReadInt16("DB8.DBW140.1") == 1) item.BoxFixturestatus = 0; // if (obj.plc.ReadInt16("DB8.DBW140.1") == 1) item.BoxFixturestatus = 0;
item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD182"); // item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD182");
item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD510"); // item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD510");
item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD526"); // item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD526");
item.BoxBeat = obj.plc.ReadInt16("DB8.DBD614"); // item.BoxBeat = obj.plc.ReadInt16("DB8.DBD614");
item.UpdateTime = DateTime.Now; // item.UpdateTime = DateTime.Now;
} //}
if (item.ObjId == 11) //if (item.ObjId == 11)
{ //{
item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0"); // item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0");
if (obj.plc.ReadInt16("DDB8.DBW142.0") == 1) item.BoxFixturestatus = 1; // if (obj.plc.ReadInt16("DDB8.DBW142.0") == 1) item.BoxFixturestatus = 1;
if (obj.plc.ReadInt16("DB8.DBW142.1") == 1) item.BoxFixturestatus = 0; // if (obj.plc.ReadInt16("DB8.DBW142.1") == 1) item.BoxFixturestatus = 0;
item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD186"); // item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD186");
item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD534"); // item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD534");
item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD550"); // item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD550");
item.BoxBeat = obj.plc.ReadInt16("DB8.DBD622"); // item.BoxBeat = obj.plc.ReadInt16("DB8.DBD622");
item.UpdateTime = DateTime.Now; // item.UpdateTime = DateTime.Now;
} //}
if (item.ObjId == 12) //if (item.ObjId == 12)
{ //{
item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0"); // item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0");
if (obj.plc.ReadInt16("DB8.DBW144.0") == 1) item.BoxFixturestatus = 1; // if (obj.plc.ReadInt16("DB8.DBW144.0") == 1) item.BoxFixturestatus = 1;
if (obj.plc.ReadInt16("DB8.DBW144.1") == 1) item.BoxFixturestatus = 0; // if (obj.plc.ReadInt16("DB8.DBW144.1") == 1) item.BoxFixturestatus = 0;
item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD190"); // item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD190");
item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD558"); // item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD558");
item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD574"); // item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD574");
item.BoxBeat = obj.plc.ReadInt16("DB8.DBD626"); // item.BoxBeat = obj.plc.ReadInt16("DB8.DBD626");
item.UpdateTime = DateTime.Now; // item.UpdateTime = DateTime.Now;
} //}
#endregion //#endregion
bool result = await _boxFoamDataServices.UpdateAsync(item); //bool result = await _boxFoamDataServices.UpdateAsync(item);
if (result) //if (result)
{ //{
RefreshBoxFoamDataDelegateEvent?.Invoke(); // RefreshBoxFoamDataDelegateEvent?.Invoke();
} //}
else //else
{ //{
// LogDelegateEvent?.Invoke($"物料[{planInfo.MaterialName}], 入库[{baseSpace.SpaceName}]失败,任务回滚!"); // // LogDelegateEvent?.Invoke($"物料[{planInfo.MaterialName}], 入库[{baseSpace.SpaceName}]失败,任务回滚!");
} //}
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -260,7 +260,7 @@ namespace Admin.Core.Tasks
} }
} }
private async Task<OldBoxFoamData> UpdateRealBoxFoamData(PlcModel obj, OldBoxFoamData item) private async Task<BoxFoamData> UpdateRealBoxFoamData(PlcModel obj, BoxFoamData item)
{ {
try try
{ {
@ -268,18 +268,18 @@ namespace Admin.Core.Tasks
if (item.ObjId == 1) if (item.ObjId == 1)
{ {
item.Fixtureboxtype = obj.plc.ReadString("D3140")+ obj.plc.ReadString("D3141"); item.Fixtureboxtype = obj.plc.ReadString("D3140")+ obj.plc.ReadString("D3141");
if (obj.plc.ReadInt16("Y0F0") == 1) //if (obj.plc.ReadInt16("Y0F0") == 1)
{ //{
item.Fixturestatus = "手动"; // item.Fixturestatus = "手动";
} //}
if (obj.plc.ReadInt16("Y0F1") == 1) //if (obj.plc.ReadInt16("Y0F1") == 1)
{ //{
item.Fixturestatus = "自动"; // item.Fixturestatus = "自动";
} //}
if (obj.plc.ReadInt16("Y110") == 1) //if (obj.plc.ReadInt16("Y110") == 1)
{ //{
item.Fixturestatus = "停止"; // item.Fixturestatus = "停止";
} //}
item.Production = obj.plc.ReadInt16("D182"); item.Production = obj.plc.ReadInt16("D182");
item.CuringTimeSettingValue = obj.plc.ReadString("D911"); item.CuringTimeSettingValue = obj.plc.ReadString("D911");
@ -289,18 +289,18 @@ namespace Admin.Core.Tasks
if (item.ObjId == 2) if (item.ObjId == 2)
{ {
item.Fixtureboxtype = obj.plc.ReadString("D3142") + obj.plc.ReadString("D3143"); item.Fixtureboxtype = obj.plc.ReadString("D3142") + obj.plc.ReadString("D3143");
if (obj.plc.ReadInt16("Y0F5") == 1) //if (obj.plc.ReadInt16("Y0F5") == 1)
{ //{
item.Fixturestatus = "手动"; // item.Fixturestatus = "手动";
} //}
if (obj.plc.ReadInt16("Y0F6") == 1) //if (obj.plc.ReadInt16("Y0F6") == 1)
{ //{
item.Fixturestatus = "自动"; // item.Fixturestatus = "自动";
} //}
if (obj.plc.ReadInt16("Y111") == 1) //if (obj.plc.ReadInt16("Y111") == 1)
{ //{
item.Fixturestatus = "停止"; // item.Fixturestatus = "停止";
} //}
item.Production = obj.plc.ReadInt16("D183"); item.Production = obj.plc.ReadInt16("D183");
item.CuringTimeSettingValue = obj.plc.ReadString("D911"); item.CuringTimeSettingValue = obj.plc.ReadString("D911");
@ -310,18 +310,18 @@ namespace Admin.Core.Tasks
if (item.ObjId == 3) if (item.ObjId == 3)
{ {
item.Fixtureboxtype = obj.plc.ReadString("D3144") + obj.plc.ReadString("D3145"); item.Fixtureboxtype = obj.plc.ReadString("D3144") + obj.plc.ReadString("D3145");
if (obj.plc.ReadInt16("Y0FA") == 1) //if (obj.plc.ReadInt16("Y0FA") == 1)
{ //{
item.Fixturestatus = "手动"; // item.Fixturestatus = "手动";
} //}
if (obj.plc.ReadInt16("Y0FB") == 1) //if (obj.plc.ReadInt16("Y0FB") == 1)
{ //{
item.Fixturestatus = "自动"; // item.Fixturestatus = "自动";
} //}
if (obj.plc.ReadInt16("Y112") == 1) //if (obj.plc.ReadInt16("Y112") == 1)
{ //{
item.Fixturestatus = "停止"; // item.Fixturestatus = "停止";
} //}
item.Production = obj.plc.ReadInt16("D183"); item.Production = obj.plc.ReadInt16("D183");
item.CuringTimeSettingValue = obj.plc.ReadString("D912"); item.CuringTimeSettingValue = obj.plc.ReadString("D912");
@ -331,18 +331,18 @@ namespace Admin.Core.Tasks
if (item.ObjId == 4) if (item.ObjId == 4)
{ {
item.Fixtureboxtype = obj.plc.ReadString("D3148") + obj.plc.ReadString("D3149"); item.Fixtureboxtype = obj.plc.ReadString("D3148") + obj.plc.ReadString("D3149");
if (obj.plc.ReadInt16("Y100 ") == 1) //if (obj.plc.ReadInt16("Y100 ") == 1)
{ //{
item.Fixturestatus = "手动"; // item.Fixturestatus = "手动";
} //}
if (obj.plc.ReadInt16("Y101") == 1) //if (obj.plc.ReadInt16("Y101") == 1)
{ //{
item.Fixturestatus = "自动"; // item.Fixturestatus = "自动";
} //}
if (obj.plc.ReadInt16("Y113") == 1) //if (obj.plc.ReadInt16("Y113") == 1)
{ //{
item.Fixturestatus = "停止"; // item.Fixturestatus = "停止";
} //}
item.Production = obj.plc.ReadInt16("D184"); item.Production = obj.plc.ReadInt16("D184");
item.CuringTimeSettingValue = obj.plc.ReadString("D913"); item.CuringTimeSettingValue = obj.plc.ReadString("D913");
@ -352,18 +352,18 @@ namespace Admin.Core.Tasks
if (item.ObjId == 5) if (item.ObjId == 5)
{ {
item.Fixtureboxtype = obj.plc.ReadString("D3150") + obj.plc.ReadString("D3151"); item.Fixtureboxtype = obj.plc.ReadString("D3150") + obj.plc.ReadString("D3151");
if (obj.plc.ReadInt16("Y105") == 1) //if (obj.plc.ReadInt16("Y105") == 1)
{ //{
item.Fixturestatus = "手动"; // item.Fixturestatus = "手动";
} //}
if (obj.plc.ReadInt16("Y106") == 1) //if (obj.plc.ReadInt16("Y106") == 1)
{ //{
item.Fixturestatus = "自动"; // item.Fixturestatus = "自动";
} //}
if (obj.plc.ReadInt16("Y114") == 1) //if (obj.plc.ReadInt16("Y114") == 1)
{ //{
item.Fixturestatus = "停止"; // item.Fixturestatus = "停止";
} //}
item.Production = obj.plc.ReadInt16("D185"); item.Production = obj.plc.ReadInt16("D185");
item.CuringTimeSettingValue = obj.plc.ReadString("D914"); item.CuringTimeSettingValue = obj.plc.ReadString("D914");
@ -373,18 +373,18 @@ namespace Admin.Core.Tasks
if (item.ObjId == 6) if (item.ObjId == 6)
{ {
item.Fixtureboxtype = obj.plc.ReadString("D3152") + obj.plc.ReadString("D3143"); item.Fixtureboxtype = obj.plc.ReadString("D3152") + obj.plc.ReadString("D3143");
if (obj.plc.ReadInt16("Y10A") == 1) //if (obj.plc.ReadInt16("Y10A") == 1)
{ //{
item.Fixturestatus = "手动"; // item.Fixturestatus = "手动";
} //}
if (obj.plc.ReadInt16("Y10B") == 1) //if (obj.plc.ReadInt16("Y10B") == 1)
{ //{
item.Fixturestatus = "自动"; // item.Fixturestatus = "自动";
} //}
if (obj.plc.ReadInt16("Y115") == 1) //if (obj.plc.ReadInt16("Y115") == 1)
{ //{
item.Fixturestatus = "停止"; // item.Fixturestatus = "停止";
} //}
item.Production = obj.plc.ReadInt16("D186"); item.Production = obj.plc.ReadInt16("D186");
item.CuringTimeSettingValue = obj.plc.ReadString("D915"); item.CuringTimeSettingValue = obj.plc.ReadString("D915");

@ -20,10 +20,10 @@ namespace Admin.Core.Tasks
public static event RefreshBoxFoamDataDelegate RefreshBoxFoamDataDelegateEvent; public static event RefreshBoxFoamDataDelegate RefreshBoxFoamDataDelegateEvent;
private static readonly log4net.ILog logHelper = LogManager.GetLogger(typeof(Job_BoxFoamData_Quartz)); private static readonly log4net.ILog logHelper = LogManager.GetLogger(typeof(Job_BoxFoamData_Quartz));
private readonly IBoxFoamDataServices _boxFoamDataServices; private readonly IBoxFoamDataServices _boxFoamDataServices;
private readonly IOldBoxFoamDataServices _oldBoxFoamDataServices; private readonly IBoxFoamDataServices _oldBoxFoamDataServices;
public Job_BoxFoamLastData_Quartz(ISysTasksQzService SysTasksQzService, ISysJobLogService sysJobLogService, public Job_BoxFoamLastData_Quartz(ISysTasksQzService SysTasksQzService, ISysJobLogService sysJobLogService,
IBoxFoamDataServices boxFoamDataServices, IOldBoxFoamDataServices oldBoxFoamDataServices) IBoxFoamDataServices boxFoamDataServices, IBoxFoamDataServices oldBoxFoamDataServices)
{ {
_SysTasksQzService = SysTasksQzService; _SysTasksQzService = SysTasksQzService;
_boxFoamDataServices = boxFoamDataServices; _boxFoamDataServices = boxFoamDataServices;
@ -33,7 +33,6 @@ namespace Admin.Core.Tasks
public async Task Execute(IJobExecutionContext context) public async Task Execute(IJobExecutionContext context)
{ {
await ExecuteJob(context, async () => await Run(context)); await ExecuteJob(context, async () => await Run(context));
await ExecuteJob(context, async () => await BoxFoamDataRun(context));
} }
public async Task Run(IJobExecutionContext context) public async Task Run(IJobExecutionContext context)
@ -41,10 +40,6 @@ namespace Admin.Core.Tasks
await SaveData(); await SaveData();
} }
public async Task BoxFoamDataRun(IJobExecutionContext context)
{
await SaveOldBoxFoamData();
}
#region PLC 任务处理表 #region PLC 任务处理表
/// <summary> /// <summary>
@ -77,338 +72,160 @@ namespace Admin.Core.Tasks
private async Task<BoxFoamData> UpdateRealData(PlcModel obj, BoxFoamData item) private async Task<BoxFoamData> UpdateRealData(PlcModel obj, BoxFoamData item)
{ {
try //try
{ //{
#region 更新PLC数据 // #region 更新PLC数据
if (item.ObjId == 1) // if (item.ObjId == 1)
{ // {
item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0"); // item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0");
if (obj.plc.ReadInt16("DB8.DBW122.0") == 1) item.BoxFixturestatus = 1; // if (obj.plc.ReadInt16("DB8.DBW122.0") == 1) item.BoxFixturestatus = 1;
if (obj.plc.ReadInt16("DB8.DBW122.1") == 1) item.BoxFixturestatus = 0; // if (obj.plc.ReadInt16("DB8.DBW122.1") == 1) item.BoxFixturestatus = 0;
item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD146"); // item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD146");
item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD294"); // item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD294");
item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD310"); // item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD310");
item.BoxBeat = obj.plc.ReadInt16("DB8.DBD578"); // item.BoxBeat = obj.plc.ReadInt16("DB8.DBD578");
item.UpdateTime = DateTime.Now; // item.UpdateTime = DateTime.Now;
} // }
if (item.ObjId == 2) // if (item.ObjId == 2)
{ // {
item.BoxFixturetype = obj.plc.ReadString("DB8.DBX12.0"); // item.BoxFixturetype = obj.plc.ReadString("DB8.DBX12.0");
if (obj.plc.ReadInt16("DB8.DBW124.0") == 1) item.BoxFixturestatus = 1; // if (obj.plc.ReadInt16("DB8.DBW124.0") == 1) item.BoxFixturestatus = 1;
if (obj.plc.ReadInt16("DB8.DBW124.1") == 1) item.BoxFixturestatus = 0; // if (obj.plc.ReadInt16("DB8.DBW124.1") == 1) item.BoxFixturestatus = 0;
item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD150"); // item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD150");
item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD318"); // item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD318");
item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD334"); // item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD334");
item.BoxBeat = obj.plc.ReadInt16("DB8.DBD582"); // item.BoxBeat = obj.plc.ReadInt16("DB8.DBD582");
item.UpdateTime = DateTime.Now; // item.UpdateTime = DateTime.Now;
} // }
if (item.ObjId == 3) // if (item.ObjId == 3)
{ // {
item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0"); // item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0");
if (obj.plc.ReadInt16("DB8.DBW126.0") == 1) item.BoxFixturestatus = 1; // if (obj.plc.ReadInt16("DB8.DBW126.0") == 1) item.BoxFixturestatus = 1;
if (obj.plc.ReadInt16("DB8.DBW126.1") == 1) item.BoxFixturestatus = 0; // if (obj.plc.ReadInt16("DB8.DBW126.1") == 1) item.BoxFixturestatus = 0;
item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD154"); // item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD154");
item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD342"); // item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD342");
item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD358"); // item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD358");
item.BoxBeat = obj.plc.ReadInt16("DB8.DBD586"); // item.BoxBeat = obj.plc.ReadInt16("DB8.DBD586");
item.UpdateTime = DateTime.Now; // item.UpdateTime = DateTime.Now;
} // }
if (item.ObjId == 4) // if (item.ObjId == 4)
{ // {
item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0"); // item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0");
if (obj.plc.ReadInt16("DB8.DBW128.0") == 1) item.BoxFixturestatus = 1; // if (obj.plc.ReadInt16("DB8.DBW128.0") == 1) item.BoxFixturestatus = 1;
if (obj.plc.ReadInt16("DB8.DBW128.1") == 1) item.BoxFixturestatus = 0; // if (obj.plc.ReadInt16("DB8.DBW128.1") == 1) item.BoxFixturestatus = 0;
item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD158"); // item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD158");
item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD366"); // item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD366");
item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD382"); // item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD382");
item.BoxBeat = obj.plc.ReadInt16("DB8.DBD590"); // item.BoxBeat = obj.plc.ReadInt16("DB8.DBD590");
item.UpdateTime = DateTime.Now; // item.UpdateTime = DateTime.Now;
} // }
if (item.ObjId == 5) // if (item.ObjId == 5)
{ // {
item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0"); // item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0");
if (obj.plc.ReadInt16("DB8.DBW130.0") == 1) item.BoxFixturestatus = 1; // if (obj.plc.ReadInt16("DB8.DBW130.0") == 1) item.BoxFixturestatus = 1;
if (obj.plc.ReadInt16("DB8.DBW130.1") == 1) item.BoxFixturestatus = 0; // if (obj.plc.ReadInt16("DB8.DBW130.1") == 1) item.BoxFixturestatus = 0;
item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD162"); // item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD162");
item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD390"); // item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD390");
item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD406"); // item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD406");
item.BoxBeat = obj.plc.ReadInt16("DB8.DBD594"); // item.BoxBeat = obj.plc.ReadInt16("DB8.DBD594");
item.UpdateTime = DateTime.Now; // item.UpdateTime = DateTime.Now;
} // }
if (item.ObjId == 6) // if (item.ObjId == 6)
{ // {
item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0"); // item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0");
if (obj.plc.ReadInt16("DB8.DBW122.0") == 1) item.BoxFixturestatus = 1; // if (obj.plc.ReadInt16("DB8.DBW122.0") == 1) item.BoxFixturestatus = 1;
if (obj.plc.ReadInt16("DB8.DBW122.1") == 1) item.BoxFixturestatus = 0; // if (obj.plc.ReadInt16("DB8.DBW122.1") == 1) item.BoxFixturestatus = 0;
item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD166"); // item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD166");
item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD414"); // item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD414");
item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD430"); // item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD430");
item.BoxBeat = obj.plc.ReadInt16("DB8.DBD598"); // item.BoxBeat = obj.plc.ReadInt16("DB8.DBD598");
item.UpdateTime = DateTime.Now; // item.UpdateTime = DateTime.Now;
} // }
if (item.ObjId == 7) // if (item.ObjId == 7)
{ // {
item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0"); // item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0");
if (obj.plc.ReadInt16("DB8.DBW134.0") == 1) item.BoxFixturestatus = 1; // if (obj.plc.ReadInt16("DB8.DBW134.0") == 1) item.BoxFixturestatus = 1;
if (obj.plc.ReadInt16("DB8.DBW134.1") == 1) item.BoxFixturestatus = 0; // if (obj.plc.ReadInt16("DB8.DBW134.1") == 1) item.BoxFixturestatus = 0;
item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD170"); // item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD170");
item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD438"); // item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD438");
item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD454"); // item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD454");
item.BoxBeat = obj.plc.ReadInt16("DB8.DBD602"); // item.BoxBeat = obj.plc.ReadInt16("DB8.DBD602");
item.UpdateTime = DateTime.Now; // item.UpdateTime = DateTime.Now;
} // }
if (item.ObjId == 8) // if (item.ObjId == 8)
{ // {
item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0"); // item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0");
if (obj.plc.ReadInt16("DB8.DBW136.0") == 1) item.BoxFixturestatus = 1; // if (obj.plc.ReadInt16("DB8.DBW136.0") == 1) item.BoxFixturestatus = 1;
if (obj.plc.ReadInt16("DB8.DBW136.1") == 1) item.BoxFixturestatus = 0; // if (obj.plc.ReadInt16("DB8.DBW136.1") == 1) item.BoxFixturestatus = 0;
item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD174"); // item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD174");
item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD462"); // item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD462");
item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD478"); // item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD478");
item.BoxBeat = obj.plc.ReadInt16("DB8.DBD606"); // item.BoxBeat = obj.plc.ReadInt16("DB8.DBD606");
item.UpdateTime = DateTime.Now; // item.UpdateTime = DateTime.Now;
} // }
if (item.ObjId == 9) // if (item.ObjId == 9)
{ // {
item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0"); // item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0");
if (obj.plc.ReadInt16("DB8.DBW138.0") == 1) item.BoxFixturestatus = 1; // if (obj.plc.ReadInt16("DB8.DBW138.0") == 1) item.BoxFixturestatus = 1;
if (obj.plc.ReadInt16("DB8.DBW138.1") == 1) item.BoxFixturestatus = 0; // if (obj.plc.ReadInt16("DB8.DBW138.1") == 1) item.BoxFixturestatus = 0;
item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD178"); // item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD178");
item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD486"); // item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD486");
item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD502"); // item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD502");
item.BoxBeat = obj.plc.ReadInt16("DB8.DBD610"); // item.BoxBeat = obj.plc.ReadInt16("DB8.DBD610");
item.UpdateTime = DateTime.Now; // item.UpdateTime = DateTime.Now;
} // }
if (item.ObjId == 10) // if (item.ObjId == 10)
{ // {
item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0"); // item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0");
if (obj.plc.ReadInt16("DB8.DBW140.0") == 1) item.BoxFixturestatus = 1; // if (obj.plc.ReadInt16("DB8.DBW140.0") == 1) item.BoxFixturestatus = 1;
if (obj.plc.ReadInt16("DB8.DBW140.1") == 1) item.BoxFixturestatus = 0; // if (obj.plc.ReadInt16("DB8.DBW140.1") == 1) item.BoxFixturestatus = 0;
item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD182"); // item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD182");
item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD510"); // item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD510");
item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD526"); // item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD526");
item.BoxBeat = obj.plc.ReadInt16("DB8.DBD614"); // item.BoxBeat = obj.plc.ReadInt16("DB8.DBD614");
item.UpdateTime = DateTime.Now; // item.UpdateTime = DateTime.Now;
} // }
if (item.ObjId == 11) // if (item.ObjId == 11)
{ // {
item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0"); // item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0");
if (obj.plc.ReadInt16("DDB8.DBW142.0") == 1) item.BoxFixturestatus = 1; // if (obj.plc.ReadInt16("DDB8.DBW142.0") == 1) item.BoxFixturestatus = 1;
if (obj.plc.ReadInt16("DB8.DBW142.1") == 1) item.BoxFixturestatus = 0; // if (obj.plc.ReadInt16("DB8.DBW142.1") == 1) item.BoxFixturestatus = 0;
item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD186"); // item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD186");
item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD534"); // item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD534");
item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD550"); // item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD550");
item.BoxBeat = obj.plc.ReadInt16("DB8.DBD622"); // item.BoxBeat = obj.plc.ReadInt16("DB8.DBD622");
item.UpdateTime = DateTime.Now; // item.UpdateTime = DateTime.Now;
} // }
if (item.ObjId == 12) // if (item.ObjId == 12)
{ // {
item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0"); // item.BoxFixturetype = obj.plc.ReadString("DB8.DBX2.0");
if (obj.plc.ReadInt16("DB8.DBW144.0") == 1) item.BoxFixturestatus = 1; // if (obj.plc.ReadInt16("DB8.DBW144.0") == 1) item.BoxFixturestatus = 1;
if (obj.plc.ReadInt16("DB8.DBW144.1") == 1) item.BoxFixturestatus = 0; // if (obj.plc.ReadInt16("DB8.DBW144.1") == 1) item.BoxFixturestatus = 0;
item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD190"); // item.BoxFixtureproduction = obj.plc.ReadInt16("DB8.DBD190");
item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD558"); // item.BoxFixturesideplate = obj.plc.ReadString("DB8.DBD558");
item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD574"); // item.BoxClosebetatemperature = obj.plc.ReadString("DB8.DBD574");
item.BoxBeat = obj.plc.ReadInt16("DB8.DBD626"); // item.BoxBeat = obj.plc.ReadInt16("DB8.DBD626");
item.UpdateTime = DateTime.Now; // item.UpdateTime = DateTime.Now;
} // }
#endregion // #endregion
bool result = await _boxFoamDataServices.UpdateAsync(item); // bool result = await _boxFoamDataServices.UpdateAsync(item);
if (result) // if (result)
{ // {
RefreshBoxFoamDataDelegateEvent?.Invoke();
}
else
{
// LogDelegateEvent?.Invoke($"物料[{planInfo.MaterialName}], 入库[{baseSpace.SpaceName}]失败,任务回滚!");
}
}
catch (Exception ex)
{
logHelper.Error($"更新箱体发泡数据失败");
}
return await Task.FromResult(item);
}
#endregion
#region PLC 任务处理表
/// <summary>
/// PLC 任务处理表
/// </summary>
/// <param name="storeCode">仓库编码</param>
/// <param name="materialBarCode">物料编码</param>
/// <returns></returns>
public async Task SaveOldBoxFoamData()
{
try
{
var obj = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("发泡Plc"));
if (obj.plc.IsConnected)
{
var taskList = await _oldBoxFoamDataServices.QueryAsync();
foreach (var item in taskList)
{
await UpdateRealBoxFoamData(obj, item);
}
}
}
catch (Exception ex)
{
logHelper.Error($"入库数据处理异常:{ex.Message}");
}
}
private async Task<OldBoxFoamData> UpdateRealBoxFoamData(PlcModel obj, OldBoxFoamData item)
{
try
{
#region 更新PLC数据
if (item.ObjId == 1)
{
item.Fixtureboxtype = obj.plc.ReadString("D3140")+ obj.plc.ReadString("D3141");
if (obj.plc.ReadInt16("Y0F0") == 1)
{
item.Fixturestatus = "手动";
}
if (obj.plc.ReadInt16("Y0F1") == 1)
{
item.Fixturestatus = "自动";
}
if (obj.plc.ReadInt16("Y110") == 1)
{
item.Fixturestatus = "停止";
}
item.Production = obj.plc.ReadInt16("D182");
item.CuringTimeSettingValue = obj.plc.ReadString("D911");
item.ActualValue = obj.plc.ReadString("T3");
item.UpdatedTime = DateTime.Now;
}
if (item.ObjId == 2)
{
item.Fixtureboxtype = obj.plc.ReadString("D3142") + obj.plc.ReadString("D3143");
if (obj.plc.ReadInt16("Y0F5") == 1)
{
item.Fixturestatus = "手动";
}
if (obj.plc.ReadInt16("Y0F6") == 1)
{
item.Fixturestatus = "自动";
}
if (obj.plc.ReadInt16("Y111") == 1)
{
item.Fixturestatus = "停止";
}
item.Production = obj.plc.ReadInt16("D183");
item.CuringTimeSettingValue = obj.plc.ReadString("D911");
item.ActualValue = obj.plc.ReadString("T13");
item.UpdatedTime = DateTime.Now;
}
if (item.ObjId == 3)
{
item.Fixtureboxtype = obj.plc.ReadString("D3144") + obj.plc.ReadString("D3145");
if (obj.plc.ReadInt16("Y0FA") == 1)
{
item.Fixturestatus = "手动";
}
if (obj.plc.ReadInt16("Y0FB") == 1)
{
item.Fixturestatus = "自动";
}
if (obj.plc.ReadInt16("Y112") == 1)
{
item.Fixturestatus = "停止";
}
item.Production = obj.plc.ReadInt16("D183");
item.CuringTimeSettingValue = obj.plc.ReadString("D912");
item.ActualValue = obj.plc.ReadString("T23");
item.UpdatedTime = DateTime.Now;
}
if (item.ObjId == 4)
{
item.Fixtureboxtype = obj.plc.ReadString("D3148") + obj.plc.ReadString("D3149");
if (obj.plc.ReadInt16("Y100 ") == 1)
{
item.Fixturestatus = "手动";
}
if (obj.plc.ReadInt16("Y101") == 1)
{
item.Fixturestatus = "自动";
}
if (obj.plc.ReadInt16("Y113") == 1)
{
item.Fixturestatus = "停止";
}
item.Production = obj.plc.ReadInt16("D184");
item.CuringTimeSettingValue = obj.plc.ReadString("D913");
item.ActualValue = obj.plc.ReadString("T33");
item.UpdatedTime = DateTime.Now;
}
if (item.ObjId == 5)
{
item.Fixtureboxtype = obj.plc.ReadString("D3150") + obj.plc.ReadString("D3151");
if (obj.plc.ReadInt16("Y105") == 1)
{
item.Fixturestatus = "手动";
}
if (obj.plc.ReadInt16("Y106") == 1)
{
item.Fixturestatus = "自动";
}
if (obj.plc.ReadInt16("Y114") == 1)
{
item.Fixturestatus = "停止";
}
item.Production = obj.plc.ReadInt16("D185");
item.CuringTimeSettingValue = obj.plc.ReadString("D914");
item.ActualValue = obj.plc.ReadString("T43");
item.UpdatedTime = DateTime.Now;
}
if (item.ObjId == 6)
{
item.Fixtureboxtype = obj.plc.ReadString("D3152") + obj.plc.ReadString("D3143");
if (obj.plc.ReadInt16("Y10A") == 1)
{
item.Fixturestatus = "手动";
}
if (obj.plc.ReadInt16("Y10B") == 1)
{
item.Fixturestatus = "自动";
}
if (obj.plc.ReadInt16("Y115") == 1)
{
item.Fixturestatus = "停止";
}
item.Production = obj.plc.ReadInt16("D186");
item.CuringTimeSettingValue = obj.plc.ReadString("D915");
item.ActualValue = obj.plc.ReadString("T53");
item.UpdatedTime = DateTime.Now;
}
#endregion
bool result = await _oldBoxFoamDataServices.UpdateAsync(item);
if (result)
{
// RefreshBoxFoamDataDelegateEvent?.Invoke(); // RefreshBoxFoamDataDelegateEvent?.Invoke();
} // }
else // else
{ // {
// LogDelegateEvent?.Invoke($"物料[{planInfo.MaterialName}], 入库[{baseSpace.SpaceName}]失败,任务回滚!"); // // LogDelegateEvent?.Invoke($"物料[{planInfo.MaterialName}], 入库[{baseSpace.SpaceName}]失败,任务回滚!");
} // }
} //}
catch (Exception ex) //catch (Exception ex)
{ //{
logHelper.Error($"更新箱体发泡数据失败"); // logHelper.Error($"更新箱体发泡数据失败");
} //}
return await Task.FromResult(item); return await Task.FromResult(item);
} }
#endregion #endregion
} }
} }

@ -29,7 +29,7 @@ namespace Admin.Core.Tasks
/// 老发泡线更新事件 /// 老发泡线更新事件
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public delegate Task RefreshOldBoxFoamDataDelegate(List<OldBoxFoamData> list); public delegate Task RefreshOldBoxFoamDataDelegate(List<BoxFoamData> list);
public static event RefreshOldBoxFoamDataDelegate RefreshOldBoxFoamDataDelegateEvent; public static event RefreshOldBoxFoamDataDelegate RefreshOldBoxFoamDataDelegateEvent;
/// <summary> /// <summary>
/// 老泡前库更新事件 /// 老泡前库更新事件
@ -43,10 +43,10 @@ namespace Admin.Core.Tasks
private static readonly log4net.ILog logHelper = LogManager.GetLogger(typeof(Job_BoxFoamData_Quartz)); private static readonly log4net.ILog logHelper = LogManager.GetLogger(typeof(Job_BoxFoamData_Quartz));
private readonly IOldBoxFoamTypeServices _oldBoxFoamTypeServices; private readonly IOldBoxFoamTypeServices _oldBoxFoamTypeServices;
private readonly IOldBoxFoamDataServices _oldBoxFoamDataServices; private readonly IBoxFoamDataServices _oldBoxFoamDataServices;
public Job_OldBoxFoamStore_Quartz(ISysTasksQzService SysTasksQzService, ISysJobLogService sysJobLogService, public Job_OldBoxFoamStore_Quartz(ISysTasksQzService SysTasksQzService, ISysJobLogService sysJobLogService,
IOldBoxFoamTypeServices oldBoxFoamTypeServices, IOldBoxFoamDataServices oldBoxFoamDataServices) IOldBoxFoamTypeServices oldBoxFoamTypeServices, IBoxFoamDataServices oldBoxFoamDataServices)
{ {
_SysTasksQzService = SysTasksQzService; _SysTasksQzService = SysTasksQzService;
_oldBoxFoamTypeServices = oldBoxFoamTypeServices; _oldBoxFoamTypeServices = oldBoxFoamTypeServices;
@ -388,13 +388,13 @@ namespace Admin.Core.Tasks
i--; i--;
if (i == 0) if (i == 0)
{ {
List<OldBoxFoamData> old = await _oldBoxFoamDataServices.QueryAsync(); List<BoxFoamData> old = await _oldBoxFoamDataServices.QueryAsync();
RefreshOldBoxFoamDataDelegateEvent?.Invoke(old); RefreshOldBoxFoamDataDelegateEvent?.Invoke(old);
} }
} }
} }
private async void UpdateRealOldBoxFoamData(OldBoxFoamData item) private async void UpdateRealOldBoxFoamData(BoxFoamData item)
{ {
if (item.ObjId == 1) if (item.ObjId == 1)
{ {
@ -414,18 +414,18 @@ namespace Admin.Core.Tasks
//} //}
//string type = $"{obj.plc.ReadInt16("D3140")}{obj.plc.ReadInt16("D3141")}"; //string type = $"{obj.plc.ReadInt16("D3140")}{obj.plc.ReadInt16("D3141")}";
//item.Fixtureboxtype = type; //item.Fixtureboxtype = type;
if (obj.plc.ReadBool("Y0F0")) //if (obj.plc.ReadBool("Y0F0"))
{ //{
item.Fixturestatus = "手动"; // item.Fixturestatus = "手动";
} //}
else if (obj.plc.ReadBool("Y0F1")) //else if (obj.plc.ReadBool("Y0F1"))
{ //{
item.Fixturestatus = "手动"; // item.Fixturestatus = "手动";
} //}
else if (obj.plc.ReadBool("Y110")) //else if (obj.plc.ReadBool("Y110"))
{ //{
item.Fixturestatus = "停止"; // item.Fixturestatus = "停止";
} //}
item.Production = obj.plc.ReadInt16("D182"); item.Production = obj.plc.ReadInt16("D182");
item.CuringTimeSettingValue = obj.plc.ReadInt16("D910").ToString(); item.CuringTimeSettingValue = obj.plc.ReadInt16("D910").ToString();
item.ActualValue = obj.plc.ReadInt16("T3").ToString(); item.ActualValue = obj.plc.ReadInt16("T3").ToString();
@ -447,18 +447,18 @@ namespace Admin.Core.Tasks
item.Fixtureboxtype = type1; item.Fixtureboxtype = type1;
} }
if (obj.plc.ReadBool("Y0F5")) //if (obj.plc.ReadBool("Y0F5"))
{ //{
item.Fixturestatus = "手动"; // item.Fixturestatus = "手动";
} //}
if (obj.plc.ReadBool("Y0F6")) //if (obj.plc.ReadBool("Y0F6"))
{ //{
item.Fixturestatus = "手动"; // item.Fixturestatus = "手动";
} //}
if (obj.plc.ReadBool("Y111")) //if (obj.plc.ReadBool("Y111"))
{ //{
item.Fixturestatus = "停止"; // item.Fixturestatus = "停止";
} //}
item.Production = obj.plc.ReadInt16("D183"); item.Production = obj.plc.ReadInt16("D183");
item.CuringTimeSettingValue = obj.plc.ReadInt16("D912").ToString(); item.CuringTimeSettingValue = obj.plc.ReadInt16("D912").ToString();
item.ActualValue = obj.plc.ReadInt16("T13").ToString(); item.ActualValue = obj.plc.ReadInt16("T13").ToString();
@ -474,22 +474,22 @@ namespace Admin.Core.Tasks
//string type = $"{obj.plc.ReadInt16("D3142")}{obj.plc.ReadInt16("D3143")}"; //string type = $"{obj.plc.ReadInt16("D3142")}{obj.plc.ReadInt16("D3143")}";
//item.Fixtureboxtype = type; //item.Fixtureboxtype = type;
var type1 = $"{obj.plc.ReadInt32("D3144")}"; var type1 = $"{obj.plc.ReadInt32("D3144")}";
if (type1.ToString() != "0") //if (type1.ToString() != "0")
{ //{
item.Fixtureboxtype = type1; // item.Fixtureboxtype = type1;
} //}
if (obj.plc.ReadBool("Y0FA")) //if (obj.plc.ReadBool("Y0FA"))
{ //{
item.Fixturestatus = "手动"; // item.Fixturestatus = "手动";
} //}
if (obj.plc.ReadBool("Y0FB")) //if (obj.plc.ReadBool("Y0FB"))
{ //{
item.Fixturestatus = "手动"; // item.Fixturestatus = "手动";
} //}
if (obj.plc.ReadBool("Y112")) //if (obj.plc.ReadBool("Y112"))
{ //{
item.Fixturestatus = "停止"; // item.Fixturestatus = "停止";
} //}
item.Production = obj.plc.ReadInt16("D184"); item.Production = obj.plc.ReadInt16("D184");
item.CuringTimeSettingValue = obj.plc.ReadInt16("D912").ToString(); item.CuringTimeSettingValue = obj.plc.ReadInt16("D912").ToString();
item.ActualValue = obj.plc.ReadInt16("T23").ToString(); item.ActualValue = obj.plc.ReadInt16("T23").ToString();
@ -515,18 +515,18 @@ namespace Admin.Core.Tasks
} }
var objStatus = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("OldMelsecPlc2")); var objStatus = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("OldMelsecPlc2"));
if (objStatus != null) { if (objStatus != null) {
if (objStatus.plc.ReadBool("Y100")) //if (objStatus.plc.ReadBool("Y100"))
{ //{
item.Fixturestatus = "手动"; // item.Fixturestatus = "手动";
} //}
if (objStatus.plc.ReadBool("Y101")) //if (objStatus.plc.ReadBool("Y101"))
{ //{
item.Fixturestatus = "手动"; // item.Fixturestatus = "手动";
} //}
if (objStatus.plc.ReadBool("Y113")) //if (objStatus.plc.ReadBool("Y113"))
{ //{
item.Fixturestatus = "停止"; // item.Fixturestatus = "停止";
} //}
} }
} }
@ -552,18 +552,18 @@ namespace Admin.Core.Tasks
var objStatus = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("OldMelsecPlc2")); var objStatus = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("OldMelsecPlc2"));
if (objStatus != null&& objStatus.plc.IsConnected) if (objStatus != null&& objStatus.plc.IsConnected)
{ {
if (objStatus.plc.ReadBool("Y105")) //if (objStatus.plc.ReadBool("Y105"))
{ //{
item.Fixturestatus = "手动"; // item.Fixturestatus = "手动";
} //}
if (objStatus.plc.ReadBool("Y106")) //if (objStatus.plc.ReadBool("Y106"))
{ //{
item.Fixturestatus = "手动"; // item.Fixturestatus = "手动";
} //}
if (objStatus.plc.ReadBool("Y114")) //if (objStatus.plc.ReadBool("Y114"))
{ //{
item.Fixturestatus = "停止"; // item.Fixturestatus = "停止";
} //}
} }
} }
@ -591,18 +591,18 @@ namespace Admin.Core.Tasks
var objStatus = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("OldMelsecPlc2")); var objStatus = PlcHelper.melsecList.FirstOrDefault(d => d.EquipName.Equals("OldMelsecPlc2"));
if (objStatus != null) if (objStatus != null)
{ {
if (objStatus.plc.ReadBool("Y10A")) //if (objStatus.plc.ReadBool("Y10A"))
{ //{
item.Fixturestatus = "手动"; // item.Fixturestatus = "手动";
} //}
if (objStatus.plc.ReadBool("Y10B")) //if (objStatus.plc.ReadBool("Y10B"))
{ //{
item.Fixturestatus = "手动"; // item.Fixturestatus = "手动";
} //}
if (objStatus.plc.ReadBool("Y115")) //if (objStatus.plc.ReadBool("Y115"))
{ //{
item.Fixturestatus = "停止"; // item.Fixturestatus = "停止";
} //}
item.ActualValue = objStatus.plc.ReadInt16("T53").ToString(); item.ActualValue = objStatus.plc.ReadInt16("T53").ToString();
} }

File diff suppressed because it is too large Load Diff

@ -17,7 +17,7 @@ namespace Aucma.Core.BoxFoam.Models
/// <summary> /// <summary>
/// 夹具状态 /// 夹具状态
/// </summary> /// </summary>
public string Fixturestatus { get; set; } public int Fixturestatus { get; set; }
/// <summary> /// <summary>
/// 产量 /// 产量

@ -70,7 +70,7 @@ namespace Aucma.Core.BoxFoam.ViewModels
{ {
string storeCode = Appsettings.app("StoreInfo", "BeforeStoreCode");//泡前库code string storeCode = Appsettings.app("StoreInfo", "BeforeStoreCode");//泡前库code
var baseSpaceInfolist = _baseSpaceInfoServices.QueryAsync(d => d.StoreCode.Equals(storeCode)).Result;//仓库 var baseSpaceInfolist = _baseSpaceInfoServices.QueryAsync(d => d.StoreCode==storeCode).Result;//仓库
if (baseSpaceInfolist == null) return; if (baseSpaceInfolist == null) return;
Shapes.Clear(); Shapes.Clear();

@ -263,18 +263,18 @@ namespace Aucma.Core.BoxFoam.ViewModels
if (list == null) return; if (list == null) return;
foreach (var item in list) foreach (var item in list)
{ {
if (item.BoxFixturestatus == 1) StatusColor.Add("Green"); if (item.Fixturestatus == 1) StatusColor.Add("Green");
if (item.BoxFixturestatus == 0) StatusColor.Add("Red"); if (item.Fixturestatus == 0) StatusColor.Add("Red");
FixtureName.Add(item.BoxFixturetype); FixtureName.Add(item.Fixtureboxtype);
Production.Add(item.BoxFixtureproduction.ToString()); Production.Add(item.Production.ToString());
FoamVolume.Add(item.FoamVolume); //FoamVolume.Add(item.v);
InternalTemperature.Add(item.BoxClosebetatemperature.ToString()); //InternalTemperature.Add(item.BoxClosebetatemperature.ToString());
OutsideTemperature.Add(item.BoxFixturesideplate.ToString()); //OutsideTemperature.Add(item.BoxFixturesideplate.ToString());
Beat.Add(item.BoxBeat); Beat.Add(item.BoxBeat);
total += item.BoxFixtureproduction; total += item.Production;
} }
Totle = total; Totle = total;
} }

@ -19,10 +19,10 @@ namespace Aucma.Core.BoxFoam.ViewModels
{ {
public partial class OldBoxFoamPageViewModel : ObservableObject public partial class OldBoxFoamPageViewModel : ObservableObject
{ {
IOldBoxFoamDataServices? _oldBoxFoamDataServices; IBoxFoamDataServices? _oldBoxFoamDataServices;
IOldBoxFoamTypeServices _oldBoxFoamTypeServices; IOldBoxFoamTypeServices _oldBoxFoamTypeServices;
public OldBoxFoamPageViewModel() { public OldBoxFoamPageViewModel() {
_oldBoxFoamDataServices = App.ServiceProvider.GetService<IOldBoxFoamDataServices>(); _oldBoxFoamDataServices = App.ServiceProvider.GetService<IBoxFoamDataServices>();
_oldBoxFoamTypeServices = App.ServiceProvider.GetService<IOldBoxFoamTypeServices>(); _oldBoxFoamTypeServices = App.ServiceProvider.GetService<IOldBoxFoamTypeServices>();
//Job_OldBoxFoam_Quartz.RefreshOldBoxFoamTypeDataDelegateEvent += OldBoxFoamTypeOnLoad; //Job_OldBoxFoam_Quartz.RefreshOldBoxFoamTypeDataDelegateEvent += OldBoxFoamTypeOnLoad;
@ -35,7 +35,7 @@ namespace Aucma.Core.BoxFoam.ViewModels
public async Task OldBoxFoamOnLoad() public async Task OldBoxFoamOnLoad()
{ {
List<OldBoxFoamData> list = await _oldBoxFoamDataServices.QueryAsync(); List<BoxFoamData> list = await _oldBoxFoamDataServices.QueryAsync();
if (list == null) return; if (list == null) return;
foreach (var item in list) foreach (var item in list)
{ {

@ -1,7 +1,10 @@
using HwCommunication; using HwCommunication;
using HwCommunication.Core;
using HwCommunication.Profinet.Melsec; using HwCommunication.Profinet.Melsec;
using log4net; using log4net;
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
@ -34,7 +37,7 @@ namespace Aucma.Core.HwPLc
// //log.Info("HslCommunication激活失败"); // //log.Info("HslCommunication激活失败");
// return; // return;
//} //}
Console.WriteLine("HwCommunication激活成功!"); //Console.WriteLine("HwCommunication激活成功!");
melsecMcNet = new MelsecMcNet(); melsecMcNet = new MelsecMcNet();
melsecMcNet.ConnectTimeOut = 2000; melsecMcNet.ConnectTimeOut = 2000;
IsConnected = Connect(iP, port);//建立连接 IsConnected = Connect(iP, port);//建立连接
@ -518,6 +521,7 @@ namespace Aucma.Core.HwPLc
if (readbyte.IsSuccess) if (readbyte.IsSuccess)
{ {
IsConnected = true; IsConnected = true;
return readbyte.Content; return readbyte.Content;
} }
else else
@ -526,5 +530,6 @@ namespace Aucma.Core.HwPLc
return null; return null;
} }
} }
} }
} }

@ -17,7 +17,7 @@ namespace Aucma.Core.OldBoxFoam.Models
/// <summary> /// <summary>
/// 夹具状态 /// 夹具状态
/// </summary> /// </summary>
public string Fixturestatus { get; set; } public int Fixturestatus { get; set; }
/// <summary> /// <summary>
/// 产量 /// 产量

@ -20,10 +20,11 @@ namespace Aucma.Core.OldBoxFoam.ViewModels
{ {
public partial class OldBoxFoamPageViewModel : ObservableObject public partial class OldBoxFoamPageViewModel : ObservableObject
{ {
IOldBoxFoamDataServices? _oldBoxFoamDataServices; IBoxFoamDataServices? _oldBoxFoamDataServices;
IOldBoxFoamTypeServices _oldBoxFoamTypeServices; IOldBoxFoamTypeServices _oldBoxFoamTypeServices;
public OldBoxFoamPageViewModel() { public OldBoxFoamPageViewModel() {
_oldBoxFoamDataServices = App.ServiceProvider.GetService<IOldBoxFoamDataServices>(); _oldBoxFoamDataServices = App.ServiceProvider.GetService<IBoxFoamDataServices>();
_oldBoxFoamTypeServices = App.ServiceProvider.GetService<IOldBoxFoamTypeServices>(); _oldBoxFoamTypeServices = App.ServiceProvider.GetService<IOldBoxFoamTypeServices>();
Job_OldBoxFoam_Quartz.RefreshOldBoxFoamTypeDataDelegateEvent += OldBoxFoamTypeOnLoad3; Job_OldBoxFoam_Quartz.RefreshOldBoxFoamTypeDataDelegateEvent += OldBoxFoamTypeOnLoad3;
@ -36,8 +37,9 @@ namespace Aucma.Core.OldBoxFoam.ViewModels
public async Task OldBoxFoamOnLoad() public async Task OldBoxFoamOnLoad()
{ {
List<OldBoxFoamData> list = await _oldBoxFoamDataServices.QueryAsync(); List<BoxFoamData> list = await _oldBoxFoamDataServices.QueryAsync();
if (list == null) return; if (list == null) return;
int i = 0;
foreach (var item in list) foreach (var item in list)
{ {
OldBoxFoamDataModel model = new OldBoxFoamDataModel(); OldBoxFoamDataModel model = new OldBoxFoamDataModel();
@ -46,18 +48,29 @@ namespace Aucma.Core.OldBoxFoam.ViewModels
model.Fixturestatus = item.Fixturestatus; model.Fixturestatus = item.Fixturestatus;
model.Production = item.Production; model.Production = item.Production;
model.CuringTimeSettingValue = item.CuringTimeSettingValue; model.CuringTimeSettingValue = item.CuringTimeSettingValue;
model.ActualValue = item.ActualValue; if (item.Fixturestatus == 1)//停止
{
_statusColor.Add("green");
_oldBoxFoamDataGrid.Add(model);
} }
else
{
_statusColor.Add("red");
}
_fixtureName.Add(item.Fixtureboxtype);
_production.Add(item.Production);
_beat.Add(item.BoxBeat);
i =+ item.Production;
} }
public Task OldBoxFoamOnLoad3(List<OldBoxFoamData> list) _totle = list.Sum(d=>d.Production);
}
public Task OldBoxFoamOnLoad3(List<BoxFoamData> list)
{ {
if (list == null) return Task.CompletedTask; if (list == null) return Task.CompletedTask;
System.Windows.Application.Current.Dispatcher.Invoke((Action)( () => System.Windows.Application.Current.Dispatcher.Invoke((Action)( () =>
{ {
OldBoxFoamDataGrid.Clear(); OldBoxFoamDataGrid.Clear();
int i = 0;
foreach (var item in list) foreach (var item in list)
{ {
OldBoxFoamDataModel model = new OldBoxFoamDataModel(); OldBoxFoamDataModel model = new OldBoxFoamDataModel();
@ -66,9 +79,19 @@ namespace Aucma.Core.OldBoxFoam.ViewModels
model.Fixturestatus = item.Fixturestatus; model.Fixturestatus = item.Fixturestatus;
model.Production = item.Production; model.Production = item.Production;
model.CuringTimeSettingValue = item.CuringTimeSettingValue; model.CuringTimeSettingValue = item.CuringTimeSettingValue;
model.ActualValue = item.ActualValue; if (item.Fixturestatus == 1)//停止
{
_statusColor.Add("green");
OldBoxFoamDataGrid.Add(model); }
else
{
_statusColor.Add("red");
}
_fixtureName.Add(item.Fixtureboxtype);
_production.Add(item.Production);
_beat.Add(item.BoxBeat);
i = +item.Production;
} }
})); }));
@ -126,5 +149,56 @@ namespace Aucma.Core.OldBoxFoam.ViewModels
set => SetProperty(ref _oldBoxFoamTypeDataGrid, value); set => SetProperty(ref _oldBoxFoamTypeDataGrid, value);
} }
#endregion #endregion
#region 夹具状态
private ObservableCollection<string> _statusColor = new ObservableCollection<string>();
public ObservableCollection<string> StatusColor
{
get => _statusColor;
set => SetProperty(ref _statusColor, value);
}
#endregion
#region 夹具名称
private ObservableCollection<string> _fixtureName = new ObservableCollection<string>();
public ObservableCollection<string> FixtureName
{
get => _fixtureName;
set => SetProperty(ref _fixtureName, value);
}
#endregion
#region 夹具产量
/// <summary>
///夹具产量
/// </summary>
private ObservableCollection<int> _production = new ObservableCollection<int>();
public ObservableCollection<int> Production
{
get => _production;
set => SetProperty(ref _production, value);
}
#endregion
#region 节拍
/// <summary>
///夹具产量
/// </summary>
private ObservableCollection<int> _beat = new ObservableCollection<int>();
public ObservableCollection<int> Beat
{
get => _beat;
set => SetProperty(ref _beat, value);
}
#endregion
#region 总计
private int _totle = 0;
public int Totle
{
get => _totle;
set => SetProperty(ref _totle, value);
}
#endregion
} }
} }

@ -256,13 +256,11 @@ namespace Aucma.Core.OldBoxFoam.ViewModels
/// 重置 /// 重置
/// </summary> /// </summary>
[RelayCommand] [RelayCommand]
public void Reset() public async void Reset()
{ {
LoadData();
Search = string.Empty; Search = string.Empty;
MaterialTypeCombox = string.Empty; MaterialTypeCombox = string.Empty;
this.LoadData(); await this.LoadData();
} }
#endregion #endregion

@ -71,37 +71,218 @@
<Grid Margin="0 10 0 0"> <Grid Margin="0 10 0 0">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition/> <RowDefinition/>
<RowDefinition Height="1.2*"/> <RowDefinition/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Border Grid.Row="0" BorderBrush="#0288d1" BorderThickness="1" CornerRadius="5" Background="#1157b9"> <UniformGrid Grid.Row="0" >
<Grid> <Grid>
<Grid.Resources>
<Style TargetType="TextBlock">
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="FontSize" Value="16"/>
<Setter Property="FontFamily" Value="Microsoft YaHei"/>
</Style>
<Style TargetType="Border">
<Setter Property="BorderBrush" Value="#0288d1"/>
<Setter Property="BorderThickness" Value="1"/>
</Style>
</Grid.Resources>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="1*"/> <RowDefinition/>
<RowDefinition Height="9*"/> <RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Border Grid.Row="0" BorderBrush="#0288d1" BorderThickness="0,0,0,1" CornerRadius="0" Background="Transparent" Margin="1,1,1,5" > <Grid.ColumnDefinitions>
<TextBlock Text="发泡线监控" FontSize="20" FontWeight="Bold" Foreground="White" VerticalAlignment="Center" HorizontalAlignment="Center" /> <ColumnDefinition Width="0.5*"/>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition/>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<Border Grid.Row="0" Grid.ColumnSpan="4" Background="#1157b9">
<TextBlock Text="发泡线" Foreground="White" FontSize="18" FontWeight="Bold"/>
</Border> </Border>
<!--信息展示--> <Border Grid.Row="1" Grid.Column="0" Background="#1157b9">
<Border x:Name="HeightHelperPanel" Grid.Row="1" BorderBrush="#0288d1" BorderThickness="0" CornerRadius="5" Background="Transparent" Margin="5"> <TextBlock Text="夹具号" Foreground="White" FontSize="18" FontWeight="Bold"/>
<DataGrid Grid.Row="0" ItemsSource="{Binding OldBoxFoamDataGrid}" Background="#00000000"
ColumnHeaderHeight="35" Height="{Binding Path=ActualHeight, ElementName=ScanPanel}"
RowHeight="50" AutoGenerateColumns="False" RowHeaderWidth="0" FontSize="20"
GridLinesVisibility="None" ScrollViewer.HorizontalScrollBarVisibility="Auto"
ScrollViewer.VerticalScrollBarVisibility="Auto" BorderThickness="0" CanUserAddRows="False" SelectionMode="Single" IsReadOnly="True"
Foreground="White">
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding ObjId}" Header="编号" Width="*" />
<DataGridTextColumn Binding="{Binding Fixtureboxtype}" Header="夹具箱型" Width="*" />
<DataGridTextColumn Binding="{Binding Fixturestatus}" Header="夹具状态" Width="*" />
<DataGridTextColumn Binding="{Binding Production}" Header="产量" Width="*" />
<DataGridTextColumn Binding="{Binding CuringTimeSettingValue}" Header="设定时间" Width="*" />
<DataGridTextColumn Binding="{Binding ActualValue}" Header="固化时间实际值" Width="*"/>
</DataGrid.Columns>
</DataGrid>
</Border> </Border>
</Grid> <Border Grid.Row="2" Grid.Column="0" Background="#1157b9">
<TextBlock Text="1" Foreground="White" FontSize="18" FontWeight="Bold"/>
</Border>
<Border Grid.Row="3" Grid.Column="0" Background="#1157b9">
<TextBlock Text="2" Foreground="White" FontSize="18" FontWeight="Bold"/>
</Border>
<Border Grid.Row="4" Grid.Column="0" Background="#1157b9">
<TextBlock Text="3" Foreground="White" FontSize="18" FontWeight="Bold"/>
</Border>
<Border Grid.Row="5" Grid.Column="0" Background="#1157b9">
<TextBlock Text="4" Foreground="White" FontSize="18" FontWeight="Bold"/>
</Border>
<Border Grid.Row="6" Grid.Column="0" Background="#1157b9">
<TextBlock Text="5" Foreground="White" FontSize="18" FontWeight="Bold"/>
</Border>
<Border Grid.Row="1" Grid.Column="1" Background="#1157b9">
<TextBlock Text="状态" Foreground="White" FontSize="18" FontWeight="Bold"/>
</Border>
<Border Grid.Row="2" Grid.Column="1" >
<Path Data="M 5,5 A 15,15 45 1 1 0,1 Z" Stroke="{Binding StatusColor[0]}" StrokeThickness="1" Fill="{Binding StatusColor[0]}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="3" Grid.Column="1" >
<Path Data="M 5,5 A 15,15 45 1 1 0,1 Z" Stroke="{Binding StatusColor[1]}" StrokeThickness="1" Fill="{Binding StatusColor[1]}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="4" Grid.Column="1" >
<Path Data="M 5,5 A 15,15 45 1 1 0,1 Z" Stroke="{Binding StatusColor[2]}" StrokeThickness="1" Fill="{Binding StatusColor[2]}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="5" Grid.Column="1" >
<Path Data="M 5,5 A 15,15 45 1 1 0,1 Z" Stroke="{Binding StatusColor[3]}" StrokeThickness="1" Fill="{Binding StatusColor[3]}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="4" Grid.Column="1" >
<Path Data="M 5,5 A 15,15 45 1 1 0,1 Z" Stroke="{Binding StatusColor[4]}" StrokeThickness="1" Fill="{Binding StatusColor[4]}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="6" Grid.Column="1" >
<Path Data="M 5,5 A 15,15 45 1 1 0,1 Z" Stroke="{Binding StatusColor[5]}" StrokeThickness="1" Fill="{Binding StatusColor[5]}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1" Grid.Column="2" Background="#1157b9">
<TextBlock Text="发泡型号" Foreground="White" FontSize="18" FontWeight="Bold"/>
</Border>
<Border Grid.Row="2" Grid.Column="2" >
<TextBlock Text="{Binding FixtureName[0]}" Foreground="White" FontSize="18"/>
</Border>
<Border Grid.Row="3" Grid.Column="2">
<TextBlock Text="{Binding FixtureName[1]}" Foreground="White" FontSize="18"/>
</Border>
<Border Grid.Row="4" Grid.Column="2">
<TextBlock Text="{Binding FixtureName[2]}" Foreground="White" FontSize="18"/>
</Border>
<Border Grid.Row="5" Grid.Column="2">
<TextBlock Text="{Binding FixtureName[3]}" Foreground="White" FontSize="18"/>
</Border>
<Border Grid.Row="6" Grid.Column="2">
<TextBlock Text="{Binding FixtureName[4]}" Foreground="White" FontSize="18"/>
</Border>
<Border Grid.Row="1" Grid.Column="3" Background="#1157b9">
<TextBlock Text="夹具产量" Foreground="White" FontSize="18" FontWeight="Bold"/>
</Border>
<Border Grid.Row="2" Grid.Column="3" >
<TextBlock Text="{Binding Production[0]}" Foreground="White" FontSize="18" FontWeight="Bold"/>
</Border> </Border>
<Border Grid.Row="3" Grid.Column="3">
<TextBlock Text="{Binding Production[1]}" Foreground="White" FontSize="18" FontWeight="Bold"/>
</Border>
<Border Grid.Row="4" Grid.Column="3">
<TextBlock Text="{Binding Production[2]}" Foreground="White" FontSize="18" FontWeight="Bold"/>
</Border>
<Border Grid.Row="5" Grid.Column="3" Grid.ColumnSpan="2" >
<TextBlock Text="{Binding Production[3]}" Foreground="White" FontSize="18" FontWeight="Bold"/>
</Border>
<Border Grid.Row="6" Grid.Column="3" Grid.ColumnSpan="2" >
<TextBlock Text="{Binding Production[4]}" Foreground="White" FontSize="18" FontWeight="Bold"/>
</Border>
<Border Grid.Row="6" Grid.Column="3" Grid.ColumnSpan="2" >
<TextBlock Text="{Binding Production[4]}" Foreground="White" FontSize="18" FontWeight="Bold"/>
</Border>
<Border Grid.Row="0" Grid.Column="4" Grid.ColumnSpan="2" >
<TextBlock Text="{Binding Totle,Mode=TwoWay}" Foreground="White" FontSize="30" FontWeight="Bold"/>
</Border>
<Border Grid.Row="1" Grid.Column="4" Background="#1157b9">
<TextBlock Text="节拍" Foreground="White" FontSize="18" FontWeight="Bold"/>
</Border>
<Border Grid.Row="2" Grid.Column="4" >
<TextBlock Text="{Binding Beat[0]}" Foreground="White" FontSize="18"/>
</Border>
<Border Grid.Row="3" Grid.Column="4">
<TextBlock Text="{Binding Beat[1]}" Foreground="White" FontSize="18"/>
</Border>
<Border Grid.Row="4" Grid.Column="4">
<TextBlock Text="{Binding Beat[2]}" Foreground="White" FontSize="18"/>
</Border>
<Border Grid.Row="0" Grid.Column="6" Grid.ColumnSpan="4" Background="#1157b9">
<TextBlock Text="发泡线" Foreground="White" FontSize="18" FontWeight="Bold"/>
</Border>
<Border Grid.Row="1" Grid.Column="5" Background="#1157b9">
<TextBlock Text="夹具号" Foreground="White" FontSize="18" FontWeight="Bold"/>
</Border>
<Border Grid.Row="2" Grid.Column="5" Background="#1157b9">
<TextBlock Text="1" Foreground="White" FontSize="18" FontWeight="Bold"/>
</Border>
<Border Grid.Row="3" Grid.Column="5" Background="#1157b9">
<TextBlock Text="2" Foreground="White" FontSize="18" FontWeight="Bold"/>
</Border>
<Border Grid.Row="4" Grid.Column="5" Background="#1157b9">
<TextBlock Text="3" Foreground="White" FontSize="18" FontWeight="Bold"/>
</Border>
<Border Grid.Row="5" Grid.Column="5" Background="#1157b9">
<TextBlock Text="4" Foreground="White" FontSize="18" FontWeight="Bold"/>
</Border>
<Border Grid.Row="6" Grid.Column="5" Background="#1157b9">
<TextBlock Text="5" Foreground="White" FontSize="18" FontWeight="Bold"/>
</Border>
<Border Grid.Row="1" Grid.Column="6" Background="#1157b9">
<TextBlock Text="状态" Foreground="White" FontSize="18" FontWeight="Bold"/>
</Border>
<Border Grid.Row="2" Grid.Column="6" >
<Path Data="M 5,5 A 15,15 45 1 1 0,1 Z" Stroke="{Binding StatusColor[3]}" StrokeThickness="1" Fill="{Binding StatusColor[3]}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="3" Grid.Column="6" >
<Path Data="M 5,5 A 15,15 45 1 1 0,1 Z" Stroke="{Binding StatusColor[4]}" StrokeThickness="1" Fill="{Binding StatusColor[4]}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="4" Grid.Column="6" >
<Path Data="M 5,5 A 15,15 45 1 1 0,1 Z" Stroke="{Binding StatusColor[5]}" StrokeThickness="1" Fill="{Binding StatusColor[5]}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border Grid.Row="1" Grid.Column="7" Background="#1157b9">
<TextBlock Text="发泡型号" Foreground="White" FontSize="18" FontWeight="Bold"/>
</Border>
<Border Grid.Row="2" Grid.Column="7" >
<TextBlock Text="{Binding FixtureName[3]}" Foreground="White" FontSize="18"/>
</Border>
<Border Grid.Row="3" Grid.Column="7" >
<TextBlock Text="{Binding FixtureName[4]}" Foreground="White" FontSize="18"/>
</Border>
<Border Grid.Row="4" Grid.Column="7" >
<TextBlock Text="{Binding FixtureName[5]}" Foreground="White" FontSize="18"/>
</Border>
<Border Grid.Row="1" Grid.Column="8" Background="#1157b9">
<TextBlock Text="夹具产量" Foreground="White" FontSize="18" FontWeight="Bold"/>
</Border>
<Border Grid.Row="2" Grid.Column="8" >
<TextBlock Text="{Binding Production[3]}" Foreground="White" FontSize="18" FontWeight="Bold"/>
</Border>
<Border Grid.Row="3" Grid.Column="8">
<TextBlock Text="{Binding Production[4]}" Foreground="White" FontSize="18" FontWeight="Bold"/>
</Border>
<Border Grid.Row="4" Grid.Column="8">
<TextBlock Text="{Binding Production[5]}" Foreground="White" FontSize="18" FontWeight="Bold"/>
</Border>
<Border Grid.Row="1" Grid.Column="9" Background="#1157b9">
<TextBlock Text="节拍" Foreground="White" FontSize="18" FontWeight="Bold"/>
</Border>
<Border Grid.Row="2" Grid.Column="9" >
<TextBlock Text="{Binding Beat[3]}" Foreground="White" FontSize="18"/>
</Border>
<Border Grid.Row="3" Grid.Column="9">
<TextBlock Text="{Binding Beat[4]}" Foreground="White" FontSize="18"/>
</Border>
<Border Grid.Row="4" Grid.Column="9">
<TextBlock Text="{Binding Beat[5]}" Foreground="White" FontSize="18"/>
</Border>
</Grid>
</UniformGrid>
<Border Grid.Row="1" BorderBrush="#0288d1" BorderThickness="1" CornerRadius="5" Background="#1157b9"> <Border Grid.Row="1" BorderBrush="#0288d1" BorderThickness="1" CornerRadius="5" Background="#1157b9">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>

@ -98,7 +98,7 @@
"ID": 1, "ID": 1,
"Name": "OldBoxFoam", "Name": "OldBoxFoam",
"JobGroup": "DEFAULT", "JobGroup": "DEFAULT",
"Cron": "*/1 * * * * ?", "Cron": "*/5 * * * * ?",
"AssemblyName": "Admin.Core.Tasks", "AssemblyName": "Admin.Core.Tasks",
"ClassName": "Job_OldBoxFoam_Quartz", "ClassName": "Job_OldBoxFoam_Quartz",
"Remark": "执行老发泡线任务调度系统", "Remark": "执行老发泡线任务调度系统",
@ -167,6 +167,9 @@
"Enabled": true "Enabled": true
} }
}, },
"StationInfo": {
"ProductLineCode": "CX_01"
},
"PLCServer": [ "PLCServer": [
{ {
"Id": 1, "Id": 1,

@ -32,7 +32,7 @@ namespace Aucma.Core.Tasks
private readonly ISMProductionCompletionRecordServices _smProductionCompletionRecordServices; private readonly ISMProductionCompletionRecordServices _smProductionCompletionRecordServices;
public AucamTaskService(ISmTaskExecutionServices smTaskExecutionServices, ISMProductionCompletionRecordServices smProductionCompletionRecordServices, public AucamTaskService(ISmTaskExecutionServices smTaskExecutionServices, ISMProductionCompletionRecordServices smProductionCompletionRecordServices,
IOldBoxFoamDataServices oldBoxFoamDataServices) IBoxFoamDataServices oldBoxFoamDataServices)
{ {
_smTaskExecutionServices= smTaskExecutionServices; _smTaskExecutionServices= smTaskExecutionServices;
_smProductionCompletionRecordServices = smProductionCompletionRecordServices; _smProductionCompletionRecordServices = smProductionCompletionRecordServices;

Loading…
Cancel
Save