Explorar el Código

增加保留两位小数

西昌缴费二期
liangkun hace 2 años
padre
commit
69598d4b31
Se han modificado 1 ficheros con 11 adiciones y 11 borrados
  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 Ver fichero

@@ -2244,7 +2244,7 @@ where bb.StuNo not in (select b.StuNo from StuInfoBasic b where b.StuNo=bb.StuNo
throw (new Exception("【金额】转换失败,必须为数字!"));
}
//筛选不在标准代码表内的数据
//第五列是金额
//第五列是项目编码
if (typecodelist.Count(m => m.ProjectCode == dr[4].ToString()) == 0)
{
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("【用友系统】不存在学生信息数据,请核对用友系统数据!"));
}
@@ -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();
Random ran = new Random();
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.PayMode = "ExcelOffLine";
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.ChargeItemName = dr[3].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.Commit();
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.ChargeItemName = dr[3].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);
//更新主订单表
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;
DataTable stuinfo = dbyongyou.FindTable("select * from SCS_XSXX where XH='" + detailstuno + "'");
if (stuinfo.Rows.Count==0)
if (stuinfo.Rows.Count == 0)
{
//用友库无学生数据
continue;
@@ -2430,7 +2430,7 @@ where bb.StuNo not in (select b.StuNo from StuInfoBasic b where b.StuNo=bb.StuNo
//触发开具发票任务
//通过调用digitalschoolapi的接口实现任务触发
string excelInvoice = Config.GetValue("ExcelInvoice");
Task.Run(()=> HttpMethods.Post(excelInvoice));
Task.Run(() => HttpMethods.Post(excelInvoice));
// 写入缓存如果有未导入的数据
if (failDt.Rows.Count > 0)
{


Cargando…
Cancelar
Guardar