Merge branch 'Insight' of http://123.132.248.154:10000/HC_YFZX/Infrastructure into Insight
commit
d218fd90a8
|
|
@ -137,14 +137,14 @@ namespace OpenAuth.App.ServiceApp
|
|||
/// 任务列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task<Response<PageInfo<List<InsTask>>>> GteTaskListForAdmin(string taskName, int pageIndex, int pageSize)
|
||||
public async Task<Response<PageInfo<List<InsTask>>>> GteTaskListForAdmin(string taskName, int page, int limit)
|
||||
{
|
||||
using (var db = base.UnitWork.CreateContext())
|
||||
{
|
||||
RefAsync<int> totalCount = 0;
|
||||
var tsakList = await db.InsTask.AsQueryable()
|
||||
.WhereIF(string.IsNullOrEmpty(taskName), r => r.TaskName.Contains(taskName))
|
||||
.ToPageListAsync(pageIndex, pageSize, totalCount);
|
||||
.ToPageListAsync(page, limit, totalCount);
|
||||
|
||||
return new Response<PageInfo<List<InsTask>>>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -0,0 +1,27 @@
|
|||
using Microsoft.Extensions.Configuration;
|
||||
using OpenAuth.App.Interface;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OpenAuth.App.ServiceApp
|
||||
{
|
||||
/// <summary>
|
||||
/// 统计分析
|
||||
/// </summary>
|
||||
public class DataAnalysisApp
|
||||
{
|
||||
private readonly IConfiguration _configuration;
|
||||
private readonly ISqlSugarClient client;
|
||||
public DataAnalysisApp(IAuth auth, ISqlSugarClient sqlSugarClient, IConfiguration configuration)
|
||||
{
|
||||
_configuration = configuration;
|
||||
this.client = sqlSugarClient;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -281,297 +281,294 @@ namespace OpenAuth.App.ServiceApp.DroneCaseInfo
|
|||
return txt;
|
||||
}
|
||||
|
||||
///// <summary>
|
||||
///// 上报案件
|
||||
///// </summary>
|
||||
///// <param name="req"></param>
|
||||
///// <returns></returns>
|
||||
//public string AddDroneCaseInfo(AddOrUpdateDroneCaseInfoReq req)
|
||||
//{
|
||||
// var user = _auth.GetCurrentUser().User;
|
||||
|
||||
// using (var db = SqlSugarOper.GetInstance(_configuration))
|
||||
// {
|
||||
// //案件实体
|
||||
// var model = req.info;
|
||||
// model.Init(user, db);
|
||||
|
||||
// //区分权限,创建人就是判读人
|
||||
// model.identification_userid = model.createuser;
|
||||
// model.identification_user = model.identification_user;
|
||||
|
||||
// if (model.lng != 0 && model.lat != 0)
|
||||
// {
|
||||
// //根据经纬度查询地区
|
||||
// var lngLat = GetOrgAreaByPoint(Convert.ToDecimal(model.lng), Convert.ToDecimal(model.lat));
|
||||
|
||||
// //县
|
||||
// model.countyid = lngLat["countyid"].ToString();
|
||||
// var countyname = db.Queryable<Sugar_Org>().Where(c => c.Id == model.countyid).First();
|
||||
// if (countyname != null)
|
||||
// {
|
||||
// model.countyname = countyname.Name;
|
||||
// }
|
||||
|
||||
// //镇
|
||||
// model.streetid = lngLat["streetid"].ToString();
|
||||
// var streetname = db.Queryable<Sugar_Org>().Where(c => c.Id == model.streetid).First();
|
||||
// if (streetname != null)
|
||||
// {
|
||||
// model.streetname = streetname.Name;
|
||||
// }
|
||||
|
||||
// //乡社区
|
||||
// model.communityid = lngLat["communityid"].ToString();
|
||||
// var communityname = db.Queryable<Sugar_Org>().Where(c => c.Id == model.communityid).First();
|
||||
// if (communityname != null)
|
||||
// {
|
||||
// model.communityname = communityname.Name;
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
// var picList = req.pic_list;
|
||||
// var videoList = req.video_list;
|
||||
|
||||
// List<Sugar_Drone_files> filesList = new List<Sugar_Drone_files>();
|
||||
// //图片
|
||||
// for (int i = 0; i < picList.Count; i++)
|
||||
// {
|
||||
// Sugar_Drone_files fileModel = new Sugar_Drone_files();
|
||||
// fileModel.Id = Guid.NewGuid().ToString();
|
||||
// fileModel.path = picList[i];
|
||||
// fileModel.type = 0;
|
||||
// fileModel.tablename = "drone_caseinfo";
|
||||
// fileModel.createtime = DateTime.Now;
|
||||
// fileModel.createuser = user.Id;
|
||||
// fileModel.createusername = user.Name;
|
||||
// fileModel.is_delete = 0;
|
||||
// fileModel.relid = model.Id;
|
||||
|
||||
// filesList.Add(fileModel);
|
||||
// }
|
||||
|
||||
// //视频
|
||||
// for (int i = 0; i < videoList.Count; i++)
|
||||
// {
|
||||
// Sugar_Drone_files fileModel = new Sugar_Drone_files();
|
||||
// fileModel.Id = Guid.NewGuid().ToString();
|
||||
// fileModel.path = videoList[i];
|
||||
// fileModel.type = 1;
|
||||
// fileModel.tablename = "drone_caseinfo";
|
||||
// fileModel.createtime = DateTime.Now;
|
||||
// fileModel.createuser = user.Id;
|
||||
// fileModel.createusername = user.Name;
|
||||
// fileModel.is_delete = 0;
|
||||
// fileModel.relid = model.Id;
|
||||
|
||||
// filesList.Add(fileModel);
|
||||
// }
|
||||
|
||||
// //关联案件
|
||||
// var caserelationList = req.relationCaseNo;
|
||||
// List<Sugar_Drone_caseinfo_relation> relationList = new List<Sugar_Drone_caseinfo_relation>();
|
||||
// foreach (var item in caserelationList)
|
||||
// {
|
||||
// relationList.Add(new Sugar_Drone_caseinfo_relation
|
||||
// {
|
||||
// caseid = model.Id,
|
||||
// relation_case_no = item
|
||||
// });
|
||||
// }
|
||||
|
||||
// //案件标签
|
||||
// var tags = req.tags;
|
||||
// List<Sugar_Drone_caseinfo_tag> tagList = new List<Sugar_Drone_caseinfo_tag>();
|
||||
// foreach (var item in tags)
|
||||
// {
|
||||
// tagList.Add(new Sugar_Drone_caseinfo_tag
|
||||
// {
|
||||
// caseid = model.Id,
|
||||
// tagid = item
|
||||
// });
|
||||
// }
|
||||
|
||||
// //使用事务提交数据
|
||||
// var transFlag = db.UseTran(() =>
|
||||
// {
|
||||
// //新增案件数据
|
||||
// db.Insertable(model).ExecuteCommand();
|
||||
|
||||
// //新增文件数据
|
||||
// db.Insertable(filesList).ExecuteCommand();
|
||||
|
||||
// //新增关联案件
|
||||
// db.Insertable(relationList).ExecuteCommand();
|
||||
|
||||
// //新增案件标签
|
||||
// db.Insertable(tagList).ExecuteCommand();
|
||||
// });
|
||||
|
||||
// if (transFlag.IsSuccess)
|
||||
// return model.Id;
|
||||
// else
|
||||
// throw new Exception("上报失败");
|
||||
// }
|
||||
//}
|
||||
|
||||
///// <summary>
|
||||
///// 修改完善案件
|
||||
///// </summary>
|
||||
///// <param name="req"></param>
|
||||
///// <returns></returns>
|
||||
//public string UpdateDroneCaseInfo(AddOrUpdateDroneCaseInfoReq req)
|
||||
//{
|
||||
// var user = _auth.GetCurrentUser().User;
|
||||
|
||||
// using (var db = SqlSugarOper.GetInstance(_configuration))
|
||||
// {
|
||||
// //案件实体
|
||||
// var model = req.info;
|
||||
// model.Update(user, db);
|
||||
|
||||
// //处理事否审核
|
||||
// if (model.is_review == null)
|
||||
// {
|
||||
// model.is_review = 0;
|
||||
// }
|
||||
|
||||
// //查询面积
|
||||
// var areaDecimal = db.Queryable<Sugar_Drone_shp_data>().Where(c => c.relid == model.Id).Sum(c => c.area);
|
||||
// if (areaDecimal != null)
|
||||
// {
|
||||
// model.area = Decimal.Round((Decimal)areaDecimal, 2).ToString();
|
||||
// }
|
||||
|
||||
// var picList = req.pic_list;
|
||||
// var videoList = req.video_list;
|
||||
/// <summary>
|
||||
/// 上报案件
|
||||
/// </summary>
|
||||
/// <param name="req"></param>
|
||||
/// <returns></returns>
|
||||
public string AddDroneCaseInfo(AddOrUpdateDroneCaseInfoReq req)
|
||||
{
|
||||
var user = _auth.GetCurrentUser().User;
|
||||
|
||||
|
||||
// var existFiles = db.Queryable<Sugar_Drone_files>().Where(c => c.relid == req.info.Id).ToList();
|
||||
// List<Sugar_Drone_files> filesList = new List<Sugar_Drone_files>();
|
||||
// //图片
|
||||
// for (int i = 0; i < picList.Count; i++)
|
||||
// {
|
||||
// var item = picList[i];
|
||||
//案件实体
|
||||
var model = req.info;
|
||||
//model.Init(user, db);
|
||||
|
||||
// var count = existFiles.Where(c => c.path == item).Count();
|
||||
// if (count > 0)
|
||||
// continue;
|
||||
// Sugar_Drone_files fileModel = new Sugar_Drone_files();
|
||||
// fileModel.Id = Guid.NewGuid().ToString();
|
||||
// fileModel.path = picList[i];
|
||||
// fileModel.type = 0;
|
||||
// fileModel.tablename = "drone_caseinfo";
|
||||
// fileModel.createtime = DateTime.Now;
|
||||
// fileModel.createuser = user.Id;
|
||||
// fileModel.createusername = user.Name;
|
||||
// fileModel.is_delete = 0;
|
||||
// fileModel.relid = model.Id;
|
||||
//区分权限,创建人就是判读人
|
||||
model.identification_userid = model.createuser;
|
||||
model.identification_user = model.identification_user;
|
||||
|
||||
// filesList.Add(fileModel);
|
||||
// }
|
||||
if (model.lng != 0 && model.lat != 0)
|
||||
{
|
||||
//根据经纬度查询地区
|
||||
var lngLat = GetOrgAreaByPoint(Convert.ToDecimal(model.lng), Convert.ToDecimal(model.lat));
|
||||
|
||||
// //视频
|
||||
// for (int i = 0; i < videoList.Count; i++)
|
||||
// {
|
||||
// var item = videoList[i];
|
||||
//县
|
||||
model.countyid = lngLat["countyid"].ToString();
|
||||
var countyname = db.Queryable<SysOrg>().Where(c => c.Id.ToString() == model.countyid).First();
|
||||
if (countyname != null)
|
||||
{
|
||||
model.countyname = countyname.Name;
|
||||
}
|
||||
|
||||
// var count = existFiles.Where(c => c.path == item).Count();
|
||||
// if (count > 0)
|
||||
// continue;
|
||||
// Sugar_Drone_files fileModel = new Sugar_Drone_files();
|
||||
// fileModel.Id = Guid.NewGuid().ToString();
|
||||
// fileModel.path = videoList[i];
|
||||
// fileModel.type = 1;
|
||||
// fileModel.tablename = "drone_caseinfo";
|
||||
// fileModel.createtime = DateTime.Now;
|
||||
// fileModel.createuser = user.Id;
|
||||
// fileModel.createusername = user.Name;
|
||||
// fileModel.is_delete = 0;
|
||||
// fileModel.relid = model.Id;
|
||||
//镇
|
||||
model.streetid = lngLat["streetid"].ToString();
|
||||
var streetname = db.Queryable<SysOrg>().Where(c => c.Id.ToString() == model.streetid).First();
|
||||
if (streetname != null)
|
||||
{
|
||||
model.streetname = streetname.Name;
|
||||
}
|
||||
|
||||
// filesList.Add(fileModel);
|
||||
// }
|
||||
//乡社区
|
||||
model.communityid = lngLat["communityid"].ToString();
|
||||
var communityname = db.Queryable<SysOrg>().Where(c => c.Id.ToString() == model.communityid).First();
|
||||
if (communityname != null)
|
||||
{
|
||||
model.communityname = communityname.Name;
|
||||
}
|
||||
|
||||
// //关联案件
|
||||
// var caserelationList = req.relationCaseNo;
|
||||
// List<Sugar_Drone_caseinfo_relation> relationList = new List<Sugar_Drone_caseinfo_relation>();
|
||||
// foreach (var item in caserelationList)
|
||||
// {
|
||||
// relationList.Add(new Sugar_Drone_caseinfo_relation
|
||||
// {
|
||||
// caseid = model.Id,
|
||||
// relation_case_no = item
|
||||
// });
|
||||
// }
|
||||
}
|
||||
|
||||
// //案件标签
|
||||
// var tags = req.tags;
|
||||
// List<Sugar_Drone_caseinfo_tag> tagList = new List<Sugar_Drone_caseinfo_tag>();
|
||||
// foreach (var item in tags)
|
||||
// {
|
||||
// tagList.Add(new Sugar_Drone_caseinfo_tag
|
||||
// {
|
||||
// caseid = model.Id,
|
||||
// tagid = item
|
||||
// });
|
||||
// }
|
||||
var picList = req.pic_list;
|
||||
var videoList = req.video_list;
|
||||
|
||||
// //专题及平台数据处理
|
||||
// var dataBaseList = db.Queryable<Sugar_Database_picture>().Where(c => req.databaseid.Contains(c.Id)).IgnoreColumns(c => new { c.org_id }).ToList();
|
||||
// List<Sugar_Drone_CaseSubject> subjectList = new List<Sugar_Drone_CaseSubject>();
|
||||
// //遍历库
|
||||
// for (int i = 0; i < dataBaseList.Count; i++)
|
||||
// {
|
||||
// //当前库
|
||||
// var _item = dataBaseList[i];
|
||||
// //专题信息
|
||||
// var subjectlist = db.Queryable<Sugar_Subject>().Where(r => req.subjectkeys.Contains(r.Key) && r.PId == _item.Id).ToList();
|
||||
// var subjectkeys = "";
|
||||
// if (req.subjectkeys != null && req.subjectkeys.Count > 0 && subjectlist.Count > 0)
|
||||
// {
|
||||
// subjectkeys = db.Queryable<Sugar_Subject>().Where(r => req.subjectkeys.Contains(r.Key) && r.PId == _item.Id).Select(r => r.Key).ToList().Aggregate((current, next) => current + "," + next);
|
||||
// }
|
||||
// Sugar_Drone_CaseSubject cject = new Sugar_Drone_CaseSubject();
|
||||
// cject.Id = Guid.NewGuid().ToString();
|
||||
// cject.CaseId = model.Id;
|
||||
// cject.DataBaseId = _item.Id;
|
||||
// cject.SubjectKeys = subjectkeys;
|
||||
// cject.CreateTime = DateTime.Now;
|
||||
// cject.CreateUser = user.Id;
|
||||
// cject.CreateUserName = user.Name;
|
||||
// subjectList.Add(cject);
|
||||
// }
|
||||
List<DroneFiles> filesList = new List<DroneFiles>();
|
||||
//图片
|
||||
for (int i = 0; i < picList.Count; i++)
|
||||
{
|
||||
DroneFiles fileModel = new DroneFiles();
|
||||
fileModel.Id = Guid.NewGuid().ToString();
|
||||
fileModel.path = picList[i];
|
||||
fileModel.type = 0;
|
||||
fileModel.tablename = "drone_caseinfo";
|
||||
fileModel.createtime = DateTime.Now;
|
||||
fileModel.createuser = user.Id.ToString();
|
||||
fileModel.createusername = user.Name;
|
||||
fileModel.is_delete = 0;
|
||||
fileModel.relid = model.Id;
|
||||
|
||||
// //使用事务提交数据
|
||||
// var transFlag = db.UseTran(() =>
|
||||
// {
|
||||
// //新增案件数据
|
||||
// db.Updateable(model).ExecuteCommand();
|
||||
filesList.Add(fileModel);
|
||||
}
|
||||
|
||||
// //新增文件数据
|
||||
// db.Insertable(filesList).ExecuteCommand();
|
||||
//视频
|
||||
for (int i = 0; i < videoList.Count; i++)
|
||||
{
|
||||
DroneFiles fileModel = new DroneFiles();
|
||||
fileModel.Id = Guid.NewGuid().ToString();
|
||||
fileModel.path = videoList[i];
|
||||
fileModel.type = 1;
|
||||
fileModel.tablename = "drone_caseinfo";
|
||||
fileModel.createtime = DateTime.Now;
|
||||
fileModel.createuser = user.Id.ToString();
|
||||
fileModel.createusername = user.Name;
|
||||
fileModel.is_delete = 0;
|
||||
fileModel.relid = model.Id;
|
||||
|
||||
// //关联案件
|
||||
// db.Deleteable<Sugar_Drone_caseinfo_relation>().Where(a => a.caseid == model.Id).ExecuteCommand();
|
||||
// db.Insertable(relationList).ExecuteCommand();
|
||||
filesList.Add(fileModel);
|
||||
}
|
||||
|
||||
// //案件标签
|
||||
// db.Deleteable<Sugar_Drone_caseinfo_tag>().Where(a => a.caseid == model.Id).ExecuteCommand();
|
||||
// db.Insertable(tagList).ExecuteCommand();
|
||||
//关联案件
|
||||
var caserelationList = req.relationCaseNo;
|
||||
List<DroneCaseinfoRelation> relationList = new List<DroneCaseinfoRelation>();
|
||||
foreach (var item in caserelationList)
|
||||
{
|
||||
relationList.Add(new DroneCaseinfoRelation
|
||||
{
|
||||
caseid = model.Id,
|
||||
relation_case_no = item
|
||||
});
|
||||
}
|
||||
|
||||
// //案件平台专题
|
||||
// db.Deleteable<Sugar_Drone_CaseSubject>().Where(a => a.CaseId == model.Id).ExecuteCommand();
|
||||
// db.Insertable(subjectList).ExecuteCommand();
|
||||
// });
|
||||
//案件标签
|
||||
var tags = req.tags;
|
||||
List<DroneCaseinfoTag> tagList = new List<DroneCaseinfoTag>();
|
||||
foreach (var item in tags)
|
||||
{
|
||||
tagList.Add(new DroneCaseinfoTag
|
||||
{
|
||||
caseid = model.Id,
|
||||
tagid = item
|
||||
});
|
||||
}
|
||||
|
||||
// if (transFlag.IsSuccess)
|
||||
// return model.Id;
|
||||
// else
|
||||
// throw new Exception("上报失败");
|
||||
// }
|
||||
//}
|
||||
//使用事务提交数据
|
||||
var transFlag = db.AsTenant().UseTran(() =>
|
||||
{
|
||||
//新增案件数据
|
||||
db.Insertable(model).ExecuteCommand();
|
||||
|
||||
//新增文件数据
|
||||
db.Insertable(filesList).ExecuteCommand();
|
||||
|
||||
//新增关联案件
|
||||
db.Insertable(relationList).ExecuteCommand();
|
||||
|
||||
//新增案件标签
|
||||
db.Insertable(tagList).ExecuteCommand();
|
||||
});
|
||||
|
||||
if (transFlag.IsSuccess)
|
||||
return model.Id;
|
||||
else
|
||||
throw new Exception("上报失败");
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 修改完善案件
|
||||
/// </summary>
|
||||
/// <param name="req"></param>
|
||||
/// <returns></returns>
|
||||
public string UpdateDroneCaseInfo(AddOrUpdateDroneCaseInfoReq req)
|
||||
{
|
||||
var user = _auth.GetCurrentUser().User;
|
||||
|
||||
//案件实体
|
||||
var model = req.info;
|
||||
//model.Update(user, db);
|
||||
|
||||
//处理事否审核
|
||||
if (model.is_review == null)
|
||||
{
|
||||
model.is_review = 0;
|
||||
}
|
||||
|
||||
//查询面积
|
||||
var areaDecimal = db.Queryable<DroneShpData>().Where(c => c.relid == model.Id).Sum(c => c.area);
|
||||
if (areaDecimal != null)
|
||||
{
|
||||
model.area = Decimal.Round((Decimal)areaDecimal, 2).ToString();
|
||||
}
|
||||
|
||||
var picList = req.pic_list;
|
||||
var videoList = req.video_list;
|
||||
|
||||
|
||||
var existFiles = db.Queryable<DroneFiles>().Where(c => c.relid == req.info.Id).ToList();
|
||||
List<DroneFiles> filesList = new List<DroneFiles>();
|
||||
//图片
|
||||
for (int i = 0; i < picList.Count; i++)
|
||||
{
|
||||
var item = picList[i];
|
||||
|
||||
var count = existFiles.Where(c => c.path == item).Count();
|
||||
if (count > 0)
|
||||
continue;
|
||||
DroneFiles fileModel = new DroneFiles();
|
||||
fileModel.Id = Guid.NewGuid().ToString();
|
||||
fileModel.path = picList[i];
|
||||
fileModel.type = 0;
|
||||
fileModel.tablename = "drone_caseinfo";
|
||||
fileModel.createtime = DateTime.Now;
|
||||
fileModel.createuser = user.Id.ToString();
|
||||
fileModel.createusername = user.Name;
|
||||
fileModel.is_delete = 0;
|
||||
fileModel.relid = model.Id;
|
||||
|
||||
filesList.Add(fileModel);
|
||||
}
|
||||
|
||||
//视频
|
||||
for (int i = 0; i < videoList.Count; i++)
|
||||
{
|
||||
var item = videoList[i];
|
||||
|
||||
var count = existFiles.Where(c => c.path == item).Count();
|
||||
if (count > 0)
|
||||
continue;
|
||||
DroneFiles fileModel = new DroneFiles();
|
||||
fileModel.Id = Guid.NewGuid().ToString();
|
||||
fileModel.path = videoList[i];
|
||||
fileModel.type = 1;
|
||||
fileModel.tablename = "drone_caseinfo";
|
||||
fileModel.createtime = DateTime.Now;
|
||||
fileModel.createuser = user.Id.ToString();
|
||||
fileModel.createusername = user.Name;
|
||||
fileModel.is_delete = 0;
|
||||
fileModel.relid = model.Id;
|
||||
|
||||
filesList.Add(fileModel);
|
||||
}
|
||||
|
||||
//关联案件
|
||||
var caserelationList = req.relationCaseNo;
|
||||
List<DroneCaseinfoRelation> relationList = new List<DroneCaseinfoRelation>();
|
||||
foreach (var item in caserelationList)
|
||||
{
|
||||
relationList.Add(new DroneCaseinfoRelation
|
||||
{
|
||||
caseid = model.Id,
|
||||
relation_case_no = item
|
||||
});
|
||||
}
|
||||
|
||||
//案件标签
|
||||
var tags = req.tags;
|
||||
List<DroneCaseinfoTag> tagList = new List<DroneCaseinfoTag>();
|
||||
foreach (var item in tags)
|
||||
{
|
||||
tagList.Add(new DroneCaseinfoTag
|
||||
{
|
||||
caseid = model.Id,
|
||||
tagid = item
|
||||
});
|
||||
}
|
||||
|
||||
//专题及平台数据处理
|
||||
var dataBaseList = db.Queryable<DatabasePicture>().Where(c => req.databaseid.Contains(c.Id)).IgnoreColumns(c => new { c.org_id }).ToList();
|
||||
List<DroneCaseSubject> subjectList = new List<DroneCaseSubject>();
|
||||
//遍历库
|
||||
for (int i = 0; i < dataBaseList.Count; i++)
|
||||
{
|
||||
//当前库
|
||||
var _item = dataBaseList[i];
|
||||
//专题信息
|
||||
var subjectlist = db.Queryable<Subject>().Where(r => req.subjectkeys.Contains(r.Key) && r.PId == _item.Id).ToList();
|
||||
var subjectkeys = "";
|
||||
if (req.subjectkeys != null && req.subjectkeys.Count > 0 && subjectlist.Count > 0)
|
||||
{
|
||||
subjectkeys = db.Queryable<Subject>().Where(r => req.subjectkeys.Contains(r.Key) && r.PId == _item.Id).Select(r => r.Key).ToList().Aggregate((current, next) => current + "," + next);
|
||||
}
|
||||
DroneCaseSubject cject = new DroneCaseSubject();
|
||||
cject.Id = Guid.NewGuid().ToString();
|
||||
cject.CaseId = model.Id;
|
||||
cject.DataBaseId = _item.Id;
|
||||
cject.SubjectKeys = subjectkeys;
|
||||
cject.CreateTime = DateTime.Now;
|
||||
cject.CreateUser = user.Id.ToString();
|
||||
cject.CreateUserName = user.Name;
|
||||
subjectList.Add(cject);
|
||||
}
|
||||
|
||||
//使用事务提交数据
|
||||
var transFlag = db.AsTenant().UseTran(() =>
|
||||
{
|
||||
//新增案件数据
|
||||
db.Updateable(model).ExecuteCommand();
|
||||
|
||||
//新增文件数据
|
||||
db.Insertable(filesList).ExecuteCommand();
|
||||
|
||||
//关联案件
|
||||
db.Deleteable<DroneCaseinfoRelation>().Where(a => a.caseid == model.Id).ExecuteCommand();
|
||||
db.Insertable(relationList).ExecuteCommand();
|
||||
|
||||
//案件标签
|
||||
db.Deleteable<DroneCaseinfoTag>().Where(a => a.caseid == model.Id).ExecuteCommand();
|
||||
db.Insertable(tagList).ExecuteCommand();
|
||||
|
||||
//案件平台专题
|
||||
db.Deleteable<DroneCaseSubject>().Where(a => a.CaseId == model.Id).ExecuteCommand();
|
||||
db.Insertable(subjectList).ExecuteCommand();
|
||||
});
|
||||
|
||||
if (transFlag.IsSuccess)
|
||||
return model.Id;
|
||||
else
|
||||
throw new Exception("上报失败");
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 事件判读
|
||||
|
|
@ -3679,259 +3676,6 @@ namespace OpenAuth.App.ServiceApp.DroneCaseInfo
|
|||
|
||||
//#endregion
|
||||
|
||||
///*
|
||||
// 需要过滤权限的几个方法:
|
||||
|
||||
//查询列表数据接口
|
||||
//LoadCaseInfoList
|
||||
//LoadCaseInfoData
|
||||
//CaseCountCensus
|
||||
|
||||
//图斑数据接口
|
||||
//GetDroneGeoJsonApp
|
||||
//GetAllDroneCaseCenterApp
|
||||
|
||||
//统计相关接口
|
||||
//CaseInfoTypeCensus
|
||||
//CaseInfoOrgCensus
|
||||
//GetDroneCaseOrgCensus
|
||||
|
||||
//现在统一使用:
|
||||
//是否判读1
|
||||
//是否删除 0 或 null
|
||||
//分配到组织机构 或 自己创建的
|
||||
// .Where(c => c.is_intact == 1 && (c.is_delete == 0 || c.is_delete == null))
|
||||
// //执行人过滤
|
||||
// .WhereIF(user.Account != Define.SYSTEM_USERNAME, c => SqlFunc.Subqueryable<Sugar_Relevance>().Where(it => it.SecondId == c.communityid && it.FirstId == user.Id && it.Key == "UserOrg").Any() || c.createuser == user.Id)
|
||||
// */
|
||||
|
||||
//#region 大屏展示
|
||||
|
||||
///// <summary>
|
||||
///// 正式案件记录
|
||||
///// </summary>
|
||||
///// <returns></returns>
|
||||
//public List<Sugar_Drone_caseinfo> LoadDroneCase(int? is_intact)
|
||||
//{
|
||||
// using (var db = SqlSugarOper.GetInstance(_configuration))
|
||||
// {
|
||||
// var list = db.Queryable<Sugar_Drone_caseinfo>()
|
||||
// .WhereIF(is_intact != null, c => c.is_intact == is_intact)
|
||||
// .OrderBy(c => c.createtime, OrderByType.Desc).Take(20).ToList();
|
||||
|
||||
// return list;
|
||||
// }
|
||||
//}
|
||||
|
||||
///// <summary>
|
||||
///// 最新案件处理
|
||||
///// </summary>
|
||||
///// <returns></returns>
|
||||
//public object LoadDroneCaseDeal(int? istoday)
|
||||
//{
|
||||
// using (var db = SqlSugarOper.GetInstance(_configuration))
|
||||
// {
|
||||
// DateTime? today = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd"));
|
||||
// var list = db.Queryable<Sugar_Drone_case_deal, Sugar_Drone_caseinfo>((d, c) => new JoinQueryInfos(
|
||||
// JoinType.Left, d.caseid == c.Id
|
||||
// ))
|
||||
// .WhereIF(istoday == 1, (d, c) => d.createtime >= today)
|
||||
// //.Where((d, c) => c.Id != null)
|
||||
// .OrderBy((d, c) => d.createtime, OrderByType.Desc)
|
||||
// .Select((d, c) => new { deal = d, caseinfo = c })
|
||||
// .Take(20)
|
||||
// .ToList();
|
||||
// return list;
|
||||
// }
|
||||
//}
|
||||
|
||||
///// <summary>
|
||||
///// 上报和处理案件数量
|
||||
///// </summary>
|
||||
///// <returns></returns>
|
||||
//public JObject GetTodayReportAndDealCount()
|
||||
//{
|
||||
// using (var db = SqlSugarOper.GetInstance(_configuration))
|
||||
// {
|
||||
// var today = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd"));
|
||||
// var reportCount = db.Queryable<Sugar_Drone_caseinfo>().Where(c => c.createtime > today).Count();
|
||||
// var dealCount = db.Queryable<Sugar_Drone_case_deal>().Where(c => c.createtime > today).Count();
|
||||
|
||||
// JObject obj = new JObject();
|
||||
// obj.Add("reportCount", reportCount);
|
||||
// obj.Add("dealCount", dealCount);
|
||||
|
||||
// return obj;
|
||||
// }
|
||||
//}
|
||||
|
||||
///// <summary>
|
||||
///// 案件数量统计
|
||||
///// </summary>
|
||||
///// <returns></returns>
|
||||
//public JObject GetDroneCaseCount()
|
||||
//{
|
||||
// using (var db = SqlSugarOper.GetInstance(_configuration))
|
||||
// {
|
||||
// var notIntactCount = db.Queryable<Sugar_Drone_caseinfo>().Where(c => c.is_intact == 0).Count();
|
||||
// var intactCount = db.Queryable<Sugar_Drone_caseinfo>().Where(c => c.is_intact == 1).Count();
|
||||
|
||||
// JObject obj = new JObject();
|
||||
// obj.Add("notIntactCount", notIntactCount);
|
||||
// obj.Add("intactCount", intactCount);
|
||||
|
||||
// return obj;
|
||||
// }
|
||||
//}
|
||||
|
||||
///// <summary>
|
||||
///// 违建分类统计
|
||||
///// </summary>
|
||||
///// <returns></returns>
|
||||
//public object GetDroneTypeCount()
|
||||
//{
|
||||
// using (var db = SqlSugarOper.GetInstance(_configuration))
|
||||
// {
|
||||
// var list = db.Queryable<Sugar_Drone_caseinfo>().GroupBy(c => new { c.typename })
|
||||
// .Select(c => new
|
||||
// {
|
||||
// c.typename,
|
||||
// count = SqlFunc.AggregateCount(c.Id)
|
||||
// }).ToList();
|
||||
|
||||
// JArray array = new JArray();
|
||||
// for (int i = 0; i < list.Count; i++)
|
||||
// {
|
||||
// var item = list[i];
|
||||
// string typename = item.typename;
|
||||
// int count = item.count;
|
||||
|
||||
// if (string.IsNullOrEmpty(typename))
|
||||
// typename = "未知";
|
||||
|
||||
// JObject obj = new JObject();
|
||||
// obj.Add("typename", typename);
|
||||
// obj.Add("count", count);
|
||||
|
||||
// array.Add(obj);
|
||||
// }
|
||||
// return array;
|
||||
// }
|
||||
//}
|
||||
|
||||
///// <summary>
|
||||
///// 按乡镇统计
|
||||
///// </summary>
|
||||
///// <returns></returns>
|
||||
//public JArray GetDroneOrgCount()
|
||||
//{
|
||||
// using (var db = SqlSugarOper.GetInstance(_configuration))
|
||||
// {
|
||||
// var countyid = db.Queryable<Sugar_Org>().Where(c => c.Name == "费县").Select(c => c.Id).First();
|
||||
// var streetList = db.Queryable<Sugar_Org>().Where(c => c.ParentId == countyid).OrderBy(c => c.SortNo, OrderByType.Asc).OrderBy(c => c.CreateTime, OrderByType.Asc).ToList();
|
||||
|
||||
// //案件上报数量
|
||||
// var caseList = db.Queryable<Sugar_Drone_caseinfo>().GroupBy(c => new { c.streetid })
|
||||
// .Select(c => new
|
||||
// {
|
||||
// c.streetid,
|
||||
// count = SqlFunc.AggregateCount(c.Id),
|
||||
// }).ToList();
|
||||
|
||||
// //案件处理数量
|
||||
// //var dealList = db.Queryable<Sugar_Drone_case_deal, Sugar_Drone_caseinfo>((d, c) => new JoinQueryInfos(
|
||||
// // JoinType.Left, d.caseid == c.Id
|
||||
// // ))
|
||||
// // .Where((d, c) => c.streetid != null && c.streetid != "")
|
||||
// // .GroupBy((d, c) => new { c.streetid })
|
||||
// // .Select((d, c) => new
|
||||
// // {
|
||||
// // c.streetid,
|
||||
// // dealCount = SqlFunc.AggregateCount(c.Id)
|
||||
// // }).ToList();
|
||||
// var today = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd"));
|
||||
|
||||
// JArray array = new JArray();
|
||||
|
||||
// //遍历乡镇
|
||||
// for (int i = 0; i < streetList.Count; i++)
|
||||
// {
|
||||
// //当前乡镇
|
||||
// var _item = streetList[i];
|
||||
|
||||
// int _reportCount = 0;
|
||||
|
||||
// //当前乡镇上报的数量
|
||||
// var _caseModel = caseList.Where(c => c.streetid == _item.Id).FirstOrDefault();
|
||||
// //今日案件数
|
||||
// var todayCount = db.Queryable<Sugar_Drone_caseinfo>().Where(c => c.streetid == _item.Id && c.createtime > today).Count();
|
||||
// //历史案件数
|
||||
// var historyCount = db.Queryable<Sugar_Drone_caseinfo>().Where(c => c.streetid == _item.Id && c.createtime < today).Count();
|
||||
// if (_caseModel != null)
|
||||
// {
|
||||
// _reportCount = _caseModel.count;
|
||||
// }
|
||||
|
||||
// JObject obj = new JObject();
|
||||
// obj.Add("name", _item.Name);
|
||||
// obj.Add("reportCount", _reportCount);
|
||||
// obj.Add("todayCount", todayCount);
|
||||
// obj.Add("historyCount", historyCount);
|
||||
|
||||
// array.Add(obj);
|
||||
// }
|
||||
|
||||
// return array;
|
||||
// }
|
||||
//}
|
||||
|
||||
///// <summary>
|
||||
///// 数据统计,按天统计图表
|
||||
///// </summary>
|
||||
///// <returns></returns>
|
||||
//public JArray GetDroneCaseDateCount(string type)
|
||||
//{
|
||||
// using (var db = SqlSugarOper.GetInstance(_configuration))
|
||||
// {
|
||||
// DateTime begin = DateTime.Parse(DateTime.Now.AddDays(-14).ToString("yyyy-MM-dd"));
|
||||
// if (type == "week")
|
||||
// {
|
||||
// begin = DateTime.Parse(DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd"));
|
||||
// }
|
||||
// else if (type == "month")
|
||||
// {
|
||||
// begin = DateTime.Parse(DateTime.Now.AddMonths(-1).ToString("yyyy-MM-dd"));
|
||||
// }
|
||||
|
||||
// //查询案件数据
|
||||
// var reportList = db.Queryable<Sugar_Drone_caseinfo>().Where(c => c.createtime > begin).Select(c => new { c.Id, c.createtime }).ToList();
|
||||
// var dealList = db.Queryable<Sugar_Drone_case_deal>().Where(c => c.createtime > begin).Select(c => new { c.Id, c.createtime }).ToList();
|
||||
|
||||
// JArray array = new JArray();
|
||||
// while (begin < DateTime.Now)
|
||||
// {
|
||||
// JObject obj = new JObject();
|
||||
|
||||
// //日期
|
||||
// obj.Add("day", begin.ToString("yyyy-MM-dd"));
|
||||
|
||||
// //过滤查询数量
|
||||
// int reportCount = reportList.Where(c => c.createtime >= begin && c.createtime < begin.AddDays(1)).Count();
|
||||
// int dealCount = dealList.Where(c => c.createtime >= begin && c.createtime < begin.AddDays(1)).Count();
|
||||
|
||||
// //数量
|
||||
// obj.Add("reportCount", reportCount);
|
||||
// obj.Add("dealCount", dealCount);
|
||||
|
||||
// array.Add(obj);
|
||||
|
||||
// //日期+1天
|
||||
// begin = begin.AddDays(1);
|
||||
// }
|
||||
|
||||
// return array;
|
||||
// }
|
||||
//}
|
||||
|
||||
///// <summary>
|
||||
///// 查询GeoJson
|
||||
|
|
@ -3948,160 +3692,8 @@ namespace OpenAuth.App.ServiceApp.DroneCaseInfo
|
|||
// return res;
|
||||
//}
|
||||
|
||||
///// <summary>
|
||||
///// 获取无人机的位置
|
||||
///// </summary>
|
||||
///// <returns></returns>
|
||||
//public object GetDroneLocationPoints()
|
||||
//{
|
||||
// using (var db = SqlSugarOper.GetInstance(_configuration))
|
||||
// {
|
||||
// string time = DateTime.Now.AddMinutes(-3).ToString("yyyy-MM-dd HH:mm:ss");
|
||||
// StringBuilder sql = new StringBuilder();
|
||||
// sql.AppendFormat($" select \"createuser\",\"createtime\", replace(replace(replace(st_astext(geom),'POINT(',''),')',''),' ',',') point from ");
|
||||
// sql.AppendFormat($" (");
|
||||
// sql.AppendFormat($" SELECT \"createuser\",createtime,geom,\"row_number\"() OVER (PARTITION by \"createuser\" ORDER BY createtime desc) rownum FROM \"drone_point_data\" where createtime > '{time}' ");
|
||||
// sql.AppendFormat($" ) aa where aa.rownum = 1");
|
||||
|
||||
|
||||
// //select createuser , createtime , replace(replace(replace(st_astext(geom),'POINT(',''),')',''),' ',',') point from ");
|
||||
// //(");
|
||||
// // SELECT createuser ,createtime,geom, row_number () OVER (PARTITION by createuser ORDER BY createtime desc) rownum FROM drone_point_data where createtime > '{time}' ");
|
||||
// //) aa where aa.rownum = 1");
|
||||
|
||||
// var list = db.SqlQueryable<dynamic>(sql.ToString()).ToList();
|
||||
// return list;
|
||||
// }
|
||||
//}
|
||||
///// <summary>
|
||||
///// 获取无人机的历史轨迹
|
||||
///// </summary>
|
||||
///// <returns></returns>
|
||||
//public object GetDroneLocationPointsHistory(string startTime, string endTime, string userId)
|
||||
//{
|
||||
// using (var db = SqlSugarOper.GetInstance(_configuration))
|
||||
// {
|
||||
// StringBuilder sql = new StringBuilder();
|
||||
// sql.AppendFormat($" select \"createuser\",\"createtime\", replace(replace(replace(st_astext(geom),'POINT(',''),')',''),' ',',') point FROM \"drone_point_data\" where createtime > '{startTime}' and createtime < '{endTime}' order by \"createtime\" desc");
|
||||
// var list = db.SqlQueryable<dynamic>(sql.ToString()).ToList();
|
||||
// return list;
|
||||
// }
|
||||
//}
|
||||
///// <summary>
|
||||
///// 无人机飞行 假数据
|
||||
///// </summary>
|
||||
///// <returns></returns>
|
||||
//public object GetDroneLocationPointsFalse()
|
||||
//{
|
||||
// JArray array = new JArray();
|
||||
// using (var db = SqlSugarOper.GetInstance(_configuration))
|
||||
// {
|
||||
// StringBuilder sql = new StringBuilder();
|
||||
// sql.AppendFormat($" select \"createuser\",\"createtime\", replace(replace(replace(st_astext(geom),'POINT(',''),')',''),' ',',') point from ");
|
||||
// sql.AppendFormat($" drone_point_data where createtime > '2022-02-11' and createtime < '2022-02-12' order by createtime asc ");
|
||||
// //var listFirst = db.SqlQueryable<dynamic>(sql.ToString()).ToList().ToJson();
|
||||
|
||||
// sql = new StringBuilder();
|
||||
// sql.AppendFormat($" select \"createuser\",\"createtime\", replace(replace(replace(st_astext(geom),'POINT(',''),')',''),' ',',') point from ");
|
||||
// sql.AppendFormat($" drone_point_data where createtime > '2022-02-15' and createtime < '2022-02-16' order by createtime asc ");
|
||||
// //var listSecond = db.SqlQueryable<dynamic>(sql.ToString()).ToList().ToJson();
|
||||
|
||||
// JObject objA = new JObject();
|
||||
// objA.Add("name", "listFirst");
|
||||
// objA.Add("point", (JToken)JsonConvert.DeserializeObject("[{\"createuser\":\"13280580815\",\"createtime\":\"2022-04-22 14:22:22\",\"point\":\"117.72339712649222,35.05450202665419\"}]"));
|
||||
// //117.72339712649222,35.05450202665419
|
||||
// array.Add(objA);
|
||||
|
||||
// JObject objB = new JObject();
|
||||
// objB.Add("name", "listSecond");
|
||||
// objB.Add("point", (JToken)JsonConvert.DeserializeObject("[{\"createuser\":\"13280580815\",\"createtime\":\"2022-04-22 14:22:22\",\"point\":\"117.71858685321234,35.22679558236362\"}]"));
|
||||
// //117.71858685321234,35.22679558236362
|
||||
// array.Add(objB);
|
||||
|
||||
// JObject objC = new JObject();
|
||||
// objC.Add("name", "listSecond");
|
||||
// objC.Add("point", (JToken)JsonConvert.DeserializeObject("[{\"createuser\":\"13280580815\",\"createtime\":\"2022-04-22 14:22:22\",\"point\":\"118.07365607557824,35.20530775653663\"}]"));
|
||||
// //118.07365607557824,35.20530775653663
|
||||
// array.Add(objC);
|
||||
|
||||
// JObject objD = new JObject();
|
||||
// objD.Add("name", "listSecond");
|
||||
// objD.Add("point", (JToken)JsonConvert.DeserializeObject("[{\"createuser\":\"13280580815\",\"createtime\":\"2022-04-22 14:22:22\",\"point\":\"117.98160109200148,35.28244211798609\"}]"));
|
||||
// //117.98160109200148,35.28244211798609
|
||||
// array.Add(objD);
|
||||
|
||||
// JObject objE = new JObject();
|
||||
// objE.Add("name", "listSecond");
|
||||
// objE.Add("point", (JToken)JsonConvert.DeserializeObject("[{\"createuser\":\"13280580815\",\"createtime\":\"2022-04-22 14:22:22\",\"point\":\"117.97323242064601,35.521189135282015\"}]"));
|
||||
// //117.97323242064601,35.521189135282015
|
||||
// array.Add(objE);
|
||||
|
||||
// return array;
|
||||
// }
|
||||
//}
|
||||
|
||||
///// <summary>
|
||||
///// 获取无人机的在线率
|
||||
///// </summary>
|
||||
///// <returns></returns>
|
||||
//public JObject GetDroneOnlinePercent()
|
||||
//{
|
||||
// using (var db = SqlSugarOper.GetInstance(_configuration))
|
||||
// {
|
||||
// string time = DateTime.Now.AddMinutes(-3).ToString("yyyy-MM-dd HH:mm:ss");
|
||||
// StringBuilder sql = new StringBuilder();
|
||||
// sql.AppendFormat($" select \"createuser\",\"createtime\", replace(replace(replace(st_astext(geom),'POINT(',''),')',''),' ',',') point from ");
|
||||
// sql.AppendFormat($" (");
|
||||
// sql.AppendFormat($" SELECT \"createuser\",createtime,geom,\"row_number\"() OVER (PARTITION by \"createuser\" ORDER BY createtime desc) rownum FROM \"drone_point_data\" where createtime > '{time}' ");
|
||||
// sql.AppendFormat($" ) aa where aa.rownum = 1");
|
||||
|
||||
// //无人机在线数量
|
||||
// var onlineCount = db.SqlQueryable<dynamic>(sql.ToString()).Count();
|
||||
|
||||
// //无人机的总数量
|
||||
// var totalCount = db.SqlQueryable<dynamic>("select distinct(\"createuser\") \"name\" from drone_point_data").Count();
|
||||
|
||||
// onlineCount += 5;
|
||||
// totalCount += 5;
|
||||
|
||||
// decimal onlinePercent = Decimal.Round(100 * Decimal.Parse(onlineCount.ToString()) / Decimal.Parse(totalCount.ToString()), 2);
|
||||
|
||||
// JObject obj = new JObject();
|
||||
// obj.Add("onlineCount", onlineCount);
|
||||
// obj.Add("offlineCount", totalCount - onlineCount);
|
||||
// obj.Add("totalCount", totalCount);
|
||||
// obj.Add("onlinePercent", onlinePercent);
|
||||
|
||||
// return obj;
|
||||
// }
|
||||
//}
|
||||
|
||||
///// <summary>
|
||||
///// 统计图表已完成未完成数量
|
||||
///// </summary>
|
||||
///// <returns></returns>
|
||||
//public JObject GetDroneCaseCompleteCount()
|
||||
//{
|
||||
// using (var db = SqlSugarOper.GetInstance(_configuration))
|
||||
// {
|
||||
// JObject obj = new JObject();
|
||||
|
||||
// var query = db.Queryable<Sugar_Drone_caseinfo>();
|
||||
// //线索总数
|
||||
// var cluesCount = query.Count();
|
||||
// //处理中数量1
|
||||
// var inHandCount = query.Where(c => c.handle_status_id == 1).Count();
|
||||
// //已完成数量2
|
||||
// var completeCount = query.Where(c => c.handle_status_id == 2).Count();
|
||||
|
||||
// obj.Add("cluesCount", cluesCount);
|
||||
// obj.Add("inHandCount", inHandCount);
|
||||
// obj.Add("completeCount", completeCount);
|
||||
|
||||
// return obj;
|
||||
// }
|
||||
//}
|
||||
|
||||
//#endregion
|
||||
|
||||
//#region 复提更新
|
||||
|
|
|
|||
|
|
@ -0,0 +1,66 @@
|
|||
using OpenAuth.Repository.Domain;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OpenAuth.App.ServiceApp.Request
|
||||
{
|
||||
public class AddOrUpdateDroneCaseInfoReq
|
||||
{
|
||||
public void Init()
|
||||
{
|
||||
if (this.pic_list == null) pic_list = new List<string>();
|
||||
if (this.video_list == null) video_list = new List<string>();
|
||||
if (this.relationCaseNo == null) relationCaseNo = new List<string>();
|
||||
if (this.tags == null) tags = new List<string>();
|
||||
}
|
||||
|
||||
public DroneCaseinfo info { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 图片列表
|
||||
/// </summary>
|
||||
public List<string> pic_list { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 视频列表
|
||||
/// </summary>
|
||||
public List<string> video_list { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 关联案件
|
||||
/// </summary>
|
||||
public List<string> relationCaseNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 案件标签
|
||||
/// </summary>
|
||||
public List<string> tags { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 图片列表
|
||||
/// </summary>
|
||||
public List<DroneFiles> pics { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 视频列表
|
||||
/// </summary>
|
||||
public List<DroneFiles> videos { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据库id
|
||||
/// </summary>
|
||||
public string[] databaseid { get; set; }
|
||||
|
||||
public List<string> subjectkeys { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class AddOrUpdateDroneCaseInfoReqExt : AddOrUpdateDroneCaseInfoReq
|
||||
{
|
||||
public decimal? lng { get; set; }
|
||||
public decimal? lat { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -27,12 +27,12 @@ namespace OpenAuth.WebApi.Controllers.ServiceControllers
|
|||
/// <param name="pageSize"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public async Task<Response<PageInfo<List<InsTask>>>> GteTaskListForAdmin(string taskName, int pageIndex, int pageSize)
|
||||
public async Task<Response<PageInfo<List<InsTask>>>> GteTaskListForAdmin(string taskName, int page, int limit)
|
||||
{
|
||||
Response<PageInfo<List<InsTask>>> response = new Response<PageInfo<List<InsTask>>>();
|
||||
try
|
||||
{
|
||||
return await _app.GteTaskListForAdmin(taskName, pageIndex, pageSize);
|
||||
return await _app.GteTaskListForAdmin(taskName, page, limit);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace OpenAuth.WebApi.Controllers.ServiceControllers
|
||||
{
|
||||
/// <summary>
|
||||
/// 统计分析
|
||||
/// </summary>
|
||||
[Route("api/[controller]/[action]")]
|
||||
[ApiController]
|
||||
public class DataAnalysisController : ControllerBase
|
||||
{
|
||||
public DataAnalysisController()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -111,5 +111,36 @@ namespace OpenAuth.WebApi.Controllers.ServiceControllers
|
|||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 上报案件
|
||||
/// </summary>
|
||||
/// <param name="req"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public Response<string> AddDroneCaseInfo([FromBody] AddOrUpdateDroneCaseInfoReq req)
|
||||
{
|
||||
Response<string> response = new Response<string>();
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(req.info.Id))
|
||||
{
|
||||
//新增
|
||||
response.Result = _app.AddDroneCaseInfo(req);
|
||||
}
|
||||
else
|
||||
{
|
||||
//修改
|
||||
response.Result = _app.UpdateDroneCaseInfo(req);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
response.Code = 500;
|
||||
response.Message = ex.InnerException?.Message ?? ex.Message;
|
||||
}
|
||||
return response;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue