Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
data-center-auto
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
data-center-auto
Commits
3777a12c
Commit
3777a12c
authored
Apr 08, 2021
by
泽锋 李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
d56242ac
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
15 deletions
+17
-15
purchase_advise.cs
AutoTurnOver.DB/purchase_advise.cs
+17
-15
No files found.
AutoTurnOver.DB/purchase_advise.cs
View file @
3777a12c
...
...
@@ -195,21 +195,23 @@ and t1.gmt_modified>=@btime and ifnull(t4.head_transport,'')!='空运'
}
sql
+=
" order by t1.start_time desc ;"
;
List
<
replace_logistics_outofstock_dto
>
ouDatas
=
_connection
.
Query
<
replace_logistics_outofstock_dto
>(
sql
,
parameters
).
ToList
();
foreach
(
var
item
in
ouDatas
)
{
// 如果采购都没到货就已经缺货了,调拨天数切换已经没有意义了
item
.
surplus_allocation_days
=
(
decimal
)(
item
.
start_time
.
AddDays
(
0
-
(
item
.
inspection_delivery
+
item
.
payment_before_delivery
+
item
.
supplier_delivery
))
-
now
).
TotalDays
;
if
(
item
.
surplus_allocation_days
>=
1
)
{
item
.
country_code
=
_connection
.
QueryFirstOrDefault
<
string
>(
" select `code` from dc_base_country where `name`=@name limit 1 "
,
new
{
name
=
item
.
area_name
});
if
(!
string
.
IsNullOrWhiteSpace
(
item
.
country_code
))
{
datas
.
Add
(
item
);
}
}
}
return
datas
;
return
ouDatas
;
//foreach (var item in ouDatas)
//{
// // 如果采购都没到货就已经缺货了,调拨天数切换已经没有意义了
// item.surplus_allocation_days = (decimal)(item.start_time.AddDays(0 - (item.inspection_delivery + item.payment_before_delivery + item.supplier_delivery)) - now).TotalDays;
// if (item.surplus_allocation_days >= 1)
// {
// item.country_code = _connection.QueryFirstOrDefault<string>(" select `code` from dc_base_country where `name`=@name limit 1 ", new { name = item.area_name });
// if (!string.IsNullOrWhiteSpace(item.country_code))
// {
// datas.Add(item);
// }
// }
//}
//return datas;
}
...
...
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