完成 控制器时间参数显示及设置 功能调整

main
xiaoguo 10 months ago
parent 3b21493d0b
commit 75f990bfee

@ -435,5 +435,51 @@
/// 女3控制器T5
/// </summary>
public const string ToiletWomanController3T5 = nameof(ToiletWomanController3T5);
/// <summary>
/// 下发参数T2
/// </summary>
public const string ToiletIssueT2 = nameof(ToiletIssueT2);
/// <summary>
/// 下发参数T3
/// </summary>
public const string ToiletIssueT3 = nameof(ToiletIssueT3);
/// <summary>
/// 下发参数T4
/// </summary>
public const string ToiletIssueT4 = nameof(ToiletIssueT4);
/// <summary>
/// 下发参数T5
/// </summary>
public const string ToiletIssueT5 = nameof(ToiletIssueT5);
/// <summary>
/// 下发参数T2确认1/复位0
/// </summary>
public const string ToiletIssueActionT2 = nameof(ToiletIssueActionT2);
/// <summary>
/// 下发参数T3确认1/复位0
/// </summary>
public const string ToiletIssueActionT3 = nameof(ToiletIssueActionT3);
/// <summary>
/// 下发参数T4确认1/复位0
/// </summary>
public const string ToiletIssueActionT4 = nameof(ToiletIssueActionT4);
/// <summary>
/// 下发参数T5确认1/复位0
/// </summary>
public const string ToiletIssueActionT5 = nameof(ToiletIssueActionT5);
/// <summary>
/// 下发参数_侧位选择
/// 男1=2男2=3男3=4男4=5男5=6女1=7女2=8女3=9
/// </summary>
public const string ToiletIssueSelect = nameof(ToiletIssueSelect);
}
}

@ -193,38 +193,47 @@ namespace GuideScreen.Common.Repositories
var washCountToiletWomanCount2 = new PLCPointEntity { DeviceName = PLCDeviceNames.WashCount, PointName = PLCPointNameByWashCount.ToiletWomanCount2, PointNote = "女2冲洗次数", PointDataType = PLCPointDataType.Int16, PointAddress = "VW186", Unit = "次", IsWrite = true };
var washCountToiletWomanCount3 = new PLCPointEntity { DeviceName = PLCDeviceNames.WashCount, PointName = PLCPointNameByWashCount.ToiletWomanCount3, PointNote = "女3冲洗次数", PointDataType = PLCPointDataType.Int16, PointAddress = "VW188", Unit = "次", IsWrite = true };
//控制器时间参数显示及设置
var toiletManController1T2 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletManController1T2, PointNote = "男1控制器T2", PointDataType = PLCPointDataType.Int16, PointAddress = "VW190", Unit = "s", IsWrite = true };
var toiletManController1T3 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletManController1T3, PointNote = "男1控制器T3", PointDataType = PLCPointDataType.Int16, PointAddress = "VW192", Unit = "s", IsWrite = true };
var toiletManController1T4 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletManController1T4, PointNote = "男1控制器T4", PointDataType = PLCPointDataType.Int16, PointAddress = "VW194", Unit = "s", IsWrite = true };
var toiletManController1T5 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletManController1T5, PointNote = "男1控制器T5", PointDataType = PLCPointDataType.Int16, PointAddress = "VW196", Unit = "s", IsWrite = true };
var toiletManController2T2 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletManController2T2, PointNote = "男2控制器T2", PointDataType = PLCPointDataType.Int16, PointAddress = "VW198", Unit = "s", IsWrite = true };
var toiletManController2T3 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletManController2T3, PointNote = "男2控制器T3", PointDataType = PLCPointDataType.Int16, PointAddress = "VW200", Unit = "s", IsWrite = true };
var toiletManController2T4 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletManController2T4, PointNote = "男2控制器T4", PointDataType = PLCPointDataType.Int16, PointAddress = "VW202", Unit = "s", IsWrite = true };
var toiletManController2T5 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletManController2T5, PointNote = "男2控制器T5", PointDataType = PLCPointDataType.Int16, PointAddress = "VW204", Unit = "s", IsWrite = true };
var toiletManController3T2 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletManController3T2, PointNote = "男3控制器T2", PointDataType = PLCPointDataType.Int16, PointAddress = "VW206", Unit = "s", IsWrite = true };
var toiletManController3T3 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletManController3T3, PointNote = "男3控制器T3", PointDataType = PLCPointDataType.Int16, PointAddress = "VW208", Unit = "s", IsWrite = true };
var toiletManController3T4 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletManController3T4, PointNote = "男3控制器T4", PointDataType = PLCPointDataType.Int16, PointAddress = "VW210", Unit = "s", IsWrite = true };
var toiletManController3T5 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletManController3T5, PointNote = "男3控制器T5", PointDataType = PLCPointDataType.Int16, PointAddress = "VW212", Unit = "s", IsWrite = true };
var toiletManController4T2 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletManController4T2, PointNote = "男4控制器T2", PointDataType = PLCPointDataType.Int16, PointAddress = "VW214", Unit = "s", IsWrite = true };
var toiletManController4T3 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletManController4T3, PointNote = "男4控制器T3", PointDataType = PLCPointDataType.Int16, PointAddress = "VW216", Unit = "s", IsWrite = true };
var toiletManController4T4 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletManController4T4, PointNote = "男4控制器T4", PointDataType = PLCPointDataType.Int16, PointAddress = "VW218", Unit = "s", IsWrite = true };
var toiletManController4T5 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletManController4T5, PointNote = "男4控制器T5", PointDataType = PLCPointDataType.Int16, PointAddress = "VW220", Unit = "s", IsWrite = true };
var toiletManController5T2 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletManController5T2, PointNote = "男5控制器T2", PointDataType = PLCPointDataType.Int16, PointAddress = "VW222", Unit = "s", IsWrite = true };
var toiletManController5T3 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletManController5T3, PointNote = "男5控制器T3", PointDataType = PLCPointDataType.Int16, PointAddress = "VW224", Unit = "s", IsWrite = true };
var toiletManController5T4 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletManController5T4, PointNote = "男5控制器T4", PointDataType = PLCPointDataType.Int16, PointAddress = "VW226", Unit = "s", IsWrite = true };
var toiletManController5T5 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletManController5T5, PointNote = "男5控制器T5", PointDataType = PLCPointDataType.Int16, PointAddress = "VW228", Unit = "s", IsWrite = true };
var toiletWomanController1T2 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletWomanController1T2, PointNote = "女1控制器T2", PointDataType = PLCPointDataType.Int16, PointAddress = "VW230", Unit = "s", IsWrite = true };
var toiletWomanController1T3 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletWomanController1T3, PointNote = "女1控制器T3", PointDataType = PLCPointDataType.Int16, PointAddress = "VW232", Unit = "s", IsWrite = true };
var toiletWomanController1T4 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletWomanController1T4, PointNote = "女1控制器T4", PointDataType = PLCPointDataType.Int16, PointAddress = "VW234", Unit = "s", IsWrite = true };
var toiletWomanController1T5 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletWomanController1T5, PointNote = "女1控制器T5", PointDataType = PLCPointDataType.Int16, PointAddress = "VW236", Unit = "s", IsWrite = true };
var toiletWomanController2T2 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletWomanController2T2, PointNote = "女2控制器T2", PointDataType = PLCPointDataType.Int16, PointAddress = "VW238", Unit = "s", IsWrite = true };
var toiletWomanController2T3 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletWomanController2T3, PointNote = "女2控制器T3", PointDataType = PLCPointDataType.Int16, PointAddress = "VW240", Unit = "s", IsWrite = true };
var toiletWomanController2T4 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletWomanController2T4, PointNote = "女2控制器T4", PointDataType = PLCPointDataType.Int16, PointAddress = "VW242", Unit = "s", IsWrite = true };
var toiletWomanController2T5 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletWomanController2T5, PointNote = "女2控制器T5", PointDataType = PLCPointDataType.Int16, PointAddress = "VW244", Unit = "s", IsWrite = true };
var toiletWomanController3T2 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletWomanController3T2, PointNote = "女3控制器T2", PointDataType = PLCPointDataType.Int16, PointAddress = "VW246", Unit = "s", IsWrite = true };
var toiletWomanController3T3 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletWomanController3T3, PointNote = "女3控制器T3", PointDataType = PLCPointDataType.Int16, PointAddress = "VW248", Unit = "s", IsWrite = true };
var toiletWomanController3T4 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletWomanController3T4, PointNote = "女3控制器T4", PointDataType = PLCPointDataType.Int16, PointAddress = "VW250", Unit = "s", IsWrite = true };
var toiletWomanController3T5 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletWomanController3T5, PointNote = "女3控制器T5", PointDataType = PLCPointDataType.Int16, PointAddress = "VW252", Unit = "s", IsWrite = true };
var toiletManController1T2 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletManController1T2, PointNote = "男1控制器T2", PointDataType = PLCPointDataType.Int16, PointAddress = "VW190", Unit = "s", IsWrite = false };
var toiletManController1T3 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletManController1T3, PointNote = "男1控制器T3", PointDataType = PLCPointDataType.Int16, PointAddress = "VW192", Unit = "s", IsWrite = false };
var toiletManController1T4 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletManController1T4, PointNote = "男1控制器T4", PointDataType = PLCPointDataType.Int16, PointAddress = "VW194", Unit = "s", IsWrite = false };
var toiletManController1T5 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletManController1T5, PointNote = "男1控制器T5", PointDataType = PLCPointDataType.Int16, PointAddress = "VW196", Unit = "s", IsWrite = false };
var toiletManController2T2 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletManController2T2, PointNote = "男2控制器T2", PointDataType = PLCPointDataType.Int16, PointAddress = "VW198", Unit = "s", IsWrite = false };
var toiletManController2T3 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletManController2T3, PointNote = "男2控制器T3", PointDataType = PLCPointDataType.Int16, PointAddress = "VW200", Unit = "s", IsWrite = false };
var toiletManController2T4 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletManController2T4, PointNote = "男2控制器T4", PointDataType = PLCPointDataType.Int16, PointAddress = "VW202", Unit = "s", IsWrite = false };
var toiletManController2T5 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletManController2T5, PointNote = "男2控制器T5", PointDataType = PLCPointDataType.Int16, PointAddress = "VW204", Unit = "s", IsWrite = false };
var toiletManController3T2 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletManController3T2, PointNote = "男3控制器T2", PointDataType = PLCPointDataType.Int16, PointAddress = "VW206", Unit = "s", IsWrite = false };
var toiletManController3T3 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletManController3T3, PointNote = "男3控制器T3", PointDataType = PLCPointDataType.Int16, PointAddress = "VW208", Unit = "s", IsWrite = false };
var toiletManController3T4 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletManController3T4, PointNote = "男3控制器T4", PointDataType = PLCPointDataType.Int16, PointAddress = "VW210", Unit = "s", IsWrite = false };
var toiletManController3T5 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletManController3T5, PointNote = "男3控制器T5", PointDataType = PLCPointDataType.Int16, PointAddress = "VW212", Unit = "s", IsWrite = false };
var toiletManController4T2 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletManController4T2, PointNote = "男4控制器T2", PointDataType = PLCPointDataType.Int16, PointAddress = "VW214", Unit = "s", IsWrite = false };
var toiletManController4T3 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletManController4T3, PointNote = "男4控制器T3", PointDataType = PLCPointDataType.Int16, PointAddress = "VW216", Unit = "s", IsWrite = false };
var toiletManController4T4 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletManController4T4, PointNote = "男4控制器T4", PointDataType = PLCPointDataType.Int16, PointAddress = "VW218", Unit = "s", IsWrite = false };
var toiletManController4T5 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletManController4T5, PointNote = "男4控制器T5", PointDataType = PLCPointDataType.Int16, PointAddress = "VW220", Unit = "s", IsWrite = false };
var toiletManController5T2 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletManController5T2, PointNote = "男5控制器T2", PointDataType = PLCPointDataType.Int16, PointAddress = "VW222", Unit = "s", IsWrite = false };
var toiletManController5T3 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletManController5T3, PointNote = "男5控制器T3", PointDataType = PLCPointDataType.Int16, PointAddress = "VW224", Unit = "s", IsWrite = false };
var toiletManController5T4 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletManController5T4, PointNote = "男5控制器T4", PointDataType = PLCPointDataType.Int16, PointAddress = "VW226", Unit = "s", IsWrite = false };
var toiletManController5T5 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletManController5T5, PointNote = "男5控制器T5", PointDataType = PLCPointDataType.Int16, PointAddress = "VW228", Unit = "s", IsWrite = false };
var toiletWomanController1T2 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletWomanController1T2, PointNote = "女1控制器T2", PointDataType = PLCPointDataType.Int16, PointAddress = "VW230", Unit = "s", IsWrite = false };
var toiletWomanController1T3 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletWomanController1T3, PointNote = "女1控制器T3", PointDataType = PLCPointDataType.Int16, PointAddress = "VW232", Unit = "s", IsWrite = false };
var toiletWomanController1T4 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletWomanController1T4, PointNote = "女1控制器T4", PointDataType = PLCPointDataType.Int16, PointAddress = "VW234", Unit = "s", IsWrite = false };
var toiletWomanController1T5 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletWomanController1T5, PointNote = "女1控制器T5", PointDataType = PLCPointDataType.Int16, PointAddress = "VW236", Unit = "s", IsWrite = false };
var toiletWomanController2T2 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletWomanController2T2, PointNote = "女2控制器T2", PointDataType = PLCPointDataType.Int16, PointAddress = "VW238", Unit = "s", IsWrite = false };
var toiletWomanController2T3 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletWomanController2T3, PointNote = "女2控制器T3", PointDataType = PLCPointDataType.Int16, PointAddress = "VW240", Unit = "s", IsWrite = false };
var toiletWomanController2T4 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletWomanController2T4, PointNote = "女2控制器T4", PointDataType = PLCPointDataType.Int16, PointAddress = "VW242", Unit = "s", IsWrite = false };
var toiletWomanController2T5 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletWomanController2T5, PointNote = "女2控制器T5", PointDataType = PLCPointDataType.Int16, PointAddress = "VW244", Unit = "s", IsWrite = false };
var toiletWomanController3T2 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletWomanController3T2, PointNote = "女3控制器T2", PointDataType = PLCPointDataType.Int16, PointAddress = "VW246", Unit = "s", IsWrite = false };
var toiletWomanController3T3 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletWomanController3T3, PointNote = "女3控制器T3", PointDataType = PLCPointDataType.Int16, PointAddress = "VW248", Unit = "s", IsWrite = false };
var toiletWomanController3T4 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletWomanController3T4, PointNote = "女3控制器T4", PointDataType = PLCPointDataType.Int16, PointAddress = "VW250", Unit = "s", IsWrite = false };
var toiletWomanController3T5 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletWomanController3T5, PointNote = "女3控制器T5", PointDataType = PLCPointDataType.Int16, PointAddress = "VW252", Unit = "s", IsWrite = false };
var toiletIssueT2 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletIssueT2, PointNote = "下发参数T2", PointDataType = PLCPointDataType.Int16, PointAddress = "VW280", Unit = "s", IsWrite = true };
var toiletIssueT3 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletIssueT3, PointNote = "下发参数T3", PointDataType = PLCPointDataType.Int16, PointAddress = "VW282", Unit = "s", IsWrite = true };
var toiletIssueT4 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletIssueT4, PointNote = "下发参数T4", PointDataType = PLCPointDataType.Int16, PointAddress = "VW284", Unit = "s", IsWrite = true };
var toiletIssueT5 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletIssueT5, PointNote = "下发参数T5", PointDataType = PLCPointDataType.Int16, PointAddress = "VW286", Unit = "s", IsWrite = true };
var toiletIssueActionT2 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletIssueActionT2, PointNote = "下发参数T2确认1/复位0 ", PointDataType = PLCPointDataType.Bool, PointAddress = "V270.0", Unit = "s", IsWrite = true };
var toiletIssueActionT3 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletIssueActionT3, PointNote = "下发参数T3确认1/复位0 ", PointDataType = PLCPointDataType.Bool, PointAddress = "V270.1", Unit = "s", IsWrite = true };
var toiletIssueActionT4 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletIssueActionT4, PointNote = "下发参数T4确认1/复位0 ", PointDataType = PLCPointDataType.Bool, PointAddress = "V270.2", Unit = "s", IsWrite = true };
var toiletIssueActionT5 = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletIssueActionT5, PointNote = "下发参数T5确认1/复位0 ", PointDataType = PLCPointDataType.Bool, PointAddress = "V270.3", Unit = "s", IsWrite = true };
var toiletIssueSelect = new PLCPointEntity { DeviceName = PLCDeviceNames.SetControllerTimeParameters, PointName = PLCPointNameBySetControllerTimeParameters.ToiletIssueSelect, PointNote = "侧位选择", PointDataType = PLCPointDataType.Int16, PointAddress = "VW288", Unit = "s", IsWrite = true };
context.PLCPointEntites.AddRange(new PLCPointEntity[]
{
vacuumPumpingStationRealTimeVacuum,
@ -304,6 +313,17 @@ namespace GuideScreen.Common.Repositories
toiletWomanController3T3,
toiletWomanController3T4,
toiletWomanController3T5,
toiletIssueT2,
toiletIssueT3,
toiletIssueT4,
toiletIssueT5,
toiletIssueActionT2,
toiletIssueActionT3,
toiletIssueActionT4,
toiletIssueActionT5,
toiletIssueSelect
});
context.SaveChanges();

@ -85,7 +85,7 @@ namespace GuideScreen.Common.Repositories.Impl
using (var context = GSDBContext.GetDbContext())
{
var total = context.PLCDeviceRecordDayEntities.Where(f => f.DeviceName == deviceName).Select(f => (decimal?)f.RecordValue).Sum();
return total??0;
return total ?? 0;
}
}
@ -172,9 +172,9 @@ namespace GuideScreen.Common.Repositories.Impl
var year = DateTime.Now.Year;
var begDate = DateTime.Parse($"{year}-1-1");
var endDate = begDate.AddYears(1).AddDays(-1);
//获取月份
var months=new List<int>();
var months = new List<int>();
for (var date = begDate; date <= endDate; date = date.AddMonths(1))
{
months.Add(date.Month);
@ -187,7 +187,7 @@ namespace GuideScreen.Common.Repositories.Impl
{
var list = context.PLCDeviceRecordDayEntities
.Where(f => f.DeviceName == PLCDeviceNames.ToiletPosition && f.UpdateDateTime >= begDate && f.UpdateDateTime <= endDate)
.GroupBy(f => f.Day).Select(f => new { Day = f.Key, Sum = f.Sum(ff=>ff.RecordValue) })
.GroupBy(f => f.Day).Select(f => new { Day = f.Key, Sum = f.Sum(ff => ff.RecordValue) })
.ToList();
foreach (var m in months)
@ -240,7 +240,7 @@ namespace GuideScreen.Common.Repositories.Impl
var end = beg.AddDays(1).AddMinutes(-1);
var last = list.Select(f => new { Day = DateTime.Parse(f.Day), f.RecordValue }).Where(f => f.Day >= beg && f.Day <= end).OrderBy(f => f.Day).Select(f => f.RecordValue).LastOrDefault();
if (index == 0)
if (index == 0)
{
var first = list.Select(f => new { Day = DateTime.Parse(f.Day), f.RecordValue }).Where(f => f.Day >= beg && f.Day <= end).OrderBy(f => f.Day).Select(f => f.RecordValue).FirstOrDefault();
retValues.Add(month.ToString(), last > first ? last - first : 0);
@ -317,13 +317,13 @@ namespace GuideScreen.Common.Repositories.Impl
/// 获取总用水量
/// </summary>
/// <returns></returns>
public decimal WaterTotal()
public decimal WaterTotal()
{
using (var context = GSDBContext.GetDbContext())
{
var val = context.PLCDeviceRecordDayEntities.Where(f => f.PointName == PLCPointNameByEnergyMonitoring.WaterConsumption).Sum(f=>f.RecordValue);
var val = context.PLCDeviceRecordDayEntities.Where(f => f.PointName == PLCPointNameByEnergyMonitoring.WaterConsumption).Sum(f => (decimal?)f.RecordValue);
return val;
return val ?? 0;
}
}
}

@ -197,9 +197,18 @@ namespace GuideScreen.Common.Services.Impl
/// <param name="value"></param>
public PLCResult Write(string address, Int16 value)
{
var operateResult = siemensS7Net.Write(address, value);
var result = ConvertResult(operateResult);
return result;
try
{
var operateResult = siemensS7Net.Write(address, value);
var result = ConvertResult(operateResult);
return result;
}
catch (Exception ex)
{
ex.WriteErrorLog("写入Int16值");
throw;
}
}
/// <summary>

@ -37,10 +37,10 @@ namespace GuideScreen.Common.Services.Impl
/// <summary>
/// 是否在运行状态
/// </summary>
public bool IsRun
public bool IsRun
{
get
{
get
{
return isRun;
}
}
@ -206,7 +206,7 @@ namespace GuideScreen.Common.Services.Impl
/// <param name="address">点位地址</param>
/// <param name="type">写类型</typeparam>
/// <returns></returns>
public object ReadValue(string address ,Type type)
public object ReadValue(string address, Type type)
{
object retVal = null;
var plcService = plcCommunicationService;
@ -266,53 +266,56 @@ namespace GuideScreen.Common.Services.Impl
/// <returns></returns>
public PLCResult WriteValue(string address, Type type, object value)
{
PLCResult retVal = null;
var plcService = plcCommunicationService;
//Boolean
if (type.Equals(typeof(Boolean)))
{
var result = plcService.Write(address, (bool)value);
var result = plcService.Write(address, Convert.ToBoolean(value));
retVal = result;
}
//Byte
if (type.Equals(typeof(Byte)))
{
var result = plcService.Write(address, (byte)value);
var result = plcService.Write(address, Convert.ToByte(value));
retVal = result;
}
//Int16
if (type.Equals(typeof(Int16)))
{
var result = plcService.Write(address, (Int16)value);
var result = plcService.Write(address, Convert.ToInt16(value));
retVal = result;
}
//Int32
if (type.Equals(typeof(Int32)))
{
var result = plcService.Write(address, (Int32)value);
var result = plcService.Write(address, Convert.ToInt32(value));
retVal = result;
}
//Int64
if (type.Equals(typeof(Int64)))
{
var result = plcService.Write(address, (Int64)value);
var result = plcService.Write(address, Convert.ToInt64(value));
retVal = result;
}
//float
if (type.Equals(typeof(float)))
{
var result = plcService.Write(address, (float)value);
var result = plcService.Write(address, Convert.ToSingle(value));
retVal = result;
}
//double
if (type.Equals(typeof(Double)))
{
var result = plcService.Write(address, (Double)value);
var result = plcService.Write(address, Convert.ToDouble(value));
retVal = result;
}
return retVal;
}
private void PointMonitor()
@ -408,7 +411,7 @@ namespace GuideScreen.Common.Services.Impl
}
else
{
ErrorMessage?.Invoke(this, result.Message);
ErrorMessage?.Invoke(this, $"点位:{point.Name} 读取失败:{result.Message}");
point.Error?.Invoke(result.Message);
}
}

@ -37,11 +37,11 @@ namespace GuideScreen.Common.Services.Impl
public PageModel<List<PLCPointModel>> GetPLCPointList(string deviceName, string note, int pageSize, int pageIndex)
{
var pageModel = plcPointRepository.GetPLCPointList(deviceName, note, pageSize, pageIndex);
if (pageModel.Content != null && pLCMonitorService.IsRun)
if (pageModel.Content != null && plcMonitorService.IsRun)
{
foreach (var model in pageModel.Content)
{
model.PointValue = pLCMonitorService.ReadValue(model.PointAddress, Type.GetType(model.PointDataType))?.ToString();
model.PointValue = plcMonitorService.ReadValue(model.PointAddress, Type.GetType(model.PointDataType))?.ToString();
}
}
return pageModel;
@ -55,12 +55,12 @@ namespace GuideScreen.Common.Services.Impl
{
var list = plcPointRepository.GetPLCPointList(PLCDeviceNames.SetControllerTimeParameters, "", 0, 0);
var points = plcMonitorService.Points;
if (points != null && points.Count > 0)
if (points != null && points.Count > 0)
{
foreach (var c in list.Content)
foreach (var c in list.Content)
{
var point = points.Where(f => f.Address == c.PointAddress).FirstOrDefault();
if (point != null)
var point = points.Where(f => f.Address == c.PointAddress).FirstOrDefault();
if (point != null)
{
c.PointValue = point.ObjectValue?.ToString();
}

@ -1,6 +1,8 @@
using GuideScreen.Common.Common;
using GuideScreen.Common.Constants;
using GuideScreen.Common.Services;
using GuideScreen.Common.Services.Models;
using Newtonsoft.Json.Linq;
using Sunny.UI;
using System;
using System.Collections.Generic;
@ -28,6 +30,18 @@ namespace GuideScreen.UI.ControlUI
plcPointService = DIManager.GetContainerObject<IPLCPointService>();
plcMonitorService = DIManager.GetContainerObject<IPLCMonitorService>();
btnSetT2.Tag = "T2";
btnSetT3.Tag = "T3";
btnSetT4.Tag = "T4";
btnSetT5.Tag = "T5";
btnSetT2.KeyDown += BtnSet_KeyDown;
btnSetT2.KeyUp += BtnSet_KeyUp;
btnSetT3.KeyDown += BtnSet_KeyDown;
btnSetT3.KeyUp += BtnSet_KeyUp;
btnSetT4.KeyDown += BtnSet_KeyDown;
btnSetT4.KeyUp += BtnSet_KeyUp;
btnSetT5.KeyDown += BtnSet_KeyDown;
btnSetT5.KeyUp += BtnSet_KeyUp;
}
private void ControlParamSetting_Load(object sender, EventArgs e)
@ -35,7 +49,7 @@ namespace GuideScreen.UI.ControlUI
var list = plcPointService.GetControllerTimeParametersList();
if (list.Count > 0)
{
var toilets = list.Select(f => f.PointNote.Substring(0, 2)).Distinct().ToList();
var toilets = list.Where(f => f.PointNote.StartsWith("男") || f.PointNote.StartsWith("女")).Select(f => f.PointNote.Substring(0, 2)).Distinct().ToList();
cmbToilet.DataSource = toilets;
btnSelect_Click();
}
@ -89,6 +103,19 @@ namespace GuideScreen.UI.ControlUI
Setting(3, Int16.Parse(txtT5.Text));
}
private void BtnSet_KeyDown(object sender, KeyEventArgs e)
{
var btn = (UIButton)sender;
downUp(btn.Tag.ToString(), true);
}
private void BtnSet_KeyUp(object sender, KeyEventArgs e)
{
var btn = (UIButton)sender;
downUp(btn.Tag.ToString(), false);
}
private void Setting(int index, Int16 value)
{
if (!plcMonitorService.IsRun)
@ -101,7 +128,43 @@ namespace GuideScreen.UI.ControlUI
ShowErrorNotifier("查询参数不正确!");
return;
}
var result = plcMonitorService.WriteValue<Int16>(models[index].PointAddress, value);
string pointName = string.Empty;
switch (index)
{
case 0:
pointName = PLCPointNameBySetControllerTimeParameters.ToiletIssueT2;
break;
case 1:
pointName = PLCPointNameBySetControllerTimeParameters.ToiletIssueT3;
break;
case 2:
pointName = PLCPointNameBySetControllerTimeParameters.ToiletIssueT4;
break;
case 3:
pointName = PLCPointNameBySetControllerTimeParameters.ToiletIssueT5;
break;
default:
break;
}
var point = plcMonitorService.Points.Where(f => f.Name == pointName).FirstOrDefault();
if (point == null)
{
ShowErrorNotifier($"没有找到点位设置参数 {pointName} 点位!");
return;
}
var selectPoint = plcMonitorService.Points.Where(f => f.Name == PLCPointNameBySetControllerTimeParameters.ToiletIssueSelect).FirstOrDefault();
if (selectPoint == null)
{
ShowErrorNotifier($"没有找到点位设置参数 {PLCPointNameBySetControllerTimeParameters.ToiletIssueSelect} 点位!");
return;
}
var result = plcMonitorService.WriteValue(selectPoint.Address, selectPoint.DataType, cmbToilet.SelectedIndex + 2);
if (!result.IsSuccess)
{
ShowErrorNotifier($"下发失败,选择侧位{cmbToilet.Text},值:{cmbToilet.SelectedIndex + 2}" + result.Message);
return;
}
result = plcMonitorService.WriteValue(point.Address, point.DataType, value);
if (!result.IsSuccess)
{
ShowErrorNotifier("下发失败," + result.Message);
@ -110,5 +173,46 @@ namespace GuideScreen.UI.ControlUI
ShowSuccessNotifier("下发成功!");
}
private void downUp(string tag, bool isDown)
{
if (!plcMonitorService.IsRun)
{
ShowErrorNotifier("PLC连接失败");
return;
}
string pointName = string.Empty;
switch (tag)
{
case "T2":
pointName = PLCPointNameBySetControllerTimeParameters.ToiletIssueActionT2;
break;
case "T3":
pointName = PLCPointNameBySetControllerTimeParameters.ToiletIssueActionT3;
break;
case "T4":
pointName = PLCPointNameBySetControllerTimeParameters.ToiletIssueActionT4;
break;
case "T5":
pointName = PLCPointNameBySetControllerTimeParameters.ToiletIssueActionT5;
break;
default:
break;
}
var point = plcMonitorService.Points.Where(f => f.Name == pointName).FirstOrDefault();
if (point == null)
{
ShowErrorNotifier($"没有找到点位设置参数 {pointName} 点位!");
return;
}
var result = plcMonitorService.WriteValue(point.Address, point.DataType, isDown);
if (!result.IsSuccess)
{
ShowErrorNotifier("下发失败," + result.Message);
return;
}
}
}
}

@ -122,19 +122,19 @@ namespace GuideScreen.Common.Services.Impl
/// 获取个厕位使用累计记录
/// </summary>
/// <returns></returns>
public IDictionary<string, int> ToiletPositionRecordTotal()
public IDictionary<string, int> ToiletPositionRecordTotal()
{
//厕所侧位使用统计
var toilets = new Dictionary<string, int>
{
["男厕1"] = plcMonitorService.ReadValue<int>(PLCPointNameByWashCount.ToiletManCount1),
["男厕2"] = plcMonitorService.ReadValue<int>(PLCPointNameByWashCount.ToiletManCount2),
["男厕3"] = plcMonitorService.ReadValue<int>(PLCPointNameByWashCount.ToiletManCount3),
["男厕4"] = plcMonitorService.ReadValue<int>(PLCPointNameByWashCount.ToiletManCount4),
["男厕5"] = plcMonitorService.ReadValue<int>(PLCPointNameByWashCount.ToiletManCount5),
["女厕1"] = plcMonitorService.ReadValue<int>(PLCPointNameByWashCount.ToiletWomanCount1),
["女厕2"] = plcMonitorService.ReadValue<int>(PLCPointNameByWashCount.ToiletWomanCount2),
["女厕3"] = plcMonitorService.ReadValue<int>(PLCPointNameByWashCount.ToiletWomanCount3),
["男厕1"] = GetPointWashCount(PLCPointNameByWashCount.ToiletManCount1),
["男厕2"] = GetPointWashCount(PLCPointNameByWashCount.ToiletManCount2),
["男厕3"] = GetPointWashCount(PLCPointNameByWashCount.ToiletManCount3),
["男厕4"] = GetPointWashCount(PLCPointNameByWashCount.ToiletManCount4),
["男厕5"] = GetPointWashCount(PLCPointNameByWashCount.ToiletManCount5),
["女厕1"] = GetPointWashCount(PLCPointNameByWashCount.ToiletWomanCount1),
["女厕2"] = GetPointWashCount(PLCPointNameByWashCount.ToiletWomanCount2),
["女厕3"] = GetPointWashCount(PLCPointNameByWashCount.ToiletWomanCount3),
};
return toilets;
@ -172,6 +172,12 @@ namespace GuideScreen.Common.Services.Impl
return 0;
}
private Int16 GetPointWashCount(string name)
{
var point = Points.Where(f => f.Name == name).FirstOrDefault();
return Convert.ToInt16(point?.ObjectValue);
}
/// <summary>
/// 添加点位记录
/// </summary>
@ -196,7 +202,10 @@ namespace GuideScreen.Common.Services.Impl
//记录正空泵信息
case PLCDeviceNames.VacuumPumpingStation:
break;
//获取冲洗统计
case PLCDeviceNames.WashCount:
ToiletPositionRecordTotal();
break;
default:
break;
}
@ -250,6 +259,10 @@ namespace GuideScreen.Common.Services.Impl
public decimal GetWaterTotal()
{
var value = deviceRecordService.WaterTotal();
if (value > 0)
{
value = Math.Round(value, 2);
}
return value;
}
}

@ -67,9 +67,9 @@ namespace GuideScreen.UI
plcController = DIManager.GetContainerObject<PLCController>();
plcController.PointChnage += PlcController_PointChnage;
plcController.ErrorMessage += Controller_ErrorMessage;
passengerFlowStatisticsController = DIManager.GetContainerObject<PassengerFlowStatisticsController>();
passengerFlowStatisticsController.Action += PassengerFlowStatisticsController_Action;
passengerFlowStatisticsController.ErrorMessage += Controller_ErrorMessage;
//passengerFlowStatisticsController = DIManager.GetContainerObject<PassengerFlowStatisticsController>();
//passengerFlowStatisticsController.Action += PassengerFlowStatisticsController_Action;
//passengerFlowStatisticsController.ErrorMessage += Controller_ErrorMessage;
Load += FormScreen_Load;
}
@ -457,7 +457,7 @@ namespace GuideScreen.UI
//侧位图表
ToileUseChartByDay();
ToileUseChartTotal();
//ToileUseChartTotal();
}
@ -646,6 +646,15 @@ namespace GuideScreen.UI
default:
break;
}
switch (e.Device)
{
case PLCDeviceNames.WashCount:
ToileUseChartTotal();
break;
default:
break;
}
}
#endregion PLC获取点位
@ -784,7 +793,7 @@ namespace GuideScreen.UI
}
//真空度过期
if (vacuumIndex > 1000)
if (vacuumIndex > 1000)
{
vacuumIndex = 0;
chartVacuum.Option.Clear();
@ -804,11 +813,11 @@ namespace GuideScreen.UI
{
var count = toilets.Values.Sum();
//每用次1.6升水
var value = Math.Round(count * 0.0016, 2);
var value = Math.Round(count * 0.0016, 4);
var dayStr = value.ToString().Aggregate(string.Empty, (c, i) => c + i + " ");
lblDayWarter.Text = $"今日用水量 {dayStr} 吨 ";
plcController.AdddeviceRecord(new PLCPoint
plcController.AdddeviceRecord(new PLCPoint
{
Device = PLCDeviceNames.EnergyMonitoring,
Name = PLCPointNameByEnergyMonitoring.WaterConsumption,

Loading…
Cancel
Save