update 增加项目名称 补偿方式 分户评估id 补偿协议id
This commit is contained in:
@@ -14,6 +14,7 @@ namespace Ewide.NbzsZheliban.Entity.Extends
|
||||
public class Fhpgs
|
||||
{
|
||||
public string PrjId { get; set; }
|
||||
public string id { get; set; }
|
||||
public string AssessmentNo { get; set; }
|
||||
public string HouseAddress { get; set; }
|
||||
public string countValue { get; set; }
|
||||
@@ -21,8 +22,11 @@ namespace Ewide.NbzsZheliban.Entity.Extends
|
||||
public class Bcxy
|
||||
{
|
||||
public string PrjId { get; set; }
|
||||
public string id { get; set; }
|
||||
public string XyNo { get; set; }
|
||||
public string HouseAddress { get; set; }
|
||||
public string SwitchProductionWay { get; set; }
|
||||
|
||||
public string SummationShouldCompensateMoney { get; set; }
|
||||
}
|
||||
public class H5IndexModel
|
||||
@@ -37,6 +41,7 @@ namespace Ewide.NbzsZheliban.Entity.Extends
|
||||
public class H5IndexPrjModel
|
||||
{
|
||||
public string PrjId { get; set; }
|
||||
public string Name { get; set; }
|
||||
/// <summary>
|
||||
/// 区域
|
||||
/// </summary>
|
||||
|
||||
@@ -29,18 +29,9 @@ namespace Ewide.NbzsZheliban.Service
|
||||
db = repository.Context;
|
||||
_jsonSerializer = jsonSerializer;
|
||||
}
|
||||
/// <summary>
|
||||
/// 被征收人关联的项目列表
|
||||
/// </summary>
|
||||
/// <param name="args"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("/project/list")]
|
||||
[Microsoft.AspNetCore.Authorization.AllowAnonymous]
|
||||
public async Task<dynamic> PrjList([FromBody] JObject args)
|
||||
private (string, string) GetUserNameCardNoByTicket(string ticket)
|
||||
{
|
||||
#region 票据
|
||||
var ticket = args.GetJsonValue("ticket", isThrowExp: true);
|
||||
//var ticket = Request.Query["ticket"];
|
||||
#region 票据
|
||||
if (!string.IsNullOrWhiteSpace(ticket))
|
||||
{
|
||||
var time = DateTime.Now.ToString("yyyyMMddHHmmss");
|
||||
@@ -90,8 +81,25 @@ namespace Ewide.NbzsZheliban.Service
|
||||
throw Oops.Oh($"ticket接口返回值有误,[{tickerRsltStr}]");
|
||||
var cardno = userinfoObj["idnum"].ToString();
|
||||
var username = userinfoObj["username"].ToString();
|
||||
|
||||
#endregion
|
||||
return (cardno, username);
|
||||
}
|
||||
return ("", "");
|
||||
}
|
||||
/// <summary>
|
||||
/// 被征收人关联的项目列表
|
||||
/// </summary>
|
||||
/// <param name="args"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("/project/list")]
|
||||
[Microsoft.AspNetCore.Authorization.AllowAnonymous]
|
||||
public async Task<dynamic> PrjList([FromBody] JObject args)
|
||||
{
|
||||
var ticket = args.GetJsonValue("ticket", isThrowExp: true);
|
||||
//获取用户身份证号码
|
||||
var (cardno, username) = GetUserNameCardNoByTicket(ticket);
|
||||
if (!string.IsNullOrEmpty(cardno))
|
||||
{
|
||||
//var cardno = args.GetJsonValue("cardno", isThrowExp: true);
|
||||
//住宅调查表
|
||||
var list_zz_dcb = await db.Ado.SqlQueryAsync<Dcbs>("select ID dcbId,ProjectId PrjId from InvestigateTable b where b.ExpropriatedCardNo=@ExpropriatedCardNo", new List<SugarParameter> { new SugarParameter("ExpropriatedCardNo", cardno, System.Data.DbType.String) }.ToArray());
|
||||
@@ -100,13 +108,12 @@ 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.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.Name,a.area,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 InvestigateTableID_param = "'" + string.Join("','", list_dcbs.Select(p => p.dcbId)) + "'";
|
||||
var list_fhpgs = await db.Ado.SqlQueryAsync<Fhpgs>("select e.ProjectId as PrjId ,d.AssessmentNo,e.HouseAddress,d.countValue from InvestigateTable_Assessment d inner join InvestigateTable e on d.InvestigateTableId=e.ID where d.InvestigateTableID in ( " + InvestigateTableID_param + " ) union all select e.ProjectId as PrjId ,AssessmentNo, e.HouseAddress, d.countValue from NonInvestigateTable_Assessment d inner join NonResidentialInvestigateTable e on d.NonInvestigateTableID = e.ID where d.NonInvestigateTableID in ( " + InvestigateTableID_param + " ) ;");
|
||||
var list_fhpgs = await db.Ado.SqlQueryAsync<Fhpgs>("select d.id,e.ProjectId as PrjId ,d.AssessmentNo,e.HouseAddress,d.countValue from InvestigateTable_Assessment d inner join InvestigateTable e on d.InvestigateTableId=e.ID where d.InvestigateTableID in ( " + InvestigateTableID_param + " ) union all select e.ProjectId as PrjId ,AssessmentNo, e.HouseAddress, d.countValue from NonInvestigateTable_Assessment d inner join NonResidentialInvestigateTable e on d.NonInvestigateTableID = e.ID where d.NonInvestigateTableID in ( " + InvestigateTableID_param + " ) ;");
|
||||
//补偿协议
|
||||
var list_bcxys = await db.Ado.SqlQueryAsync<Bcxy>("select 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 from ResidentialAgreement d inner join InvestigateTable e on d.InvestigateTableId=e.ID where d.InvestigateTableID in ( " + InvestigateTableID_param + " ) union all select isnull(d.CollectDecisionNoHeadName, '') + isnull(d.No2, '') + '-' + isnull(d.No3, '') XyNo , d.SwitchProductionWay, e.HouseAddress, d.SummationShouldCompensateMoney, e.ProjectId as PrjId from NonResidentialAgreement d inner join NonResidentialInvestigateTable e on d.NonInvestigateTableID = e.ID where d.NonInvestigateTableID in ( " + InvestigateTableID_param + " ); ");
|
||||
|
||||
var list_bcxys = 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 from ResidentialAgreement d inner join InvestigateTable e on d.InvestigateTableId=e.ID where d.InvestigateTableID in ( " + InvestigateTableID_param + " ) union all select isnull(d.CollectDecisionNoHeadName, '') + isnull(d.No2, '') + '-' + isnull(d.No3, '') XyNo , d.SwitchProductionWay, e.HouseAddress, d.SummationShouldCompensateMoney, e.ProjectId as PrjId from NonResidentialAgreement d inner join NonResidentialInvestigateTable e on d.NonInvestigateTableID = e.ID where d.NonInvestigateTableID in ( " + InvestigateTableID_param + " ); ");
|
||||
list_projects.ForEach(p =>
|
||||
{
|
||||
p.FhpgList = list_fhpgs.Where(a => a.PrjId == p.PrjId);
|
||||
@@ -145,12 +152,12 @@ 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.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.Name,a.area,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 InvestigateTableID_param = "'" + string.Join("','", list_dcbs.Select(p => p.dcbId)) + "'";
|
||||
var list_fhpgs = await db.Ado.SqlQueryAsync<Fhpgs>("select e.ProjectId as PrjId ,d.AssessmentNo,e.HouseAddress,d.countValue from InvestigateTable_Assessment d inner join InvestigateTable e on d.InvestigateTableId=e.ID where d.InvestigateTableID in ( " + InvestigateTableID_param + " ) union all select e.ProjectId as PrjId ,AssessmentNo, e.HouseAddress, d.countValue from NonInvestigateTable_Assessment d inner join NonResidentialInvestigateTable e on d.NonInvestigateTableID = e.ID where d.NonInvestigateTableID in ( " + InvestigateTableID_param + " ) ;");
|
||||
var list_fhpgs = await db.Ado.SqlQueryAsync<Fhpgs>("select d.id,e.ProjectId as PrjId ,d.AssessmentNo,e.HouseAddress,d.countValue 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 from NonInvestigateTable_Assessment d inner join NonResidentialInvestigateTable e on d.NonInvestigateTableID = e.ID where d.NonInvestigateTableID in ( " + InvestigateTableID_param + " ) ;");
|
||||
//补偿协议
|
||||
var list_bcxys = await db.Ado.SqlQueryAsync<Bcxy>("select 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 from ResidentialAgreement d inner join InvestigateTable e on d.InvestigateTableId=e.ID where d.InvestigateTableID in ( " + InvestigateTableID_param + " ) union all select isnull(d.CollectDecisionNoHeadName, '') + isnull(d.No2, '') + '-' + isnull(d.No3, '') XyNo , d.SwitchProductionWay, e.HouseAddress, d.SummationShouldCompensateMoney, e.ProjectId as PrjId from NonResidentialAgreement d inner join NonResidentialInvestigateTable e on d.NonInvestigateTableID = e.ID where d.NonInvestigateTableID in ( " + InvestigateTableID_param + " ); ");
|
||||
var list_bcxys = 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 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 from NonResidentialAgreement d inner join NonResidentialInvestigateTable e on d.NonInvestigateTableID = e.ID where d.NonInvestigateTableID in ( " + InvestigateTableID_param + " ); ");
|
||||
|
||||
list_projects.ForEach(p =>
|
||||
{
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user