干混机报错

dep
我叫锄头 11 months ago
parent 81583566a1
commit 47a9a79a39

@ -289,8 +289,9 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
if (UserJudge.IsNormalUser()) if (UserJudge.IsNormalUser())
{ {
ReportReadDb.ReadFeededDry();
ReportReadDb.ReadReport(); ReportReadDb.ReadReport();
ReportReadDb.ReadFeededDry();
} }

@ -1,5 +1,5 @@
using Mesnac.Action.Base; using Mesnac.Action.Base;
using Mesnac.Action.ChemicalWeighing.MainDetailControl.Entity;
using Mesnac.Codd.Session; using Mesnac.Codd.Session;
using Mesnac.Controls.Default; using Mesnac.Controls.Default;
@ -115,9 +115,9 @@ namespace Mesnac.Action.ChemicalWeighing.Report.DryMixer
dbHelper.ClearParameter(); dbHelper.ClearParameter();
string sql = $"select t1.actCode, t1.mixBatch as 批次,t1.mixStep as 步号," + string sql = $"select t1.actCode, t1.mixBatch as 批次,t1.mixStep as 步号,t1.actCode as 动作,\r\n " +
$"t2.ActionName as 动作,t1.mixTime as 时间,t1.mixTemp as 温度," + $" t1.mixTime as 时间,t1.mixTemp as 温度,t1.mixSpeed as 速度, t1.recordTime as 记录时间 from" +
$"t1.mixSpeed as 速度 from Report_DryMixer_Detail t1\r\nleft join ActionCode t2 on t2.Code=t1.actCode\r\nwhere t2.DeviceUnitId=1 and t1.reportId='{lR_planID}' order by actCode"; $" Report_DryMixer_Detail t1\r\n\r\nwhere t1.reportId='{lR_planID}' order by actCode";
dbHelper.CommandText = sql.ToString(); dbHelper.CommandText = sql.ToString();
dbHelper.CommandType = System.Data.CommandType.Text; dbHelper.CommandType = System.Data.CommandType.Text;

@ -156,7 +156,6 @@ namespace Mesnac.Action.ChemicalWeighing.Report
DB2107Helper dB2107Helper = new DB2107Helper(); DB2107Helper dB2107Helper = new DB2107Helper();
NormalStatusEntity normal = dB2107Helper.NormalStatus; NormalStatusEntity normal = dB2107Helper.NormalStatus;
if (normal.RdyRpt_D1) if (normal.RdyRpt_D1)
@ -350,10 +349,7 @@ namespace Mesnac.Action.ChemicalWeighing.Report
recordTime = DateTime.Now recordTime = DateTime.Now
}); });
} }
else
{
break;
}
} }
foreach (var item in dryer.Mix) foreach (var item in dryer.Mix)
@ -363,6 +359,7 @@ namespace Mesnac.Action.ChemicalWeighing.Report
lsMix.Add(new Report_DryMixer_Detail() lsMix.Add(new Report_DryMixer_Detail()
{ {
reportId = dry.reportId, reportId = dry.reportId,
actCode = item.ActCode,
eqNo = item.EqNo, eqNo = item.EqNo,
mixBatch = item.MixBatch, mixBatch = item.MixBatch,
mixStep = item.MixStep, mixStep = item.MixStep,
@ -370,13 +367,13 @@ namespace Mesnac.Action.ChemicalWeighing.Report
mixTemp = item.MixTemp, mixTemp = item.MixTemp,
mixTime = item.MixTime, mixTime = item.MixTime,
recordTime = DateTime.Now recordTime = DateTime.Now
}); }) ;
} }
} }
if (lsDos.Any()) if (lsDos.Any())
{ {
dry.Batch=lsDos.Select(x=>x.batch).First(); dry.Batch=lsDos.Where(x=>x.batch>0).Select(x=>x.batch).First();
FreeSqlUnit.Instance.Insert(dry).ExecuteAffrows(); FreeSqlUnit.Instance.Insert(dry).ExecuteAffrows();
FreeSqlUnit.Instance.Insert(lsDos).ExecuteAffrows(); FreeSqlUnit.Instance.Insert(lsDos).ExecuteAffrows();
FreeSqlUnit.Instance.Insert(lsMix).ExecuteAffrows(); FreeSqlUnit.Instance.Insert(lsMix).ExecuteAffrows();

@ -30,9 +30,11 @@ namespace DataBlockHelper.Entity.DB2106Entity
private byte[] Bytes; private byte[] Bytes;
int start; int start;
int mixStart;
public Dryer_(int start, byte[] bytes) public Dryer_(int start, byte[] bytes)
{ {
this.start = start; this.start = start;
mixStart = start + 286;
this.Bytes = bytes; this.Bytes = bytes;
} }
@ -58,7 +60,7 @@ namespace DataBlockHelper.Entity.DB2106Entity
{ {
List<Report_MixE> ListE = new List<Report_MixE>(); List<Report_MixE> ListE = new List<Report_MixE>();
var content = Bytes.Skip(start).Take(180).ToArray(); var content = Bytes.Skip(mixStart).Take(180).ToArray();
for (int i = 0; i < 10; i++) for (int i = 0; i < 10; i++)
{ {

Loading…
Cancel
Save