Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DataCenter_Core2.1_20190520
Overview
Overview
Details
Activity
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
bltdc
DataCenter_Core2.1_20190520
Commits
fa458249
Commit
fa458249
authored
Dec 17, 2020
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整物流往来供应商,增加合并和不统计速卖通线上平台供应商
parent
9a78cb33
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
2 deletions
+56
-2
Program.cs
Bailun.DC.DailyItemNoProfitRate/Program.cs
+1
-1
Services.cs
Bailun.DC.DailyLogisticSupplierTransaction/Services.cs
+55
-1
No files found.
Bailun.DC.DailyItemNoProfitRate/Program.cs
View file @
fa458249
...
...
@@ -19,7 +19,7 @@ namespace Bailun.DC.DailyItemNoProfitRate
//await builder.RunConsoleAsync();
var
_service
=
new
Services
();
var
day
=
DateTime
.
Parse
(
DateTime
.
Now
.
AddDays
(-
1
).
ToShortDateString
());
var
day
=
DateTime
.
Parse
(
DateTime
.
Now
.
AddDays
(-
2
).
ToShortDateString
());
_service
.
Init
(
day
.
AddDays
(-
20
),
day
);
_service
.
OneDayItemNoProfitRate
(
day
.
AddDays
(-
1
),
day
);
}
...
...
Bailun.DC.DailyLogisticSupplierTransaction/Services.cs
View file @
fa458249
...
...
@@ -60,6 +60,8 @@ namespace Bailun.DC.DailyLogisticSupplierTransaction
List
<
string
>
arrMidland
=
new
List
<
string
>
{
"Midlands Associates Ltd"
,
"Midlands Associates Ltd(B)"
};
List
<
string
>
arrHuaYu
=
new
List
<
string
>
{
"橙联平台充值"
,
"江苏天地华宇物联科技有限公司"
};
List
<
string
>
arrRongHeng
=
new
List
<
string
>
{
"深圳荣恒国际物流有限公司(美金)"
,
"深圳荣恒国际物流有限公司(人民币)"
,
"深圳荣恒国际物流有限公司"
};
List
<
string
>
arrXingXing
=
new
List
<
string
>
{
"SHENZHEN KINGKONG INTERNATIONAL SUPPLY CHAIN TECHNOLOGY LIMITED"
,
"深圳市猩猩国际供应链科技有限公司美元"
,
"深圳市猩猩国际供应链科技有限公司"
};
List
<
string
>
arrRongHui
=
new
List
<
string
>
{
"黄红玲"
,
"深圳市荣辉快运国际物流有限公司"
};
public
void
Init
(
DateTime
day
)
{
...
...
@@ -235,8 +237,53 @@ namespace Bailun.DC.DailyLogisticSupplierTransaction
};
//新增猩猩
var
objXingXing
=
list
.
Where
(
a
=>
arrXingXing
.
Contains
(
a
.
suppliername
)).
ToList
();
var
tempXingXing
=
new
dc_daily_logistics_supplier_transaction
{
amount_happen
=
objXingXing
.
Count
>
0
?
objXingXing
.
Sum
(
a
=>
a
.
amount_happen
)
:
0
,
amount_pay
=
objXingXing
.
Count
>
0
?
objXingXing
.
Sum
(
a
=>
a
.
amount_pay
)
:
0
,
amount_receipt
=
objXingXing
.
Count
>
0
?
objXingXing
.
Sum
(
a
=>
a
.
amount_receipt
)
:
0
,
amount_other
=
objXingXing
.
Count
>
0
?
objXingXing
.
Sum
(
a
=>
a
.
amount_other
)
:
0
,
suppliername
=
"深圳市猩猩国际供应链科技有限公司"
,
supplierid
=
0
,
amount_end
=
0
,
amount_start
=
0
,
createtime
=
DateTime
.
Now
,
day
=
list
.
FirstOrDefault
().
day
,
lastupdatetime
=
DateTime
.
Now
,
lastupdateuserid
=
0
,
lastupdateusername
=
"admin"
};
//新增荣辉
var
objRongHui
=
list
.
Where
(
a
=>
arrRongHui
.
Contains
(
a
.
suppliername
)).
ToList
();
var
tempRongHui
=
new
dc_daily_logistics_supplier_transaction
{
amount_happen
=
objRongHui
.
Count
>
0
?
objRongHui
.
Sum
(
a
=>
a
.
amount_happen
)
:
0
,
amount_pay
=
objRongHui
.
Count
>
0
?
objRongHui
.
Sum
(
a
=>
a
.
amount_pay
)
:
0
,
amount_receipt
=
objRongHui
.
Count
>
0
?
objRongHui
.
Sum
(
a
=>
a
.
amount_receipt
)
:
0
,
amount_other
=
objRongHui
.
Count
>
0
?
objRongHui
.
Sum
(
a
=>
a
.
amount_other
)
:
0
,
suppliername
=
"深圳市荣辉快运国际物流有限公司"
,
supplierid
=
0
,
amount_end
=
0
,
amount_start
=
0
,
createtime
=
DateTime
.
Now
,
day
=
list
.
FirstOrDefault
().
day
,
lastupdatetime
=
DateTime
.
Now
,
lastupdateuserid
=
0
,
lastupdateusername
=
"admin"
};
//去除三通、华宇、荣恒的子公司数据
list
=
list
.
Where
(
a
=>
!
arrSanTong
.
Contains
(
a
.
suppliername
)
&&
!
arrMidland
.
Contains
(
a
.
suppliername
)
&&
!
arrHuaYu
.
Contains
(
a
.
suppliername
)
&&
!
arrRongHeng
.
Contains
(
a
.
suppliername
)).
ToList
();
list
=
list
.
Where
(
a
=>
!
arrSanTong
.
Contains
(
a
.
suppliername
)
&&
!
arrMidland
.
Contains
(
a
.
suppliername
)
&&
!
arrHuaYu
.
Contains
(
a
.
suppliername
)
&&
!
arrRongHeng
.
Contains
(
a
.
suppliername
)
&&
!
arrXingXing
.
Contains
(
a
.
suppliername
)
&&
!
arrRongHui
.
Contains
(
a
.
suppliername
)
).
ToList
();
//增加三通、华宇、荣恒数据到列表
list
.
Add
(
tempSanTong
);
...
...
@@ -244,6 +291,9 @@ namespace Bailun.DC.DailyLogisticSupplierTransaction
list
.
Add
(
tempHuaYu
);
list
.
Add
(
tempRongHeng
);
list
.
Add
(
tempXingXing
);
list
.
Add
(
tempRongHui
);
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString
))
{
...
...
@@ -254,6 +304,10 @@ namespace Bailun.DC.DailyLogisticSupplierTransaction
foreach
(
var
item
in
list
)
{
if
(
item
.
suppliername
==
"速卖通平台-线上物流商"
)
continue
;
//获取期初
var
sql
=
$"select * from dc_daily_logistics_supplier_transaction where suppliername='
{
item
.
suppliername
}
' and day<'
{
item
.
day
.
ToString
(
"yyyy-MM-dd"
)}
' order by day desc limit 1"
;
var
objStart
=
cn
.
QueryFirstOrDefault
<
dc_daily_logistics_supplier_transaction
>(
sql
);
...
...
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