修改数据库

dep
杨威 5 months ago
parent 4fe160c30d
commit 25ea21363f

@ -101,52 +101,55 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
ComboE.ChooseMaterial2.SelectedIndex = 0;
}
var getGelatG1 = LjPlanningPlcHelp.GetGelatG1;
var getWeterM1 = LjPlanningPlcHelp.GetWeterM1;
var getGelatG2 = LjPlanningPlcHelp.GetGelatG2;
var getWeterM2 = LjPlanningPlcHelp.GetWeterM2;
var getGelatG3 = LjPlanningPlcHelp.GetGelatG3;
var getWeterM3 = LjPlanningPlcHelp.GetWeterM3;
var getGelatG4 = LjPlanningPlcHelp.GetGelatG4;
var getWeterM4 = LjPlanningPlcHelp.GetWeterM4;
var getGelatG5 = LjPlanningPlcHelp.GetGelatG5;
var getWeterM5 = LjPlanningPlcHelp.GetWeterM5;
var getGelatG6 = LjPlanningPlcHelp.GetGelatG6;
var getWeterM6 = LjPlanningPlcHelp.GetWeterM6;
var getGelatG7 = LjPlanningPlcHelp.GetGelatG7;
var getWeterM7 = LjPlanningPlcHelp.GetWeterM7;
var getGelatG8 = LjPlanningPlcHelp.GetGelatG8;
var getWeterM8 = LjPlanningPlcHelp.GetWeterM8;
switch (select)
{
case 1:
GWDataShow(getGelatG1, getWeterM1, TextE);
break;
case 2:
GWDataShow(getGelatG2, getWeterM2, TextE);
break;
case 3:
GWDataShow(getGelatG3, getWeterM3, TextE);
break;
case 4:
GWDataShow(getGelatG4, getWeterM4, TextE);
break;
case 5:
GWDataShow(getGelatG5, getWeterM5, TextE);
break;
case 6:
GWDataShow(getGelatG6, getWeterM6, TextE);
break;
case 7:
GWDataShow(getGelatG7, getWeterM7, TextE);
break;
case 8:
GWDataShow(getGelatG8, getWeterM8, TextE);
break;
default:
return;
}
GWDataShow(selected, TextE, select);
//var getGelatG1 = LjPlanningPlcHelp.GetGelatG1;
//var getWeterM1 = LjPlanningPlcHelp.GetWeterM1;
//var getGelatG2 = LjPlanningPlcHelp.GetGelatG2;
//var getWeterM2 = LjPlanningPlcHelp.GetWeterM2;
//var getGelatG3 = LjPlanningPlcHelp.GetGelatG3;
//var getWeterM3 = LjPlanningPlcHelp.GetWeterM3;
//var getGelatG4 = LjPlanningPlcHelp.GetGelatG4;
//var getWeterM4 = LjPlanningPlcHelp.GetWeterM4;
//var getGelatG5 = LjPlanningPlcHelp.GetGelatG5;
//var getWeterM5 = LjPlanningPlcHelp.GetWeterM5;
//var getGelatG6 = LjPlanningPlcHelp.GetGelatG6;
//var getWeterM6 = LjPlanningPlcHelp.GetWeterM6;
//var getGelatG7 = LjPlanningPlcHelp.GetGelatG7;
//var getWeterM7 = LjPlanningPlcHelp.GetWeterM7;
//var getGelatG8 = LjPlanningPlcHelp.GetGelatG8;
//var getWeterM8 = LjPlanningPlcHelp.GetWeterM8;
//switch (select)
//{
// case 1:
// GWDataShow(getGelatG1, getWeterM1, TextE);
// break;
// case 2:
// GWDataShow(getGelatG2, getWeterM2, TextE);
// break;
// case 3:
// GWDataShow(getGelatG3, getWeterM3, TextE);
// break;
// case 4:
// GWDataShow(getGelatG4, getWeterM4, TextE);
// break;
// case 5:
// GWDataShow(getGelatG5, getWeterM5, TextE);
// break;
// case 6:
// GWDataShow(getGelatG6, getWeterM6, TextE);
// break;
// case 7:
// GWDataShow(getGelatG7, getWeterM7, TextE);
// break;
// case 8:
// GWDataShow(getGelatG8, getWeterM8, TextE);
// break;
// default:
// return;
//}
}
@ -167,52 +170,54 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
ComboE.ChooseMaterial2.SelectedIndex = 0;
}
var getGelatG1 = LjPlanningPlcHelp.GetGelatG1;
var getWeterM1 = LjPlanningPlcHelp.GetWeterM1;
var getGelatG2 = LjPlanningPlcHelp.GetGelatG2;
var getWeterM2 = LjPlanningPlcHelp.GetWeterM2;
var getGelatG3 = LjPlanningPlcHelp.GetGelatG3;
var getWeterM3 = LjPlanningPlcHelp.GetWeterM3;
var getGelatG4 = LjPlanningPlcHelp.GetGelatG4;
var getWeterM4 = LjPlanningPlcHelp.GetWeterM4;
var getGelatG5 = LjPlanningPlcHelp.GetGelatG5;
var getWeterM5 = LjPlanningPlcHelp.GetWeterM5;
var getGelatG6 = LjPlanningPlcHelp.GetGelatG6;
var getWeterM6 = LjPlanningPlcHelp.GetWeterM6;
var getGelatG7 = LjPlanningPlcHelp.GetGelatG7;
var getWeterM7 = LjPlanningPlcHelp.GetWeterM7;
var getGelatG8 = LjPlanningPlcHelp.GetGelatG8;
var getWeterM8 = LjPlanningPlcHelp.GetWeterM8;
switch (select)
{
case 1:
GWDataShow2(getGelatG1, getWeterM1, TextE);
break;
case 2:
GWDataShow2(getGelatG2, getWeterM2, TextE);
break;
case 3:
GWDataShow2(getGelatG3, getWeterM3, TextE);
break;
case 4:
GWDataShow2(getGelatG4, getWeterM4, TextE);
break;
case 5:
GWDataShow2(getGelatG5, getWeterM5, TextE);
break;
case 6:
GWDataShow2(getGelatG6, getWeterM6, TextE);
break;
case 7:
GWDataShow2(getGelatG7, getWeterM7, TextE);
break;
case 8:
GWDataShow2(getGelatG8, getWeterM8, TextE);
break;
default:
return;
}
GWDataShow2(selected, TextE, select);
//var getGelatG1 = LjPlanningPlcHelp.GetGelatG1;
//var getWeterM1 = LjPlanningPlcHelp.GetWeterM1;
//var getGelatG2 = LjPlanningPlcHelp.GetGelatG2;
//var getWeterM2 = LjPlanningPlcHelp.GetWeterM2;
//var getGelatG3 = LjPlanningPlcHelp.GetGelatG3;
//var getWeterM3 = LjPlanningPlcHelp.GetWeterM3;
//var getGelatG4 = LjPlanningPlcHelp.GetGelatG4;
//var getWeterM4 = LjPlanningPlcHelp.GetWeterM4;
//var getGelatG5 = LjPlanningPlcHelp.GetGelatG5;
//var getWeterM5 = LjPlanningPlcHelp.GetWeterM5;
//var getGelatG6 = LjPlanningPlcHelp.GetGelatG6;
//var getWeterM6 = LjPlanningPlcHelp.GetWeterM6;
//var getGelatG7 = LjPlanningPlcHelp.GetGelatG7;
//var getWeterM7 = LjPlanningPlcHelp.GetWeterM7;
//var getGelatG8 = LjPlanningPlcHelp.GetGelatG8;
//var getWeterM8 = LjPlanningPlcHelp.GetWeterM8;
//switch (select)
//{
// case 1:
// GWDataShow2(getGelatG1, getWeterM1, TextE);
// break;
// case 2:
// GWDataShow2(getGelatG2, getWeterM2, TextE);
// break;
// case 3:
// GWDataShow2(getGelatG3, getWeterM3, TextE);
// break;
// case 4:
// GWDataShow2(getGelatG4, getWeterM4, TextE);
// break;
// case 5:
// GWDataShow2(getGelatG5, getWeterM5, TextE);
// break;
// case 6:
// GWDataShow2(getGelatG6, getWeterM6, TextE);
// break;
// case 7:
// GWDataShow2(getGelatG7, getWeterM7, TextE);
// break;
// case 8:
// GWDataShow2(getGelatG8, getWeterM8, TextE);
// break;
// default:
// return;
//}
}
@ -272,28 +277,71 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
//ComboE.DryM15.SelectedIndex = 0;
}
var getDryerD1 = LjPlanningPlcHelp.GetDryerD1;
var getDryerD2 = LjPlanningPlcHelp.GetDryerD2;
var getDryerD3 = LjPlanningPlcHelp.GetDryerD3;
var getDryerD4 = LjPlanningPlcHelp.GetDryerD4;
switch (select)
{
case 1:
DryDataShow(getDryerD1, TextE);
break;
case 2:
DryDataShow(getDryerD2, TextE);
break;
case 3:
DryDataShow(getDryerD3, TextE);
break;
case 4:
DryDataShow(getDryerD4, TextE);
break;
default: return;
}
//var getDryerD1 = LjPlanningPlcHelp.GetDryerD1;
//var getDryerD2 = LjPlanningPlcHelp.GetDryerD2;
//var getDryerD3 = LjPlanningPlcHelp.GetDryerD3;
//var getDryerD4 = LjPlanningPlcHelp.GetDryerD4;
DryDataShow(drtSelected, TextE, select);
//switch (select)
//{
// case 1:
// DryDataShow(getDryerD1, TextE);
// break;
// case 2:
// DryDataShow(getDryerD2, TextE);
// break;
// case 3:
// DryDataShow(getDryerD3, TextE);
// break;
// case 4:
// DryDataShow(getDryerD4, TextE);
// break;
// default: return;
//}
}
public static void DryDataShow(List<DeviceMaterrial> Dry, MCTextBoxEntity TextE,int sel)
{
TextE.DryW1.MCValue = Dry[0].Weight;
TextE.DryW2.MCValue = Dry[1].Weight;
TextE.DryW3.MCValue = Dry[2].Weight;
TextE.DryW4.MCValue = Dry[3].Weight;
TextE.DryW5.MCValue = Dry[4].Weight;
TextE.DryW6.MCValue = Dry[5].Weight;
TextE.DryW7.MCValue = Dry[6].Weight;
TextE.DryW8.MCValue = Dry[7].Weight;
TextE.DryW9.MCValue = Dry[8].Weight;
TextE.DryW10.MCValue = Dry[9].Weight;
TextE.DryW11.MCValue = Dry[10].Weight;
TextE.DryW12.MCValue = Dry[11].Weight;
//TextE.DryW13.MCValue = Dry.RecipePlcViews[12].Set;
//TextE.DryW14.MCValue = Dry.RecipePlcViews[13].Set;
//TextE.DryW15.MCValue = Dry.RecipePlcViews[14].Set;
TextE.DryT1.MCValue = Dry[0].Allowance;
TextE.DryT2.MCValue = Dry[1].Allowance;
TextE.DryT3.MCValue = Dry[2].Allowance;
TextE.DryT4.MCValue = Dry[3].Allowance;
TextE.DryT5.MCValue = Dry[4].Allowance;
TextE.DryT6.MCValue = Dry[5].Allowance;
TextE.DryT7.MCValue = Dry[6].Allowance;
TextE.DryT8.MCValue = Dry[7].Allowance;
TextE.DryT9.MCValue = Dry[8].Allowance;
TextE.DryT10.MCValue = Dry[9].Allowance;
TextE.DryT11.MCValue = Dry[10].Allowance;
TextE.DryT12.MCValue = Dry[11].Allowance;
var d= FreeSqlUnit.Instance.Queryable<DryDownloadDetail>().Where(x => x.Id == sel).First();
TextE.DryWaitTime.MCValue = d.WaitTime;
TextE.DryOutDelayTime.MCValue = d.OutDelayTime;
TextE.DrySpeed1.MCValue = d.Speed1;
TextE.DrySpeed2.MCValue =d.Speed2;
TextE.DrySpeed3.MCValue = d.Speed3;
}
public static void DryDataShow(DryerView Dry, MCTextBoxEntity TextE)
@ -335,6 +383,31 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
TextE.DrySpeed3.MCValue = Dry.RecipeSteps[2].MixSpeed;
}
public static void GWDataShow(List<DeviceMaterrial> Gels, MCTextBoxEntity TextE,int sel)
{
TextE.MaterialWeight1.MCValue = Gels[0].Weight;
TextE.MaterialWeight2.MCValue = Gels[1].Weight;
TextE.MaterialTolerance1.MCValue = Gels[0].Allowance;
TextE.MaterialTolerance2.MCValue = Gels[1].Allowance;
WetDetail web=FreeDb.FreeSqlUnit.Instance.Queryable<WetDetail>().Where(x=>x.Id==sel).First();
TextE.GelSpeedSet.MCValue = web.MixSpeed;
TextE.GelPosTimeA.MCValue =web.GelPosA;
TextE.GelNagTimeB.MCValue = web.GelPosB;
TextE.GelPosTimeC.MCValue = web.GelPosC;
TextE.GelWaterTime.MCValue = web.GelWater;
TextE.GelWaitTime.MCValue = web.GelWait;
TextE.GelCloseHeatTime.MCValue = web.GelCloseHeat;
TextE.GelOutDelayTime.MCValue = web.WetOutDelay;
TextE.WetDryWeight.MCValue = web.WetDryWei;
TextE.WetMixTime.MCValue = web.WetMix;
TextE.WetOutDelayTime.MCValue = web.WetOutDelay;
}
public static void GWDataShow(DryerView Gel, List<MixStep> Wet, MCTextBoxEntity TextE)
{
TextE.MaterialWeight1.MCValue = Gel.RecipePlcViews[0].Set;
@ -378,6 +451,30 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
TextE.WetOutDelayTime.MCValue = Wet[4].MixTime;
}
public static void GWDataShow2(List<DeviceMaterrial> Gels, MCTextBoxEntity TextE, int sel)
{
TextE.MaterialWeight1.MCValue = Gels[0].Weight;
TextE.MaterialWeight2.MCValue = Gels[1].Weight;
TextE.MaterialTolerance1.MCValue = Gels[0].Allowance;
TextE.MaterialTolerance2.MCValue = Gels[1].Allowance;
WetDetail web = FreeDb.FreeSqlUnit.Instance.Queryable<WetDetail>().Where(x => x.Id == sel).First();
TextE.GelSpeedSet.MCValue = web.MixSpeed;
TextE.GelPosTimeA.MCValue = web.GelPosA;
TextE.GelNagTimeB.MCValue = web.GelPosB;
TextE.GelPosTimeC.MCValue = web.GelPosC;
TextE.GelWaterTime.MCValue = web.GelWater;
TextE.GelWaitTime.MCValue = web.GelWait;
TextE.GelCloseHeatTime.MCValue = web.GelCloseHeat;
TextE.GelOutDelayTime.MCValue = web.WetOutDelay;
TextE.WetMixTime.MCValue = web.WetMix;
TextE.WetOutDelayTime.MCValue = web.WetOutDelay;
}
/// <summary>
/// 将C#数据实体转化为JSON数据

@ -30,5 +30,10 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl.DB
/// </summary
public int Code { get; set; }
public float Weight { get; set; } = 0;
public float Allowance { get; set; } = 0;
}
}

@ -6,6 +6,7 @@ using Mesnac.Action.Base;
using Mesnac.Action.ChemicalWeighing.AutoControl.DB;
using Mesnac.Action.ChemicalWeighing.AutoControl.Entity;
using Mesnac.Action.ChemicalWeighing.FreeDb;
using Mesnac.Action.ChemicalWeighing.FreeDb.DBEntity;
using Mesnac.Action.ChemicalWeighing.LjMixManager;
using Mesnac.Action.ChemicalWeighing.LjPlanning;
using Mesnac.Controls.Base;
@ -341,14 +342,45 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
ComboE.ChooseMaterial1.DataSource = StockMaterrialDbHelp.GetSiloMaterrial();
ComboE.ChooseMaterial2.DataSource = StockMaterrialDbHelp.GetSiloMaterrial();
TextE.ColdValueA.MCValue = dB2104Helper.GetAColWater.Set;
TextE.ColdValueB.MCValue = dB2104Helper.GetBColWater.Set;
TextE.HotValueA.MCValue = dB2104Helper.GetAHotWater.Set;
TextE.HotValueB.MCValue = dB2104Helper.GetBHotWater.Set;
TextE.ColdToleranceA.MCValue = dB2104Helper.GetAColWater.Tolerance;
TextE.ColdToleranceB.MCValue = dB2104Helper.GetBColWater.Tolerance;
TextE.HotToleranceA.MCValue = dB2104Helper.GetAHotWater.Tolerance;
TextE.HotToleranceB.MCValue = dB2104Helper.GetBHotWater.Tolerance;
WaterDownloadEntity entity = new WaterDownloadEntity();
List<WaterDownloadEntity> list = FreeSqlUnit.Instance.Select<WaterDownloadEntity>().ToList();
var coldA=list.First(x=>x.Id==1);
var coldB=list.First(x=>x.Id==2);
var hotA = list.First(x => x.Id == 3);
var hotB=list.First(x=>x.Id==4);
//1 冷水a 2 冷水b 3 热水a 4 热水b
// TextE.ColdValueA.MCValue = dB2104Helper.GetAColWater.Set;
TextE.ColdValueA.MCValue= coldA.Set;
// TextE.ColdValueB.MCValue = dB2104Helper.GetBColWater.Set;
TextE.ColdValueB. MCValue = coldB.Set;
// TextE.HotValueA.MCValue = dB2104Helper.GetAHotWater.Set;
TextE.HotValueA. MCValue = hotA.Set;
// TextE.HotValueB.MCValue = dB2104Helper.GetBHotWater.Set;
TextE.HotValueB.MCValue =hotB.Set;
// TextE.ColdToleranceA.MCValue = dB2104Helper.GetAColWater.Tolerance;
TextE.ColdToleranceA.MCValue = coldA.Tolerance;
// TextE.ColdToleranceB.MCValue = dB2104Helper.GetBColWater.Tolerance;
TextE.ColdToleranceB.MCValue = coldB.Tolerance;
// TextE.HotToleranceA.MCValue = dB2104Helper.GetAHotWater.Tolerance;
TextE.HotToleranceA.MCValue = hotA.Tolerance;
// TextE.HotToleranceB.MCValue = dB2104Helper.GetBHotWater.Tolerance;
TextE.HotToleranceB.MCValue = hotB.Tolerance;
ComboE.DryM1.DataSource = StockMaterrialDbHelp.GetDryerMaterrial();
ComboE.DryM2.DataSource = StockMaterrialDbHelp.GetDryerMaterrial();
@ -386,21 +418,21 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
ComboE.CBLeftOrRight.DataSource = dataB.Copy();
ComboE.HBLeftOrRight.DataSource = dataB.Copy();
var ha = dB2104Helper.GetAHotWater;
TextE.HADeviation.MCValue = ha.differ;
ComboE.HALeftOrRight.MCValue = ha.stand;
// var ha = dB2104Helper.GetAHotWater;
TextE.HADeviation.MCValue = hotA.differ;
ComboE.HALeftOrRight.MCValue = hotA.stand;
var hb = dB2104Helper.GetBHotWater;
TextE.HBDeviation.MCValue = hb.differ;
ComboE.HBLeftOrRight.MCValue = hb.stand;
// var hb = dB2104Helper.GetBHotWater;
TextE.HBDeviation.MCValue = hotB.differ;
ComboE.HBLeftOrRight.MCValue = hotB.stand;
var ca = dB2104Helper.GetAColWater;
TextE.CADeviation.MCValue = ca.differ;
ComboE.CALeftOrRight.MCValue = ca.stand;
// var ca = dB2104Helper.GetAColWater;
TextE.CADeviation.MCValue = coldA.differ;
ComboE.CALeftOrRight.MCValue = coldA.stand;
var cb = dB2104Helper.GetBColWater;
TextE.CBDeviation.MCValue = cb.differ;
ComboE.CBLeftOrRight.MCValue = cb.stand;
// var cb = dB2104Helper.GetBColWater;
TextE.CBDeviation.MCValue = coldB.differ;
ComboE.CBLeftOrRight.MCValue = coldB.stand;
if (!DB2105WriteHelper.GetWaterStatus()[0])
{

@ -29,6 +29,8 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
public static void GelWetDownload(MCTextBoxEntity TextE, MCComboBoxEntity ComboE, MCRadioButtonEntity RadioE)
{
WetDetail wet=new WetDetail();
int b1 = Convert.ToInt32(ComboE.ChooseMaterial1.MCValue.ToString());
int b2 = Convert.ToInt32(ComboE.ChooseMaterial2.MCValue.ToString());
@ -41,16 +43,28 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
float MatWei1 = Convert.ToSingle(TextE.MaterialWeight1.MCValue.ToString());
float MatWei2 = Convert.ToSingle(TextE.MaterialWeight2.MCValue.ToString());
float GelSpeed = Convert.ToSingle(TextE.GelSpeedSet.MCValue.ToString());
wet.MixSpeed = GelSpeed;
float GelPosA = Convert.ToSingle(TextE.GelPosTimeA.MCValue.ToString());
wet.GelPosA = GelPosA;
float GelNagB = Convert.ToSingle(TextE.GelNagTimeB.MCValue.ToString());
wet.GelPosB = GelNagB;
short GelPosC = Convert.ToInt16(TextE.GelPosTimeC.MCValue.ToString());
wet.GelPosC = GelPosC;
short GelWater = Convert.ToInt16(TextE.GelWaterTime.MCValue.ToString());
wet.GelWater = GelWater;
short GelWait = Convert.ToInt16(TextE.GelWaitTime.MCValue.ToString());
wet.GelWait = GelWait;
short GelCloseHeat = Convert.ToInt16(TextE.GelCloseHeatTime.MCValue.ToString());
wet.GelCloseHeat = GelCloseHeat;
float GelDelayTime = Convert.ToSingle(TextE.GelOutDelayTime.MCValue.ToString());
wet.GelDelayTime = GelDelayTime;
if (b2 == -1)
{
@ -154,9 +168,14 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
steps.Add(step9);
steps.Add(step9);
float WetDryWei = Convert.ToSingle(TextE.WetDryWeight.MCValue.ToString());
wet.WetDryWei = WetDryWei;
short WetMix = Convert.ToInt16(TextE.WetMixTime.MCValue.ToString());
wet.WetMix = WetMix;
short WetOutDelay = Convert.ToInt16(TextE.WetOutDelayTime.MCValue.ToString());
wet.WetOutDelay = WetOutDelay;
List<MixStep> mixSteps = new List<MixStep>();
@ -204,7 +223,9 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
DeviceId = ControlsHelper.SingleSelect(RadioE),
MaterrialId = b1,
Type = 2,
Code = StockMaterrialDbHelp.GetCodeById(b1)
Code = StockMaterrialDbHelp.GetCodeById(b1),
Weight= MatWei1,
Allowance= MatTol1,
};
DeviceMaterrial deviceMaterial2 = new DeviceMaterrial()
@ -212,7 +233,9 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
DeviceId = ControlsHelper.SingleSelect(RadioE),
MaterrialId = b2,
Type = 2,
Code = StockMaterrialDbHelp.GetCodeById(b2)
Code = StockMaterrialDbHelp.GetCodeById(b2),
Weight = MatWei2,
Allowance = MatTol2,
};
materials.Add(deviceMaterial1);
@ -265,6 +288,9 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
return;
}
wet.Id = ControlsHelper.SingleSelect(RadioE);
FreeDb.FreeSqlUnit.Instance.Update<WetDetail>().SetSource(wet).ExecuteAffrows();
GWlog(recipes, steps, mixSteps, RadioE);
//if (!GWComparePLC(recipes, steps, mixSteps, RadioE))
@ -387,6 +413,13 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
float drySpeed2 = Convert.ToSingle(TextE.DrySpeed2.MCValue.ToString());
float drySpeed3 = Convert.ToSingle(TextE.DrySpeed3.MCValue.ToString());
DryDownloadDetail detail = new DryDownloadDetail();
detail.WaitTime = dryWaitTime;
detail.OutDelayTime = dryOutDelayTime;
detail.Speed1 = Convert.ToInt32((short)drySpeed1);
detail.Speed2 = Convert.ToInt32((short)drySpeed2);
detail.Speed3 = Convert.ToInt32((short)drySpeed3);
if (drySpeed1 > 50 || drySpeed2 > 50 || drySpeed3 > 50)
{
MessageBox.Show("速度值不能大于五十!");
@ -429,21 +462,28 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
LjPlanningPlcHelp.DownD1Recipe(recipes, steps);
DeviceMaterrialService.Save(materials);
detail.Id = 1;
break;
case 2:
LjPlanningPlcHelp.DownD2Recipe(recipes, steps);
DeviceMaterrialService.Save(materials);
detail.Id = 2;
break;
case 3:
LjPlanningPlcHelp.DownD3Recipe(recipes, steps);
DeviceMaterrialService.Save(materials);
detail.Id = 3;
break;
case 4:
LjPlanningPlcHelp.DownD4Recipe(recipes, steps);
DeviceMaterrialService.Save(materials);
detail.Id = 4;
break;
}
FreeSqlUnit.Instance.Update<DryDownloadDetail>().SetSource(detail).ExecuteUpdated();
//if (!DYComparePLC(recipes, steps, RadioE))
//{
// MessageBox.Show("干混产线下传数据不完整,请重新下传数据!");
@ -1369,7 +1409,9 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
DeviceId = ControlsHelper.DrySelect(RadioE),
MaterrialId = b,
Type = 1,
Code = StockMaterrialDbHelp.GetCodeById(b)
Code = StockMaterrialDbHelp.GetCodeById(b),
Weight = w,
Allowance = t
};
materials.Add(deviceMaterial1);

@ -0,0 +1,56 @@
using FreeSql.DataAnnotations;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Mesnac.Action.ChemicalWeighing.FreeDb
{
[Table(Name = "DryDownloadDetail")]
public class DryDownloadDetail
{
/// <summary>
/// 主键
/// </summary>
[Column(IsPrimary = true, IsIdentity = false)]
public int Id { get; set; }
public int Speed1 { get; set; }
public int Speed2 { get; set; }
public int Speed3 { get; set; }
public int WaitTime { get; set; }
public int OutDelayTime { get; set; }
}
[Table(Name = "WetDetail")]
public class WetDetail
{
/// <summary>
/// 主键
/// </summary>
[Column(IsPrimary = true, IsIdentity = false)]
public int Id { get; set; }
public float MixSpeed { get; set; }
public float GelPosA { get; set; }
public float GelPosB { get; set; }
public float GelPosC { get; set; }
public int GelWater { get; set; }
public int GelWait { get; set; }
public int GelCloseHeat { get; set; }
public float GelDelayTime { get; set; }
public float WetDryWei { get; set; }
public int WetMix { get; set; }
public float WetOutDelay { get; set; }
public float ManualWeight { get; set; }
public float ManualTolerance { get; set; }
}
}

@ -284,6 +284,7 @@
<Compile Include="FreeDb\DBEntity\Report\Report_WetMixer.cs" />
<Compile Include="FreeDb\DBEntity\Report\Report_WetMixer_Detail.cs" />
<Compile Include="FreeDb\DBEntity\WaterDownloadEntity.cs" />
<Compile Include="FreeDb\DryDownloadDetail.cs" />
<Compile Include="FreeDb\FreeSqlUnit.cs" />
<Compile Include="InterfaceDocking\DockingEntity\JsonReturnEntity.cs" />
<Compile Include="InterfaceDocking\DockingEntity\MaterialPlanSyncEntity.cs" />

Loading…
Cancel
Save