| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- -- 定义字段
- select 'private ' || case
- when a.data_type like '%CHAR%' then
- 'string'
- when a.data_type like '%DATE%' then
- 'DateTime'
- when a.data_type like '%TIME%' then
- 'DateTime'
- when a.data_type like '%NUM%' then
- 'double'
- when a.data_type like '%LONG%' then
- 'double'
- when a.data_type like '%FLOA%' then
- 'double'
- when a.data_type like '%DECIMAL%' then
- 'double'
- when a.data_type like 'INTEGER' then
- 'int'
- when a.data_type like 'TIME' then
- 'DateTime'
- else
- 'string'
- end || ' _' || a.column_name || ';'
- from user_tab_columns a
- where a.table_name = 'RTD_POINTCCM1NO1'
- order by a.column_id asc;
- -- 设置属性值
- select 'public ' || case
- when a.data_type like '%CHAR%' then
- 'string'
- when a.data_type like '%DATE%' then
- 'DateTime'
- when a.data_type like '%TIME%' then
- 'DateTime'
- when a.data_type like '%NUM%' then
- 'double'
- when a.data_type like '%LONG%' then
- 'double'
- when a.data_type like '%FLOA%' then
- 'double'
- when a.data_type like '%DECIMAL%' then
- 'double'
- when a.data_type like 'INTEGER' then
- 'int'
- when a.data_type like 'TIME' then
- 'DateTime'
- else
- 'string'
- end || ' ' || a.column_name || '' || ' { get { return this._' ||
- a.column_name || ';}' || ' set {this._' || a.column_name ||
- ' = value;}}'
- from user_tab_columns a
- where a.table_name = 'RTD_POINTCCM1NO1'
- order by a.column_id asc;
- select 'try{ Ccm1No1.' || a.column_name || ' = ' || '' || case
- when a.data_type like '%CHAR%' then
- 'Core.Mes.Client.Common.Util.LgConvertUtil.ConvetToString'
- when a.data_type like '%DATE%' then
- 'Core.Mes.Client.Common.Util.LgConvertUtil.ConvertToDateTime'
- when a.data_type like '%TIME%' then
- 'Core.Mes.Client.Common.Util.LgConvertUtil.ConvertToDateTime'
- when a.data_type like '%NUM%' then
- 'Core.Mes.Client.Common.Util.LgConvertUtil.ConvetToDouble'
- when a.data_type like '%LONG%' then
- 'Core.Mes.Client.Common.Util.LgConvertUtil.ConvetToDouble'
- when a.data_type like '%FLOAT%' then
- 'Core.Mes.Client.Common.Util.LgConvertUtil.ConvetToDouble'
- when a.data_type like '%DECIMAL%' then
- 'Core.Mes.Client.Common.Util.LgConvertUtil.ConvetToDouble'
- when a.data_type like 'INTEGER' then
- 'Core.Mes.Client.Common.Util.LgConvertUtil.ConvetToInt32'
- else
- 'Core.Mes.Client.Common.Util.LgConvertUtil.ConvetToString'
- end || '(' || 'dr[' || '"' || a.column_name || '"' || ']);' || '}' ||
- ' catch {}'
- from user_tab_columns a
- where a.table_name = 'RTD_POINTCCM1NO1'
- order by a.column_id asc
|