<?xml version="1.0" encoding="UTF-8" ?>
<queryMap>
    <query id="CrmBsStorageServer.Query" desc="仓库信息查询">
        SELECT
        T.STORAGE_NO,
        T.STORAGE_NAME,
        T.STORAGE_ATTR,
        T.STORAGE_ADDR_NO,
        T.STORAGE_ADDR_NAME,
        T.STORAGE_TYPE_NO,
        T.STORAGE_TYPE_NAME,
        T.MANAGEMENT_NO,
        T.MANAGEMENT_NAME,
        T.HL_MANAGEMENT_NO,
        T.HL_MANAGEMENT_NAME,
        DECODE(T.DUMMY_FLAG, '0', '实物库', '1', '虚拟库') DUMMY_FLAG,
        T.MEMO,
        DECODE(T.VALIDFLAG, '0', '无效', '1', '有效') VALIDFLAG,
        T.CREATE_NAME,
        TO_CHAR(T.CREATE_TIME, 'YYYY-MM-DD HH24:MI:SS') CREATE_TIME,
        T.UPDATE_NAME,
        TO_CHAR(T.UPDATE_TIME, 'YYYY-MM-DD HH24:MI:SS') UPDATE_TIME,
        T.DELETE_NAME,
        TO_CHAR(T.DELETE_TIME, 'YYYY-MM-DD HH24:MI:SS') DELETE_TIME,
        T.STORAGE_ATTR_NAME,
        T.DEPARTMENT_CODE,
        T.DEPARTMENT_DESC,
        T.STOCK_GROUP_CODE,
        T.STOCK_GROUP_NAME,
        DECODE(T.IS_CAR_TAKING, '0', '否', '1', '是') IS_CAR_TAKING,
        DECODE(T.IS_CAR_TAKING_BILL, '0', '否', '1', '是') IS_CAR_TAKING_BILL,
        DECODE(T.IS_CRANE_LOADING, '0', '否', '1', '是') IS_CRANE_LOADING,
        DECODE(T.IS_CRANE_UNLOADING, '0', '否', '1', '是') IS_CRANE_UNLOADING,
        DECODE(T.SEAM_AREA, '0', '天管', '1', '天淮') SEAM_AREA,
        DECODE(T.DATA_STATUS, '0', '新增', '1', '修改', '2','删除') DATA_STATUS,
        DECODE(T.IS_FLAG, '0', '未同步', '1', '已同步', '2', 'crm数据问题', '3', '产销数据问题', '4', '数据过滤') IS_FLAG,
        TO_CHAR(T.SYNCHRO_TIME, 'YYYY-MM-DD HH24:MI:SS') SYNCHRO_TIME,
        T.ID,
        T.CREATE_TIMESTAMP
        FROM CRM_BS_STORAGE T
        WHERE
        1 =1
    </query>
</queryMap>