Merge branch 'master' of http://git.ybhdmob.com:3000/liuzl/Waste
This commit is contained in:
commit
2e9c154cce
|
|
@ -1,13 +1,9 @@
|
|||
using Furion.DynamicApiController;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Nirvana.Common;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Waste.Domain;
|
||||
|
||||
namespace Waste.Application
|
||||
{
|
||||
|
|
@ -17,10 +13,12 @@ namespace Waste.Application
|
|||
public class DeviceAppService : IDynamicApiController
|
||||
{
|
||||
private readonly IDeviceService _deviceService;
|
||||
|
||||
public DeviceAppService(IDeviceService deviceService)
|
||||
{
|
||||
_deviceService = deviceService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设备列表
|
||||
/// </summary>
|
||||
|
|
@ -31,6 +29,7 @@ namespace Waste.Application
|
|||
{
|
||||
return await _deviceService.GetListAsync(param);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 信息提交
|
||||
/// </summary>
|
||||
|
|
@ -40,6 +39,7 @@ namespace Waste.Application
|
|||
{
|
||||
return await _deviceService.SubmitFormAsync(role);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量操作
|
||||
/// </summary>
|
||||
|
|
@ -49,6 +49,7 @@ namespace Waste.Application
|
|||
{
|
||||
return await _deviceService.BatchSetAsync(deviceBatchModel);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设备状态修改
|
||||
/// </summary>
|
||||
|
|
@ -61,6 +62,7 @@ namespace Waste.Application
|
|||
{
|
||||
return await _deviceService.SetStatusAsync(id, status);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 配置设备推送信息
|
||||
/// </summary>
|
||||
|
|
@ -70,5 +72,15 @@ namespace Waste.Application
|
|||
{
|
||||
return await _deviceService.SetConfigAsync(input);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量配置千灯镇商户推送
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[AllowAnonymous]
|
||||
public async Task SetQDConfig()
|
||||
{
|
||||
await _deviceService.SetQDConfig();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,15 +1,11 @@
|
|||
using Furion.DependencyInjection;
|
||||
using Furion.DistributedIDGenerator;
|
||||
using Furion.DynamicApiController;
|
||||
using Mapster;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Nirvana.Common;
|
||||
using Nirvana.Common.ApiBase;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Waste.Domain;
|
||||
|
||||
|
|
@ -30,6 +26,7 @@ namespace Waste.Application.Device
|
|||
dbClient = repository.Context;
|
||||
_businessService = businessService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设备批量操作
|
||||
/// </summary>
|
||||
|
|
@ -46,7 +43,6 @@ namespace Waste.Application.Device
|
|||
//如果是管理员分配
|
||||
if (currentUser.AccountType == (int)AccountType.platform)
|
||||
{
|
||||
|
||||
await dbClient.Updateable<W_Device>().SetColumns(x => new W_Device
|
||||
{
|
||||
Businessid = deviceBatchModel.BusinessId,
|
||||
|
|
@ -121,6 +117,7 @@ namespace Waste.Application.Device
|
|||
Id = devicedata.Id
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设备详情数据
|
||||
/// </summary>
|
||||
|
|
@ -149,6 +146,7 @@ namespace Waste.Application.Device
|
|||
FacEcode = device.FacEcode
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取设备配置详情
|
||||
/// </summary>
|
||||
|
|
@ -156,10 +154,10 @@ namespace Waste.Application.Device
|
|||
/// <returns></returns>
|
||||
public async Task<W_DeviceConfig> GetConfigAsync(Guid id)
|
||||
{
|
||||
var data= await dbClient.Queryable<W_DeviceConfig>().FirstAsync(x => x.DeviceId == id);
|
||||
if(data == null)
|
||||
var data = await dbClient.Queryable<W_DeviceConfig>().FirstAsync(x => x.DeviceId == id);
|
||||
if (data == null)
|
||||
{
|
||||
data= new W_DeviceConfig();
|
||||
data = new W_DeviceConfig();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
|
@ -276,6 +274,7 @@ namespace Waste.Application.Device
|
|||
limit = param.limit
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 配置设备推送信息
|
||||
/// </summary>
|
||||
|
|
@ -307,6 +306,44 @@ namespace Waste.Application.Device
|
|||
return new ResultInfo(ResultState.SUCCESS, "配置成功");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量配置千灯镇商户推送
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task SetQDConfig()
|
||||
{
|
||||
string Body = string.Empty;
|
||||
string Url = "http://36.154.126.138:8817/api/third/postdata";
|
||||
var bid = Guid.Parse("08D99B4B-B02D-4E65-8D56-2FD16EC1716F");
|
||||
var alldevice = await dbClient.Queryable<W_Device>().Where(x => x.Businessid == bid).Select(x => new W_Device
|
||||
{
|
||||
Id = x.Id,
|
||||
FacEcode=x.FacEcode
|
||||
}).ToListAsync();
|
||||
foreach (var item in alldevice)
|
||||
{
|
||||
if (await dbClient.Queryable<W_DeviceConfig>().AnyAsync(x => x.DeviceId == item.Id))
|
||||
{
|
||||
await dbClient.Updateable<W_DeviceConfig>().SetColumns(x => new W_DeviceConfig
|
||||
{
|
||||
Url = Url,
|
||||
Body = Body
|
||||
}).Where(x => x.DeviceId == item.Id).ExecuteCommandAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
var insertdata = new W_DeviceConfig
|
||||
{
|
||||
DeviceId = item.Id,
|
||||
Body = Body,
|
||||
CreateTime = DateTime.Now,
|
||||
Url = Url
|
||||
};
|
||||
await dbClient.Insertable(insertdata).ExecuteCommandAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设备状态修改
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,5 @@
|
|||
using Nirvana.Common;
|
||||
using Nirvana.Common.ApiBase;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Waste.Domain;
|
||||
|
||||
|
|
@ -20,43 +16,56 @@ namespace Waste.Application
|
|||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
Task<PageParms<DeviceList>> GetListAsync(QueryParams param);
|
||||
|
||||
/// <summary>
|
||||
/// 设备信息提交
|
||||
/// </summary>
|
||||
/// <param name="role"></param>
|
||||
/// <returns></returns>
|
||||
Task<ResultInfo> SubmitFormAsync(DeviceSubmit role);
|
||||
|
||||
/// <summary>
|
||||
/// 详情
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<DeviceSubmit> DetailAsync(Guid id);
|
||||
|
||||
/// <summary>
|
||||
/// 设备批量操作
|
||||
/// </summary>
|
||||
/// <param name="deviceBatchModel"></param>
|
||||
/// <returns></returns>
|
||||
Task<ResultInfo> BatchSetAsync(DeviceBatchModel deviceBatchModel);
|
||||
|
||||
/// <summary>
|
||||
/// 设备详情数据
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
Task<DeviceDetailS2Dto> DeviceDetailAsync(Guid id);
|
||||
|
||||
/// <summary>
|
||||
/// 设备状态修改
|
||||
/// </summary>
|
||||
/// <param name="id">设备ID</param>
|
||||
/// <param name="status">设备状态,0-停用,1-正常,2-激活</param>
|
||||
/// <returns></returns>
|
||||
Task<ResultInfo> SetStatusAsync(Guid id,int status);
|
||||
Task<ResultInfo> SetStatusAsync(Guid id, int status);
|
||||
|
||||
/// <summary>
|
||||
/// 配置设备推送信息
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
Task<ResultInfo> SetConfigAsync(DeviceConfigC2SDto input);
|
||||
|
||||
/// <summary>
|
||||
/// 批量配置千灯镇商户推送
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task SetQDConfig();
|
||||
|
||||
/// <summary>
|
||||
/// 获取设备配置详情
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
using Nirvana.Common;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Waste.Application.SubscribeInfo;
|
||||
|
||||
namespace Waste.Application
|
||||
{
|
||||
|
|
@ -53,5 +50,12 @@ namespace Waste.Application
|
|||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
Task<PageParms<ResultListByEquS2CDto>> GetListByEquAsync(ResultListByEquC2SDto input);
|
||||
|
||||
/// <summary>
|
||||
/// 给第三方推送消息
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
Task SendMessageToThird(SendThirdMessageSubscribeS2SDto input);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +1,6 @@
|
|||
using DotNetCore.CAP;
|
||||
using Furion;
|
||||
using Furion.DependencyInjection;
|
||||
using Furion.DistributedIDGenerator;
|
||||
using Furion.RemoteRequest.Extensions;
|
||||
using Furion.TaskScheduler;
|
||||
using Mapster;
|
||||
using Nirvana.Common;
|
||||
using SqlSugar;
|
||||
|
|
@ -266,7 +263,13 @@ namespace Waste.Application
|
|||
Time = time,
|
||||
TrashCode = data.trashcode,
|
||||
WasteType = data.WasteType,
|
||||
Weight = currentweight
|
||||
Weight = currentweight,
|
||||
faccode = device.FacEcode,
|
||||
ecode = device.Ecode,
|
||||
province = device.Province,
|
||||
city = device.City,
|
||||
area = device.Area,
|
||||
address = device.Address
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -341,7 +344,13 @@ namespace Waste.Application
|
|||
Time = time,
|
||||
TrashCode = myPackage.trashcode,
|
||||
WasteType = myPackage.WasteType,
|
||||
Weight = Weight
|
||||
Weight = Weight,
|
||||
faccode = device.FacEcode,
|
||||
ecode = device.Ecode,
|
||||
province = device.Province,
|
||||
city = device.City,
|
||||
area = device.Area,
|
||||
address = device.Address
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -439,7 +448,13 @@ namespace Waste.Application
|
|||
TrashCode = myPackage.trashcode,
|
||||
WasteType = myPackage.WasteType,
|
||||
Weight = Weight,
|
||||
WasteSType = wastestype
|
||||
WasteSType = wastestype,
|
||||
faccode = device.FacEcode,
|
||||
ecode = device.Ecode,
|
||||
province = device.Province,
|
||||
city = device.City,
|
||||
area = device.Area,
|
||||
address = device.Address
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -449,7 +464,7 @@ namespace Waste.Application
|
|||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
private async Task SendMessageToThird(SendThirdMessageSubscribeS2SDto input)
|
||||
public async Task SendMessageToThird(SendThirdMessageSubscribeS2SDto input)
|
||||
{
|
||||
if (input.Weight <= 0)
|
||||
{
|
||||
|
|
@ -580,7 +595,13 @@ namespace Waste.Application
|
|||
Time = time,
|
||||
TrashCode = myPackage.Area,
|
||||
WasteType = myPackage.WasteType,
|
||||
Weight = weight
|
||||
Weight = weight,
|
||||
faccode = device.FacEcode,
|
||||
ecode = device.Ecode,
|
||||
province = device.Province,
|
||||
city = device.City,
|
||||
area = device.Area,
|
||||
address = device.Address
|
||||
});
|
||||
}
|
||||
return new ResultInfo(ResultState.SUCCESS, "success");
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Waste.Application.SubscribeInfo
|
||||
{
|
||||
|
|
@ -132,6 +128,36 @@ namespace Waste.Application.SubscribeInfo
|
|||
/// 上报时间
|
||||
/// </summary>
|
||||
public DateTime Time { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备机器码
|
||||
/// </summary>
|
||||
public string ecode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备编号
|
||||
/// </summary>
|
||||
public string faccode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备所属省份
|
||||
/// </summary>
|
||||
public string province { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备所属城市
|
||||
/// </summary>
|
||||
public string city { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备所属区/县
|
||||
/// </summary>
|
||||
public string area { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备详细地址
|
||||
/// </summary>
|
||||
public string address { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -184,5 +210,40 @@ namespace Waste.Application.SubscribeInfo
|
|||
/// 设备ID
|
||||
/// </summary>
|
||||
public Guid DeviceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备机器码
|
||||
/// </summary>
|
||||
public string ecode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备编号
|
||||
/// </summary>
|
||||
public string faccode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备所属省份
|
||||
/// </summary>
|
||||
public string province { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备所属城市
|
||||
/// </summary>
|
||||
public string city { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备所属区/县
|
||||
/// </summary>
|
||||
public string area { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 设备详细地址
|
||||
/// </summary>
|
||||
public string address { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 最近心跳时间
|
||||
/// </summary>
|
||||
public long BeatTime { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,8 +1,6 @@
|
|||
using DotNetCore.CAP;
|
||||
using Furion;
|
||||
using Furion.DependencyInjection;
|
||||
using Furion.DistributedIDGenerator;
|
||||
using Furion.Logging.Extensions;
|
||||
using Furion.RemoteRequest.Extensions;
|
||||
using Mapster;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
|
@ -10,8 +8,6 @@ using Newtonsoft.Json;
|
|||
using Nirvana.Common;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Waste.Application.ThirdApiInfo;
|
||||
|
|
@ -269,6 +265,11 @@ namespace Waste.Application.SubscribeInfo
|
|||
{
|
||||
string errmsg = string.Empty;
|
||||
var senddata = data.Adapt<SendMessageToThirdS2CDto>();
|
||||
var devicedata = await dbClient.Queryable<W_DeviceData>().Where(x => x.DeviceId == data.DeviceId).Select(x => new W_DeviceData
|
||||
{
|
||||
LastBeatTime = x.LastBeatTime
|
||||
}).FirstAsync();
|
||||
senddata.BeatTime = devicedata == null ? 0 : devicedata.LastBeatTime.GetTimeStamp();
|
||||
var response = await data.Url
|
||||
.SetBody(senddata, "application/json", Encoding.UTF8)
|
||||
.OnException((res, errors) =>
|
||||
|
|
|
|||
|
|
@ -215,6 +215,23 @@ namespace Waste.Application.ThirdApiInfo
|
|||
wastetype = type,
|
||||
weight = weight
|
||||
});
|
||||
|
||||
//推送数据给第三方
|
||||
await _resultService.SendMessageToThird(new SendThirdMessageSubscribeS2SDto
|
||||
{
|
||||
DeviceId = device.Id,
|
||||
WasteSType = "",
|
||||
Time = DateTime.Now,
|
||||
TrashCode = returndata.trash,
|
||||
WasteType = type,
|
||||
Weight = weight.ToDecimal(),
|
||||
faccode = device.FacEcode,
|
||||
ecode = device.Ecode,
|
||||
province = device.Province,
|
||||
city = device.City,
|
||||
area = device.Area,
|
||||
address = device.Address
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -238,38 +255,6 @@ namespace Waste.Application.ThirdApiInfo
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 16进制转汉字
|
||||
/// </summary>
|
||||
/// <param name="hex"></param>
|
||||
/// <returns></returns>
|
||||
private string GetChsFromHex(string hex)
|
||||
{
|
||||
if (hex == null)
|
||||
return "";
|
||||
if (hex.Length % 2 != 0)
|
||||
{
|
||||
hex += "20";//空格
|
||||
}
|
||||
// 需要将 hex 转换成 byte 数组。
|
||||
byte[] bytes = new byte[hex.Length / 2];
|
||||
for (int i = 0; i < bytes.Length; i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
// 每两个字符是一个 byte。
|
||||
bytes[i] = byte.Parse(hex.Substring(i * 2, 2),
|
||||
System.Globalization.NumberStyles.HexNumber);
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
// 获得 GB2312,Chinese Simplified。
|
||||
Encoding chs = Encoding.GetEncoding("gb2312");
|
||||
return chs.GetString(bytes);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 16进制转10进制
|
||||
/// </summary>
|
||||
|
|
@ -377,40 +362,6 @@ namespace Waste.Application.ThirdApiInfo
|
|||
return new ResultInfo(ResultState.SUCCESS, "success", data);
|
||||
}
|
||||
|
||||
private int TrashType(string type)
|
||||
{
|
||||
if (type == "厨余垃圾") return 1;
|
||||
else if (type == "可回收物") return 2;
|
||||
else if (type == "有害垃圾") return 3;
|
||||
else if (type == "其他垃圾") return 4;
|
||||
else return 0;
|
||||
}
|
||||
|
||||
private int GetTimestamp(DateTime time)
|
||||
{
|
||||
DateTime dateTimeStart = TimeZoneInfo.ConvertTimeToUtc(new DateTime(1970, 1, 1, 8, 0, 0));
|
||||
int timestamp = Convert.ToInt32((time - dateTimeStart).TotalSeconds);
|
||||
return timestamp;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 字节数组转16进制
|
||||
/// </summary>
|
||||
/// <param name="bt"></param>
|
||||
/// <returns></returns>
|
||||
private string BytesToHexStr(byte[] bt)
|
||||
{
|
||||
string returnStr = "";
|
||||
if (bt != null)
|
||||
{
|
||||
for (int i = 0; i < bt.Length; i++)
|
||||
{
|
||||
returnStr += bt[i].ToString("X2");
|
||||
}
|
||||
}
|
||||
return returnStr;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新设备版本信息
|
||||
/// </summary>
|
||||
|
|
@ -497,6 +448,72 @@ namespace Waste.Application.ThirdApiInfo
|
|||
return returndata;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 16进制转汉字
|
||||
/// </summary>
|
||||
/// <param name="hex"></param>
|
||||
/// <returns></returns>
|
||||
private string GetChsFromHex(string hex)
|
||||
{
|
||||
if (hex == null)
|
||||
return "";
|
||||
if (hex.Length % 2 != 0)
|
||||
{
|
||||
hex += "20";//空格
|
||||
}
|
||||
// 需要将 hex 转换成 byte 数组。
|
||||
byte[] bytes = new byte[hex.Length / 2];
|
||||
for (int i = 0; i < bytes.Length; i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
// 每两个字符是一个 byte。
|
||||
bytes[i] = byte.Parse(hex.Substring(i * 2, 2),
|
||||
System.Globalization.NumberStyles.HexNumber);
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
// 获得 GB2312,Chinese Simplified。
|
||||
Encoding chs = Encoding.GetEncoding("gb2312");
|
||||
return chs.GetString(bytes);
|
||||
}
|
||||
|
||||
private int TrashType(string type)
|
||||
{
|
||||
if (type == "厨余垃圾") return 1;
|
||||
else if (type == "可回收物") return 2;
|
||||
else if (type == "有害垃圾") return 3;
|
||||
else if (type == "其他垃圾") return 4;
|
||||
else return 0;
|
||||
}
|
||||
|
||||
private int GetTimestamp(DateTime time)
|
||||
{
|
||||
DateTime dateTimeStart = TimeZoneInfo.ConvertTimeToUtc(new DateTime(1970, 1, 1, 8, 0, 0));
|
||||
int timestamp = Convert.ToInt32((time - dateTimeStart).TotalSeconds);
|
||||
return timestamp;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 字节数组转16进制
|
||||
/// </summary>
|
||||
/// <param name="bt"></param>
|
||||
/// <returns></returns>
|
||||
private string BytesToHexStr(byte[] bt)
|
||||
{
|
||||
string returnStr = "";
|
||||
if (bt != null)
|
||||
{
|
||||
for (int i = 0; i < bt.Length; i++)
|
||||
{
|
||||
returnStr += bt[i].ToString("X2");
|
||||
}
|
||||
}
|
||||
return returnStr;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// wifi数据解析
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -589,6 +589,12 @@
|
|||
<param name="input"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Waste.Application.DeviceAppService.SetQDConfig">
|
||||
<summary>
|
||||
批量配置千灯镇商户推送
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:Waste.Application.Device.DeviceService">
|
||||
<summary>
|
||||
设备管理
|
||||
|
|
@ -636,6 +642,12 @@
|
|||
<param name="input"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Waste.Application.Device.DeviceService.SetQDConfig">
|
||||
<summary>
|
||||
批量配置千灯镇商户推送
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Waste.Application.Device.DeviceService.SetStatusAsync(System.Guid,System.Int32)">
|
||||
<summary>
|
||||
设备状态修改
|
||||
|
|
@ -868,6 +880,12 @@
|
|||
<param name="input"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Waste.Application.IDeviceService.SetQDConfig">
|
||||
<summary>
|
||||
批量配置千灯镇商户推送
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Waste.Application.IDeviceService.GetConfigAsync(System.Guid)">
|
||||
<summary>
|
||||
获取设备配置详情
|
||||
|
|
@ -2106,6 +2124,13 @@
|
|||
<param name="input"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Waste.Application.IResultService.SendMessageToThird(Waste.Application.SubscribeInfo.SendThirdMessageSubscribeS2SDto)">
|
||||
<summary>
|
||||
给第三方推送消息
|
||||
</summary>
|
||||
<param name="input"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:Waste.Application.ResultInfos.ResultAppService">
|
||||
<summary>
|
||||
投放记录
|
||||
|
|
@ -3330,13 +3355,6 @@
|
|||
<param name="data"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Waste.Application.ThirdApiInfo.OpenService.GetChsFromHex(System.String)">
|
||||
<summary>
|
||||
16进制转汉字
|
||||
</summary>
|
||||
<param name="hex"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Waste.Application.ThirdApiInfo.OpenService.HextToDec(System.String)">
|
||||
<summary>
|
||||
16进制转10进制
|
||||
|
|
@ -3358,13 +3376,6 @@
|
|||
<param name="ecode"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Waste.Application.ThirdApiInfo.OpenService.BytesToHexStr(System.Byte[])">
|
||||
<summary>
|
||||
字节数组转16进制
|
||||
</summary>
|
||||
<param name="bt"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Waste.Application.ThirdApiInfo.OpenService.UpdateVersionAsync(Waste.Application.SubscribeInfo.DeviceVerS2SDto)">
|
||||
<summary>
|
||||
更新设备版本信息
|
||||
|
|
@ -3379,6 +3390,20 @@
|
|||
<param name="data"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Waste.Application.ThirdApiInfo.OpenService.GetChsFromHex(System.String)">
|
||||
<summary>
|
||||
16进制转汉字
|
||||
</summary>
|
||||
<param name="hex"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Waste.Application.ThirdApiInfo.OpenService.BytesToHexStr(System.Byte[])">
|
||||
<summary>
|
||||
字节数组转16进制
|
||||
</summary>
|
||||
<param name="bt"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Waste.Application.ThirdApiInfo.OpenService.AnalyProto(Waste.Application.ThirdApiInfo.WifiRequestC2SDto)">
|
||||
<summary>
|
||||
wifi数据解析
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<key id="80becbe4-b8da-478f-8e04-2ee72229ce40" version="1">
|
||||
<creationDate>2023-06-26T04:03:32.1101352Z</creationDate>
|
||||
<activationDate>2023-06-26T04:03:32.0644029Z</activationDate>
|
||||
<expirationDate>2023-09-24T04:03:32.0644029Z</expirationDate>
|
||||
<descriptor deserializerType="Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60">
|
||||
<descriptor>
|
||||
<encryption algorithm="AES_256_CBC" />
|
||||
<validation algorithm="HMACSHA256" />
|
||||
<masterKey p4:requiresEncryption="true" xmlns:p4="http://schemas.asp.net/2015/03/dataProtection">
|
||||
<!-- Warning: the key below is in an unencrypted form. -->
|
||||
<value>ANfcQR1Xd4K1vIjHAszafBN+8YUKKjIPVRAtivcWhALy3lpclGIiHHZo0Ya4u2hcIV+3+1yfaeqrBBnIxtzQ6A==</value>
|
||||
</masterKey>
|
||||
</descriptor>
|
||||
</descriptor>
|
||||
</key>
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<key id="c2bee2c8-4c80-40e0-802c-5f5a51ff95d1" version="1">
|
||||
<creationDate>2023-11-06T09:29:17.0142323Z</creationDate>
|
||||
<activationDate>2023-11-06T09:29:16.9516438Z</activationDate>
|
||||
<expirationDate>2024-02-04T09:29:16.9516438Z</expirationDate>
|
||||
<descriptor deserializerType="Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60">
|
||||
<descriptor>
|
||||
<encryption algorithm="AES_256_CBC" />
|
||||
<validation algorithm="HMACSHA256" />
|
||||
<masterKey p4:requiresEncryption="true" xmlns:p4="http://schemas.asp.net/2015/03/dataProtection">
|
||||
<!-- Warning: the key below is in an unencrypted form. -->
|
||||
<value>ObJzvr6B6Rz5ZFItThMbbfbTiGATKLJiwa31wlJkcgXomsyU+LEYb2Z5oFipInn7ufXzRnjJbUCj71yk+9PYUA==</value>
|
||||
</masterKey>
|
||||
</descriptor>
|
||||
</descriptor>
|
||||
</key>
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -3,6 +3,6 @@
|
|||
<PropertyGroup>
|
||||
<RazorPage_SelectedScaffolderID>RazorPageScaffolder</RazorPage_SelectedScaffolderID>
|
||||
<RazorPage_SelectedScaffolderCategoryPath>root/Common/RazorPage</RazorPage_SelectedScaffolderCategoryPath>
|
||||
<NameOfLastUsedPublishProfile>H:\liuzl_ybhdmob\Waste\Waste.Web.Entry\Properties\PublishProfiles\waste.ybhdmob.com.pubxml</NameOfLastUsedPublishProfile>
|
||||
<NameOfLastUsedPublishProfile>E:\liuzl_ybhdmob\巨天垃圾分类\Waste\Waste.Web.Entry\Properties\PublishProfiles\waste.ybhdmob.com.pubxml</NameOfLastUsedPublishProfile>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
Loading…
Reference in New Issue