現場測試提交

zw
lxw 6 months ago
parent ff7961545a
commit 6728923020

@ -47,6 +47,7 @@ public class InfoEnum
[Info("换电任务启动","换电任务启动")] StartSwapInfo, [Info("换电任务启动","换电任务启动")] StartSwapInfo,
[Info("航车拍照中,请稍后","航车拍照中,请稍后")] CarTakePhotoInfo, [Info("航车拍照中,请稍后","航车拍照中,请稍后")] CarTakePhotoInfo,
[Info("启动换电失败,请联系站务人员","启动换电失败,请联系站务人员")] ErrStartSwap, [Info("启动换电失败,请联系站务人员","启动换电失败,请联系站务人员")] ErrStartSwap,
[Info("电池移仓中","电池移仓中")] InfoBatteryMove,
} }

@ -44,14 +44,16 @@ public class BatteryMoveTask : AbstractTaskHandler
return; return;
} }
BinInfo? binInfo = _binInfoRepository.QueryListByClause(i => i.ChargeStatus == 4, "battery_enter_seq asc") List<BinInfo> queryListByClause = _binInfoRepository.QueryListByClause(i => i.ChargeStatus == 4 && i.CacheBinFlag==0, "battery_enter_seq asc");
.First();
if (binInfo == null)
if (queryListByClause.Count<=0)
{ {
return; return;
} }
var binInfo = queryListByClause[0];
Result<bool> success = _monitorService.BatteryRelocation(ushort.Parse(binInfo.No), ushort.Parse(cacheBin.No)); Result<bool> success = _monitorService.BatteryRelocation(ushort.Parse(binInfo.No), ushort.Parse(cacheBin.No));
//查询人物状态 //查询人物状态

@ -1,6 +1,8 @@
using Entity.Constant;
using HybirdFrameworkCore.Autofac.Attribute; using HybirdFrameworkCore.Autofac.Attribute;
using log4net; using log4net;
using Service.Execute; using Service.Execute;
using Service.Execute.StaticTools;
using Service.Plc.Client; using Service.Plc.Client;
namespace Service.Mgr; namespace Service.Mgr;
@ -34,7 +36,17 @@ public class PlcTaskMgr
{ {
isSuccess = true; isSuccess = true;
} }
}, () => { Log.Info($"PlcTaskMgr.QueryPlcTask taskNo={taskNo} execute ing"); }, true, () => { } }, () =>
{
Log.Info($"PlcTaskMgr.QueryPlcTask taskNo={taskNo} execute ing");
if (taskNo == 2)
{
SoundTool.PlayOneSound((int)InfoEnum.SwapInfo.InfoBatteryMove);
}else if (taskNo == 5)
{
}
}, true, () => { }
, 5, InvokeStatus.Exception); , 5, InvokeStatus.Exception);
if (InvokeStatus.Exception == invokeStatus) if (InvokeStatus.Exception == invokeStatus)

@ -326,7 +326,7 @@ public class PlcMgr
{ {
HostToPlc writeHostToPlc = new HostToPlc(); HostToPlc writeHostToPlc = new HostToPlc();
writeHostToPlc.LightingControl.Value = 1000; writeHostToPlc.LightingControl.Value = 1000;
bResult = PlcClient.WriteValue(writeHostToPlc.LightIn); bResult = PlcClient.WriteValue(writeHostToPlc.LightingControl);
} }
return bResult; return bResult;
@ -357,7 +357,7 @@ public class PlcMgr
{ {
HostToPlc writeHostToPlc = new HostToPlc(); HostToPlc writeHostToPlc = new HostToPlc();
writeHostToPlc.LightingControl.Value = 1010; writeHostToPlc.LightingControl.Value = 1010;
bResult = PlcClient.WriteValue(writeHostToPlc.LightIn); bResult = PlcClient.WriteValue(writeHostToPlc.LightingControl);
} }
return bResult; return bResult;

@ -27,7 +27,7 @@ public class MonitorService
public ChargeOrderRepository ChargeOrderRepository { get; set; } public ChargeOrderRepository ChargeOrderRepository { get; set; }
public PlcTaskMgr PlcTaskMgr { get; set; } public PlcTaskMgr PlcTaskMgr { get; set; }
public Result<SwapMonitorScreenResp> GetSwapMonitorData() public Result<SwapMonitorScreenResp> GetSwapMonitorData()
{ {
var configBinInfo = var configBinInfo =
new MapperConfiguration(cfg => cfg.CreateMap<StepModel, SwappingStateInfoResp>().ReverseMap()); new MapperConfiguration(cfg => cfg.CreateMap<StepModel, SwappingStateInfoResp>().ReverseMap());
@ -35,7 +35,7 @@ public class MonitorService
List<SwappingStateInfoResp> stateInfoList = List<SwappingStateInfoResp> stateInfoList =
mapperBinInfo.Map<List<SwappingStateInfoResp>>(StationSoftMgr.SwappingStateMachine.StepModel); mapperBinInfo.Map<List<SwappingStateInfoResp>>(StationSoftMgr.SwappingStateMachine.StepModel);
Task<TboxCarInfoModel> carInfo = TBoxApi.GetCarInfo(); var tboxCarInfoModel = StationSoftMgr.SwappingStateMachine.BoxCarInfoModel;
List<BinInfo> binInfos = BinInfoRepository.QueryListByClause(i => i.Exists == 1 && i.Status == 1); List<BinInfo> binInfos = BinInfoRepository.QueryListByClause(i => i.Exists == 1 && i.Status == 1);
SwapMonitorScreenResp monitorScreenResp = new() SwapMonitorScreenResp monitorScreenResp = new()
@ -55,8 +55,8 @@ public class MonitorService
VelMac = StationSoftMgr.SwappingStateMachine.RfidReadModel != null VelMac = StationSoftMgr.SwappingStateMachine.RfidReadModel != null
? StationSoftMgr.SwappingStateMachine.RfidReadModel.VelMac ? StationSoftMgr.SwappingStateMachine.RfidReadModel.VelMac
: null, : null,
LockStatus = carInfo.Result != null ? carInfo.Result.HeartBeatMsg.LockStatus : null, LockStatus = tboxCarInfoModel != null ? tboxCarInfoModel.HeartBeatMsg.LockStatus : null,
KeyStatus = carInfo.Result != null ? carInfo.Result.HeartBeatMsg.KeyStatus : null, KeyStatus = tboxCarInfoModel != null ? tboxCarInfoModel.HeartBeatMsg.KeyStatus : null,
VelNo = StationSoftMgr.SwappingStateMachine.RfidReadModel != null VelNo = StationSoftMgr.SwappingStateMachine.RfidReadModel != null
? StationSoftMgr.SwappingStateMachine.RfidReadModel.VelNo ? StationSoftMgr.SwappingStateMachine.RfidReadModel.VelNo
: null, : null,
@ -152,7 +152,7 @@ public class MonitorService
} }
BinInfo? putBin = BinInfoRepository.QueryByClause(i => BinInfo? putBin = BinInfoRepository.QueryByClause(i =>
i.No.Equals(putBinNo) && (i.ChargeStatus == 2 || i.ChargeStatus == 4) && i.Exists == 0 && i.AmtLock == 0 && i.No.Equals(putBinNo) && i.Exists == 0 && i.AmtLock == 0 &&
i.Status == 1); i.Status == 1);
if (putBin == null) if (putBin == null)
{ {

@ -2,7 +2,7 @@
"ConnectionStrings": { "ConnectionStrings": {
"ConfigId": "master", "ConfigId": "master",
"DbType": "MySql", "DbType": "MySql",
"SqlConnection": "server=192.168.2.2;Port=3306;Database=huanneng_dev;Uid=root;Pwd=Rszn123;Charset=utf8;" "SqlConnection": "server=127.0.0.1;Port=3306;Database=huanneng_dev;Uid=root;Pwd=anyixing2023!@#;Charset=utf8;"
}, },
"Update": { "Update": {
"AutoUpdate": "false", "AutoUpdate": "false",
@ -10,7 +10,7 @@
"Url": "http://121.4.95.243:8090/Updates/AutoUpdaterStarter.xml" "Url": "http://121.4.95.243:8090/Updates/AutoUpdaterStarter.xml"
}, },
"Redis": { "Redis": {
"Connection": "106.12.36.89:6379,password=123456", "Connection": "127.0.0.1:6379,password=123456",
"InstanceName": "local", "InstanceName": "local",
"DefaultDB": "8" "DefaultDB": "8"
}, },
@ -101,7 +101,7 @@
// //
}, },
"HttpContextRequest": { "HttpContextRequest": {
"Scheme": "http://0.0.0.0:5034" "Scheme": ""
}, },
"Kestrel": { "Kestrel": {
"Endpoints": { "Endpoints": {
@ -111,7 +111,7 @@
} }
}, },
"cloud": { "cloud": {
"enable": true "enable": false
}, },
"plc": { "plc": {
"enable": true "enable": true

Loading…
Cancel
Save