liangkun 1 год назад
Родитель
Сommit
b0cc50aedf
1 измененных файлов: 61 добавлений и 30 удалений
  1. +61
    -30
      DigitalSchoolApi/Controllers/YKTTrabs.cs

+ 61
- 30
DigitalSchoolApi/Controllers/YKTTrabs.cs Просмотреть файл

@@ -805,7 +805,7 @@ namespace DigitalSchoolApi.Controllers
List<FinaChargeStuOrderDetailEntity> stuEnrollFeeOrderDetailList =
conn.Query<FinaChargeStuOrderDetailEntity>(@"select a.*, b.InvoiceTypeCode from FinaChargeStuOrderDetail a
join StuEnrollInvoiceTypeCode b on a.chargeItemcode = b.ProjectCode
where a.OrderId = '" + orderEntity.Id + "'").ToList();
where a.FCSOId = '" + orderEntity.Id + "'").ToList();

var groupDetail = stuEnrollFeeOrderDetailList.GroupBy(x => x.InvoiceTypeCode);
foreach (IGrouping<string, FinaChargeStuOrderDetailEntity> item in groupDetail)
@@ -1082,10 +1082,10 @@ namespace DigitalSchoolApi.Controllers
itemdetail.itemName = itemEntity.ChargeItemName;
itemdetail.count = 1;
itemdetail.standard = Convert.ToDouble(itemEntity.YJAmount);
itemdetail.amt = Convert.ToDouble((itemEntity.SJAmount> itemEntity.YJAmount? itemEntity.YJAmount: itemEntity.SJAmount));
itemdetail.amt = Convert.ToDouble((itemEntity.SJAmount > itemEntity.YJAmount ? itemEntity.YJAmount : itemEntity.SJAmount));
itemdetailList.Add(itemdetail);
}
biParam.totalAmt = Convert.ToDouble(itemdetailList.Sum(m=>m.amt));
biParam.totalAmt = Convert.ToDouble(itemdetailList.Sum(m => m.amt));
biParam.itemDetail = itemdetailList;
//JsonConvert.SerializeObject(biParam)
using (IDbConnection conncore = new SqlConnection(_coresqlConnection))
@@ -1512,18 +1512,22 @@ namespace DigitalSchoolApi.Controllers
}
catch (Exception e)
{
conncores.Execute(
$"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),55555,'更新专业数据','编号({item.CODE_}),姓名({item.NAME_})更新时出现异常:{e.Message}',getdate())");
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(),55555,'更新专业数据','编号({item.CODE_}),姓名({item.NAME_})更新时出现异常:{e.Message}',getdate())");
}
}
}
}
else
{

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(),55555,'更新专业数据','新增数据{anumMajor}条,修改数据{unumMajor}条,共计{anumMajor + unumMajor}条,获取数据{zyxx.Count()}',getdate())");
}
//记录修改数据总数
conncores.Execute(
$"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),55555,'更新专业数据','新增数据{anumMajor}条,修改数据{unumMajor}条,共计{anumMajor + unumMajor}条,获取数据{zyxx.Count()}',getdate())");

#endregion

#region 课程
@@ -1568,13 +1572,21 @@ namespace DigitalSchoolApi.Controllers
}
catch (Exception e)
{
conncores.Execute(
$"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),55555,'更新课程数据','编号({item.CODE_}),姓名({item.NAME_})更新时出现异常:{e.Message}',getdate())");
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(),55555,'更新课程数据','编号({item.CODE_}),姓名({item.NAME_})更新时出现异常:{e.Message}',getdate())");
}
}
}
//记录修改数据总数
conncores.Execute(

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(),55555,'更新课程数据','新增数据{anumLesson}条,修改数据{unumlesson}条,共计{unumlesson + anumLesson}条,获取数据{kcxx.Count()}',getdate())");
}

#endregion

#region 教师信息
@@ -1646,13 +1658,21 @@ namespace DigitalSchoolApi.Controllers
}
catch (Exception e)
{
conncores.Execute(
$"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),55555,'更新教师数据','编号({item.TEA_NO}),姓名({item.NAME_})更新时出现异常:{e.Message}',getdate())");
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(),55555,'更新教师数据','编号({item.TEA_NO}),姓名({item.NAME_})更新时出现异常:{e.Message}',getdate())");
}
}
}
//记录修改数据总数
conncores.Execute(
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(),55555,'更新教师数据','新增数据{anumTeach}条,修改数据{unumTeach}条,共计{unumTeach + anumTeach}条,获取数据{jsxx.Count()}',getdate())");

}

#endregion

#region 班级信息
@@ -1733,7 +1753,7 @@ namespace DigitalSchoolApi.Controllers
$"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),55555,'更新教师数据','新增数据{anumClass}条,修改数据{unumClass}条,共计{unumClass + anumClass}条,获取数据{bjxx.Count()}',getdate())");
#endregion

#region 班级信息
#region 教室信息
List<ClassRoomModel> classRoomModels = conncores.Query<ClassRoomModel>("select * from classroominfo").ToList();
int anumCroom = 0;
int unumCroom = 0;
@@ -1798,13 +1818,24 @@ namespace DigitalSchoolApi.Controllers
}
catch (Exception e)
{
conncores.Execute(
$"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),55555,'更新教师数据','编号({item.CODE_}),姓名({item.NAME_})更新时出现异常:{e.Message}',getdate())");
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(),55555,'更新教师数据','编号({item.CODE_}),姓名({item.NAME_})更新时出现异常:{e.Message}',getdate())");

}

}
}
//记录修改数据总数
conncores.Execute(

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(),55555,'更新教师数据','新增数据{anumCroom}条,修改数据{unumCroom}条,共计{unumCroom + anumCroom}条,获取数据{bjxx.Count()}',getdate())");

}

#endregion
}

@@ -1817,11 +1848,11 @@ namespace DigitalSchoolApi.Controllers
//(case when dept_id in ('01','02','03') then dept_id when dept_id='00' then '06' when dept_id='23' then '04' when dept_id='06' then '07' else '' end )as dept_id,
//MAJOR_CODE,class_id,birthday,(case sex_code when '2' then '0' else '1' end) as sex_code,NATION_CODE,POLITICS_CODE,LENGTH_SCHOOLING,ENROLL_DATE,substr(ENROLL_GRADE,3,2) as ENROLL_GRADE from v_lq_xs_stu
//where class_id like '21010130%'").ToList();
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(),578,'从西昌中间库更新学生数据','获取oracle学生数据{xsxx.Count()}条',getdate())");
}
//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(),578,'从西昌中间库更新学生数据','获取oracle学生数据{xsxx.Count()}条',getdate())");
//}
using (IDbConnection conn = new SqlConnection(_sqlConnection))
{
//西昌学生信息表
@@ -1943,7 +1974,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(),578,'从西昌中间库更新学生数据','学生学号({item.STU_NO}),姓名({item.NAME_})更新时出现异常:{e.Message}',getdate())");
$"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),578,'从西昌中间库更新学生数据','学生学号({item.STU_NO}),姓名({item.NAME_})更新时出现异常:{e.Message}.',getdate())");
}
}
}
@@ -1972,7 +2003,7 @@ namespace DigitalSchoolApi.Controllers
using (IDbConnection conn = new SqlConnection(_coresqlConnection))
{
conn.Execute(
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),578,'从西昌中间库更新学生数据','错误信息:" +
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),578,'从西昌中间库更新基础数据','错误信息:" +
e.Message + "',getdate())");
}
}


Загрузка…
Отмена
Сохранить