Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mall.oytour.com
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
mall.oytour.com
Commits
c64260ec
Commit
c64260ec
authored
Jun 29, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
d9fab6af
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
9 deletions
+20
-9
FinanceModule.cs
Mall.WindowsService/Module/FinanceModule.cs
+19
-9
appsettings.json
Mall.WindowsService/appsettings.json
+1
-0
No files found.
Mall.WindowsService/Module/FinanceModule.cs
View file @
c64260ec
using
Mall.Common
;
using
DapperExtensions.Lambda
;
using
Mall.Common
;
using
Mall.Common.Enum.Goods
;
using
Mall.Common.Enum.Goods
;
using
Mall.Common.Enum.User
;
using
Mall.Common.Enum.User
;
using
Mall.Common.Plugin
;
using
Mall.Common.Plugin
;
...
@@ -180,8 +181,6 @@ and DATE_FORMAT(b.PaymentTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') A
...
@@ -180,8 +181,6 @@ and DATE_FORMAT(b.PaymentTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') A
newOrderGoods
.
FinanceType
=
2
;
newOrderGoods
.
FinanceType
=
2
;
result
.
Add
(
newOrderGoods
);
result
.
Add
(
newOrderGoods
);
}
}
RB_Finance_RecordDetail
financeRecordDetail
=
new
RB_Finance_RecordDetail
RB_Finance_RecordDetail
financeRecordDetail
=
new
RB_Finance_RecordDetail
{
{
...
@@ -204,14 +203,25 @@ and DATE_FORMAT(b.PaymentTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') A
...
@@ -204,14 +203,25 @@ and DATE_FORMAT(b.PaymentTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') A
}
}
}
}
if
(
result
!=
null
&&
result
.
Any
())
if
(
result
!=
null
&&
result
.
Any
())
{
{
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
detailList
=
result
.
Select
(
x
=>
new
var
detailList
=
result
.
Select
(
x
=>
new
{
{
CostTypeId
=
x
.
FinanceType
==
1
?
item
.
IncomeCostTypeId
:
item
.
FreightCostTypeId
,
CostTypeId
=
x
.
FinanceType
==
1
?
item
.
IncomeCostTypeId
:
item
.
FreightCostTypeId
,
Number
=
x
.
FinanceType
==
1
?
x
.
Number
:
1
,
Number
=
x
.
FinanceType
==
1
?
x
.
Number
:
1
,
OriginalMoney
=
x
.
FinanceType
==
1
?
x
.
Unit_Price
:
x
.
FreightMoney
,
OriginalMoney
=
x
.
FinanceType
==
1
?
(
x
.
Final_Price
??
0
)
:
(
x
.
FreightMoney
??
0
),
UnitPrice
=
x
.
FinanceType
==
1
?
(((
x
.
Final_Price
??
0
)
-
(
x
.
FreightMoney
??
0
))
/
(
x
.
Number
??
0
))
:
x
.
FreightMoney
,
// OriginalMoney = x.FinanceType == 1 ? ((x.Unit_Price ?? 0) * (x.Number ?? 0)) : x.FreightMoney,
UnitPrice
=
x
.
FinanceType
==
1
?
((
x
.
Final_Price
??
0
)
/
(
x
.
Number
??
0
))
:
x
.
FreightMoney
,
// UnitPrice = x.FinanceType == 1 ? (((x.Final_Price ?? 0) - (x.FreightMoney ?? 0)) / (x.Number ?? 0)) : x.FreightMoney,
Remark
=
x
.
GoodsName
+
x
.
OrderNo
Remark
=
x
.
GoodsName
+
x
.
OrderNo
});
});
var
financeObj
=
new
var
financeObj
=
new
...
@@ -220,7 +230,7 @@ and DATE_FORMAT(b.PaymentTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') A
...
@@ -220,7 +230,7 @@ and DATE_FORMAT(b.PaymentTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') A
item
.
IsPublic
,
item
.
IsPublic
,
BType
=
item
.
AccountType
,
BType
=
item
.
AccountType
,
AccountId
=
item
.
AccountId
,
AccountId
=
item
.
AccountId
,
WBMoney
=
result
.
Sum
(
x
=>
x
.
Fina
l_Price
??
0
),
WBMoney
=
result
.
Sum
(
x
=>
x
.
Fina
nceType
==
1
?
(
x
.
Final_Price
??
0
)
:
(
x
.
FreightMoney
??
0
)
),
RB_Branch_Id
=
Config
.
RB_Branch_Id
,
RB_Branch_Id
=
Config
.
RB_Branch_Id
,
RemitterName
=
item
.
RemitterName
,
RemitterName
=
item
.
RemitterName
,
TradeDate
=
System
.
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
),
TradeDate
=
System
.
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
),
...
@@ -229,7 +239,6 @@ and DATE_FORMAT(b.PaymentTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') A
...
@@ -229,7 +239,6 @@ and DATE_FORMAT(b.PaymentTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') A
OrderSource
=
16
,
OrderSource
=
16
,
Remark
=
System
.
DateTime
.
Now
.
ToString
(
"yyyy年MM月dd日"
)
+
"自动生成财务单据"
,
Remark
=
System
.
DateTime
.
Now
.
ToString
(
"yyyy年MM月dd日"
)
+
"自动生成财务单据"
,
detailList
,
detailList
,
};
};
string
sign
=
EncryptionHelper
.
AesEncrypt
(
JsonHelper
.
Serialize
(
financeObj
),
Config
.
FinanceKey
);
string
sign
=
EncryptionHelper
.
AesEncrypt
(
JsonHelper
.
Serialize
(
financeObj
),
Config
.
FinanceKey
);
var
resultInfo
=
new
var
resultInfo
=
new
...
@@ -584,7 +593,8 @@ and DATE_FORMAT(b.PaymentTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') A
...
@@ -584,7 +593,8 @@ and DATE_FORMAT(b.PaymentTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') A
//判断是否到了时间
//判断是否到了时间
}
}
else
{
else
{
//直接结算佣金
//直接结算佣金
}
}
}
}
...
...
Mall.WindowsService/appsettings.json
View file @
c64260ec
...
@@ -33,6 +33,7 @@
...
@@ -33,6 +33,7 @@
"RebornDMC"
:
"reborn_dmc"
,
"RebornDMC"
:
"reborn_dmc"
,
"IncomeFinanceApi"
:
"http://192.168.2.16:8083/api/Mall/InsertFinanceBatchForMallIn"
,
"IncomeFinanceApi"
:
"http://192.168.2.16:8083/api/Mall/InsertFinanceBatchForMallIn"
,
"PaymentFinanceApi"
:
"http://192.168.2.16:8083/api/Mall/InsertFinanceBatchForMallOut"
,
"PaymentFinanceApi"
:
"http://192.168.2.16:8083/api/Mall/InsertFinanceBatchForMallOut"
,
"SettlementRate"
:
"0.60"
,
//
"FinanceKey"
:
"FinanceMallInsertToERPViitto2020"
,
//
"FinanceKey"
:
"FinanceMallInsertToERPViitto2020"
,
"FinanceKey"
:
"FinanceMallInsertToERPViitto2020"
,
"FinanceKey"
:
"FinanceMallInsertToERPViitto2020"
,
"RedisSetting"
:
{
"RedisSetting"
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment