parent
43660eb950
commit
9946c6729a
|
|
@ -0,0 +1,13 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace OpenAuth.App.ServiceApp.Category
|
||||||
|
{
|
||||||
|
public class CategoryApp
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,118 @@
|
||||||
|
using SqlSugar;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace OpenAuth.App.Request
|
||||||
|
{
|
||||||
|
public class Category
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:创建时间
|
||||||
|
/// Default:CURRENT_TIMESTAMP
|
||||||
|
/// Nullable:False
|
||||||
|
/// </summary>
|
||||||
|
public DateTime CreateTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:创建人ID
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:False
|
||||||
|
/// </summary>
|
||||||
|
public string CreateUserId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:创建人
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:False
|
||||||
|
/// </summary>
|
||||||
|
public string CreateUserName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string Description { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:分类标识
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:False
|
||||||
|
/// </summary>
|
||||||
|
public string DtCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:通常与分类标识一致,但万一有不一样的情况呢?
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string DtValue { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:
|
||||||
|
/// Default:0
|
||||||
|
/// Nullable:False
|
||||||
|
/// </summary>
|
||||||
|
public byte Enable { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:False
|
||||||
|
/// </summary>
|
||||||
|
public string Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:分类名称或描述
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:False
|
||||||
|
/// </summary>
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:排序号
|
||||||
|
/// Default:0
|
||||||
|
/// Nullable:False
|
||||||
|
/// </summary>
|
||||||
|
public int SortNo { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string TypeId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:最后更新时间
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? UpdateTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:最后更新人ID
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string UpdateUserId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:最后更新人
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string UpdateUserName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:父级Id
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string PId { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -41,6 +41,133 @@ namespace OpenAuth.App.ServiceApp.DroneCaseInfo
|
||||||
this.commonData = commonData;
|
this.commonData = commonData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region 初始化
|
||||||
|
/// <summary>
|
||||||
|
/// 初始化
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="user"></param>
|
||||||
|
/// <param name="db"></param>
|
||||||
|
public void Init(DroneCaseinfo dcs)
|
||||||
|
{
|
||||||
|
var user = _auth.GetCurrentUser().User;
|
||||||
|
//主键
|
||||||
|
dcs.Id = Guid.NewGuid().ToString();
|
||||||
|
|
||||||
|
//创建人和创建时间
|
||||||
|
dcs.createtime = DateTime.Now;
|
||||||
|
dcs.createuser = user.Id.ToString();
|
||||||
|
dcs.createusername = user.Name;
|
||||||
|
|
||||||
|
//案件是否关闭,默认0 未关闭
|
||||||
|
dcs.is_closed = 0;
|
||||||
|
|
||||||
|
//是否删除,默认0 未删除
|
||||||
|
dcs.is_delete = 0;
|
||||||
|
|
||||||
|
//是否判读
|
||||||
|
dcs.is_intact = 0;
|
||||||
|
|
||||||
|
//是否退回
|
||||||
|
dcs.is_improve = 0;
|
||||||
|
|
||||||
|
//是否审核
|
||||||
|
dcs.is_review = 0;
|
||||||
|
|
||||||
|
//处理状态
|
||||||
|
dcs.handle_status_id = 0;
|
||||||
|
dcs.handle_status_name = "未办理";
|
||||||
|
|
||||||
|
//时间戳标识案件编号
|
||||||
|
dcs.case_no = DateTime.Now.ToString("yyyyMMddHHmmssffff");
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(dcs.case_description)) dcs.case_description = "";
|
||||||
|
if (string.IsNullOrEmpty(dcs.address)) dcs.address = "";
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(dcs.typeid)) dcs.typeid = "";
|
||||||
|
if (string.IsNullOrEmpty(dcs.typename)) dcs.typename = "";
|
||||||
|
if (string.IsNullOrEmpty(dcs.sec_typeid)) dcs.sec_typeid = "";
|
||||||
|
if (string.IsNullOrEmpty(dcs.sec_typename)) dcs.sec_typename = "";
|
||||||
|
if (string.IsNullOrEmpty(dcs.thr_typeid)) dcs.thr_typeid = "";
|
||||||
|
if (string.IsNullOrEmpty(dcs.thr_typename)) dcs.thr_typename = "";
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(dcs.countyid)) dcs.countyid = "";
|
||||||
|
if (string.IsNullOrEmpty(dcs.countyname)) dcs.countyname = "";
|
||||||
|
if (string.IsNullOrEmpty(dcs.streetid)) dcs.streetid = "";
|
||||||
|
if (string.IsNullOrEmpty(dcs.streetname)) dcs.streetname = "";
|
||||||
|
if (string.IsNullOrEmpty(dcs.communityid)) dcs.communityid = "";
|
||||||
|
if (string.IsNullOrEmpty(dcs.communityname)) dcs.communityname = "";
|
||||||
|
|
||||||
|
InitOther(dcs);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 修改
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="user"></param>
|
||||||
|
/// <param name="db"></param>
|
||||||
|
public void Update(DroneCaseinfo dcs)
|
||||||
|
{
|
||||||
|
InitOther(dcs);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 初始化 类型、状态、县镇村等名称
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="db"></param>
|
||||||
|
private void InitOther(DroneCaseinfo dcs)
|
||||||
|
{
|
||||||
|
//类型
|
||||||
|
if (!string.IsNullOrEmpty(dcs.typeid))
|
||||||
|
{
|
||||||
|
var typeModel = db.Queryable<SysDataItemDetail>().Where(c => c.ItemDetailId == dcs.typeid && c.ItemCode == "HFK_HANDLE_STATUS").First();
|
||||||
|
if (typeModel != null)
|
||||||
|
{
|
||||||
|
dcs.typename = typeModel.ItemName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//案件状态
|
||||||
|
if (!string.IsNullOrEmpty(dcs.case_status_id))
|
||||||
|
{
|
||||||
|
var statusModel = db.Queryable<SysDataItemDetail>().Where(c => c.ItemDetailId == dcs.case_status_id&&c.ItemCode== "HFK_HANDLE_STATUS").First();
|
||||||
|
if (statusModel != null)
|
||||||
|
{
|
||||||
|
dcs.case_status_name = statusModel.ItemName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//县
|
||||||
|
if (!string.IsNullOrEmpty(dcs.countyid))
|
||||||
|
{
|
||||||
|
var model = db.Queryable<SysOrg>().Where(c => c.Id.ToString() == dcs.countyid).First();
|
||||||
|
if (model != null)
|
||||||
|
{
|
||||||
|
dcs.countyname = model.Name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//镇
|
||||||
|
if (!string.IsNullOrEmpty(dcs.streetid))
|
||||||
|
{
|
||||||
|
var model = db.Queryable<SysOrg>().Where(c => c.Id.ToString() == dcs.streetid).First();
|
||||||
|
if (model != null)
|
||||||
|
{
|
||||||
|
dcs.streetname = model.Name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//村
|
||||||
|
if (!string.IsNullOrEmpty(dcs.communityid))
|
||||||
|
{
|
||||||
|
var model = db.Queryable<SysOrg>().Where(c => c.Id.ToString() == dcs.communityid).First();
|
||||||
|
if (model != null)
|
||||||
|
{
|
||||||
|
dcs.communityname = model.Name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
//#region 案件
|
//#region 案件
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -54,7 +181,7 @@ namespace OpenAuth.App.ServiceApp.DroneCaseInfo
|
||||||
DroneCaseinfo model = req.MapTo<DroneCaseinfo>();
|
DroneCaseinfo model = req.MapTo<DroneCaseinfo>();
|
||||||
var picList = req.pic_list;
|
var picList = req.pic_list;
|
||||||
|
|
||||||
//model.Init(user, db);
|
Init(model);
|
||||||
|
|
||||||
List<DroneFiles> filesList = new List<DroneFiles>();
|
List<DroneFiles> filesList = new List<DroneFiles>();
|
||||||
//图片
|
//图片
|
||||||
|
|
@ -102,7 +229,6 @@ namespace OpenAuth.App.ServiceApp.DroneCaseInfo
|
||||||
{
|
{
|
||||||
model.communityname = communityname.Name;
|
model.communityname = communityname.Name;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//使用事务提交数据
|
//使用事务提交数据
|
||||||
|
|
@ -136,7 +262,7 @@ namespace OpenAuth.App.ServiceApp.DroneCaseInfo
|
||||||
|
|
||||||
//案件实体
|
//案件实体
|
||||||
var model = req.info;
|
var model = req.info;
|
||||||
//model.Init(user, db);
|
Init(model);
|
||||||
|
|
||||||
//区分权限,创建人就是判读人
|
//区分权限,创建人就是判读人
|
||||||
model.identification_userid = model.createuser;
|
model.identification_userid = model.createuser;
|
||||||
|
|
@ -269,7 +395,7 @@ namespace OpenAuth.App.ServiceApp.DroneCaseInfo
|
||||||
|
|
||||||
//案件实体
|
//案件实体
|
||||||
var model = req.info;
|
var model = req.info;
|
||||||
//model.Update(user, db);
|
Update(model);
|
||||||
|
|
||||||
//处理事否审核
|
//处理事否审核
|
||||||
if (model.is_review == null)
|
if (model.is_review == null)
|
||||||
|
|
@ -425,7 +551,7 @@ namespace OpenAuth.App.ServiceApp.DroneCaseInfo
|
||||||
|
|
||||||
//案件实体
|
//案件实体
|
||||||
var model = req.info;
|
var model = req.info;
|
||||||
//model.Update(user, db);
|
Update(model);
|
||||||
|
|
||||||
//是否判读、判读人和判读时间
|
//是否判读、判读人和判读时间
|
||||||
model.is_intact = 1;
|
model.is_intact = 1;
|
||||||
|
|
@ -782,24 +908,21 @@ namespace OpenAuth.App.ServiceApp.DroneCaseInfo
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////查询专题数据
|
//查询专题数据
|
||||||
//public List<SubjectRes> GetSubjectInfos()
|
public List<SubjectRes> GetSubjectInfos()
|
||||||
//{
|
{
|
||||||
// using (var db = SqlSugarOper.GetInstance(_configuration))
|
var list = db.Queryable<DatabasePicture>().Select(r => new SubjectRes
|
||||||
// {
|
{
|
||||||
// var list = db.Queryable<Sugar_Database_picture>().Select(r => new SubjectRes
|
Id = r.Id,
|
||||||
// {
|
Name = r.database_name,
|
||||||
// Id = r.Id,
|
Children = SqlFunc.Subqueryable<Subject>().Where(a => a.PId == r.Id).ToList(a => new ChildSubject
|
||||||
// Name = r.database_name,
|
{
|
||||||
// Children = SqlFunc.Subqueryable<Sugar_Subject>().Where(a => a.PId == r.Id).ToList(a => new ChildSubject
|
Key = a.Key,
|
||||||
// {
|
Name = a.Name
|
||||||
// Key = a.Key,
|
})
|
||||||
// Name = a.Name
|
}).ToList();
|
||||||
// })
|
return list;
|
||||||
// }).ToList();
|
}
|
||||||
// return list;
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 同步航飞库数据
|
/// 同步航飞库数据
|
||||||
|
|
@ -908,16 +1031,6 @@ namespace OpenAuth.App.ServiceApp.DroneCaseInfo
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查询案件列表
|
/// 查询案件列表
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -956,6 +1069,8 @@ namespace OpenAuth.App.ServiceApp.DroneCaseInfo
|
||||||
//上报人
|
//上报人
|
||||||
.WhereIF(req.is_reporter == 1 && user.Account != Define.SYSTEM_USERNAME, c => c.createuser == user.Id.ToString())
|
.WhereIF(req.is_reporter == 1 && user.Account != Define.SYSTEM_USERNAME, c => c.createuser == user.Id.ToString())
|
||||||
//执行人
|
//执行人
|
||||||
|
.WhereIF(req.is_dealer==1&&user.Account != Define.SYSTEM_USERNAME,c=> SqlFunc.Subqueryable<SysUserOrg>().Where(it=>it.OrgId.ToString()==c.countyid||it.OrgId.ToString() == c.streetid||it.OrgId.ToString() == c.communityid).Any())
|
||||||
|
//执行人
|
||||||
//.WhereIF(req.is_dealer == 1 && user.Account != Define.SYSTEM_USERNAME, c => SqlFunc.Subqueryable<Sugar_Relevance>().Where(it => it.SecondId == c.communityid && it.FirstId == user.Id && it.Key == Define.USERORG).Any()
|
//.WhereIF(req.is_dealer == 1 && user.Account != Define.SYSTEM_USERNAME, c => SqlFunc.Subqueryable<Sugar_Relevance>().Where(it => it.SecondId == c.communityid && it.FirstId == user.Id && it.Key == Define.USERORG).Any()
|
||||||
// || SqlFunc.Subqueryable<Sugar_Relevance>().Where(it => it.SecondId == c.streetid && it.FirstId == user.Id && it.Key == Define.USERORG).Any()
|
// || SqlFunc.Subqueryable<Sugar_Relevance>().Where(it => it.SecondId == c.streetid && it.FirstId == user.Id && it.Key == Define.USERORG).Any()
|
||||||
// || SqlFunc.Subqueryable<Sugar_Relevance>().Where(it => it.SecondId == c.countyid && it.FirstId == user.Id && it.Key == Define.USERORG).Any()
|
// || SqlFunc.Subqueryable<Sugar_Relevance>().Where(it => it.SecondId == c.countyid && it.FirstId == user.Id && it.Key == Define.USERORG).Any()
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace OpenAuth.App.Response
|
||||||
|
{
|
||||||
|
public class SubjectRes
|
||||||
|
{
|
||||||
|
public string Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:数据库名
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 专题子集
|
||||||
|
/// </summary>
|
||||||
|
public List<ChildSubject> Children { get; set; }
|
||||||
|
}
|
||||||
|
public class ChildSubject
|
||||||
|
{
|
||||||
|
public string Key { get; set; }
|
||||||
|
public string Name { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -212,7 +212,7 @@ namespace OpenAuth.App.ServiceApp.InsTaskHallManager
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<List<InsTaskgroup>> GetgrouptaskList(string id)
|
public async Task<List<InsTaskgroup>> GetgrouptaskList(string id)
|
||||||
{
|
{
|
||||||
var query = await client.Queryable<InsTaskgroup>()
|
var query = await client.Queryable<InsTaskgroup>().Where(r=>r.ReciveUserId==null)
|
||||||
.Where(r => r.TaskId==id)
|
.Where(r => r.TaskId==id)
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue