public string AnalysizeSql() { sql = string.Empty; if (string.IsNullOrWhiteSpace(ItemId)) { ShowMessage("请输入待删除设备itemId"); LogHelper.CommLogger.Info("请输入待删除设备itemId"); return(sql); } if (ItemId.TrimEnd(' ').Length != 32) { ShowMessage("输入的待删除设备itemId不符合要求,请确认"); LogHelper.CommLogger.Info("输入的待删除设备itemId不符合要求,请确认,itemId=" + ItemId); return(sql); } LogHelper.CommLogger.Info("即将删除设备,itemId=" + ItemId); BaseDataEquipmentModel baseDataEquipmentModel = new BaseDataEquipmentModel() { itemId = ItemId, typeClass = SelectTypeClass, code = "no used", name = "no used", type = "200", ipAddress = "192.168.12.12", isDeleted = true, ioType = 0, timestamp = (CommonHelper.GetTimeStamp()).ToString(), parkId = ConstantHelper.PARKNO, parentId = "" }; string protocolData = JsonHelper.SerializeObject(baseDataEquipmentModel); sql = $"INSERT INTO sync_xmpp(ServiceType,DataType,ServiceId,SeqId,BusinessId,ProtocolData,SendNum,SendPriority,`Status`,AddTime,UpdateTime,Remark,RequestType) " + $"VALUE(0,0,'dm_equip_base_data_equipment','{Guid.NewGuid().ToString().Replace("-", "")}','{new Guid(ItemId)}','{protocolData}',0,9,0,'{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}','{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}','子系统上传设备信息到云平台','DATA')"; return(sql); }