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
b1c54947
Commit
b1c54947
authored
Jan 23, 2021
by
泽锋 李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增供应链采购在途
parent
722a9a80
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
16 deletions
+9
-16
daily.cs
AutoTurnOver.DB/daily.cs
+9
-16
No files found.
AutoTurnOver.DB/daily.cs
View file @
b1c54947
...
...
@@ -1322,25 +1322,18 @@ where id=@id
sql
=
@"
select
sum(ifnull(t4.usable_stock,0)) as 'stock',
sum(ifnull(t1.quantity_purchase,0)) as 'quantity_purchase',
sum(ifnull(t1.`quantity_arrival`,0)) as 'quantity_arrival',
sum(ifnull(t1.`quantity_inbound`,0)) as 'quantity_inbound',
sum(ifnull(t1.`quantity_not_inbound`,0)) as 'quantity_not_inbound',
sum(ifnull(t8.distribution_quantity,0)) as 'prod_distribution_quantity',
sum(ifnull(( t8.order_quantity - t8.distribution_quantity),0)) as 'prod_not_distribution_quantity',
sum(ifnull(t8.prod_quantity,0)) as 'prod_quantity'
sum(ifnull(t1.`quantity_not_inbound`,0)) as 'quantity_not_inbound'
from dc_base_purchase_details as t1
from dc_base_purchase_details as t1
left join dc_base_warehouse as t2 on t1.warehouse_code = t2.warehouse_code
left join dc_base_sku as t3 on t1.bailun_sku = t3.bailun_sku
left join dc_base_stock as t4 on t1.bailun_sku = t4.bailun_sku and t1.warehouse_code = t4.warehouse_code
left join dc_mid_transit as t5 on t1.bailun_sku = t5.bailun_sku and t1.warehouse_code = t5.warehouse_code
left join dc_auto_turnover as t6 on t1.bailun_sku = t6.bailun_sku and t1.warehouse_code = t6.warehouse_code
left join dc_auto_forecast_fluctuation as t7 on t1.bailun_sku = t7.bailun_sku and t1.warehouse_code = t7.warehouse_code
left join ( select * from dc_base_prod_order where is_delete=0 ) as t8 on t1.bailun_sku = t8.bailun_sku and t1.purchase_id = t8.purchase_no
"
;
if
((
categoryModels
!=
null
&&
categoryModels
.
Count
>=
1
)
||
!
string
.
IsNullOrWhiteSpace
(
search_data
.
buyer_name
)
||
search_data
.
product_type
>
0
)
{
sql
+=
" left join dc_base_sku as t3 on t1.bailun_sku = t3.bailun_sku "
;
}
if
(
search_data
.
has_tort
!=
null
)
{
sql
+=
" left join dc_base_tort as t9 on t1.bailun_sku = t9.bailun_sku "
;
...
...
@@ -1349,7 +1342,7 @@ left join ( select * from dc_base_prod_order where is_delete=0 ) as t8 on t1.ba
{
sql
+=
" left join dc_auto_config_sku_warehouse as t10 on t1.bailun_sku = t10.bailun_sku and t1.warehouse_code = t10.warehouse_code "
;
}
sql
+=
" where t1.`status` not in (-1,4) and t1.has_delete =0 and t1.quantity_not_inbound > 0 "
;
sql
+=
" where t1.`status` not in (-1,4) and t1.has_delete =0 and t1.quantity_not_inbound > 0
"
;
}
else
{
...
...
@@ -1394,7 +1387,7 @@ left join dc_base_stock as t4 on t1.bailun_sku = t4.bailun_sku and t1.warehouse_
left join dc_mid_transit as t5 on t1.bailun_sku = t5.bailun_sku and t1.warehouse_code = t5.warehouse_code
left join dc_auto_turnover as t6 on t1.bailun_sku = t6.bailun_sku and t1.warehouse_code = t6.warehouse_code
left join dc_auto_forecast_fluctuation as t7 on t1.bailun_sku = t7.bailun_sku and t1.warehouse_code = t7.warehouse_code
left join
( select * from dc_base_prod_order where is_delete=0 )
as t8 on t1.bailun_sku = t8.bailun_sku and t1.purchase_id = t8.purchase_no
left join
dc_base_prod_order
as t8 on t1.bailun_sku = t8.bailun_sku and t1.purchase_id = t8.purchase_no
"
;
...
...
@@ -1406,7 +1399,7 @@ left join ( select * from dc_base_prod_order where is_delete=0 ) as t8 on t1.b
{
sql
+=
" left join dc_auto_config_sku_warehouse as t10 on t1.bailun_sku = t10.bailun_sku and t1.warehouse_code = t10.warehouse_code "
;
}
sql
+=
" where t1.`status` not in (-1,4) and t1.has_delete =0 and t1.quantity_not_inbound > 0 "
;
sql
+=
" where t1.`status` not in (-1,4) and t1.has_delete =0 and t1.quantity_not_inbound > 0
and t8.is_delete=0
"
;
}
...
...
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