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
5f1c9f3d
Commit
5f1c9f3d
authored
Dec 30, 2020
by
guanzhenshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整平台订单利润率一天的时间长度;调整物流供应商往来统计服务
parent
089d0b02
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
27 deletions
+33
-27
Services.cs
Bailun.DC.DailyItemNoProfitRate/Services.cs
+2
-2
Program.cs
Bailun.DC.DailyLogisticSupplierTransaction/Program.cs
+4
-1
Services.cs
Bailun.DC.DailyLogisticSupplierTransaction/Services.cs
+27
-24
No files found.
Bailun.DC.DailyItemNoProfitRate/Services.cs
View file @
5f1c9f3d
...
@@ -37,7 +37,7 @@ namespace Bailun.DC.DailyItemNoProfitRate
...
@@ -37,7 +37,7 @@ namespace Bailun.DC.DailyItemNoProfitRate
Init
(
day
.
AddDays
(-
20
),
day
);
Init
(
day
.
AddDays
(-
20
),
day
);
Console
.
WriteLine
(
"开始生成一天的itemno利润率"
+
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
));
Console
.
WriteLine
(
"开始生成一天的itemno利润率"
+
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
));
OneDayItemNoProfitRate
(
day
.
AddDays
(-
2
),
day
);
OneDayItemNoProfitRate
(
day
.
AddDays
(-
1
),
day
);
Console
.
WriteLine
(
"任务运行完成 "
+
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
));
Console
.
WriteLine
(
"任务运行完成 "
+
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
));
...
@@ -53,7 +53,7 @@ namespace Bailun.DC.DailyItemNoProfitRate
...
@@ -53,7 +53,7 @@ namespace Bailun.DC.DailyItemNoProfitRate
Init
(
day
.
AddDays
(-
20
),
day
);
Init
(
day
.
AddDays
(-
20
),
day
);
Console
.
WriteLine
(
"开始生成一天的itemno利润率"
+
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
));
Console
.
WriteLine
(
"开始生成一天的itemno利润率"
+
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
));
OneDayItemNoProfitRate
(
day
.
AddDays
(-
2
),
day
);
OneDayItemNoProfitRate
(
day
.
AddDays
(-
1
),
day
);
}
}
...
...
Bailun.DC.DailyLogisticSupplierTransaction/Program.cs
View file @
5f1c9f3d
...
@@ -27,7 +27,10 @@ namespace Bailun.DC.DailyLogisticSupplierTransaction
...
@@ -27,7 +27,10 @@ namespace Bailun.DC.DailyLogisticSupplierTransaction
{
{
var
_services
=
new
Services
();
var
_services
=
new
Services
();
var
start
=
DateTime
.
Parse
(
"2020-09-01"
);
var
start
=
DateTime
.
Parse
(
"2020-11-01"
);
_services
.
Init
(
start
);
return
;
while
(
start
.
AddDays
(
1
)
<
DateTime
.
Now
)
while
(
start
.
AddDays
(
1
)
<
DateTime
.
Now
)
{
{
Console
.
WriteLine
(
start
);
Console
.
WriteLine
(
start
);
...
...
Bailun.DC.DailyLogisticSupplierTransaction/Services.cs
View file @
5f1c9f3d
...
@@ -73,7 +73,7 @@ namespace Bailun.DC.DailyLogisticSupplierTransaction
...
@@ -73,7 +73,7 @@ namespace Bailun.DC.DailyLogisticSupplierTransaction
var
list
=
new
List
<
dc_daily_logistics_supplier_transaction
>();
var
list
=
new
List
<
dc_daily_logistics_supplier_transaction
>();
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString
))
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString
_read
))
{
{
if
(
cn
.
State
==
System
.
Data
.
ConnectionState
.
Closed
)
if
(
cn
.
State
==
System
.
Data
.
ConnectionState
.
Closed
)
{
{
...
@@ -316,31 +316,34 @@ namespace Bailun.DC.DailyLogisticSupplierTransaction
...
@@ -316,31 +316,34 @@ namespace Bailun.DC.DailyLogisticSupplierTransaction
foreach
(
var
item
in
listMerge
)
foreach
(
var
item
in
listMerge
)
{
{
var
listObj
=
list
.
Where
(
a
=>
a
.
suppliername
==
item
.
Key
||
item
.
Select
(
a
=>
a
.
suppliername
).
Contains
(
a
.
suppliername
));
var
listObj
=
list
.
Where
(
a
=>
a
.
suppliername
==
item
.
Key
||
item
.
Select
(
a
=>
a
.
suppliername
).
Contains
(
a
.
suppliername
));
if
(
listObj
.
Count
()>
0
)
var
newObj
=
new
dc_daily_logistics_supplier_transaction
()
{
{
amount_happen
=
listObj
.
Count
()
>
0
?
listObj
.
Sum
(
a
=>
a
.
amount_happen
)
:
0
,
var
newObj
=
new
dc_daily_logistics_supplier_transaction
()
amount_pay
=
listObj
.
Count
()
>
0
?
listObj
.
Sum
(
a
=>
a
.
amount_pay
)
:
0
,
{
amount_receipt
=
listObj
.
Count
()
>
0
?
listObj
.
Sum
(
a
=>
a
.
amount_receipt
)
:
0
,
amount_happen
=
listObj
.
Count
()
>
0
?
listObj
.
Sum
(
a
=>
a
.
amount_happen
)
:
0
,
amount_other
=
listObj
.
Count
()
>
0
?
listObj
.
Sum
(
a
=>
a
.
amount_other
)
:
0
,
amount_pay
=
listObj
.
Count
()
>
0
?
listObj
.
Sum
(
a
=>
a
.
amount_pay
)
:
0
,
amount_receipt
=
listObj
.
Count
()
>
0
?
listObj
.
Sum
(
a
=>
a
.
amount_receipt
)
:
0
,
suppliername
=
item
.
Key
,
amount_other
=
listObj
.
Count
()
>
0
?
listObj
.
Sum
(
a
=>
a
.
amount_other
)
:
0
,
supplierid
=
0
,
amount_end
=
0
,
suppliername
=
item
.
Key
,
amount_start
=
0
,
supplierid
=
0
,
createtime
=
DateTime
.
Now
,
amount_end
=
0
,
day
=
list
.
FirstOrDefault
().
day
,
amount_start
=
0
,
lastupdatetime
=
DateTime
.
Now
,
createtime
=
DateTime
.
Now
,
lastupdateuserid
=
0
,
day
=
list
.
FirstOrDefault
().
day
,
lastupdateusername
=
"admin"
lastupdatetime
=
DateTime
.
Now
,
};
lastupdateuserid
=
0
,
lastupdateusername
=
"admin"
foreach
(
var
o
in
listObj
)
};
{
list
.
Remove
(
o
);
}
list
.
Add
(
newObj
);
foreach
(
var
o
in
listObj
)
{
list
.
Remove
(
o
);
}
list
.
Add
(
newObj
);
}
}
}
...
...
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