OrDroid APP 相关
OrDroid CloudKanBan 对象插件使用说明
OrDroid V13 APP 安装与使用说明
01- V13 移动浏览器升级及更新说明
02- V13 移动事务对象插件使用说明
03- V13 查询元对象插件使用说明
04- V13 协同工作流插件使用说明
04- V13 消息对象插件使用说明
05- V13 ESOP 插件使用说明
06- V13 DOC 插件使用说明
07- V13 Andon 插件使用说明
09- V13 自定义 Apk 插件使用说明
10- V13 OrDroid Html 网页插件使用说明
OrDroid V13&V15 版本差异说明
OrDroid V15 APP 安装与使用说明
01- V15 主程序安装与使用说明
02- V15 其它插件安装与更新说明(除主程序外)
03- V15 移动事务对象插件使用说明
04- V15 打印插件安装与使用
Poinse一体式打印机参数说明文档
TSC打印机参数说明文档
佳博打印机参数说明文档
富立叶一体式打印机参数说明文档
斑马打印机参数说明文档
汉印打印机参数说明文档
瑞利信一体式打印机参数说明文档
蓝畅一体式打印机参数说明文档
译维打印机参数说明文档
05- V15 消息对象插件说明
OrDroid-Msg 消息推送架构搭建手册
消息推送机制说明
消息通知函数说明
06- V15 DOC插件使用说明
07- V15 ESOP插件使用说明
08- V15 自定义插件开发指南
09- V15 自定义打印插件开发指南
10- V15 OrDroidSSO使用说明
11- UHF-SLR5100系列RFID设备使用指南
11- V15 OrDroid Html网页插件使用说明
OrDroid 开发配置与测试用例
OrDroid 查询对象挂载 Mrz 使用说明
OrDroid 通过斑马打印机ZPL指令实现移动打印
OrDroid 限制同一个用户在不同设备同时登录
-
+
首页
11- UHF-SLR5100系列RFID设备使用指南
# 一、新增MobileObjectMethod表字段 在MobileObjectMethod表中,新增字段IsActivityDevice、ActivityParameter,表字段类型如下图。 ![](/media//202303/2023-03-09_164724.png) # 二、修改存储过程MobileObjectMethodMainView 代码如下。 ```sql SELECT MobileObjectMethod.MobileObjectId, MobileObjectMethod.MethodSequence, MobileObjectMethod.MobileObjectMethodName, MobileObjectMethod.SQLDoTxn, MobileObjectMethod.TxnParameter, MobileObjectMethod.IsHidden, MobileObjectMethod.RefreshGridParameter, MobileObjectMethod.AccessCode, MobileObjectMethod.IsPlaySound, MobileObjectMethod.IsGetGPS, MobileObjectMethod.IsBeforeRunningConfirm, MobileObjectMethod.IsAutoRunWhenTabActive, MobileObjectMethod.IsActivityDevice, MobileObjectMethod.ActivityParameter, MobileObjectMethod.IsVibrate, MobileObjectMethod.PromptMessage, IIF(ISNULL(SysText.Text1,'')='',MobileObjectMethod.MobileObjectMethodName,SysText.Text1) AS Text1, SysText.Text2, SysText.Text3, SysText.Text4, SysText.Text5, SysText.Text6, SysText.Text7, SysText.Text8 FROM dbo.MobileObjectMethod LEFT JOIN dbo.SysText ON dbo.MobileObjectMethod.MobileObjectMethodName=dbo.SysText.TextModule AND SysText.TextOwner='[Public Text]' WHERE dbo.MobileObjectMethod.MobileObjectMethodId=@I_PKId ``` # 三、修改存储过程MobileObjectMethodSaveData 代码如下。 ```sql ALTER PROCEDURE [dbo].[MobileObjectMethodSaveData] @I_ReturnMessage NVARCHAR(MAX)='' OUTPUT, --返回的信息,支持多语言 @I_IsNewRow BIT = 0 OUTPUT, --向客户端报告是否是新行 @I_ExceptionFieldName NVARCHAR(100)='' OUTPUT, --向客户端报告引起冲突的字段 @I_LanguageId CHAR(1)='1', --客户端传入的语言ID @I_PlugInCommand VARCHAR(5)='', --插件命令 @I_OrBitUserId CHAR(12)='', --用户ID @I_OrBitUserName NVARCHAR(100)='', --用户名 @I_ResourceId CHAR(12)='', --资源ID(如果资源不在资源清单中,那么它将是空的) @I_ResourceName NVARCHAR(100)='', --资源名 @I_PKId CHAR(12) = '', --主键 @I_SourcePKId CHAR(12)='', --执行拷贝时传入的源主键 @I_ParentPKId CHAR(12)='', --父级主键 @I_Parameter NVARCHAR(100)='', --插件参数 --以上变量为服务固定接口参数,必须在每一个Save过程中实现。 --以下参与必须与该元对象数据在MetadataField表中提供的字段一一对应。 --警告: 以下变量请一定要赋以默认值,否则前台程序会报错 --提示:元数据在MetadataField表中提供的所有字段必须全部包含在Save过程中 -- 否则会导致因在更新时为参数不找到出前台程序报错。> --提示:以下是用户变量定义段,如有用户变量定义段,请将上面@I_Parameter nvarchar(100)=''后面加上,号! @MobileObjectId CHAR(12)='', @MobileObjectMethodName NVARCHAR(50)='', @MethodSequence CHAR(2)='', @SQLDoTxn NVARCHAR(100)='', @TxnParameter NVARCHAR(1000)='', @IsHidden BIT=0, @IsPlaySound BIT=0, @RefreshGridParameter NVARCHAR(100)='', @IsBeforeRunningConfirm BIT=0, @IsAutoRunWhenTabActive BIT=0, @PromptMessage NVARCHAR(100)='', @AccessCode NVARCHAR(20)='', @IsGetGPS BIT=0, @IsActivityDevice BIT=0, --是否激活设备 @ActivityParameter NVARCHAR(50)='', @IsVibrate BIT=0, --是否振动 @Text1 NVARCHAR(100)='', @Text2 NVARCHAR(100)='', @Text3 NVARCHAR(100)='', @Text4 NVARCHAR(100)='', @Text5 NVARCHAR(100)='', @Text6 NVARCHAR(100)='', @Text7 NVARCHAR(100)='', @Text8 NVARCHAR(100)='' --用户变量结束 AS BEGIN -- This Stored Procedure is created by OrBit-MetaObject engine SET NOCOUNT ON; SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED --执行SaveData,注意:以下过程必须根据业务的需求进行调整 --如果您不了解SaveData过程如何编写,请参考我们提供的示例_SampleProjectSaveData declare @ModifyObject nvarchar(50) declare @ModifyType nvarchar(20) declare @return_value int declare @S_ReturnMessage nvarchar(100) declare @FieldsValueOld nvarchar(max) declare @FieldsValueNew nvarchar(max) declare @FieldsChanged nvarchar(max) set @I_ReturnMessage='' set @I_IsNewRow = 0 set @I_ExceptionFieldName='' set @ModifyObject='MobileObjectMethod' --这里必须要是当前操作的表名 set @ModifyType ='' --没有申请到主键就退出 if ltrim(@I_PKId)='' begin set @I_ReturnMessage='No PKId applied' return -1 end if @IsActivityDevice=1 and ISNULL(@ActivityParameter,'')='' begin set @I_ReturnMessage='ServerMessage:已选中“是否激活设备”后,激活参数不能为空!' return -1 end if not exists(SELECT MobileObjectMethodId FROM MobileObjectMethod WHERE MobileObjectMethodId=@I_PKId) begin Insert into MobileObjectMethod( MobileObjectMethodId, MobileObjectId, MobileObjectMethodName, MethodSequence, SQLDoTxn, TxnParameter, IsHidden, IsPlaySound, RefreshGridParameter, IsBeforeRunningConfirm, IsAutoRunWhenTabActive, PromptMessage, IsGetGPS, AccessCode, IsActivityDevice, ActivityParameter, IsVibrate )Values( @I_PKId, @I_ParentPKId, @MobileObjectMethodName, @MethodSequence, @SQLDoTxn, @TxnParameter, @IsHidden, @IsPlaySound, @RefreshGridParameter, @IsBeforeRunningConfirm, @IsAutoRunWhenTabActive, @PromptMessage, @IsGetGPS, @AccessCode, @IsActivityDevice, @ActivityParameter, @IsVibrate) set @I_IsNewRow=1 set @ModifyType='Insert' --获取刚刚插入的记录 EXEC SysGetTableFieldsCombine @ModifyObject,@I_PKId,@FieldsChanged output end else begin --获更新前的记录 EXEC SysGetTableFieldsCombine @ModifyObject,@I_PKId,@FieldsValueOld output Update MobileObjectMethod set MobileObjectId=@I_ParentPKId, MobileObjectMethodName=@MobileObjectMethodName, MethodSequence=@MethodSequence, SQLDoTxn=@SQLDoTxn, TxnParameter=@TxnParameter, IsHidden=@IsHidden, IsGetGPS=@IsGetGPS, IsPlaySound=@IsPlaySound, RefreshGridParameter=@RefreshGridParameter, IsBeforeRunningConfirm=@IsBeforeRunningConfirm, IsAutoRunWhenTabActive=@IsAutoRunWhenTabActive, PromptMessage=@PromptMessage, AccessCode=@AccessCode, IsActivityDevice=@IsActivityDevice, ActivityParameter=@ActivityParameter, IsVibrate=@IsVibrate WHERE MobileObjectMethodId=@I_PKId set @ModifyType='Update' --获更新后的记录,并进行比较 EXEC SysGetTableFieldsCombine @ModifyObject,@I_PKId,@FieldsValueNew output EXEC SysGetTableFieldsCompare @FieldsValueOld,@FieldsValueNew,@FieldsChanged OUTPUT end --将Text1-Text8插入到SysText表中 EXEC [dbo].[SysTextSaveModuleValue] @TextModule = @MobileObjectMethodName, @Text1 = @Text1, @Text2 = @Text2, @Text3 = @Text3, @Text4 = @Text4, @Text5 = @Text5, @Text6 = @Text6, @Text7 = @Text7, @Text8 = @Text8 --最后将所做的修改入修改历史中 if @FieldsChanged<>'' EXEC [dbo].[SysWriteInModifyHistory] @ObjectName = @ModifyObject, @TablePKId = @I_PKId , @ModifyType = @ModifyType, @UserName = @I_OrBitUserName, @ModifyHistory = @FieldsChanged return 0 END ``` # 四、在元对象MobileObjectMethod中增加元字段 在元对象MobileObjectMethod的元字段组MobileObjectMethod Default Group中增加元字段IsActivityDevice、ActivityParameter,如图。 ![](/media//202303/2023-03-09_172009.png) # 五、修改存储过程GetOrDroidMobileObjectInfo 代码如下。 ```sql ALTER PROCEDURE [dbo].[GetOrDroidMobileObjectInfo] @I_PluginCommand nvarchar(2000)='', @GetWhat int=0 --0,获取 AS BEGIN if @GetWhat=0 --取得OrDroid插件对应的【移动事务对象】清单 begin SELECT dbo.MobileObject.MobileObjectId, dbo.MobileObject.MobileObjectName, dbo.MobileObject.MobileObjectDesc, dbo.MobileObject.IsActivity, dbo.MobileObject.ColumnCount, dbo.MobileObject.FieldWidth, dbo.MobileObject.FieldSpace, dbo.MobileObject.MsgCount, dbo.MobileObject.AccessCode, dbo.MobileObject.AutoRefreshSec, isnull(SysText.Text1,'') as MetadataName_Text1, isnull(SysText.Text2,'') as MetadataName_Text2, isnull(SysText.Text3,'') as MetadataName_Text3, isnull(SysText.Text4,'') as MetadataName_Text4, isnull(SysText.Text5,'') as MetadataName_Text5, isnull(SysText.Text6,'') as MetadataName_Text6, isnull(SysText.Text7,'') as MetadataName_Text7, isnull(SysText.Text8,'') as MetadataName_Text8 FROM dbo.OrDroidPlugin INNER JOIN dbo.OrDroid_MobileObject ON dbo.OrDroidPlugin.OrDroidPluginId = dbo.OrDroid_MobileObject.OrDroidPluginId INNER JOIN dbo.MobileObject ON dbo.OrDroid_MobileObject.MobileObjectId = dbo.MobileObject.MobileObjectId LEFT OUTER JOIN dbo.SysText ON MobileObject.MobileObjectName = SysText.TextModule and SysText.TextOwner='[Public Text]' WHERE (dbo.OrDroidPlugin.OrDroidPluginCommand = @I_PluginCommand) AND (dbo.MobileObject.IsActivity = 1) ORDER BY dbo.OrDroid_MobileObject.MobileObjectSequence return 0 end if @GetWhat =1 --取得OrDroid插件对应的【移动事务对象方法】清单 begin SELECT dbo.MobileObject.MobileObjectId, dbo.MobileObject.MobileObjectName, dbo.MobileObjectMethod.MobileObjectMethodId, dbo.MobileObjectMethod.MobileObjectMethodName, dbo.MobileObjectMethod.MethodSequence, dbo.MobileObjectMethod.SQLDoTxn, dbo.MobileObjectMethod.TxnParameter, dbo.MobileObjectMethod.IsHidden, dbo.MobileObjectMethod.IsPlaySound, isnull(dbo.MobileObjectMethod.IsGetGPS,0) as IsGetGPS , dbo.MobileObjectMethod.RefreshGridParameter, dbo.MobileObjectMethod.IsBeforeRunningConfirm, dbo.MobileObjectMethod.IsAutoRunWhenTabActive, ISNULL(dbo.MobileObjectMethod.IsActivityDevice,0) AS IsActivityDevice, dbo.MobileObjectMethod.ActivityParameter, ISNULL(dbo.MobileObjectMethod.IsVibrate,0) AS IsVibrate, dbo.MobileObjectMethod.PromptMessage, dbo.MobileObjectMethod.AccessCode, isnull(SysText.Text1,'') as MobileObjectMethodName_Text1, isnull(SysText.Text2,'') as MobileObjectMethodName_Text2, isnull(SysText.Text3,'') as MobileObjectMethodName_Text3, isnull(SysText.Text4,'') as MobileObjectMethodName_Text4, isnull(SysText.Text5,'') as MobileObjectMethodName_Text5, isnull(SysText.Text6,'') as MobileObjectMethodName_Text6, isnull(SysText.Text7,'') as MobileObjectMethodName_Text7, isnull(SysText.Text8,'') as MobileObjectMethodName_Text8 FROM dbo.OrDroidPlugin INNER JOIN dbo.OrDroid_MobileObject ON dbo.OrDroidPlugin.OrDroidPluginId = dbo.OrDroid_MobileObject.OrDroidPluginId INNER JOIN dbo.MobileObject ON dbo.OrDroid_MobileObject.MobileObjectId = dbo.MobileObject.MobileObjectId INNER JOIN dbo.MobileObjectMethod ON dbo.MobileObject.MobileObjectId = dbo.MobileObjectMethod.MobileObjectId LEFT OUTER JOIN dbo.SysText ON MobileObjectMethod.MobileObjectMethodName = SysText.TextModule and SysText.TextOwner='[Public Text]' WHERE (dbo.OrDroidPlugin.OrDroidPluginCommand = @I_PluginCommand) AND (dbo.MobileObject.IsActivity = 1) ORDER BY dbo.OrDroid_MobileObject.MobileObjectSequence, dbo.MobileObject.MobileObjectName, dbo.MobileObjectMethod.MethodSequence return 0 end if @GetWhat =2 --取得OrDroid插件对应的【移动事务对象参数】清单 begin SELECT dbo.MobileObject.MobileObjectId, dbo.MobileObject.MobileObjectName, dbo.MobileObjectParameter.MobileObjectParameterId, dbo.MobileObjectParameter.MobileObjectParameterName, dbo.MobileObjectParameter.DataType, dbo.MobileObjectParameter.ParameterSequence, dbo.MobileObjectParameter.IsValueListUsage, dbo.MobileObjectParameter.ControlLine, dbo.MobileObjectParameter.ValueList, dbo.MobileObjectParameter.LinkToValueListParameter, dbo.MobileObjectParameter.IsReadOnly, dbo.MobileObjectParameter.IsHidden, dbo.MobileObjectParameter.HiddenCondition, dbo.MobileObjectParameter.IsPicture, dbo.MobileObjectParameter.IsSplitLine, dbo.MobileObjectParameter.IsGrid, dbo.MobileObjectParameter.IsShowTime, dbo.MobileObjectParameter.IsSaveValueToLocal, dbo.MobileObjectParameter.IsMustInput, dbo.MobileObjectParameter.AccessCode, dbo.MobileObjectParameter.DecimalPlace, isnull(dbo.MobileObjectParameter.IsPassword,0) as IsPassword, isnull(dbo.MobileObjectParameter.IsDefaultFirst,0) as IsDefaultFirst, isnull(SysText.Text1,'') as MobileObjectParameterName_Text1, isnull(SysText.Text2,'') as MobileObjectParameterName_Text2, isnull(SysText.Text3,'') as MobileObjectParameterName_Text3, isnull(SysText.Text4,'') as MobileObjectParameterName_Text4, isnull(SysText.Text5,'') as MobileObjectParameterName_Text5, isnull(SysText.Text6,'') as MobileObjectParameterName_Text6, isnull(SysText.Text7,'') as MobileObjectParameterName_Text7, isnull(SysText.Text8,'') as MobileObjectParameterName_Text8 FROM dbo.OrDroidPlugin INNER JOIN dbo.OrDroid_MobileObject ON dbo.OrDroidPlugin.OrDroidPluginId = dbo.OrDroid_MobileObject.OrDroidPluginId INNER JOIN dbo.MobileObject ON dbo.OrDroid_MobileObject.MobileObjectId = dbo.MobileObject.MobileObjectId INNER JOIN dbo.MobileObjectParameter ON dbo.MobileObject.MobileObjectId = dbo.MobileObjectParameter.MobileObjectId LEFT OUTER JOIN dbo.SysText ON MobileObjectParameter.MobileObjectParameterName = SysText.TextModule and SysText.TextOwner='[Public Text]' WHERE (dbo.OrDroidPlugin.OrDroidPluginCommand = @I_PluginCommand) AND (dbo.MobileObject.IsActivity = 1) ORDER BY dbo.OrDroid_MobileObject.MobileObjectSequence, dbo.MobileObject.MobileObjectName, dbo.MobileObjectParameter.ParameterSequence return 0 end END ``` # 六、维护读取RFID设备数据方法 在移动事务对象方法中,增加一个读取RFID数据的方法,勾选"是否激活设备",并且在"激活参数"文本框中维护需要将数据赋值的移动事务对象参数,如图。 ![](/media//202303/2023-03-09_172525.png) 备注:用户也可在"执行事务名"中维护业务存储过程,此方法被用户激活后将在读取到数据后继续执行此存储过程。
HF0028
2023年3月9日 17:29
分享
上一篇
下一篇
目录
微信扫一扫
复制链接
手机扫一扫进行分享
复制链接
下载Markdown文件