| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162 |
- using System;
- using System.ComponentModel.DataAnnotations;
- using System.ComponentModel.DataAnnotations.Schema;
- using Abp.Domain.Entities.Auditing;
- using ContractService.Authorization.Users;
- using ContractService.CommonManager.States;
- using ContractService.Configuration;
- namespace ContractService.LegalContract
- {
- /// <summary>
- /// 合同关键点
- /// </summary>
- [Table("Ls_LegalContractKeyPoints")]
- public class LegalContractKeyPointInfo : FullAuditedEntity<string, User>
- {
- public LegalContractKeyPointInfo()
- {
- NotifyType = NotifyTypeDefinition.None;
- }
- /// <summary>
- /// 父关键点
- /// </summary>
- [MaxLength(IwbConsts.PrimaryKey)]
- public string ParentNo { get; set; }
- [ForeignKey("ParentNo")]
- public LegalContractKeyPointInfo ParentInfo { get; set; }
- /// <summary>
- /// 关键点名称
- /// </summary>
- [MaxLength(50)]
- public string Name { get; set; }
- /// <summary>
- /// 标签
- /// </summary>
- [MaxLength(200)]
- public string Tags { get; set; }
- /// <summary>
- /// 关键点描述
- /// </summary>
- [MaxLength(500)]
- public string Description { get; set; }
- /// <summary>
- /// 关键点等级
- /// </summary>
- public int KeyPointLevel { get; set; }
- /// <summary>
- /// 关键点状态
- /// </summary>
- public int KeyPointState { get; set; }
- /// <summary>
- /// 过期日期
- /// </summary>
- public DateTime? ExpireDate { get; set; }
- /// <summary>
- /// 开始报警日期
- /// </summary>
- public DateTime? AlarmDate { get; set; }
- public DateTime? ExecuteDate { get; set; }
- /// <summary>
- /// 父关键点执行后多少天过期
- /// </summary>
- public int ExpireDay { get; set; }
- /// <summary>
- /// 父关键点执行后多少天报警
- /// </summary>
- public int AlarmDay { get; set; }
- /// <summary>
- /// 路径
- /// </summary>
- [MaxLength(500)]
- public string KeyPointPath { get; set; }
- /// <summary>
- /// 合同信息
- /// </summary>
- [MaxLength(IwbConsts.PrimaryKey)]
- public string ContractNo { get; set; }
- [ForeignKey("ContractNo")]
- public LegalContractInfo ContractInfo { get; set; }
-
- [MaxLength(1000)]
- public string Remark { get; set; }
- public int NotifyType { get; set; }
- }
- public class NotifyTypeDefinition
- {
- public const int None = 0;
- public const int Alarm = 1;
- public const int Expire = 2;
- }
- /// <summary>
- /// 关键点状态定义
- /// </summary>
- public class LegalKeyPointStateDefinition
- {
- /// <summary>
- /// 新建
- /// </summary>
- public const int New = 1;
- /// <summary>
- /// 待执行
- /// </summary>
- public const int Run = 2;
- /// <summary>
- /// 已执行
- /// </summary>
- public const int Executed = 3;
- /// <summary>
- /// 挂起
- /// </summary>
- public const int Hang = 4;
- /// <summary>
- /// 结束
- /// </summary>
- public const int End = 5;
- public static string GetName(int definition, IStatesManager statesManager)
- {
- return statesManager.GetDisplayValue("KeyPoint", "State", definition + "");
- }
- }
- /// <summary>
- /// 关键点级别定义
- /// </summary>
- public class LegalKeyPointLevelDefinition
- {
- /// <summary>
- /// 一般
- /// </summary>
- public const int Common= 1;
- /// <summary>
- /// 重要
- /// </summary>
- public const int Important = 2;
- /// <summary>
- /// 紧急
- /// </summary>
- public const int Urgent = 3;
- public static string GetName(int definition, IStatesManager statesManager)
- {
- return statesManager.GetDisplayValue("KeyPoint", "Level", definition + "");
- }
- }
-
- }
|