|
|
|
@ -1,8 +1,7 @@
|
|
|
|
def get_where_query_sql(assetnum, worktype):
|
|
|
|
def get_where_query_sql(assetnum, worktype):
|
|
|
|
where_query = f"""
|
|
|
|
where_query = f"""
|
|
|
|
where
|
|
|
|
where
|
|
|
|
a.asset_unit = '3'
|
|
|
|
(a.asset_unit = '3' OR a.asset_unit='00')
|
|
|
|
AND a.asset_unit='00'
|
|
|
|
|
|
|
|
and a.wonum not like 'T%'
|
|
|
|
and a.wonum not like 'T%'
|
|
|
|
AND a.asset_assetnum = '{assetnum}'
|
|
|
|
AND a.asset_assetnum = '{assetnum}'
|
|
|
|
{f"AND a.worktype = '{worktype}'" if worktype != 'CM' else "AND a.worktype in ('CM', 'PROACTIVE', 'EM')"}
|
|
|
|
{f"AND a.worktype = '{worktype}'" if worktype != 'CM' else "AND a.worktype in ('CM', 'PROACTIVE', 'EM')"}
|
|
|
|
@ -21,8 +20,7 @@ def get_where_query_sql(assetnum, worktype):
|
|
|
|
def get_where_query_sql_all_worktype(assetnum):
|
|
|
|
def get_where_query_sql_all_worktype(assetnum):
|
|
|
|
where_query = f"""
|
|
|
|
where_query = f"""
|
|
|
|
where
|
|
|
|
where
|
|
|
|
a.asset_unit = '3'
|
|
|
|
(a.asset_unit = '3' OR a.asset_unit='00')
|
|
|
|
AND a.asset_unit='00'
|
|
|
|
|
|
|
|
and a.wonum not like 'T%'
|
|
|
|
and a.wonum not like 'T%'
|
|
|
|
AND a.asset_assetnum = '{assetnum}'
|
|
|
|
AND a.asset_assetnum = '{assetnum}'
|
|
|
|
AND (
|
|
|
|
AND (
|
|
|
|
|