This commit is contained in:
@@ -232,6 +232,7 @@
|
|||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Timestamp.cs" />
|
<Compile Include="Timestamp.cs" />
|
||||||
<Compile Include="TravelRate.cs" />
|
<Compile Include="TravelRate.cs" />
|
||||||
|
<Compile Include="UnitMeterReading.cs" />
|
||||||
<Compile Include="UserType.cs" />
|
<Compile Include="UserType.cs" />
|
||||||
<Compile Include="util.cs" />
|
<Compile Include="util.cs" />
|
||||||
<Compile Include="Vendor.cs" />
|
<Compile Include="Vendor.cs" />
|
||||||
|
|||||||
29
AyaNovaQBI/UnitMeterReading.cs
Normal file
29
AyaNovaQBI/UnitMeterReading.cs
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace AyaNovaQBI
|
||||||
|
{
|
||||||
|
|
||||||
|
public class UnitMeterReading
|
||||||
|
{
|
||||||
|
public long Id { get; set; }
|
||||||
|
public uint Concurrency { get; set; }
|
||||||
|
public string Notes { get; set; }
|
||||||
|
public long Meter { get; set; }
|
||||||
|
public DateTime MeterDate { get; set; }
|
||||||
|
public long UnitId { get; set; }
|
||||||
|
public long? WorkOrderItemUnitId { get; set; }
|
||||||
|
|
||||||
|
public string UnitViz { get; set; }
|
||||||
|
|
||||||
|
public string WorkOrderViz { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}//eoc
|
||||||
|
|
||||||
|
}
|
||||||
@@ -6368,7 +6368,10 @@ namespace AyaNovaQBI
|
|||||||
{
|
{
|
||||||
//todo: fetch full unit record here to get lastmeter from it
|
//todo: fetch full unit record here to get lastmeter from it
|
||||||
// [HttpGet("unit/meter-reading/{id}")]
|
// [HttpGet("unit/meter-reading/{id}")]
|
||||||
s = s.Replace("~UNIT_METER~", u.UnitLastMeterViz);
|
var lastMeterResponse = await GetAsync($"unit/meter-reading/{u.UnitId}");
|
||||||
|
var lastMeterReading = woReponse.ObjectResponse["data"].ToObject<UnitMeterReading>();
|
||||||
|
if (lastMeterReading != null)
|
||||||
|
s = s.Replace("~UNIT_METER~", lastMeterReading.Meter.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user