|
|
@@ -204,6 +204,12 @@ namespace DigitalSchoolApi.Controllers |
|
|
|
List<FinaChargeStuOrderEntity> list = conn.Query<FinaChargeStuOrderEntity>("select * from FinaChargeStuOrder where PlaceOrderTime>='" + lastdate + "' and Status=0 and OrderType=1 ").ToList(); |
|
|
|
foreach (var item in list) |
|
|
|
{ |
|
|
|
//校验 |
|
|
|
var orderentity = conn.QueryFirstOrDefault<FinaChargeStuOrderEntity>($"select * from FinaChargeStuOrder where Id='{item.Id}' "); |
|
|
|
if (orderentity == null || orderentity.Status == 1) |
|
|
|
{ |
|
|
|
continue; |
|
|
|
} |
|
|
|
//轮询建行商户平台 |
|
|
|
XmlDocument xml = new XmlDocument(); |
|
|
|
xml.Load(AppContext.BaseDirectory + "\\Content\\payxml\\PayResultXMLFile.xml"); |
|
|
@@ -262,7 +268,13 @@ namespace DigitalSchoolApi.Controllers |
|
|
|
//string REM1 = item.StuNo; |
|
|
|
//string REM2 = item.YearNo.ToString(); |
|
|
|
if (ORDER_STATUS == "1") |
|
|
|
{ |
|
|
|
{ |
|
|
|
//校验 |
|
|
|
var orderentity2 = conn.QueryFirstOrDefault<FinaChargeStuOrderEntity>($"select * from FinaChargeStuOrder where Id='{item.Id}' "); |
|
|
|
if (orderentity2 == null || orderentity2.Status == 1) |
|
|
|
{ |
|
|
|
continue; |
|
|
|
} |
|
|
|
conn.Execute("update FinaChargeStuOrder set SJAmount='" + PAYMENT_MONEY + "',Status='" + ORDER_STATUS + "',PayTime='" + TRAN_DATE + "',PayMode='" + PAY_MODE + "',BankOrder='" + OriOvrlsttnEV_Trck_No + "' where orderid='" + Orderid + "'"); |
|
|
|
////判断实缴金额是否缴清费用 |
|
|
|
//decimal sjcount = Convert.ToDecimal(conn.ExecuteScalar("select isnull(sum(SJAmount),0) from FinaChargeStuOrder where StuNo='" + REM1 + "' and Status=1 and YearNo='" + REM2 + "' ")); |
|
|
@@ -313,17 +325,17 @@ group by a.FSYear,b.StuNo ) aa left join |
|
|
|
"'0','" + newitem.FSBlance + "',getdate(),'1')"); |
|
|
|
} |
|
|
|
} |
|
|
|
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,'ccb','FCSOId:" + item.Id + " orderid:" + Orderid + " StuNo:" + REM1 + " 缴费状态更新成功',getdate())"); |
|
|
|
} |
|
|
|
int PayFeeStatus = Convert.ToInt32(conn.ExecuteScalar("select PayFeeStatus from FinaChargeStuYear where StuNo='" + item.StuNo + "' and FSYear='" + item.YearNo + "'")); |
|
|
|
if (PayFeeStatus == 1) |
|
|
|
{ |
|
|
|
//开票 |
|
|
|
Task.Run(() => YKTTrabs.InvoiceEBillMethodTwo(item)); |
|
|
|
} |
|
|
|
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,'ccb','FCSOId:" + item.Id + " orderid:" + Orderid + " StuNo:" + REM1 + " 缴费状态更新成功',getdate())"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|