2022-11-01 18:57:24 +08:00
|
|
|
|
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, //維修
|
|
|
|
|
}
|
|
|
|
|
|
2022-11-04 09:41:50 +08:00
|
|
|
|
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; }
|
2022-11-04 09:41:50 +08:00
|
|
|
|
public string serial_number { get; set; } //表单号
|
|
|
|
|
public DateTime? start_created_at { get; set; }//开始建立时间
|
|
|
|
|
public DateTime? end_created_at { get; set; }//结束建立时间
|
2022-11-11 17:39:40 +08:00
|
|
|
|
//public bool today { get; set; }//今天建立时间
|
|
|
|
|
//public bool yesterday { get; set; }//昨天建立时间
|
2022-11-30 18:11:37 +08:00
|
|
|
|
public List<string> main_system_tag { get; set; }//大类tag
|
|
|
|
|
public List<string> sub_system_tag { get; set; }//小类tag
|
2022-11-12 15:05:42 +08:00
|
|
|
|
public byte? work_type { get; set; } // 1:保養, 2:維修
|
2022-11-04 09:41:50 +08:00
|
|
|
|
}
|
|
|
|
|
|
2022-11-05 11:26:34 +08:00
|
|
|
|
public class BuildingList
|
2022-11-01 18:57:24 +08:00
|
|
|
|
{
|
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-01 18:57:24 +08:00
|
|
|
|
}
|
|
|
|
|
|
2022-11-05 11:26:34 +08:00
|
|
|
|
public class Operation_Record : Actor
|
2022-11-01 18:57:24 +08:00
|
|
|
|
{
|
2022-11-05 11:26:34 +08:00
|
|
|
|
public int id { get; set; }
|
2022-11-12 18:34:24 +08:00
|
|
|
|
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; }
|
2022-11-12 18:34:24 +08:00
|
|
|
|
public string work_person_id { get; set; }
|
2022-12-03 08:38:31 +08:00
|
|
|
|
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
|
|
|
|
|
{
|
2022-11-01 18:57:24 +08:00
|
|
|
|
get
|
|
|
|
|
{
|
2022-11-05 11:26:34 +08:00
|
|
|
|
Dictionary<byte, string> name = new Dictionary<byte, string>()
|
2022-11-01 18:57:24 +08:00
|
|
|
|
{
|
2022-11-05 11:26:34 +08:00
|
|
|
|
{ 1 , "保養" },
|
|
|
|
|
{ 2 , "維修" }
|
2022-11-01 18:57:24 +08:00
|
|
|
|
};
|
2022-11-05 11:26:34 +08:00
|
|
|
|
return name[work_type];
|
2022-11-01 18:57:24 +08:00
|
|
|
|
}
|
2022-11-05 11:26:34 +08:00
|
|
|
|
}
|
|
|
|
|
public string status_name
|
2022-11-01 18:57:24 +08:00
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
2022-11-05 11:26:34 +08:00
|
|
|
|
Dictionary<byte, string> name = new Dictionary<byte, string>()
|
2022-11-01 18:57:24 +08:00
|
|
|
|
{
|
|
|
|
|
{ 0, "未完成"},
|
|
|
|
|
{ 1, "完成"},
|
|
|
|
|
{ 2, "未完成-過期"},
|
2022-11-05 11:26:34 +08:00
|
|
|
|
{ 3, "完成-過期"}
|
2022-11-01 18:57:24 +08:00
|
|
|
|
};
|
2022-11-05 11:26:34 +08:00
|
|
|
|
return name[status];
|
2022-11-01 18:57:24 +08:00
|
|
|
|
}
|
2022-11-05 11:26:34 +08:00
|
|
|
|
}
|
|
|
|
|
public string device_name { get; }
|
2022-11-14 13:36:02 +08:00
|
|
|
|
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-01 18:57:24 +08:00
|
|
|
|
}
|
|
|
|
|
|
2022-11-05 11:26:34 +08:00
|
|
|
|
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; }
|
2022-11-01 18:57:24 +08:00
|
|
|
|
}
|
2022-11-30 18:11:37 +08:00
|
|
|
|
|
|
|
|
|
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; }
|
|
|
|
|
}
|
2022-11-01 18:57:24 +08:00
|
|
|
|
}
|