Browse Source

增加保留两位小数

西昌缴费二期
liangkun 2 years ago
parent
commit
69598d4b31
1 changed files with 11 additions and 11 deletions
  1. +11
    -11
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshService.cs

+ 11
- 11
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoFresh/StuInfoFreshService.cs View File

@@ -2244,7 +2244,7 @@ where bb.StuNo not in (select b.StuNo from StuInfoBasic b where b.StuNo=bb.StuNo
throw (new Exception("【金额】转换失败,必须为数字!")); throw (new Exception("【金额】转换失败,必须为数字!"));
} }
//筛选不在标准代码表内的数据 //筛选不在标准代码表内的数据
//第五列是金额
//第五列是项目编码
if (typecodelist.Count(m => m.ProjectCode == dr[4].ToString()) == 0) if (typecodelist.Count(m => m.ProjectCode == dr[4].ToString()) == 0)
{ {
throw (new Exception("【缴费项目编码】不存在,请核对!")); throw (new Exception("【缴费项目编码】不存在,请核对!"));
@@ -2283,8 +2283,8 @@ where bb.StuNo not in (select b.StuNo from StuInfoBasic b where b.StuNo=bb.StuNo
} }
} }
//用友库查询是否存在缴费项目 //用友库查询是否存在缴费项目
if (BaseRepository("YongyouDb").FindTable("select * from SCS_XSXX where XH='" + dr[1].ToString() + "'").Rows.Count==0)
if (BaseRepository("YongyouDb").FindTable("select * from SCS_XSXX where XH='" + dr[1].ToString() + "'").Rows.Count == 0)
{ {
throw (new Exception("【用友系统】不存在学生信息数据,请核对用友系统数据!")); throw (new Exception("【用友系统】不存在学生信息数据,请核对用友系统数据!"));
} }
@@ -2302,8 +2302,8 @@ where bb.StuNo not in (select b.StuNo from StuInfoBasic b where b.StuNo=bb.StuNo
orderEntity.StuNo = dr[1].ToString(); orderEntity.StuNo = dr[1].ToString();
Random ran = new Random(); Random ran = new Random();
orderEntity.orderid = DateTime.Now.ToString("yyyyMMddhhmmss") + ran.Next(0, 100000); orderEntity.orderid = DateTime.Now.ToString("yyyyMMddhhmmss") + ran.Next(0, 100000);
orderEntity.YJAmount = dr[5].ToDecimal();
orderEntity.SJAmount = dr[5].ToDecimal();
orderEntity.YJAmount = dr[5].ToDecimal(2);
orderEntity.SJAmount = dr[5].ToDecimal(2);
orderEntity.PlaceOrderTime = DateTime.Now; orderEntity.PlaceOrderTime = DateTime.Now;
orderEntity.PayMode = "ExcelOffLine"; orderEntity.PayMode = "ExcelOffLine";
orderEntity.Status = 999; orderEntity.Status = 999;
@@ -2318,8 +2318,8 @@ where bb.StuNo not in (select b.StuNo from StuInfoBasic b where b.StuNo=bb.StuNo
orderDetailEntity.OrderId = orderEntity.Id; orderDetailEntity.OrderId = orderEntity.Id;
orderDetailEntity.ChargeItemName = dr[3].ToString(); orderDetailEntity.ChargeItemName = dr[3].ToString();
orderDetailEntity.ChargeItemID = dr[4].ToString(); orderDetailEntity.ChargeItemID = dr[4].ToString();
orderDetailEntity.YJAmount = dr[5].ToDecimal();
orderDetailEntity.SJAmount = dr[5].ToDecimal();
orderDetailEntity.YJAmount = dr[5].ToDecimal(2);
orderDetailEntity.SJAmount = dr[5].ToDecimal(2);
db.Insert(orderDetailEntity); db.Insert(orderDetailEntity);
db.Commit(); db.Commit();
snum++; snum++;
@@ -2340,8 +2340,8 @@ where bb.StuNo not in (select b.StuNo from StuInfoBasic b where b.StuNo=bb.StuNo
orderDetailEntity.OrderId = orderEntity.Id; orderDetailEntity.OrderId = orderEntity.Id;
orderDetailEntity.ChargeItemName = dr[3].ToString(); orderDetailEntity.ChargeItemName = dr[3].ToString();
orderDetailEntity.ChargeItemID = dr[4].ToString(); orderDetailEntity.ChargeItemID = dr[4].ToString();
orderDetailEntity.YJAmount = dr[5].ToDecimal();
orderDetailEntity.SJAmount = dr[5].ToDecimal();
orderDetailEntity.YJAmount = dr[5].ToDecimal(2);
orderDetailEntity.SJAmount = dr[5].ToDecimal(2);
db.Insert(orderDetailEntity); db.Insert(orderDetailEntity);
//更新主订单表 //更新主订单表
orderEntity.YJAmount += orderDetailEntity.YJAmount; orderEntity.YJAmount += orderDetailEntity.YJAmount;
@@ -2404,7 +2404,7 @@ where bb.StuNo not in (select b.StuNo from StuInfoBasic b where b.StuNo=bb.StuNo
} }
string detailstuno = newdetail.StuNo; string detailstuno = newdetail.StuNo;
DataTable stuinfo = dbyongyou.FindTable("select * from SCS_XSXX where XH='" + detailstuno + "'"); DataTable stuinfo = dbyongyou.FindTable("select * from SCS_XSXX where XH='" + detailstuno + "'");
if (stuinfo.Rows.Count==0)
if (stuinfo.Rows.Count == 0)
{ {
//用友库无学生数据 //用友库无学生数据
continue; continue;
@@ -2430,7 +2430,7 @@ where bb.StuNo not in (select b.StuNo from StuInfoBasic b where b.StuNo=bb.StuNo
//触发开具发票任务 //触发开具发票任务
//通过调用digitalschoolapi的接口实现任务触发 //通过调用digitalschoolapi的接口实现任务触发
string excelInvoice = Config.GetValue("ExcelInvoice"); string excelInvoice = Config.GetValue("ExcelInvoice");
Task.Run(()=> HttpMethods.Post(excelInvoice));
Task.Run(() => HttpMethods.Post(excelInvoice));
// 写入缓存如果有未导入的数据 // 写入缓存如果有未导入的数据
if (failDt.Rows.Count > 0) if (failDt.Rows.Count > 0)
{ {


Loading…
Cancel
Save