|
|
|
@ -421,13 +421,6 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
|
private void Time(int deviceNo, int statu)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
//OpenDoorService.Insert(new OpenDoorEntity()
|
|
|
|
|
//{
|
|
|
|
|
// DeviceId = deviceNo,
|
|
|
|
|
// OpenTime = DateTime.Now,
|
|
|
|
|
// CreateTime = DateTime.Now,
|
|
|
|
|
// Status = statu
|
|
|
|
|
//});
|
|
|
|
|
|
|
|
|
|
if (WetStatus.ContainsKey(deviceNo) == false)
|
|
|
|
|
{
|
|
|
|
@ -444,23 +437,26 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
|
|
|
|
|
|
private void DonwloadWetState(int deviceNo, int statu)
|
|
|
|
|
{
|
|
|
|
|
TankIsDischargedSyncEntity tankIsDischargedSyncEntity = new TankIsDischargedSyncEntity()
|
|
|
|
|
{
|
|
|
|
|
reqCode = System.Guid.NewGuid().ToString(),
|
|
|
|
|
reqTime = DateTime.Now,
|
|
|
|
|
deviceNo = deviceNo.ToString(),
|
|
|
|
|
state = statu.ToString(),
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//即使网络不同 也不会影响上位机的使用
|
|
|
|
|
ThreadPool.QueueUserWorkItem(delegate
|
|
|
|
|
{
|
|
|
|
|
HttpResponse httpResponse = new HttpResponse();
|
|
|
|
|
// MesnacServiceManager.Instance.LoggingService.Info($"湿混机{deviceNo}下发请求");
|
|
|
|
|
string returnTest = httpResponse.PostResponse(tankIsDischargedSyncEntity);
|
|
|
|
|
// LjManualLog.ManualLogControl($"湿混机{deviceNo}返回数据 " + returnTest);
|
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info($"湿混机{deviceNo}返回数据" + returnTest);
|
|
|
|
|
});
|
|
|
|
|
string userName= string.IsNullOrWhiteSpace(UserInfo.Instance.UserName) ? "Edit" : UserInfo.Instance.UserName;
|
|
|
|
|
if (userName.Length > 0 && userName != "Edit")
|
|
|
|
|
{
|
|
|
|
|
//即使网络不同 也不会影响上位机的使用
|
|
|
|
|
ThreadPool.QueueUserWorkItem(delegate
|
|
|
|
|
{
|
|
|
|
|
TankIsDischargedSyncEntity tankIsDischargedSyncEntity = new TankIsDischargedSyncEntity()
|
|
|
|
|
{
|
|
|
|
|
reqCode = System.Guid.NewGuid().ToString(),
|
|
|
|
|
reqTime = DateTime.Now,
|
|
|
|
|
deviceNo = deviceNo.ToString(),
|
|
|
|
|
state = statu.ToString(),
|
|
|
|
|
};
|
|
|
|
|
HttpResponse httpResponse = new HttpResponse();
|
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info($"湿混机{deviceNo}下发请求:{statu}");
|
|
|
|
|
string returnTest = httpResponse.PostResponse(tankIsDischargedSyncEntity);
|
|
|
|
|
// LjManualLog.ManualLogControl($"湿混机{deviceNo}返回数据 " + returnTest);
|
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info($"湿混机{deviceNo}返回数据" + returnTest);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|