o
    6Id                     @   sz   d dl Z d dlmZmZmZmZ d dlmZmZ d dl	m
Z
 d dlmZ d dlT d dlZe Zeddefd	d
ZdS )    N)	APIRouterRequestBodystatus)DictList)jsonable_encoder)JSONResponse)*z/get_uom/{uom_id}requestc                    sz   | j j }|dkr|d|}n|d}g }|jdkr;|D ]}||d |d d q t|dkr7|S |d S dS )N0zTselect SpecificationTypeId,Name from SpecificationType where SpecificationTypeId = ?z>select SpecificationId,Name from Specification where TypeId =4r      )uom_iduom_namezuom not found)appmssqlcursorexecuterowcountappendlen)r   r   r   rowsZuom_datarow r   5D:\Vignesh\Freelance\Astroved\api_v1\routes\others.pyget_uom   s    


r   )arrowfastapir   r   r   r   typingr   r   fastapi.encodersr   fastapi.responsesr	   
lib.commonjsonroutergetr   r   r   r   r   <module>   s    