This commit is contained in:
2024-03-26 15:56:31 +08:00
parent 634e8b71ab
commit 0855ae42cd
547 changed files with 94818 additions and 60463 deletions

View File

@ -1,4 +1,5 @@
using System;
using DocumentFormat.OpenXml.Spreadsheet;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
@ -65,6 +66,7 @@ namespace IronIntel.Contractor.Machines
/// 前端选择的时区的分钟偏移
/// </summary>
public int OffsetMinute { get; set; }
public string TimeZone { get; set; }
public string DataSource { get; set; }
}

View File

@ -1,4 +1,5 @@
using Foresight.Fleet.Services.Asset;
using DocumentFormat.OpenXml.Office2010.CustomUI;
using Foresight.Fleet.Services.Asset;
using Foresight.ServiceModel;
using System;
using System.Collections.Generic;
@ -8,78 +9,24 @@ using System.Threading.Tasks;
namespace IronIntel.Contractor.Machines
{
public class AssetBasicItem
public class AssetBasicItem : AssetBasicInfo
{
public long ID { get; set; }
public string Name { get; set; }
public string Name2 { get; set; }
public string MakeName { get; set; }
public string ModelName { get; set; }
private double _EngineHours;
public double EngineHours
{
get
{
return _EngineHours;
}
set
{
value = value > 0 ? value : 0;
_EngineHours = Math.Round(value, 2);
}
}
public string CalampDeviceAirID { get; set; }//PairedDeviceSN
public bool TelematicsEnabled { get; set; }
public bool Hide { get; set; }
public bool OnRoad { get; set; }
public bool Attachment { get; set; }
public bool Preloaded { get; set; }
public int MakeYear { get; set; }
public string DealerID { get; set; }
public string Dealer { get; set; }
public string ContractorID { get; set; }
public string Contractor { get; set; }
public string TypeName { get; set; }
public int ModelID { get; set; }
public int TypeID { get; set; }
public int MakeID { get; set; }
public string VIN { get; set; }
public DateTime? EngineHoursDate { get; set; }
public AssetShareStatus ShareStatus { get; set; }
public DateTime? AddedTime { get; set; }
public DateTime? AddedLocalTime { get; set; }
public double Odometer;
public string OdometerUOM { get; set; }
public DateTime? OdometerDate { get; set; }
public string Description { get; set; }
public string AcquisitionType { get; set; }
public string PMPlans { get; set; }
public string AssetGroups { get; set; }
public string Jobsites { get; set; }
public AssetCustomStatus CustomStatus { get; set; }
public string DisplayName
{
get
{
//DisplayName取值顺序为Name2,Name,VIN,ID用于前端显示
string name = Name2;
if (string.IsNullOrWhiteSpace(name))
name = Name;
if (string.IsNullOrWhiteSpace(name))
name = VIN;
if (string.IsNullOrWhiteSpace(name))
name = ID.ToString();
return name;
}
}
private const char SPLITCHAR = (char)175;
public string AddedTimeStr { get { return (AddedLocalTime == null || AddedLocalTime.Value <= Helper.DBMinDateTime) ? "" : AddedLocalTime.Value.ToShortDateString(); } }
public string EngineHoursDateStr { get { return (EngineHoursDate == null || EngineHoursDate.Value <= Helper.DBMinDateTime) ? "" : EngineHoursDate.Value.ToShortDateString(); } }
public string EngineHoursDateTimeStr { get { return (EngineHoursDate == null || EngineHoursDate.Value <= Helper.DBMinDateTime) ? "" : EngineHoursDate.Value.ToString(); } }
public string OdometerDateStr { get { return (OdometerDate == null || OdometerDate.Value <= Helper.DBMinDateTime) ? "" : OdometerDate.Value.ToShortDateString(); } }
public override string ToString()
{
StringBuilder sb = new StringBuilder();
sb.Append(base.ToString());
sb.Append(SPLITCHAR + AddedTimeStr);
sb.Append(SPLITCHAR + EngineHoursDateStr);
sb.Append(SPLITCHAR + EngineHoursDateTimeStr);
sb.Append(SPLITCHAR + OdometerDateStr);
return sb.ToString();
}
}

View File

@ -80,6 +80,7 @@ namespace IronIntel.Contractor.Machines
/// 前端选择的时区的分钟偏移
/// </summary>
public int OffsetMinute { get; set; }
public string TimeZone { get; set; }
public string DataSource { get; set; }
}
public class CalampOdometerInfo