add增加ticket记录
This commit is contained in:
98
Ewide.NbzsZheliban/Entity/DataBase/zjzwfwTickets.cs
Normal file
98
Ewide.NbzsZheliban/Entity/DataBase/zjzwfwTickets.cs
Normal file
@@ -0,0 +1,98 @@
|
||||
//----------zjzwfwTickets开始----------
|
||||
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
//using System.Data.Entity.ModelConfiguration;
|
||||
using Ewide.NbzsZheliban.Entity;
|
||||
using System.Runtime.Serialization;
|
||||
namespace Ewide.NbzsZheliban.Entity
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据表实体类:zjzwfwTickets
|
||||
/// </summary>
|
||||
[Table("zjzwfwTickets")]
|
||||
public partial class zjzwfwTickets: BaseEntity {
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("ID")]
|
||||
[DataMember]
|
||||
public string ID {get;set;}
|
||||
/// <summary>
|
||||
/// 无描述
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="无描述")]
|
||||
[Column("Ticket")]
|
||||
[DataMember]
|
||||
public string Ticket {get;set;}
|
||||
/// <summary>
|
||||
/// 姓名
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="姓名")]
|
||||
[Column("UserName")]
|
||||
[DataMember]
|
||||
public string UserName {get;set;}
|
||||
/// <summary>
|
||||
/// 身份证号码
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="身份证号码")]
|
||||
[Column("IdCardNo")]
|
||||
[DataMember]
|
||||
public string IdCardNo {get;set;}
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="创建时间")]
|
||||
[Column("CreateTime")]
|
||||
[DataMember]
|
||||
public DateTime? CreateTime {get;set;}
|
||||
/// <summary>
|
||||
/// 到期时间 默认1小时到期
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="到期时间 默认1小时到期")]
|
||||
[Column("ExpireTime")]
|
||||
[DataMember]
|
||||
public DateTime? ExpireTime {get;set;}
|
||||
/// <summary>
|
||||
/// 原始文本
|
||||
/// </summary>
|
||||
|
||||
[Display(Name="原始文本")]
|
||||
[Column("OriginalResponse")]
|
||||
[DataMember]
|
||||
public string OriginalResponse {get;set;}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
/// <summary>
|
||||
/// 数据表实体类Map:zjzwfwTickets
|
||||
/// </summary>
|
||||
public class zjzwfwTicketsMap : EntityTypeConfiguration<zjzwfwTickets>
|
||||
{
|
||||
public zjzwfwTicketsMap()
|
||||
{
|
||||
this.ToTable("zjzwfwTickets");
|
||||
this.Property(t => t.ID).HasColumnName("ID").IsRequired();
|
||||
this.Property(t => t.Ticket).HasColumnName("Ticket");
|
||||
this.Property(t => t.UserName).HasColumnName("UserName");
|
||||
this.Property(t => t.IdCardNo).HasColumnName("IdCardNo");
|
||||
this.Property(t => t.CreateTime).HasColumnName("CreateTime");
|
||||
this.Property(t => t.ExpireTime).HasColumnName("ExpireTime");
|
||||
this.Property(t => t.OriginalResponse).HasColumnName("OriginalResponse");
|
||||
}
|
||||
}**/
|
||||
|
||||
}
|
||||
|
||||
//----------zjzwfwTickets结束----------
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace Ewide.NbzsZheliban.Entity.Extends
|
||||
/// 项目信息
|
||||
/// </summary>
|
||||
public List<H5IndexPrjModel> PrjList { get; set; }
|
||||
public List<PoliciesRegulation> PoliciesRegulationsList { get; set; }
|
||||
public PoliciesRegulations PoliciesRegulationsLists { get; set; }
|
||||
}
|
||||
public class H5IndexPrjModel
|
||||
{
|
||||
@@ -70,6 +70,11 @@ namespace Ewide.NbzsZheliban.Entity.Extends
|
||||
/// </summary>
|
||||
public object BcxyList { get; set; }
|
||||
}
|
||||
public class PoliciesRegulations
|
||||
{
|
||||
public int TotalCount { get; set; }
|
||||
public List<PoliciesRegulation> List { get; set; }
|
||||
}
|
||||
public class PoliciesRegulation
|
||||
{
|
||||
|
||||
@@ -77,5 +82,6 @@ namespace Ewide.NbzsZheliban.Entity.Extends
|
||||
public string Title { get; set; }
|
||||
public string Contents { get; set; }
|
||||
public DateTime? PublicTime { get; set; }
|
||||
public string Area { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,3 +18,4 @@
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
string tableClass="";
|
||||
//所有表名称
|
||||
//string sqlGetTable = "SELECT Name FROM SysObjects Where XType='U' ORDER BY Name";
|
||||
DataTable dt = GetDataTable(new List<string> { "Projects","InvestigateTable","NonResidentialInvestigateTable","InvestigateTable_Assessment","NonInvestigateTable_Assessment","NonResidentialAgreement","ResidentialAgreement","PoliciesRegulations" });
|
||||
DataTable dt = GetDataTable(new List<string> { "Projects","InvestigateTable","NonResidentialInvestigateTable","InvestigateTable_Assessment","NonInvestigateTable_Assessment","NonResidentialAgreement","ResidentialAgreement","PoliciesRegulations","zjzwfwTickets" });
|
||||
//DataTable dtRelationTable = GetRelationTable();
|
||||
//所有表信息
|
||||
string selectQuery ="select syscolumns.name,systypes.name,syscolumns.length from syscolumns,systypes where syscolumns.xusertype=systypes.xusertype and syscolumns.id=object_id('@tableName')";
|
||||
@@ -52,7 +52,8 @@ using System.Runtime.Serialization;
|
||||
public partial class <#= tableClass #><# if(objType=="U"){#>: BaseEntity<#}else{#>: BaseEntity<#}#>
|
||||
{
|
||||
<#
|
||||
List<string> listBaseColumn = new List<string>{"Id","UNID","CreateTime","CreateUserId","LastUpdateTime","IsDeleted","Sort"};
|
||||
//List<string> listBaseColumn = new List<string>{"Id","UNID","CreateTime","CreateUserId","LastUpdateTime","IsDeleted","Sort"};
|
||||
List<string> listBaseColumn = new List<string>{};
|
||||
foreach (DataRow dr in datacloumn.Rows)
|
||||
{
|
||||
string columnName=GetFormColumnName(dr["columnname"].ToString(),tableClass);
|
||||
|
||||
@@ -78,6 +78,18 @@ namespace Ewide.NbzsZheliban.Service
|
||||
}
|
||||
if (userinfoObj["result"].Value<int>() != 0)
|
||||
throw Oops.Oh($"ticket接口返回值有误,[{tickerRsltStr}]");
|
||||
var temp1 = db.Insertable<zjzwfwTickets>(new zjzwfwTickets
|
||||
{
|
||||
ID = Guid.NewGuid().ToString(),
|
||||
Ticket = ticket,
|
||||
IdCardNo = userinfoObj["idnum"].ToString(),
|
||||
UserName = userinfoObj["username"].ToString(),
|
||||
ExpireTime = DateTime.Now.AddHours(1),
|
||||
CreateTime = DateTime.Now,
|
||||
OriginalResponse = userinfoRsltStr
|
||||
}).ExecuteCommand();
|
||||
if (temp1 <= 0)
|
||||
throw Oops.Oh("出现异常,请联系管理员");
|
||||
return userinfoObj;
|
||||
}
|
||||
else
|
||||
@@ -102,7 +114,7 @@ namespace Ewide.NbzsZheliban.Service
|
||||
//补偿协议
|
||||
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_PoliciesRegulations = await db.Queryable<PoliciesRegulations>().ToListAsync();
|
||||
var list_PoliciesRegulations = await db.Queryable<Entity.PoliciesRegulations>().ToListAsync();
|
||||
var listAreas = new List<Guid?>
|
||||
{
|
||||
Guid.Parse("B2A0291C-84C7-4D86-A6D5-CB9FCCF4A2D8")
|
||||
@@ -113,18 +125,20 @@ namespace Ewide.NbzsZheliban.Service
|
||||
p.BcxyList = list_bcxys.Where(a => a.PrjId == p.PrjId);
|
||||
listAreas.Add(Guid.Parse(p.AreaID));
|
||||
});
|
||||
var listPr = list_PoliciesRegulations.Where(a => listAreas.Contains(a.AreaID)).Select(b => new PoliciesRegulation
|
||||
{
|
||||
ID = b.ID,
|
||||
Contents = b.Contents,
|
||||
PublicTime = b.PublicTime,
|
||||
Title = b.Title,
|
||||
Area = b.Area
|
||||
}).ToList();
|
||||
H5IndexModel h5IndexModel = new()
|
||||
{
|
||||
PrjList = list_projects,
|
||||
IdCard = cardno,
|
||||
UserName = username,
|
||||
PoliciesRegulationsList = list_PoliciesRegulations.Where(a => listAreas.Contains(a.AreaID)).Select(b => new PoliciesRegulation
|
||||
{
|
||||
ID = b.ID,
|
||||
Contents = b.Contents,
|
||||
PublicTime = b.PublicTime,
|
||||
Title = b.Title
|
||||
}).ToList()
|
||||
PoliciesRegulationsLists = new Entity.Extends.PoliciesRegulations { List = listPr, TotalCount = listPr.Count }
|
||||
};
|
||||
return h5IndexModel;
|
||||
}
|
||||
|
||||
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.
@@ -1 +1 @@
|
||||
f1f4caefb72a8ff498e1136f2c067bdcb196bbb2
|
||||
84fd37caa0c16ac3725555de4dc9cd62ba901214
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
||||
bb995a3e2bd3f9318c4170de209b003704c71518
|
||||
45a45ab57f43f74b631fd62aae6c40b3682e1ac4
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user