<?xml version="1.0" encoding="UTF-8"?>
<sagacity
	xmlns="http://www.sagframe.com/schema/sqltoy-translate"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.sagframe.com/schema/sqltoy-translate  http://www.sagframe.com/schema/sqltoy/sqltoy-translate.xsd"
>
	<!-- 缓存有默认失效时间，默认为1小时,因此只有较为频繁的缓存才需要及时检测 -->
    <cache-translates>
		<!-- 故障状态 -->
		<sql-translate cache="dictFaultStatus" datasource="dataSource">
			<sql>
				<![CDATA[
				SELECT t.dict_value AS faultStatus_dictText,t.dict_label
			    FROM t_sys_dict_data t WHERE t.dict_type = 'fault_status'
			]]>
			</sql>
		</sql-translate>
		<!-- 转换状态 -->
		<sql-translate cache="dictTurnStatus" datasource="dataSource">
			<sql>
				<![CDATA[
				SELECT t.dict_value AS turnStatusText,t.dict_label
			    FROM t_sys_dict_data t WHERE t.dict_type = 'turn_status'
			]]>
			</sql>
		</sql-translate>
		<!-- 知识类别 -->
		<sql-translate cache="dictKnowledgeType" datasource="dataSource">
			<sql>
				<![CDATA[
				SELECT t.dict_value AS knowledgeType_dictText,t.dict_label
			    FROM t_sys_dict_data t WHERE t.dict_type = 'knowledge_type'
			]]>
			</sql>
		</sql-translate>
    	<!-- 日志类别 -->
		<sql-translate cache="dictEquipLog" datasource="dataSource">
			<sql>
				<![CDATA[
				SELECT t.dict_value AS equipmentLogType,t.dict_label
			    FROM t_sys_dict_data t WHERE t.dict_type = 'equipment_log_type'
			]]>
			</sql>
		</sql-translate>
    	<!-- 发布状态 -->
		<sql-translate cache="dictSendStatus" datasource="dataSource">
			<sql>
			<![CDATA[
				SELECT t.dict_value AS is_release,t.dict_label 
			    FROM t_sys_dict_data t WHERE t.dict_type = 'send_status'
			]]>
			</sql>
		</sql-translate>

		<!-- 列车工作日志类型 -->
		<sql-translate cache="dictTrainWorkingLogType" datasource="dataSource">
			<sql>
				<![CDATA[
				SELECT t.dict_value AS trainWorkingLogType_dictText,t.dict_label
			    FROM t_sys_dict_data t WHERE t.dict_type = 'train_working_log_type'
			]]>
			</sql>
		</sql-translate>
		', ''
		<!-- 设备在线状态 -->
		<sql-translate cache="dictOnlineStatus" datasource="dataSource">
			<sql>
				<![CDATA[
				SELECT t.dict_value AS onlineStatu_dictText,t.dict_label
			    FROM t_sys_dict_data t WHERE t.dict_type = 'online_status'
			]]>
			</sql>
		</sql-translate>
		<!-- 播放状态 -->
		<sql-translate cache="dictPlayState" datasource="dataSource">
			<sql>
				<![CDATA[
				SELECT t.dict_value AS playState_dictText,t.dict_label
			    FROM t_sys_dict_data t WHERE t.dict_type = 'play_state'
			]]>
			</sql>
		</sql-translate>
		<!-- 开门方向 -->
		<sql-translate cache="dictDoorDirection" datasource="dataSource">
			<sql>
				<![CDATA[
				SELECT t.dict_value AS openDoorDirection_dictText,t.dict_label
			    FROM t_sys_dict_data t WHERE t.dict_type = 'open_door_direction'
			]]>
			</sql>
		</sql-translate>
		<!-- 列车运行方向 -->
		<sql-translate cache="dictCarDirection" datasource="dataSource">
			<sql>
				<![CDATA[
				SELECT t.dict_value AS carDirection_dictText,t.dict_label
			    FROM t_sys_dict_data t WHERE t.dict_type = 'direction'
			]]>
			</sql>
		</sql-translate>
		<!-- 设备类别 -->
		<sql-translate cache="dictEquipType" datasource="dataSource">
			<sql>
				<![CDATA[
				SELECT t.dict_value AS euqipType_dictText,t.dict_label
			    FROM t_sys_dict_data t WHERE t.dict_type = 'equipment_type'
			]]>
			</sql>
		</sql-translate>
		<!-- 故障类别 -->
		<sql-translate cache="dictFaultType" datasource="dataSource">
			<sql>
				<![CDATA[
				SELECT t.dict_value AS faultType_dictText,t.dict_label
			    FROM t_sys_dict_data t WHERE t.dict_type = 'fault_type'
			]]>
			</sql>
		</sql-translate>
		<!-- 预警类别 -->
		<sql-translate cache="dictWarnType" datasource="dataSource">
			<sql>
				<![CDATA[
				SELECT t.dict_value AS warnType_dictText,t.dict_label
			    FROM t_sys_dict_data t WHERE t.dict_type = 'warn_type'
			]]>
			</sql>
		</sql-translate>
		<!-- 报警状态 -->
		<sql-translate cache="dictAlarmStatus" datasource="dataSource">
			<sql>
				<![CDATA[
				SELECT t.dict_value AS alarmStatus_dictText,t.dict_label
			    FROM t_sys_dict_data t WHERE t.dict_type = 'alarm_status'
			]]>
			</sql>
		</sql-translate>
    	<!-- 板卡类型 -->
		<sql-translate cache="dictBoardCardType" datasource="dataSource">
			<sql>
			<![CDATA[
				SELECT t.dict_value AS boardCardType_dictText,t.dict_label 
			    FROM t_sys_dict_data t WHERE t.dict_type = 'board_card_type'
			]]>
			</sql>
		</sql-translate>
		<!-- 出入库类别: 基于sql直接查询的方式获取缓存 -->
		<sql-translate cache="dictStockOutIn" datasource="dataSource">
			<sql>
			<![CDATA[
				SELECT t.dict_value AS out_in,t.dict_label 
			    FROM t_sys_dict_data t WHERE t.dict_type = 'out_in'
			]]>
			</sql>
		</sql-translate>
		<!-- 仓库名称 -->
		<sql-translate cache="dictWarehouse" datasource="dataSource">
			<sql>
			<![CDATA[SELECT t.id AS warehouse_id,t.name FROM atv_warehouse t]]>
			</sql>
		</sql-translate>
		<!-- 供应商 -->
		<sql-translate cache="dictSupplier" datasource="dataSource">
			<sql>
			<![CDATA[SELECT t.id AS supplier_id,t.name  FROM atv_supplier t]]>
			</sql>
		</sql-translate>
		<!-- 用户 -->
		<sql-translate cache="dictUser" datasource="dataSource">
			<sql>
			<![CDATA[SELECT t.user_id,t.nick_name FROM t_sys_user t ]]>
			</sql>
		</sql-translate>
	</cache-translates>
</sagacity>