using OpenAuth.Repository.Domain; using SqlSugar; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace OpenAuth.App.Response { /// ///无人机案件 /// [SugarTable("drone_caseinfo")] public partial class Sugar_Drone_caseinfo { public Sugar_Drone_caseinfo() { } /// /// 初始化 /// /// /// public void Init(SysUser user, SqlSugarClient db) { //主键 this.Id = Guid.NewGuid().ToString(); //创建人和创建时间 this.createtime = DateTime.Now; this.createuser = user.Id.ToString(); this.createusername = user.Name; //案件是否关闭,默认0 未关闭 this.is_closed = 0; //是否删除,默认0 未删除 this.is_delete = 0; //是否判读 this.is_intact = 0; //是否退回 this.is_improve = 0; drawbackcount = 0; //处理状态 this.handle_status_id = 0; this.handle_status_name = "未办理"; // 案件是否已查看 is_checked = 0; //时间戳标识案件编号 this.case_no = DateTime.Now.ToString("yyyyMMddHHmmssffff"); if (string.IsNullOrEmpty(case_description)) case_description = ""; if (string.IsNullOrEmpty(address)) address = ""; if (string.IsNullOrEmpty(typeid)) typeid = ""; if (string.IsNullOrEmpty(typename)) typename = ""; if (string.IsNullOrEmpty(countyid)) countyid = ""; if (string.IsNullOrEmpty(countyname)) countyname = ""; if (string.IsNullOrEmpty(streetid)) streetid = ""; if (string.IsNullOrEmpty(streetname)) streetname = ""; if (string.IsNullOrEmpty(communityid)) communityid = ""; if (string.IsNullOrEmpty(communityname)) communityname = ""; InitOther(db); } /// /// 修改 /// /// /// public void Update(SysUser user, SqlSugarClient db) { InitOther(db); } /// /// 初始化 类型、状态、县镇村等名称 /// /// private void InitOther(SqlSugarClient db) { //类型 if (!string.IsNullOrEmpty(typeid)) { var typeModel = db.Queryable().Where(c => c.ItemDetailId.ToString() == this.typeid).First(); if (typeModel != null) { this.typename = typeModel.ItemName; } } //案件状态 if (!string.IsNullOrEmpty(case_status_id)) { var statusModel = db.Queryable().Where(c => c.ItemDetailId.ToString() == this.case_status_id).First(); if (statusModel != null) { this.case_status_name = statusModel.ItemName; } } //县 if (!string.IsNullOrEmpty(countyid)) { var model = db.Queryable().Where(c => c.Id.ToString() == countyid).First(); if (model != null) { countyname = model.Name; } } //镇 if (!string.IsNullOrEmpty(streetid)) { var model = db.Queryable().Where(c => c.Id.ToString() == streetid).First(); if (model != null) { streetname = model.Name; } } //村 if (!string.IsNullOrEmpty(communityid)) { var model = db.Queryable().Where(c => c.Id.ToString() == communityid).First(); if (model != null) { communityname = model.Name; } } } /// /// Desc: /// Default: /// Nullable:False /// [SugarColumn(IsPrimaryKey = true)] public string Id { get; set; } /// /// Desc:案件编号 /// Default: /// Nullable:True /// public string case_no { get; set; } /// /// Desc:案件名称 /// Default: /// Nullable:True /// public string case_name { get; set; } /// /// Desc:案件描述 /// Default: /// Nullable:True /// public string case_description { get; set; } /// /// Desc:开始时间 /// Default: /// Nullable:True /// public DateTime? start_time { get; set; } /// /// Desc:结束时间 /// Default: /// Nullable:True /// public DateTime? end_time { get; set; } /// /// Desc:地址 /// Default: /// Nullable:True /// public string address { get; set; } /// /// Desc:经度 /// Default: /// Nullable:True /// public decimal? lng { get; set; } /// /// Desc:纬度 /// Default: /// Nullable:True /// public decimal? lat { get; set; } /// /// Desc:类型 /// Default: /// Nullable:True /// public string typeid { get; set; } /// /// Desc:类型 /// Default: /// Nullable:True /// public string typename { get; set; } /// /// Desc:处理状态 /// Default: /// Nullable:True /// public int? handle_status_id { get; set; } /// /// Desc:处理状态 /// Default: /// Nullable:True /// public string handle_status_name { get; set; } /// /// Desc:案件状态 /// Default: /// Nullable:True /// public string case_status_id { get; set; } /// /// Desc:案件状态 /// Default: /// Nullable:True /// public string case_status_name { get; set; } /// /// Desc:创建时间 /// Default: /// Nullable:True /// public DateTime? createtime { get; set; } /// /// Desc:创建人 /// Default: /// Nullable:True /// public string createuser { get; set; } /// /// Desc:创建人姓名 /// Default: /// Nullable:True /// public string createusername { get; set; } /// /// Desc:无人机编号 /// Default: /// Nullable:True /// public string drone_no { get; set; } /// /// Desc:案件处理人 /// Default: /// Nullable:True /// public string deal_userid { get; set; } /// /// Desc:案件处理人 /// Default: /// Nullable:True /// public string deal_username { get; set; } /// /// Desc:是否删除 /// Default: /// Nullable:True /// public int? is_delete { get; set; } /// /// 县 /// public string countyid { get; set; } /// /// 县 /// public string countyname { get; set; } /// /// 镇 /// public string streetid { get; set; } /// /// 镇 /// public string streetname { get; set; } /// /// 村 /// public string communityid { get; set; } /// /// 村 /// public string communityname { get; set; } /// /// 备注 /// public string remark { get; set; } /// /// 是否关闭 /// public int? is_closed { get; set; } /// /// 面积 /// public string area { get; set; } /// /// 是否违法 /// public int? is_illegal { get; set; } /// /// 关闭人 /// public string close_user { get; set; } /// /// 关闭时间 /// public DateTime? close_time { get; set; } /// /// 判读人 /// public string identification_user { get; set; } /// /// 判读时间 /// public DateTime? identification_time { get; set; } /// /// 是否判读 /// public int? is_intact { get; set; } /// /// 关闭人id /// public string close_userid { get; set; } /// /// 判读人id /// public string identification_userid { get; set; } /// /// 审核人id /// public string verifyuserid { get; set; } /// /// 审核人 /// public string verifyuser { get; set; } /// /// 审核时间 /// public DateTime? verifytime { get; set; } /// /// Desc:是否改进 /// Default: /// Nullable:True /// public int? is_improve { get; set; } /// /// Desc:改进原因 /// Default: /// Nullable:True /// public string improve_reason { get; set; } /// /// Desc:是否分发 /// Default: /// Nullable:True /// public int? is_dispense { get; set; } /// /// Desc:分发人id /// Default: /// Nullable:True /// public string dispense_userid { get; set; } /// /// Desc:分发时间 /// Default: /// Nullable:True /// public DateTime? dispense_time { get; set; } /// /// Desc:分发人姓名 /// Default: /// Nullable:True /// public string dispense_username { get; set; } /// /// Desc:审核状态 /// Default: /// Nullable:True /// public int? verifystatus { get; set; } /// /// Desc:审核状态名称 /// Default: /// Nullable:True /// public string verifystatusname { get; set; } /// /// 案件是否已查看 /// public int? is_checked { get; set; } /// /// Desc:处理时间 /// Default: /// Nullable:True /// public DateTime? deal_time { get; set; } /// /// 前时相 /// public DateTime? pre_phase_time { get; set; } /// /// 后时相 /// public DateTime? later_phase_time { get; set; } /// /// 前时相 照片 /// public string pre_phase_img { get; set; } /// /// 后时相 照片 /// public string later_phase_img { get; set; } /// /// 是否核销 /// public int? is_verification { get; set; } /// /// 核销人 /// public string verification_userid { get; set; } /// /// 核销人 /// public string verification_username { get; set; } /// /// 核销时间 /// public DateTime? verification_time { get; set; } /// /// 是否退回 /// public int? is_drawback { get; set; } /// /// 退回次数 /// public int? drawbackcount { get; set; } /// /// 退回给谁 /// public string back_to_userid { get; set; } /// /// 退回给谁 /// public string back_to_username { get; set; } /// /// 退回类型 /// public string drawback_type { get; set; } /// /// 退回描述 /// public string drawback_description { get; set; } /// /// 是否暂结 /// public int? is_tentative_complete { get; set; } /// /// 暂结人 /// public string tentative_userid { get; set; } /// /// 暂结人 /// public string tentative_username { get; set; } /// /// 暂结时间 /// public DateTime? tentative_time { get; set; } /// /// 是否核查 /// public int? is_examine { get; set; } /// /// 核查人 /// public string examiner_id { get; set; } /// /// 核查人 /// public string examiner_name { get; set; } /// /// 核查时间 /// public DateTime? examine_time { get; set; } /// /// 处理措施 /// public string measure_name { get; set; } /// /// 农用地面积 /// public string nongyongdi_area { get; set; } /// /// 耕地面积 /// public string gengdi_area { get; set; } /// /// 永久基本农田面积 /// public string yongjiujibennongtian_area { get; set; } /// /// 重点区域面积 /// public string zhongdianquyu_area { get; set; } /// /// 生态保护红线面积 /// public string shengtaibaohuhongxian_area { get; set; } /// /// 国土空间规划面积 /// public string guotukongjianguihua_area { get; set; } /// /// 图斑来源(全域巡查、卫片下发) /// public string tubanlaiyuan { get; set; } /// /// 批次号 /// public string picihao { get; set; } /// /// 标注类型 在建 已建成 持续变化 /// public string is_build_name { get; set; } /// /// 同步时间 /// public DateTime? synchronoustime { get; set; } /// /// 自定义字段值 /// public Dictionary extra_info { get; set; } public string mineralsinfo { get; set; } public string resubmitremark { get; set; } } }