Commit ddf81696 authored by 吴春's avatar 吴春

提交代码

parent 285a9eb0
......@@ -207,13 +207,15 @@ and DATE_FORMAT(b.PaymentTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') A
{
//decimal OriginalFee = 0;
decimal OriginalFee = 0;
//var goodsDetailGroupList = goodsDetailList.GroupBy(x => x.OrderId);
//foreach (var goodsDetailGroupItem in goodsDetailGroupList)
//{
// OriginalFee += goodsDetailList.Where(x => x.OrderId == goodsDetailGroupItem.Key).Sum(x => (x.FreightMoney ?? 0) + (x.Final_Price ?? 0)) * (Convert.ToDecimal(Config.SettlementRate) / 100);
//}
var goodsDetailGroupList = goodsDetailList.GroupBy(x => x.OrderId);
foreach (var goodsDetailGroupItem in goodsDetailGroupList)
{
decimal totalPrice = goodsDetailList.Where(x => x.OrderId == goodsDetailGroupItem.Key).Sum(x => (x.FreightMoney ?? 0) + (x.Final_Price ?? 0)) * (Convert.ToDecimal(Config.SettlementRate) / 100);
OriginalFee += Math.Round(totalPrice, 2, MidpointRounding.AwayFromZero);
}
var detailList = result.Select(x => new
{
CostTypeId = x.FinanceType == 1 ? item.IncomeCostTypeId : item.FreightCostTypeId,
......@@ -239,6 +241,7 @@ and DATE_FORMAT(b.PaymentTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') A
OrderSource = 16,
Remark = System.DateTime.Now.ToString("yyyy年MM月dd日") + "自动生成财务单据",
detailList,
OriginalFee
};
string sign = EncryptionHelper.AesEncrypt(JsonHelper.Serialize(financeObj), Config.FinanceKey);
var resultInfo = new
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment