@@ -811,7 +811,7 @@ namespace DigitalSchoolApi.Controllers
using (IDbConnection conncore = new SqlConnection(_coresqlConnection))
{
conncore.Execute(
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),121,'typecode','FCSOId:" + orderEntity.Id + " 开票typecode:" + item.Key + "',getdate())");
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),121,'typecode','FCSOId:" + orderEntity.Id + ";FSYId:" + orderEntity.FSYId + "; 开票typecode:" + item.Key + "',getdate())");
}
InvoiceEBillByTypeTwo(conn, orderEntity, item.Key, item);
}
@@ -820,7 +820,7 @@ namespace DigitalSchoolApi.Controllers
using (IDbConnection conncore = new SqlConnection(_coresqlConnection))
{
conncore.Execute(
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + " 开票异常:" + ex.Message + "',getdate())");
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + ";FSYId:" + orderEntity.FSYId + "; 开票异常:" + ex.Message + "',getdate())");
}
}
}
@@ -831,7 +831,7 @@ namespace DigitalSchoolApi.Controllers
using (IDbConnection conncore = new SqlConnection(_coresqlConnection))
{
conncore.Execute(
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + " 开票准备报错:" + ex.Message + "',getdate())");
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + ";FSYId:" + orderEntity.FSYId + "; 开票准备报错:" + ex.Message + "',getdate())");
}
}
}
@@ -1086,7 +1086,7 @@ namespace DigitalSchoolApi.Controllers
using (IDbConnection conncore = new SqlConnection(_coresqlConnection))
{
conncore.Execute(
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime,F_Module) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + " 发送给开票系统原始数据:" + JsonConvert.SerializeObject(biParam) + "',getdate(),'" + orderEntity.Id + "')");
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime,F_Module) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + ";FSYId:" + orderEntity.FSYId + "; 发送给开票系统原始数据:" + JsonConvert.SerializeObject(biParam) + "',getdate(),'" + orderEntity.Id + "')");
}
var data = Convert.ToBase64String(encoding.GetBytes(JsonConvert.SerializeObject(biParam)));
var noise = DateTime.Now.ToString("yyyyMMddhhmmss") + ran.Next(0, 100000);
@@ -1113,7 +1113,7 @@ namespace DigitalSchoolApi.Controllers
using (IDbConnection conncore = new SqlConnection(_coresqlConnection))
{
conncore.Execute(
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime,F_Module) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + " 开票系统返回:" + datain + "',getdate(),'" + orderEntity.Id + "')");
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime,F_Module) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + ";FSYId:" + orderEntity.FSYId + "; 开票系统返回:" + datain + "',getdate(),'" + orderEntity.Id + "')");
}
string returnresult = encoding.GetString(Convert.FromBase64String(datain));
if (returnresult != "")
@@ -1127,7 +1127,7 @@ namespace DigitalSchoolApi.Controllers
using (IDbConnection conncore = new SqlConnection(_coresqlConnection))
{
conncore.Execute(
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime,F_Module) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + " 开票系统成功返回:" + messagedecode + "',getdate(),'" + orderEntity.Id + "')");
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime,F_Module) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + ";FSYId:" + orderEntity.FSYId + "; 开票系统成功返回:" + messagedecode + "',getdate(),'" + orderEntity.Id + "')");
}
dynamic billInfo = JsonConvert.DeserializeObject(messagedecode);
string eBillCode = billInfo.eBillCode;
@@ -1135,7 +1135,7 @@ namespace DigitalSchoolApi.Controllers
string checkCode = billInfo.checkCode;
//记录票号
var recordId = Guid.NewGuid();
conn.Execute($"insert into StuEnrollInvoiceRecord(Id,YearNo,StuNo,billNo,random,billStatus,FCSOId,CreateTime) values('{recordId}','{orderEntity.YearNo}','{orderEntity.StuNo}','{eBillNo}','{checkCode}','1','{orderEntity.Id}',getdate())");
conn.Execute($"insert into StuEnrollInvoiceRecord(Id,YearNo,StuNo,billNo,random,billStatus,FCSOId,CreateTime,FSYId ) values('{recordId}','{orderEntity.YearNo}','{orderEntity.StuNo}','{eBillNo}','{checkCode}','1','{orderEntity.Id}',getdate(),'{orderEntity.FSYId}' )");
//查询票据url
var invoiceobj = new { billBatchCode = eBillCode, billNo = eBillNo, random = checkCode, channelMode = "1" };
@@ -1162,7 +1162,7 @@ namespace DigitalSchoolApi.Controllers
using (IDbConnection conncore = new SqlConnection(_coresqlConnection))
{
conncore.Execute(
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime,F_Module) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + " 查询开票url返回:" + datainvoice + "',getdate(),'" + orderEntity.Id + "')");
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime,F_Module) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + ";FSYId:" + orderEntity.FSYId + "; 查询开票url返回:" + datainvoice + "',getdate(),'" + orderEntity.Id + "')");
}
string returnresultinvoice = encoding.GetString(Convert.FromBase64String(datainvoice));
resultobj = JsonConvert.DeserializeObject(returnresultinvoice);
@@ -1173,7 +1173,7 @@ namespace DigitalSchoolApi.Controllers
using (IDbConnection conncore = new SqlConnection(_coresqlConnection))
{
conncore.Execute(
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime,F_Module) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + " 查询开票url成功返回:" + messagedecode + "',getdate(),'" + orderEntity.Id + "')");
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime,F_Module) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + ";FSYId:" + orderEntity.FSYId + "; 查询开票url成功返回:" + messagedecode + "',getdate(),'" + orderEntity.Id + "')");
}
dynamic InvoiceUrlInfo = JsonConvert.DeserializeObject(messagedecode);
string pictureUrl = InvoiceUrlInfo.pictureUrl;
@@ -1187,7 +1187,7 @@ namespace DigitalSchoolApi.Controllers
using (IDbConnection conncore = new SqlConnection(_coresqlConnection))
{
conncore.Execute(
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime,F_Module) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + " 查询开票url错误:" + messagedecode + "',getdate(),'" + orderEntity.Id + "')");
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime,F_Module) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + ";FSYId:" + orderEntity.FSYId + "; 查询开票url错误:" + messagedecode + "',getdate(),'" + orderEntity.Id + "')");
}
}
}
@@ -1198,7 +1198,7 @@ namespace DigitalSchoolApi.Controllers
using (IDbConnection conncore = new SqlConnection(_coresqlConnection))
{
conncore.Execute(
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime,F_Module) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + " 开票系统错误:" + messagedecode + "',getdate(),'" + orderEntity.Id + "')");
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime,F_Module) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + ";FSYId:" + orderEntity.FSYId + "; 开票系统错误:" + messagedecode + "',getdate(),'" + orderEntity.Id + "')");
}
}
}
@@ -1210,7 +1210,7 @@ namespace DigitalSchoolApi.Controllers
using (IDbConnection conncore = new SqlConnection(_coresqlConnection))
{
conncore.Execute(
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime,F_Module) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + " 开票系统报错:" + e.Message + "',getdate(),'" + orderEntity.Id + "')");
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime,F_Module) values(newid(),121,'piaoju','FCSOId:" + orderEntity.Id + ";FSYId:" + orderEntity.FSYId + "; 开票系统报错:" + e.Message + "',getdate(),'" + orderEntity.Id + "')");
}
}
}