|
@@ -2448,11 +2448,16 @@ where bb.StuNo not in (select b.StuNo from StuInfoBasic b where b.StuNo=bb.StuNo |
|
|
List<StuEnrollFeeOrderDetailEntity> orderdetaillist = BaseRepository("CollegeMIS").FindList<StuEnrollFeeOrderDetailEntity>("select * from StuEnrollFeeOrderDetail where OrderId='" + newdetail.Id + "'").ToList(); |
|
|
List<StuEnrollFeeOrderDetailEntity> orderdetaillist = BaseRepository("CollegeMIS").FindList<StuEnrollFeeOrderDetailEntity>("select * from StuEnrollFeeOrderDetail where OrderId='" + newdetail.Id + "'").ToList(); |
|
|
for (int i = 0; i < orderdetaillist.Count; i++) |
|
|
for (int i = 0; i < orderdetaillist.Count; i++) |
|
|
{ |
|
|
{ |
|
|
string sqldetail = "insert into SCS_ORDEL(GSDM,KJND,OR_ID,XH,SFND,SFXMDM,SFXMMC,JE,SFQJNM) " + |
|
|
|
|
|
"values('001','" + newdetail.YearNo + "','" + newdetail.orderid + "-" + newdetail.YearNo + "','" + (xhnew + i + 1) + "','" + newdetail.YearNo + "','" + orderdetaillist[i].ChargeItemID + "','" + orderdetaillist[i].ChargeItemName + "','" + orderdetaillist[i].SJAmount + "','" + newdetail.YearNo + "')"; |
|
|
|
|
|
BaseRepository("YongyouDb").ExecuteBySql(sqldetail); |
|
|
|
|
|
//更新主表 |
|
|
|
|
|
BaseRepository("YongyouDb").ExecuteBySql("update SCS_ORDER set AMOUNT=AMOUNT+" + orderdetaillist[i].SJAmount + " where KJND='" + newdetail.YearNo + "' and OR_ID='" + newdetail.orderid + "-" + newdetail.YearNo + "' and OR_NO='" + newdetail.orderid + "'"); |
|
|
|
|
|
|
|
|
if (BaseRepository("YongyouDb") |
|
|
|
|
|
.FindTable("select * from SCS_ORDEL where OR_ID='" + newdetail.orderid + "-" + |
|
|
|
|
|
newdetail.YearNo + "' and SFXMDM='" + orderdetaillist[i].ChargeItemID + "'").Rows.Count==0) |
|
|
|
|
|
{ |
|
|
|
|
|
string sqldetail = "insert into SCS_ORDEL(GSDM,KJND,OR_ID,XH,SFND,SFXMDM,SFXMMC,JE,SFQJNM) " + |
|
|
|
|
|
"values('001','" + newdetail.YearNo + "','" + newdetail.orderid + "-" + newdetail.YearNo + "','" + (xhnew + i + 1) + "','" + newdetail.YearNo + "','" + orderdetaillist[i].ChargeItemID + "','" + orderdetaillist[i].ChargeItemName + "','" + orderdetaillist[i].SJAmount + "','" + newdetail.YearNo + "')"; |
|
|
|
|
|
BaseRepository("YongyouDb").ExecuteBySql(sqldetail); |
|
|
|
|
|
//更新主表 |
|
|
|
|
|
BaseRepository("YongyouDb").ExecuteBySql("update SCS_ORDER set AMOUNT=AMOUNT+" + orderdetaillist[i].SJAmount + " where KJND='" + newdetail.YearNo + "' and OR_ID='" + newdetail.orderid + "-" + newdetail.YearNo + "' and OR_NO='" + newdetail.orderid + "'"); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|