121 lines
4.1 KiB
C#
121 lines
4.1 KiB
C#
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
|
|
{
|
|
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 string main_system_tag { get; set; }//大类tag
|
|
public string sub_system_tag { get; set; }//小类tag
|
|
public byte work_type { get; set; } // 1:保養, 2:維修
|
|
}
|
|
|
|
public class BuildingList
|
|
{
|
|
public string device_building_tag { get; set; }
|
|
public string device_floor_tag { get; set; }
|
|
public string full_name { get; set; }
|
|
}
|
|
|
|
public class Operation_Record : Actor
|
|
{
|
|
public int id { get; set; }
|
|
public byte deleted { get; set; }
|
|
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 int 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; }
|
|
public string notice { get; set; }
|
|
public string description { get; set; }
|
|
public string work_type_name
|
|
{
|
|
get
|
|
{
|
|
Dictionary<byte, string> name = new Dictionary<byte, string>()
|
|
{
|
|
{ 1 , "保養" },
|
|
{ 2 , "維修" }
|
|
};
|
|
return name[work_type];
|
|
}
|
|
}
|
|
public string status_name
|
|
{
|
|
get
|
|
{
|
|
Dictionary<byte, string> name = new Dictionary<byte, string>()
|
|
{
|
|
{ 0, "未完成"},
|
|
{ 1, "完成"},
|
|
{ 2, "未完成-過期"},
|
|
{ 3, "完成-過期"}
|
|
};
|
|
return name[status];
|
|
}
|
|
}
|
|
public string device_name { get; }
|
|
public string user_full_name { get; }
|
|
public List<Operation_Record_File> lorf { get; set; }
|
|
}
|
|
|
|
public class Operation_Record_File : Actor
|
|
{
|
|
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; }
|
|
}
|
|
}
|