bugfix
前端二次进入页面和二次回退问题解决
This commit is contained in:
@@ -170,6 +170,12 @@ namespace Ewide.NbzsZheliban.Service
|
||||
return await db.Ado.SqlQueryAsync<Bcxy>("select d.id,isnull(d.CollectDecisionNoHeadName,'')+isnull(d.No1,'')+'-'+isnull(d.No2,'')+(case when (d.No3 is null or d.No3 = '') then '' else ('-'+d.No3) end ) XyNo,d.SwitchProductionWay,e.HouseAddress,d.SummationShouldCompensateMoney,e.ProjectId as PrjId,e.id dcbId,d.SignTime,1 type from ResidentialAgreement d inner join InvestigateTable e on d.InvestigateTableId=e.ID where d.IsInRecords = 1 and d.InvestigateTableID in ( " + InvestigateTableID_param + " ) union all select d.id,isnull(d.CollectDecisionNoHeadName, '') + isnull(d.No2, '') + '-' + isnull(d.No3, '') XyNo , d.SwitchProductionWay, e.HouseAddress, d.SummationShouldCompensateMoney, e.ProjectId as PrjId,e.id dcbId,d.SignTime,2 type from NonResidentialAgreement d inner join NonResidentialInvestigateTable e on d.NonInvestigateTableID = e.ID where d.IsInRecords = 1 and d.NonInvestigateTableID in ( " + InvestigateTableID_param + " ); ");
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="cardno"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <returns></returns>
|
||||
private async Task<H5IndexModel> GetInfoByCardNoAsync(string cardno, string username)
|
||||
{
|
||||
var cachedata = _cache.Get("IndexData-" + cardno);
|
||||
@@ -205,7 +211,7 @@ namespace Ewide.NbzsZheliban.Service
|
||||
{
|
||||
ID = b.ID,
|
||||
Contents = b.Contents,
|
||||
PublicTime = b.PublicTime.HasValue ? b.PublicTime.Value.ToString("yyyy-MM-dd") : string.Empty,
|
||||
PublicTime = b.PublicTime.ToString(),
|
||||
Title = b.Title,
|
||||
Area = b.Area
|
||||
}).ToList();
|
||||
@@ -217,11 +223,15 @@ namespace Ewide.NbzsZheliban.Service
|
||||
{
|
||||
ID = b.ID,
|
||||
Contents = b.Contents,
|
||||
PublicTime = b.PublicTime.HasValue ? b.PublicTime.Value.ToString("yyyy-MM-dd") : string.Empty,
|
||||
PublicTime = b.PublicTime.ToString(),
|
||||
Title = b.Title,
|
||||
Area = b.Area
|
||||
}).ToList();
|
||||
}
|
||||
list_PoliciesRegulations.ForEach(a =>
|
||||
{
|
||||
a.PublicTime = Convert.ToDateTime(a.PublicTime).ToString("yyyy-MM-dd");
|
||||
});
|
||||
//移除没有协议也没有分户评估的项目 (空项目)
|
||||
list_projects.FindAll(a => (a.BcxyList == null || a.BcxyList.Count == 0) && (a.FhpgList == null || a.FhpgList.Count == 0)).ForEach(a =>
|
||||
{
|
||||
@@ -403,6 +413,12 @@ namespace Ewide.NbzsZheliban.Service
|
||||
var ticket = args.GetJsonValue("ticket", isThrowExp: true);
|
||||
var id = args.GetJsonGuidValue("id", isThrowExp: true);
|
||||
JObject userInfoObj = GetInfoByTicket(ticket);
|
||||
//var cachedata=_cache.Get($"CacheData-ResidentialAgreement");
|
||||
//if (!string.IsNullOrWhiteSpace(cachedata))
|
||||
//{
|
||||
// var listBcxy = JSON.Deserialize<List<Bcxy>>(cachedata);
|
||||
// XyFile= listBcxy.Where(p => p.Id == id.ToString()).Select(p => new {ID= p.Id, XyFile=p.XyFile }).First();
|
||||
//}
|
||||
var XyFile = "";
|
||||
//住宅
|
||||
var entity_zz = db.Queryable<Nbzs.Entity.ResidentialAgreement>().Where(p => p.ID == id).Select(p => new { p.ID, p.XyFile }).First();
|
||||
@@ -430,7 +446,7 @@ namespace Ewide.NbzsZheliban.Service
|
||||
|
||||
var filePath = GetCurrentRootPath() + XyFile;
|
||||
var pdfFile = new FileInfo(filePath);
|
||||
if (File.Exists(pdfFile.Directory + "\\lock"))
|
||||
if (File.Exists(pdfFile.Directory + "\\" + pdfFile.Name + ".lock"))
|
||||
{
|
||||
var picCount = pdfFile.Directory.GetFiles(pdfFile.Name + "-*.jpg").Length;
|
||||
for (int i = 0; i < picCount; i++)
|
||||
@@ -458,13 +474,13 @@ namespace Ewide.NbzsZheliban.Service
|
||||
pics.Add(current_domain + XyFile + "-" + i + ".jpg");
|
||||
if (i == 0)
|
||||
{
|
||||
File.WriteAllText(pdfFile.Directory.FullName + "\\lock", "lock");
|
||||
File.WriteAllText(pdfFile.Directory.FullName + "\\" + pdfFile.Name + ".lock", pdfFile.Name + ".lock");
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
//throw Oops.Oh(ex.Message);
|
||||
throw Oops.Oh(ex.Message + ex.StackTrace);
|
||||
throw Oops.Oh(-2002, "无附件文件[" + nbzs_domain + XyFile + "]");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user