ibms-dome/FrontendWebApi/Models/Operation.cs

182 lines
6.2 KiB
C#
Raw Permalink Normal View History

using Microsoft.AspNetCore.Http;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace FrontendWebApi.Models
{
public enum OperationRecordStatusEnum : byte
{
NoneComplete = 0, //未完成
Complete = 1, //完成
NoneCompleteExpired = 2, //未完成-過期
CompleteExpired = 3, //完成-過期
}
public enum OperationRecordWorkTypeEnum : byte
{
Clearn = 0, //清潔
Inspection = 1, //巡檢
Fix = 2, //維修
}
public class Operation_Firm : Actor
{
public int id { get; set; }
public byte deleted { get; set; }
public string device_system_category_layer2 { get; set; }//系統類別(第2層)
public string device_system_category_layer3 { get; set; }//系統類別(第3層)
public string name { get; set; }//名称
public string contact_person { get; set; }//联络人
public string phone { get; set; }//电话
public string email { get; set; }//Email
public string tax_id_number { get; set; }//统一编号
public string remark { get; set; }//备注
public string system_key { get; set; }//類別名稱
}
public class OperationFindList
{
2022-11-12 11:26:43 +08:00
public int id { get; set; }
public string serial_number { get; set; } //表单号
public DateTime? start_created_at { get; set; }//开始建立时间
public DateTime? end_created_at { get; set; }//结束建立时间
//public bool today { get; set; }//今天建立时间
//public bool yesterday { get; set; }//昨天建立时间
public List<string> main_system_tag { get; set; }//大类tag
public List<string> sub_system_tag { get; set; }//小类tag
public byte? work_type { get; set; } // 1:保養, 2:維修
public string formId { get; set; } //異常代碼
}
2022-11-05 11:26:34 +08:00
public class BuildingList
{
2022-11-12 11:26:43 +08:00
public string device_area_tag { get; set; }
2022-11-05 11:26:34 +08:00
public string device_building_tag { get; set; }
public string device_floor_tag { get; set; }
2022-11-12 11:26:43 +08:00
public string area_name { get; set; }
public string building_name { get; set; }
public string main_system_tag { get; set; }//大类tag
public string sub_system_tag { get; set; }//小类tag
2022-12-07 09:25:43 +08:00
public List<string> list_sub_system_tag { get; set; }
}
2022-11-05 11:26:34 +08:00
public class Operation_Record : Actor
{
2022-11-05 11:26:34 +08:00
public int id { get; set; }
public byte? deleted { get; set; }
2022-11-05 11:26:34 +08:00
public string formId { get; set; }
public string location { get; set; }
public string location_code { get; set; }
public string device_system_category_layer2 { get; set; }
public string device_system_category_layer3 { get; set; }
public byte work_type { get; set; }
public string error_code { get; set; }
public string fix_do { get; set; }
public string fix_do_code { get; set; }
public int fix_firm { get; set; }
public byte status { get; set; }
public string work_person_id { get; set; }
public DateTime? start_time { get; set; }
public DateTime? end_time { get; set; }
public DateTime? work_time { get; set; }
public DateTime? finish_time { get; set; }
2022-11-05 11:26:34 +08:00
public string notice { get; set; }
public string description { get; set; }
public string work_type_name
{
get
{
2022-11-05 11:26:34 +08:00
Dictionary<byte, string> name = new Dictionary<byte, string>()
{
2022-11-05 11:26:34 +08:00
{ 1 , "保養" },
{ 2 , "維修" }
};
2022-11-05 11:26:34 +08:00
return name[work_type];
}
2022-11-05 11:26:34 +08:00
}
public string status_name
{
get
{
2022-11-05 11:26:34 +08:00
Dictionary<byte, string> name = new Dictionary<byte, string>()
{
{ 0, "未完成"},
{ 1, "完成"},
{ 2, "未完成-過期"},
2022-11-05 11:26:34 +08:00
{ 3, "完成-過期"}
};
2022-11-05 11:26:34 +08:00
return name[status];
}
2022-11-05 11:26:34 +08:00
}
public string device_name { get; }
public string device_area_tag { get; }
public string device_building_tag { get; }
public string device_floor_tag { get; }
2022-11-05 11:26:34 +08:00
public string user_full_name { get; }
public List<Operation_Record_File> lorf { get; set; }
}
2022-11-05 11:26:34 +08:00
public class Operation_Record_File : Actor
{
2022-11-05 11:26:34 +08:00
public int id { get; set; }
public byte deleted { get; set; }
public int record_id { get; set; }
public IFormFile file { get; set; }
public string ori_file_name { get; set; }
public string save_file_name { get; set; }
}
public class Find_Sub_List
{
public List<string> main_system_tag { get; set; }
}
public class ExportExcel
{
public byte? work_type { get; set; }
public DateTime? startdate { get; set; }
public DateTime? enddate { get; set; }
}
public class OperationLog
{
public int id { get; set; }
public string user_guid { get; set;}
public string building_tag { get; set; }
public string main_system_tag { get; set;}
public string sub_system_tag { get; set;}
public string floor_tag { get; set;}
public string device_guid { get; set;}
public short operation_type { get; set;}
public string parameter { get; set;}
public string action_name { get; set;}
public string value { get; set;}
public DateTime? created_at { get; set;}
}
public class OperationLogOutput : OperationLog {
public string user_name { get; set; }
public string content { get; set; }
}
public class OperationLogInput {
public string start_time { get; set; }
public string end_time { get; set; }
public string building_tag{ get; set; }
public short operation_type { get; set; }
}
public class OperationLogExportInput {
public bool isNiagara { get; set; }
public string exportOpeTypeName { get; set; }
public PageResult<OperationLogInput> listInput { get; set; }
public List<OperationLogOutput> exportList { get; set; }
}
}