/// <summary> /// 创建APU序号件 /// </summary> /// <param name="installDate">初始安装日期</param> /// <param name="pnReg">附件</param> /// <param name="sn">序号</param> /// <returns>APU序号件</returns> public static APUReg CreateAPUReg( DateTime installDate, PnReg pnReg, string sn) { var apuReg = new APUReg { InstallDate = installDate, Sn = sn, }; apuReg.GenerateNewIdentity(); apuReg.SetPnReg(pnReg); apuReg.SetSnStatus(SnStatus.装机); apuReg.SetIsLife(false, false, 0, 0); apuReg.SetMonitorStatus((OilMonitorStatus.正常)); apuReg.CreateDate = DateTime.Now; apuReg.UpdateDate = DateTime.Now; return apuReg; }
/// <summary> /// 更新APU序号件 /// </summary> /// <param name="installDate">初始安装日期</param> /// <param name="pnReg">附件</param> /// <param name="sn">序号</param> /// <returns>APU序号件</returns> public static APUReg UpdateAPUReg( DateTime installDate, PnReg pnReg, string sn) { var apuReg = new APUReg { InstallDate = installDate, Sn = sn, }; apuReg.GenerateNewIdentity(); apuReg.SetPnReg(pnReg); apuReg.UpdateDate = DateTime.Now; return apuReg; }