This commit is contained in:
路 范
2021-09-18 10:54:55 +08:00
26 changed files with 260 additions and 293 deletions

View File

@@ -113,7 +113,7 @@ namespace Ewide.NbzsZheliban.Service
//调查表集合
var list_dcbs = list_zz_dcb.Concat(list_fzz_dcb);
//项目列表
var list_projects = await db.Ado.SqlQueryAsync<H5IndexPrjModel>("select a.ID Prjid,a.area,a.AreaID,a.HouseAcquisitionDepartment as zsbm,a.CollectDecisionNo1 as year,(isnull(a.CollectDecisionNoHeadName,'')+'['+cast(a.CollectDecisionNo1 as varchar)+']'+ isnull(cast(a.CollectDecisionNo2 as varchar),'')+'号') zsjdh,dbo.get_current_state(a.ID) CurrentState from Projects a where ID in ('" + string.Join("','", list_dcbs.Select(p => p.PrjId)) + "') ");
var list_projects = await db.Ado.SqlQueryAsync<H5IndexPrjModel>("select a.ID Prjid,a.area,a.AreaID,a.HouseAcquisitionDepartment as zsbm,a.CollectDecisionNo1 as year,(isnull(a.CollectDecisionNoHeadName,'')+'['+cast(a.CollectDecisionNo1 as varchar)+']'+ isnull(cast(a.CollectDecisionNo2 as varchar),'')+'号') zsjdh,dbo.get_current_state(a.ID) CurrentState,NAME from Projects a where ID in ('" + string.Join("','", list_dcbs.Select(p => p.PrjId)) + "') ");
//分户评估
var InvestigateTableID_param = "'" + string.Join("','", list_dcbs.Select(p => p.dcbId)) + "'";
var list_fhpgs = await db.Ado.SqlQueryAsync<Fhpgs>("select d.id,e.ProjectId as PrjId ,d.AssessmentNo,e.HouseAddress,d.countValue,e.id dcbId,d.CreateTime,d.CreateUserName from InvestigateTable_Assessment d inner join InvestigateTable e on d.InvestigateTableId=e.ID where d.InvestigateTableID in ( " + InvestigateTableID_param + " ) union all select d.id,e.ProjectId as PrjId ,AssessmentNo, e.HouseAddress, d.countValue,e.id dcbId,d.CreateTime,d.CreateUserName from NonInvestigateTable_Assessment d inner join NonResidentialInvestigateTable e on d.NonInvestigateTableID = e.ID where d.NonInvestigateTableID in ( " + InvestigateTableID_param + " ) ;");
@@ -198,7 +198,6 @@ namespace Ewide.NbzsZheliban.Service
}).FirstAsync();
return entity;
}
/// <summary>
/// 协议详细
/// </summary>
@@ -206,7 +205,7 @@ namespace Ewide.NbzsZheliban.Service
/// <returns></returns>
[HttpPost("/agreement/info")]
[Microsoft.AspNetCore.Authorization.AllowAnonymous]
public IActionResult AgreementInfo([FromBody] JObject args)
public async Task<dynamic> AgreementInfo([FromBody] JObject args)
{
var ticket = args.GetJsonValue("ticket", isThrowExp: true);
var id = args.GetJsonGuidValue("id", isThrowExp: true);
@@ -231,9 +230,44 @@ namespace Ewide.NbzsZheliban.Service
}
if (string.IsNullOrEmpty(XyFile))
throw Oops.Oh("未上传附件");
var filePath = App.Configuration["nbzs_file_path"] + XyFile;
return new FileStreamResult(new FileStream(filePath, FileMode.Open), "application/octet-stream") { FileDownloadName = new FileInfo(filePath).Name };
var filePath = App.Configuration["nbzs_domain"] + XyFile;
return filePath;
}
///// <summary>
///// 协议详细
///// </summary>
///// <param name="args"></param>
///// <returns></returns>
//[HttpPost("/agreement/info")]
//[Microsoft.AspNetCore.Authorization.AllowAnonymous]
//public IActionResult AgreementInfo([FromBody] JObject args)
//{
// var ticket = args.GetJsonValue("ticket", isThrowExp: true);
// var id = args.GetJsonGuidValue("id", isThrowExp: true);
// JObject userInfoObj = GetInfoByTicket(ticket);
// var XyFile = "";
// //住宅
// var entity_zz = db.Queryable<Entity.ResidentialAgreement>().Where(p => p.ID == id).Select(p => new { p.ID, p.XyFile }).First();
// if (entity_zz != null)
// {
// XyFile = entity_zz.XyFile;
// }
// //非住宅
// else
// {
// var entity_fzz = db.Queryable<Entity.NonResidentialAgreement>().Where(p => p.ID == id).Select(p => new { p.ID, p.XyFile }).First();
// if (entity_fzz != null)
// {
// XyFile = entity_fzz.XyFile;
// }
// else
// throw Oops.Oh("ID错误");
// }
// if (string.IsNullOrEmpty(XyFile))
// throw Oops.Oh("未上传附件");
// var filePath = App.Configuration["nbzs_file_path"] + XyFile;
// return new FileStreamResult(new FileStream(filePath, FileMode.Open), "application/octet-stream") { FileDownloadName = new FileInfo(filePath).Name };
//}
/// <summary>
/// 分布评估详细
/// </summary>