update 修改推送服务 和其他

This commit is contained in:
路 范
2021-10-09 14:51:07 +08:00
parent 9218cee300
commit ea98c1ea73
20 changed files with 346 additions and 8 deletions

View File

@@ -64,7 +64,7 @@ namespace Ewide.NbzsZheliban.Service
var cardno = userinfoObj["idnum"].ToString();
var username = userinfoObj["username"].ToString();
//修改测试数据
db.Ado.ExecuteCommand("update InvestigateTable set ExpropriatedCardNo='" + cardno + "' where id ='A80C1599-B658-4176-8CCF-DDA57A64254F' ");
//db.Ado.ExecuteCommand("update InvestigateTable set ExpropriatedCardNo='" + cardno + "' where id ='A80C1599-B658-4176-8CCF-DDA57A64254F' ");
return await GetInfoByCardNoAsync(cardno, username);
}
/// <summary>
@@ -110,7 +110,7 @@ namespace Ewide.NbzsZheliban.Service
private async Task<List<H5IndexPrjModel>> GetPrjListAsync(IEnumerable<Dcbs> list_dcbs)
{
//项目列表
return 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,CreateRecordTime from Projects a where ID in ('" + string.Join("','", list_dcbs.Select(p => p.PrjId)) + "') ");
return 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,CreateRecordTime from Projects a where status = 2 and ID in ('" + string.Join("','", list_dcbs.Select(p => p.PrjId)) + "') ");
}
/// <summary>
/// 分户评估
@@ -120,7 +120,7 @@ namespace Ewide.NbzsZheliban.Service
private async Task<List<Fhpgs>> GetFHPGListAsync(string InvestigateTableID_param)
{
//分户评估
return 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,1 type 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,2 type from NonInvestigateTable_Assessment d inner join NonResidentialInvestigateTable e on d.NonInvestigateTableID = e.ID where d.NonInvestigateTableID in ( " + InvestigateTableID_param + " ) ;");
return 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,1 type from InvestigateTable_Assessment d inner join InvestigateTable e on d.InvestigateTableId=e.ID where d.IsPublic=1 and 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,2 type from NonInvestigateTable_Assessment d inner join NonResidentialInvestigateTable e on d.NonInvestigateTableID = e.ID where d.IsPublic=1 and d.NonInvestigateTableID in ( " + InvestigateTableID_param + " ) ;");
}
/// <summary>
/// 补偿协议
@@ -130,7 +130,7 @@ namespace Ewide.NbzsZheliban.Service
private async Task<List<Bcxy>> GetBCXYListAsync(string InvestigateTableID_param)
{
//补偿协议
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.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.NonInvestigateTableID in ( " + InvestigateTableID_param + " ); ");
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 + " ); ");
}
private async Task<H5IndexModel> GetInfoByCardNoAsync(string cardno, string username)
{
@@ -391,12 +391,12 @@ namespace Ewide.NbzsZheliban.Service
FHPG jzlrModel = null;
if (type == 1)
{
jzlrModel = db.Ado.SqlQuery<FHPG>("select a.ID,b.HouseAddress,a.ValuationMethod,a.AssessmentNo,a.HousingAssessmentValue,a.countValue,a.AttachedAssessedValue,a.DecorateAssessedValue,a.Remark,a.ExceedLandMoney,a.AtticAssessedValue,1 Type from InvestigateTable_Assessment a inner join InvestigateTable b on a.InvestigateTableID=b.ID where a.ID=@ID", new { ID = id }).FirstOrDefault();
jzlrModel = db.Ado.SqlQuery<FHPG>("select a.ID,b.HouseAddress,a.ValuationMethod,a.AssessmentNo,a.HousingAssessmentValue,a.countValue,a.AttachedAssessedValue,a.DecorateAssessedValue,a.Remark,a.ExceedLandMoney,a.AtticAssessedValue,1 Type from InvestigateTable_Assessment a inner join InvestigateTable b on a.InvestigateTableID=b.ID where a.IsPublic=1 and a.ID=@ID", new { ID = id }).FirstOrDefault();
}
else if (type == 2)
{
//非住宅
jzlrModel = db.Ado.SqlQuery<FHPG>("select b.HouseAddress,a.ValuationMethod,a.AssessmentNo,a.HousingAssessmentValue,a.countValue,a.AttachedAssessedValue,a.DecorateAssessedValue,a.Remark,a.ExceedLandMoney,2 Type from NonInvestigateTable_Assessment a inner join NonResidentialInvestigateTable b on a.NonInvestigateTableID=b.ID where a.ID=@ID", new { ID = id }).FirstOrDefault();
jzlrModel = db.Ado.SqlQuery<FHPG>("select b.HouseAddress,a.ValuationMethod,a.AssessmentNo,a.HousingAssessmentValue,a.countValue,a.AttachedAssessedValue,a.DecorateAssessedValue,a.Remark,a.ExceedLandMoney,2 Type from NonInvestigateTable_Assessment a inner join NonResidentialInvestigateTable b on a.NonInvestigateTableID=b.ID where a.IsPublic=1 and a.ID=@ID", new { ID = id }).FirstOrDefault();
}
if (jzlrModel == null)
throw Oops.Oh("ID有误");