|
|
|
@ -1,6 +1,9 @@
|
|
|
|
|
using Autofac;
|
|
|
|
|
using Entity.DbModel.Station;
|
|
|
|
|
using HybirdFrameworkCore.Autofac;
|
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
using Repository.Station;
|
|
|
|
|
using Service.Sound.SoundClient;
|
|
|
|
|
using SqlSugar;
|
|
|
|
|
|
|
|
|
|
namespace WebStarter.Controllers.Test;
|
|
|
|
@ -46,35 +49,7 @@ public class GenController : ControllerBase
|
|
|
|
|
[HttpGet("test115")]
|
|
|
|
|
public void Test115()
|
|
|
|
|
{
|
|
|
|
|
var group = new BatteryGroup()
|
|
|
|
|
{
|
|
|
|
|
BatteryNo = "1",
|
|
|
|
|
Group = 1,
|
|
|
|
|
};
|
|
|
|
|
var batteryGroup = new BatteryGroup()
|
|
|
|
|
{
|
|
|
|
|
BatteryNo = "2",
|
|
|
|
|
Group = 2,
|
|
|
|
|
};
|
|
|
|
|
var groups = new List<BatteryGroup>() { group, batteryGroup };
|
|
|
|
|
_batteryGroupRepository.Insert(groups);
|
|
|
|
|
BatteryGroup batteryGroups = _batteryGroupRepository.QueryByClause(i => i.Group == 1);
|
|
|
|
|
/*
|
|
|
|
|
/*BatteryGroup batteryGroup = batteryGroups[0];
|
|
|
|
|
_batteryGroupRepository.Delete(batteryGroup);
|
|
|
|
|
BatteryGroup batteryGroup1 = batteryGroups[1];
|
|
|
|
|
batteryGroup1.Group = 3;
|
|
|
|
|
_batteryGroupRepository.Update(batteryGroup1);#1#
|
|
|
|
|
|
|
|
|
|
if (batteryGroups == null)
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine();
|
|
|
|
|
}
|
|
|
|
|
*/
|
|
|
|
|
AppInfo.Container.Resolve<SoundClient>().SoundPlay(SoundEnum.music100);
|
|
|
|
|
|
|
|
|
|
Console.WriteLine("测试完毕");
|
|
|
|
|
}
|
|
|
|
|