|
|
|
|
@ -3,6 +3,7 @@ def get_where_query_sql(assetnum, worktype):
|
|
|
|
|
where
|
|
|
|
|
(a.asset_unit = '3' OR a.asset_unit='00')
|
|
|
|
|
and a.wonum not like 'T%'
|
|
|
|
|
and a.status in ('COMP', 'CLOSE')
|
|
|
|
|
AND a.asset_assetnum = '{assetnum}'
|
|
|
|
|
{f"AND a.worktype = '{worktype}'" if worktype != 'CM' else "AND a.worktype in ('CM', 'PROACTIVE', 'EM')"}
|
|
|
|
|
{f"AND a.wojp8 != 'S1'" if worktype == 'CM' else ""}
|
|
|
|
|
@ -22,6 +23,7 @@ def get_where_query_sql_all_worktype(assetnum):
|
|
|
|
|
where
|
|
|
|
|
(a.asset_unit = '3' OR a.asset_unit='00')
|
|
|
|
|
and a.wonum not like 'T%'
|
|
|
|
|
and a.status in ('COMP', 'CLOSE')
|
|
|
|
|
AND a.asset_assetnum = '{assetnum}'
|
|
|
|
|
AND (
|
|
|
|
|
(a.worktype = 'CM' AND a.wojp8 != 'S1')
|
|
|
|
|
|