dev
洁 任 16 hours ago
parent ac8ad7541c
commit b1b3de8441

@ -2786,12 +2786,12 @@ public partial class DroneCaseInfoSingleApp : SqlSugarBaseApp<DroneCaseInfoSingl
// $"a.\"ProcessCode\"='" +
// schemeCode + "' ";
sql = $"select * from ((select a.\"Id\" as taskId,a.\"UnitName\" as unitName,c.xiangmu_name as title,c.synchronoustime as createDate," +
sql = $"select * from ((select a.\"Id\" as taskId,a.\"UnitName\" as unitName,c.xiangmu_name as title,c.handle_status_id,c.synchronoustime as createDate," +
$"c.xiangmu_no as caseNo,c.countyname,c.streetname,c.communityname,c.countyid,c.streetid,c.communityid,\r\n a.\"ProcessCode\" as processcode,a.\"ProcessId\" as processid,a.\"Type\" as type,a.\"ChildSchemeInfoCode\" as childSchemeInfoCode," +
$"c.gengdi_area as gengdiArea,yongjiujibennongtian_area as yongjiujibennongtianArea ,nongyongdi_area as nongyongdiArea,c.geomid," +
$"c.\"Id\" as caseid\r\n from wf_task a LEFT JOIN wf_process b on a.\"ProcessId\"=b.\"Id\"\r\nLEFT JOIN drone_ssnyd c " +
$"on b.\"InstanceInfo\"->>'pkeyValue'=c.\"Id\" where 1=1 and a.\"ProcessCode\"='004' and a.\"UnitName\" in ('开工核查','开工问题整改','建中核查','建中问题整改','完工核查','完工问题整改','日常监管','监管问题整改','现场复核','监管接收')" +
$" and a.\"State\"=1 ) UNION \r\n\r\n(select a.\"Id\" as taskId,a.\"UnitName\" as unitName,c.xiangmu_name as title,c.synchronoustime as createDate,c.xiangmu_no as caseNo,c.countyname,c.streetname,c.communityname,c.countyid,c.streetid,c.communityid," +
$" and a.\"State\"=1 ) UNION \r\n\r\n(select a.\"Id\" as taskId,a.\"UnitName\" as unitName,c.xiangmu_name as title,c.handle_status_id,c.synchronoustime as createDate,c.xiangmu_no as caseNo,c.countyname,c.streetname,c.communityname,c.countyid,c.streetid,c.communityid," +
$"\r\n a.\"ProcessCode\" as processcode,a.\"ProcessId\" as processid,a.\"Type\" as type,a.\"ChildSchemeInfoCode\" as childSchemeInfoCode,c.gengdi_area as gengdiArea,yongjiujibennongtian_area as yongjiujibennongtianArea ,nongyongdi_area as nongyongdiArea,c.geomid,c.\"Id\" as caseid\r\n" +
$" from wf_task a LEFT JOIN wf_process b on a.\"ProcessId\"=b.\"Id\"\r\nLEFT JOIN drone_ssnyd_rcjg d on b.\"InstanceInfo\"->>'pkeyValue'=d.\"Id\" RIGHT JOIN drone_ssnyd c on c.\"Id\"=d.ssnyd_id where 1=1 " +
$" and a.\"ProcessCode\"='005' and a.\"UnitName\" in ('开工核查','开工问题整改','建中核查','建中问题整改','完工核查','完工问题整改','日常监管','监管问题整改','现场复核','监管接收') and a.\"State\"=1 )) e where 1=1 ";
@ -2808,6 +2808,12 @@ public partial class DroneCaseInfoSingleApp : SqlSugarBaseApp<DroneCaseInfoSingl
sqlpart = sqlpart + $" and (e.caseno like '%" + req.caseNo + "%' or e.title like '%" + req.caseNo+"%') ";
}
if (!string.IsNullOrEmpty(req.caseid))
{
//sqlpart = sqlpart + $" and e.xiangmu_no like '%" + req.caseNo + "%'";
sqlpart = sqlpart + $" and e.caseid='{req.caseid}' ";
}
@ -2883,6 +2889,11 @@ public partial class DroneCaseInfoSingleApp : SqlSugarBaseApp<DroneCaseInfoSingl
double.Parse(req.jibenArea2);
}
if (req.handle_status_id != null)
{
sqlpart = sqlpart + $" and handle_status_id={req.handle_status_id} ";
}
sqlpart += $" ORDER BY e.createdate desc";
@ -6957,5 +6968,9 @@ public partial class DroneCaseInfoSingleApp : SqlSugarBaseApp<DroneCaseInfoSingl
// 将文件打包成 ZIP
CreateZipFromShapefiles(shpFilePath, shpFilePathzip);
}
#region 查询子流程信息
#endregion
}

@ -28,7 +28,7 @@ namespace OpenAuth.App.ServiceApp.DroneCaseInfo.Request
/// </summary>
public string typename { get; set; }
public string caseid { get; set; }
/// <summary>
/// 图斑面积
/// </summary>
@ -68,6 +68,7 @@ namespace OpenAuth.App.ServiceApp.DroneCaseInfo.Request
public string jibenArea2 { get; set; }
public string nowStatus { get; set; }
public int? handle_status_id { get; set; }
/// <summary>
/// 页码
/// </summary>

@ -13,9 +13,11 @@ namespace OpenAuth.App.ServiceApp.DroneSsnydManage
{
public class DroneSsnyApp : SqlSugarBaseApp<DroneSsnyd, SugarDbContext>
{
public DroneSsnyApp(ISugarUnitOfWork<SugarDbContext> unitWork, ISimpleClient<DroneSsnyd> repository, IAuth auth)
private readonly ISqlSugarClient _client;
public DroneSsnyApp(ISugarUnitOfWork<SugarDbContext> unitWork, ISimpleClient<DroneSsnyd> repository, ISqlSugarClient client, IAuth auth)
: base(unitWork, repository, auth)
{
_client = client;
}
/// <summary>
@ -440,50 +442,55 @@ namespace OpenAuth.App.ServiceApp.DroneSsnydManage
dataRow.Cells[2].SetCellValue(item.streetname);
dataRow.Cells[3].SetCellValue(item.communityname);
dataRow.Cells[4].SetCellValue(item.quanliren);
dataRow.Cells[5].SetCellValue(item.xingzhengquhua);
dataRow.Cells[6].SetCellValue(item.beian_no);
dataRow.Cells[7].SetCellValue(item.start_time.ToString());
dataRow.Cells[8].SetCellValue(item.end_time.ToString());
dataRow.Cells[9].SetCellValue(item.xiangmu_yt);
dataRow.Cells[5].SetCellValue(item.lianxifangshi);
dataRow.Cells[6].SetCellValue(item.xingzhengquhua);
dataRow.Cells[7].SetCellValue(item.beian_no);
dataRow.Cells[8].SetCellValue(item.beianriqi);
dataRow.Cells[9].SetCellValue(item.handle_status_name);
if (item.start_time != null)
{
dataRow.Cells[10].SetCellValue(Convert.ToDateTime(item.start_time).ToString("yyyy-MM-dd"));
}
else
{
dataRow.Cells[10].SetCellValue("");
}
if (item.end_time != null)
{
dataRow.Cells[11].SetCellValue(Convert.ToDateTime(item.end_time).ToString("yyyy-MM-dd"));
}
else
{
dataRow.Cells[11].SetCellValue("");
}
dataRow.Cells[12].SetCellValue(item.xiangmu_yt);
dataRow.Cells[13].SetCellValue(item.jianzhujiegou);
if (item.shenqing_area != null)
{
dataRow.Cells[10].SetCellValue(item.shenqing_area.ToString());
dataRow.Cells[14].SetCellValue(item.shenqing_area.ToString());
}
else
{
dataRow.Cells[10].SetCellValue("0.00");
dataRow.Cells[14].SetCellValue("0.00");
}
if (item.shengchan_area != null)
{
dataRow.Cells[11].SetCellValue(item.shenqing_area.ToString());
dataRow.Cells[15].SetCellValue(item.shengchan_area.ToString());
}
else
{
dataRow.Cells[11].SetCellValue("0.00");
dataRow.Cells[15].SetCellValue("0.00");
}
if (item.fuzhu_area != null)
{
dataRow.Cells[12].SetCellValue(item.fuzhu_area.ToString());
dataRow.Cells[16].SetCellValue(item.fuzhu_area.ToString());
}
else
{
dataRow.Cells[12].SetCellValue("0.00");
dataRow.Cells[16].SetCellValue("0.00");
}
dataRow.Cells[13].SetCellValue(item.xiafatime.ToString());
dataRow.Cells[14].SetCellValue(item.handle_status_name);
//if (item.handle_status_id != null)
//{
// StatusType status = (StatusType)item.handle_status_id;
// dataRow.Cells[14].SetCellValue(status.ToString());
//}
//else
//{
// dataRow.Cells[14].SetCellValue("--");
//}
}
#endregion
@ -552,6 +559,244 @@ namespace OpenAuth.App.ServiceApp.DroneSsnydManage
#endregion
#region 预警列表
/// <summary>
/// 预警问题列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <returns></returns>
public PageInfo<List<DroneSsnyd>> GetWentiDronssnydList(string xiangmumc, string countyid, string streetid,
string xiangmuno, string xiangmuyt, int? status,
int pageIndex, int pageSize)
{
int totalCount = 0;
//获取当前登录用户
var orgs = _auth.GetCurrentUser().Orgs;
List<string> ids = new List<string>();
if (orgs != null && orgs.Count > 0)
{
ids = orgs.Select(r => r.Id.ToString()).ToList();
}
bool issystem = _auth.IsSystem();
var list = _client.Queryable<DroneSsnydRcjg>()
.LeftJoin<DroneSsnyd>((r,a)=>r.ssnyd_id==a.Id)
.Where((r, a) => r.iswenti_rc=="是"&&r.is_lishi==0)
.WhereIF(!string.IsNullOrEmpty(xiangmumc), (r, a) => a.xiangmu_name.Contains(xiangmumc))
.WhereIF(!string.IsNullOrEmpty(countyid), (r, a) => a.countyid == countyid)
.WhereIF(!string.IsNullOrEmpty(streetid), (r, a) => a.streetid == streetid)
.WhereIF(!string.IsNullOrEmpty(xiangmuyt), (r, a) => a.xiangmu_yt == xiangmuyt)
.WhereIF(!string.IsNullOrEmpty(xiangmuno), (r, a) => a.xiangmu_no.Contains(xiangmuno))
.WhereIF(!issystem, (r, a) => (ids.Contains(a.countyid) || ids.Contains(a.streetid)))
.WhereIF(status != null, (r, a) => a.handle_status_id == status)
.OrderBy((r, a) => a.end_time, OrderByType.Desc)
.Select((r, a) => a)
.ToPageList(pageIndex, pageSize, ref totalCount);
return new PageInfo<List<DroneSsnyd>>
{
Items = list,
Total = totalCount
};
}
public List<DroneSsnyd> GetWentiDronssnydexport(string xiangmumc, string countyid, string streetid,
string xiangmuno, string xiangmuyt, int? status)
{
//获取当前登录用户
var orgs = _auth.GetCurrentUser().Orgs;
List<string> ids = new List<string>();
if (orgs != null && orgs.Count > 0)
{
ids = orgs.Select(r => r.Id.ToString()).ToList();
}
bool issystem = _auth.IsSystem();
var list = _client.Queryable<DroneSsnydRcjg>()
.LeftJoin<DroneSsnyd>((r, a) => r.ssnyd_id == a.Id)
.Where((r, a) => r.iswenti_rc == "是" && r.is_lishi == 0)
.WhereIF(!string.IsNullOrEmpty(xiangmumc), (r, a) => a.xiangmu_name.Contains(xiangmumc))
.WhereIF(!string.IsNullOrEmpty(countyid), (r, a) => a.countyid == countyid)
.WhereIF(!string.IsNullOrEmpty(streetid), (r, a) => a.streetid == streetid)
.WhereIF(!string.IsNullOrEmpty(xiangmuyt), (r, a) => a.xiangmu_yt == xiangmuyt)
.WhereIF(!string.IsNullOrEmpty(xiangmuno), (r, a) => a.xiangmu_no.Contains(xiangmuno))
.WhereIF(!issystem, (r, a) => (ids.Contains(a.countyid) || ids.Contains(a.streetid)))
.WhereIF(status != null, (r, a) => a.handle_status_id == status)
.OrderBy((r, a) => a.end_time, OrderByType.Desc)
.Select((r, a) => a)
.ToList();
return list;
}
/// <summary>
/// 导出
/// </summary>
/// <param name="list"></param>
/// <param name="headers"></param>
/// <returns></returns>
public Response<MemoryStream> ListWentiToExcel(List<DroneSsnyd> list, List<string> headers)
{
Response<MemoryStream> response = new Response<MemoryStream>();
try
{
HSSFWorkbook workbook = new HSSFWorkbook();
ISheet sheet = workbook.CreateSheet();
#region 内容样式
IFont font1 = workbook.CreateFont(); //创建一个字体样式对象
font1.FontName = "Microsoft YaHei"; //和excel里面的字体对应
//font1.Boldweight = short.MaxValue;//字体加粗
font1.FontHeightInPoints = 12; //字体大小
ICellStyle style = workbook.CreateCellStyle(); //创建样式对象
style.BorderBottom = BorderStyle.Thin;
style.BorderLeft = BorderStyle.Thin;
style.BorderRight = BorderStyle.Thin;
style.BorderTop = BorderStyle.Thin;
style.Alignment = HorizontalAlignment.Center;
style.VerticalAlignment = VerticalAlignment.Center;
style.SetFont(font1); //将字体样式赋给样式对象
style.WrapText = true;
#endregion
#region 标题样式
IFont font = workbook.CreateFont(); //创建一个字体样式对象
font.FontName = "Microsoft YaHei"; //和excel里面的字体对应
font.Boldweight = (short)FontBoldWeight.Bold; //字体加粗
font.FontHeightInPoints = 12; //字体大小
ICellStyle style1 = workbook.CreateCellStyle(); //创建样式对象
style1.BorderBottom = BorderStyle.Thin;
style1.BorderLeft = BorderStyle.Thin;
style1.BorderRight = BorderStyle.Thin;
style1.BorderTop = BorderStyle.Thin;
style1.Alignment = HorizontalAlignment.Center;
style1.VerticalAlignment = VerticalAlignment.Center;
style1.SetFont(font); //将字体样式赋给样式对象
#endregion
#region 创建表头
IRow rowHeader = sheet.CreateRow(0);
rowHeader.Height = 20 * 30;
for (int i = 0; i < headers.Count; i++)
{
var header = headers[i];
rowHeader.CreateCell(i);
rowHeader.Cells[i].CellStyle = style1;
rowHeader.Cells[i].SetCellValue(header);
if (i == 0)
{
sheet.SetColumnWidth(0, 20 * 200);
}
else
{
sheet.SetColumnWidth(i, 20 * 350);
}
}
#endregion
#region 填充数据
for (int i = 0; i < list.Count; i++) //循环数据
{
var item = list[i];
IRow dataRow = sheet.CreateRow(i + 1);
//dataRow.Height = 20 * 20;
var type = item.GetType();
var props = type.GetProperties();
for (int j = 0; j < headers.Count; j++)
{
dataRow.CreateCell(j);
dataRow.Cells[j].CellStyle = style;
}
dataRow.Cells[0].SetCellValue(item.xiangmu_no);
dataRow.Cells[1].SetCellValue(item.xiangmu_name);
dataRow.Cells[2].SetCellValue(item.streetname);
dataRow.Cells[3].SetCellValue(item.communityname);
dataRow.Cells[4].SetCellValue(item.quanliren);
dataRow.Cells[5].SetCellValue(item.lianxifangshi);
dataRow.Cells[6].SetCellValue(item.xingzhengquhua);
dataRow.Cells[7].SetCellValue(item.beian_no);
dataRow.Cells[8].SetCellValue(item.beianriqi);
dataRow.Cells[9].SetCellValue(item.handle_status_name);
if (item.start_time != null)
{
dataRow.Cells[10].SetCellValue(Convert.ToDateTime(item.start_time).ToString("yyyy-MM-dd"));
}
else
{
dataRow.Cells[10].SetCellValue("");
}
if (item.end_time != null)
{
dataRow.Cells[11].SetCellValue(Convert.ToDateTime(item.end_time).ToString("yyyy-MM-dd"));
}
else
{
dataRow.Cells[11].SetCellValue("");
}
dataRow.Cells[12].SetCellValue(item.xiangmu_yt);
dataRow.Cells[13].SetCellValue(item.jianzhujiegou);
if (item.shenqing_area != null)
{
dataRow.Cells[14].SetCellValue(item.shenqing_area.ToString());
}
else
{
dataRow.Cells[14].SetCellValue("0.00");
}
if (item.shengchan_area != null)
{
dataRow.Cells[15].SetCellValue(item.shengchan_area.ToString());
}
else
{
dataRow.Cells[15].SetCellValue("0.00");
}
if (item.fuzhu_area != null)
{
dataRow.Cells[16].SetCellValue(item.fuzhu_area.ToString());
}
else
{
dataRow.Cells[16].SetCellValue("0.00");
}
}
#endregion
response.Result = new MemoryStream();
workbook.Write(response.Result);
workbook = null;
response.Result.Close();
response.Result.Dispose();
response.Code = 200;
response.Message = "获取成功";
}
catch (Exception ex)
{
response.Code = 500;
response.Message = ex.Message;
}
return response;
}
#endregion
/// <summary>
/// 项目编号维护
/// </summary>

@ -405,8 +405,7 @@ namespace OpenAuth.WebApi.Controllers.ServiceControllers
List<string> headers = null;
headers = new List<string>
{
"项目编号", "项目名称", "乡镇", "村庄", "权利人", "行政区划", "备案编号", "项目开始时间", "项目结束时间", "项目当前用途", "设施农业申请用地面积", "生产设施用地",
"辅助设施用地", "下发时间", "项目状态"
"项目编号", "项目名称", "乡镇", "村庄", "权利人", "联系方式","行政区划", "备案编号","备案日期","项目状态", "项目开始时间", "项目结束时间", "设施农业类型","建筑结构", "设施农业申请用地面积(公顷)", "生产设施用地(公顷)", "辅助设施用地(公顷)"
};
var response = droneSsnyApp.TimeOutAlarmExport(import.xiangmumc, import.countyid, import.streetid,
import.xiangmuno, import.xiangmuyt);
@ -481,8 +480,7 @@ namespace OpenAuth.WebApi.Controllers.ServiceControllers
List<string> headers = null;
headers = new List<string>
{
"项目编号", "项目名称", "乡镇", "村庄", "权利人", "行政区划", "备案编号", "项目开始时间", "项目结束时间", "项目当前用途", "设施农业申请用地面积", "生产设施用地",
"辅助设施用地", "下发时间", "项目状态"
"项目编号", "项目名称", "乡镇", "村庄", "权利人", "联系方式","行政区划", "备案编号","备案日期","项目状态", "项目开始时间", "项目结束时间", "设施农业类型","建筑结构", "设施农业申请用地面积(公顷)", "生产设施用地(公顷)", "辅助设施用地(公顷)"
};
var response = droneSsnyApp.GetDronssnydExportList(import.xiangmumc, import.countyid, import.streetid,
import.xiangmuno, import.xiangmuyt,import.status);
@ -510,5 +508,80 @@ namespace OpenAuth.WebApi.Controllers.ServiceControllers
return Ok(data);
}
#endregion
#region 预警问题列表
/// <summary>
/// 预警问题列表
/// </summary>
/// <param name="xiangmumc">项目名称</param>
/// <param name="countyid">县</param>
/// <param name="streetid">镇</param>
/// <param name="xiangmuno">项目编号</param>
/// <param name="xiangmuyt">项目用途</param>
/// <param name="status">项目状态</param>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <returns></returns>
[HttpGet]
public Response<PageInfo<List<DroneSsnyd>>> GetWentiDronssnydList(string xiangmumc, string countyid, string streetid, int? status,
string xiangmuno, string xiangmuyt,
int page, int limit)
{
var response = new Response<PageInfo<List<DroneSsnyd>>>();
try
{
response.Result =
droneSsnyApp.GetWentiDronssnydList(xiangmumc, countyid, streetid, xiangmuno, xiangmuyt, status, page, limit);
}
catch (Exception ex)
{
response.Code = 500;
response.Message = ex.InnerException?.Message ?? ex.Message;
}
return response;
}
/// <summary>
/// 预警问题列表导出
/// </summary>
/// <param name="import"></param>
/// <returns></returns>
[HttpPost]
public IActionResult GetWentiDronssnydExport([FromQuery] DroneSsny import)
{
var data = new Response();
List<string> headers = null;
headers = new List<string>
{
"项目编号", "项目名称", "乡镇", "村庄", "权利人", "联系方式","行政区划", "备案编号","备案日期","项目状态", "项目开始时间", "项目结束时间", "设施农业类型","建筑结构", "设施农业申请用地面积(公顷)", "生产设施用地(公顷)", "辅助设施用地(公顷)"
};
var response = droneSsnyApp.GetWentiDronssnydexport(import.xiangmumc, import.countyid, import.streetid,
import.xiangmuno, import.xiangmuyt, import.status);
if (response.Count > 0)
{
var excelRes = droneSsnyApp.ListWentiToExcel(response, headers);
if (excelRes.Code == 200)
{
return File(excelRes.Result.ToArray(),
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"预警问题列表" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".xls");
}
else
{
data.Code = excelRes.Code;
data.Message = "导出失败";
}
}
else
{
data.Code = 300;
data.Message = "暂无数据";
}
return Ok(data);
}
#endregion
}
}

@ -3,7 +3,7 @@
<PropertyGroup>
<Controller_SelectedScaffolderID>MvcControllerEmptyScaffolder</Controller_SelectedScaffolderID>
<Controller_SelectedScaffolderCategoryPath>root/Common/MVC/Controller</Controller_SelectedScaffolderCategoryPath>
<NameOfLastUsedPublishProfile>D:\Program Files %28x86%29\lanling\lanlingxian_ziranziyuanheguihua\OpenAuth.WebApi\Properties\PublishProfiles\continue.pubxml</NameOfLastUsedPublishProfile>
<NameOfLastUsedPublishProfile>E:\2025\兰陵批后监管\OpenAuth.WebApi\Properties\PublishProfiles\continue.pubxml</NameOfLastUsedPublishProfile>
<ActiveDebugProfile>OpenAuthApi</ActiveDebugProfile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

@ -10,7 +10,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<PublishProvider>FileSystem</PublishProvider>
<PublishUrl>E:\迅雷下载\lanling</PublishUrl>
<PublishUrl>E:\2025\文件系统</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod>
<_TargetId>Folder</_TargetId>
<SiteUrlToLaunchAfterPublish />

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<key id="93fca0d4-8c39-4163-9f3b-c3b352893dd8" version="1">
<creationDate>2025-09-08T02:08:00.3094773Z</creationDate>
<activationDate>2025-09-08T02:08:00.2851972Z</activationDate>
<expirationDate>2025-12-07T02:08:00.2851972Z</expirationDate>
<descriptor deserializerType="Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60">
<descriptor>
<encryption algorithm="AES_256_CBC" />
<validation algorithm="HMACSHA256" />
<masterKey p4:requiresEncryption="true" xmlns:p4="http://schemas.asp.net/2015/03/dataProtection">
<!-- Warning: the key below is in an unencrypted form. -->
<value>Im+AmFwF5B2Hu4BQdOwxhwRUSGxTPaE4Av7UcMndP1xn3WFsOjlb6zbAMY4kxi505RgfX5bCEkUIQ1BX/80lLQ==</value>
</masterKey>
</descriptor>
</descriptor>
</key>
Loading…
Cancel
Save