|
|
|
|
@ -2,6 +2,7 @@ |
|
|
|
|
using System.Collections.Generic; |
|
|
|
|
using System.Linq; |
|
|
|
|
using System.Text; |
|
|
|
|
using System.Text.Json; |
|
|
|
|
using System.Text.Json.Serialization; |
|
|
|
|
using System.Threading.Tasks; |
|
|
|
|
|
|
|
|
|
@ -231,14 +232,11 @@ namespace Common.Shared.Application.SafetyFirePro.ResponseDto |
|
|
|
|
/// <summary> |
|
|
|
|
/// 工单时间轴实体类 |
|
|
|
|
/// </summary> |
|
|
|
|
/// <summary> |
|
|
|
|
/// 工单时间轴节点实体(data数组元素) |
|
|
|
|
/// </summary> |
|
|
|
|
public class WorkOrderTimelineDto |
|
|
|
|
{ |
|
|
|
|
/// <summary> |
|
|
|
|
/// 工单id |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("orderId")] |
|
|
|
|
public long? OrderId { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 时间轴id |
|
|
|
|
/// </summary> |
|
|
|
|
@ -246,45 +244,491 @@ namespace Common.Shared.Application.SafetyFirePro.ResponseDto |
|
|
|
|
public long? TimelineId { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 节点类型 |
|
|
|
|
/// 节点类型(示例:"办结工单"、"登记派发工单") |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("nodeType")] |
|
|
|
|
public string? NodeType { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 节点描述 |
|
|
|
|
/// 节点描述(示例:"办结工单,单号:2350"、"保洁") |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("nodeDesc")] |
|
|
|
|
public string? NodeDesc { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 处理图片路径 |
|
|
|
|
/// 节点详情(示例:"【管理员】办结工单,单号:2350") |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("nodeDetail")] |
|
|
|
|
public string? NodeDetail { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 处理图片路径(可为null,无图片时返回null) |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("nodeImg")] |
|
|
|
|
public string? NodeImg { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 处理视频路径 |
|
|
|
|
/// 处理视频路径(可为null,无视频时返回null) |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("nodeMp4")] |
|
|
|
|
public string? NodeMp4 { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 工单状态 |
|
|
|
|
/// 创建人ID |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("createBy")] |
|
|
|
|
public long? CreateBy { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 创建时间(JSON格式:"yyyy-MM-dd HH:mm:ss") |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("createTime")] |
|
|
|
|
[JsonConverter(typeof(FixedPatternDateTimeConverter))] |
|
|
|
|
public DateTime? CreateTime { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 工单状态(示例:"11"表示办结,"1"表示已派发) |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("status")] |
|
|
|
|
public string? Status { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 创建人 |
|
|
|
|
/// 工单id |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("createBy")] |
|
|
|
|
public long? CreateBy { get; set; } |
|
|
|
|
[JsonPropertyName("orderId")] |
|
|
|
|
public long? OrderId { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 创建时间 |
|
|
|
|
/// 操作人员姓名(示例:"管理员") |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("createTime")] |
|
|
|
|
public DateTime? CreateTime { get; set; } |
|
|
|
|
[JsonPropertyName("operaterName")] |
|
|
|
|
public string? OperaterName { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 节点颜色(示例:"#909399"、"#E6A23C",用于前端显示) |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("nodeColor")] |
|
|
|
|
public string? NodeColor { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 效率评分(可为null,无评分时返回null) |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("assessScoreXl")] |
|
|
|
|
public decimal? AssessScoreXl { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 服务评分(可为null,无评分时返回null) |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("assessScoreFw")] |
|
|
|
|
public decimal? AssessScoreFw { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 质量评分(可为null,无评分时返回null) |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("assessScoreZl")] |
|
|
|
|
public decimal? AssessScoreZl { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 评价内容(可为null,无评价时返回null) |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("assessContent")] |
|
|
|
|
public string? AssessContent { get; set; } |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#region 危险施工作业响应体 |
|
|
|
|
|
|
|
|
|
public class LedgerDto |
|
|
|
|
{ |
|
|
|
|
/// <summary> |
|
|
|
|
/// 当前页码 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("current_page")] |
|
|
|
|
public int CurrentPage { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 符合查询条件的数据总数 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("total")] |
|
|
|
|
public int Total { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 作业票列表 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("data")] |
|
|
|
|
public List<WorkTicket> Data { get; set; } |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public class WorkTicket |
|
|
|
|
{ |
|
|
|
|
/// <summary> |
|
|
|
|
/// 作业详细地点 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("address")] |
|
|
|
|
public string Address { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 作业票申请信息 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("applicant_info")] |
|
|
|
|
public ApplicantInfo ApplicantInfo { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 作业票审批过程信息 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("approval_tasks")] |
|
|
|
|
public List<ApprovalTask> ApprovalTasks { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 作业活动部门信息 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("branch")] |
|
|
|
|
public Branch Branch { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 作业活动内容 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("content")] |
|
|
|
|
public string Content { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 作业教育人信息 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("education_info")] |
|
|
|
|
public EducationInfo EducationInfo { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 计划结束时间 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("end_at")] |
|
|
|
|
public string EndAt { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 实际结束时间 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("finish_time")] |
|
|
|
|
public string FinishTime { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 作业ID |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("id")] |
|
|
|
|
public int Id { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 作业名称 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("name")] |
|
|
|
|
public string Name { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 作业编号 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("number")] |
|
|
|
|
public string Number { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 作业人员信息 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("operators")] |
|
|
|
|
public List<Operator> Operators { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 作业负责人信息 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("principal_info")] |
|
|
|
|
public PrincipalInfo PrincipalInfo { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 实际开始作业时间 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("real_start_at")] |
|
|
|
|
public string RealStartAt { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 作业地点id |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("region_id")] |
|
|
|
|
public int RegionId { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 作业地点信息 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("region")] |
|
|
|
|
public Region Region { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 作业检查信息 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("Supervises")] |
|
|
|
|
public List<Supervise> Supervises { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 作业计划开始时间 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("start_at")] |
|
|
|
|
public string StartAt { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 作业状态 |
|
|
|
|
/// 1待审批,2待作业前检查,3作业中,4抽作业前检查,6作业结束, |
|
|
|
|
/// 7延期结束,8超时结束,11审批不通过,12作业中止,13强行结束 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("status")] |
|
|
|
|
public int Status { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 作业类型 |
|
|
|
|
/// 1动火,2高处,3受限空间,4临时用电,5盲板抽堵, |
|
|
|
|
/// 6断路,7动土吊装,8吊装,9爆破 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("type")] |
|
|
|
|
public int Type { get; set; } |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public class ApplicantInfo |
|
|
|
|
{ |
|
|
|
|
/// <summary> |
|
|
|
|
/// 申请ID |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("id")] |
|
|
|
|
public int Id { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 申请人id |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("uid")] |
|
|
|
|
public int Uid { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 申请人姓名 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("name")] |
|
|
|
|
public string Name { get; set; } |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public class ApprovalTask |
|
|
|
|
{ |
|
|
|
|
/// <summary> |
|
|
|
|
/// 审批ID |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("id")] |
|
|
|
|
public int Id { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 审批意见 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("infos")] |
|
|
|
|
public string Infos { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 审批状态 0待审批,1同意,2不同意 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("status")] |
|
|
|
|
public int Status { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 审批人信息 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("user")] |
|
|
|
|
public ApprovalUser User { get; set; } |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public class ApprovalUser |
|
|
|
|
{ |
|
|
|
|
/// <summary> |
|
|
|
|
/// 审批人附加信息 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("extras")] |
|
|
|
|
public Extras Extras { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 审批人所在部门 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("branch")] |
|
|
|
|
public List<UserBranchWrapper> Branch { get; set; } |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public class Extras |
|
|
|
|
{ |
|
|
|
|
/// <summary> |
|
|
|
|
/// 审批人姓名 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("name")] |
|
|
|
|
public string Name { get; set; } |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public class UserBranchWrapper |
|
|
|
|
{ |
|
|
|
|
[JsonPropertyName("Branch")] |
|
|
|
|
public Branch Branch { get; set; } |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public class Branch |
|
|
|
|
{ |
|
|
|
|
/// <summary> |
|
|
|
|
/// 部门ID |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("id")] |
|
|
|
|
public int Id { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 部门名称 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("name")] |
|
|
|
|
public string Name { get; set; } |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public class EducationInfo |
|
|
|
|
{ |
|
|
|
|
/// <summary> |
|
|
|
|
/// 作业教育人姓名 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("name")] |
|
|
|
|
public string Name { get; set; } |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public class Operator |
|
|
|
|
{ |
|
|
|
|
/// <summary> |
|
|
|
|
/// 作业人信息 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("user_info")] |
|
|
|
|
public UserInfo UserInfo { get; set; } |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public class PrincipalInfo |
|
|
|
|
{ |
|
|
|
|
/// <summary> |
|
|
|
|
/// 作业负责人姓名 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("name")] |
|
|
|
|
public string Name { get; set; } |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public class Region |
|
|
|
|
{ |
|
|
|
|
/// <summary> |
|
|
|
|
/// 作业地点名称 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("name")] |
|
|
|
|
public string Name { get; set; } |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public class Supervise |
|
|
|
|
{ |
|
|
|
|
/// <summary> |
|
|
|
|
/// 作业检查时间 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("check_at")] |
|
|
|
|
public string CheckAt { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 检查情况说明 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("infos")] |
|
|
|
|
public string Infos { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 安全措施及检查情况 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("measure_check_content")] |
|
|
|
|
public List<MeasureCheckContent> MeasureCheckContent { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 气温 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("temperature")] |
|
|
|
|
public string Temperature { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 检查人信息 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("user_info")] |
|
|
|
|
public UserInfo UserInfo { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 天气情况 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("weather")] |
|
|
|
|
public string Weather { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 风力等级 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("wind")] |
|
|
|
|
public string Wind { get; set; } |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public class MeasureCheckContent |
|
|
|
|
{ |
|
|
|
|
/// <summary> |
|
|
|
|
/// 安全措施内容 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("infos")] |
|
|
|
|
public string Infos { get; set; } |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// 检查结果,1符合,0不符合 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("radio")] |
|
|
|
|
public int Radio { get; set; } |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public class UserInfo |
|
|
|
|
{ |
|
|
|
|
/// <summary> |
|
|
|
|
/// 姓名 |
|
|
|
|
/// </summary> |
|
|
|
|
[JsonPropertyName("name")] |
|
|
|
|
public string Name { get; set; } |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#endregion 危险施工作业响应体 |
|
|
|
|
|
|
|
|
|
public sealed class FixedPatternDateTimeConverter : JsonConverter<DateTime?> |
|
|
|
|
{ |
|
|
|
|
private const string Pattern = "yyyy-MM-dd HH:mm:ss"; |
|
|
|
|
|
|
|
|
|
public override DateTime? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) |
|
|
|
|
{ |
|
|
|
|
if (reader.TokenType == JsonTokenType.Null) return null; |
|
|
|
|
|
|
|
|
|
if (reader.TokenType == JsonTokenType.String) |
|
|
|
|
{ |
|
|
|
|
var s = reader.GetString(); |
|
|
|
|
if (string.IsNullOrWhiteSpace(s)) return null; |
|
|
|
|
|
|
|
|
|
// 先按固定格式 |
|
|
|
|
if (DateTime.TryParseExact( |
|
|
|
|
s, Pattern, System.Globalization.CultureInfo.InvariantCulture, |
|
|
|
|
System.Globalization.DateTimeStyles.AssumeLocal, out var dt)) |
|
|
|
|
return dt; |
|
|
|
|
|
|
|
|
|
// 退化:再尝试系统通用解析(兼容 ISO8601) |
|
|
|
|
if (DateTime.TryParse(s, out dt)) |
|
|
|
|
return dt; |
|
|
|
|
|
|
|
|
|
throw new JsonException($"Invalid date format: {s}"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 可选:数字视为 Unix 时间戳(秒/毫秒) |
|
|
|
|
if (reader.TokenType == JsonTokenType.Number && reader.TryGetInt64(out var num)) |
|
|
|
|
{ |
|
|
|
|
var dto = num > 3_000_000_000 |
|
|
|
|
? DateTimeOffset.FromUnixTimeMilliseconds(num) |
|
|
|
|
: DateTimeOffset.FromUnixTimeSeconds(num); |
|
|
|
|
return dto.LocalDateTime; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
throw new JsonException("Unexpected token for DateTime."); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public override void Write(Utf8JsonWriter writer, DateTime? value, JsonSerializerOptions options) |
|
|
|
|
{ |
|
|
|
|
if (value.HasValue) |
|
|
|
|
writer.WriteStringValue(value.Value.ToString(Pattern)); |
|
|
|
|
else |
|
|
|
|
writer.WriteNullValue(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |