現場測試提交

zw
lxw 6 months ago
parent ff7961545a
commit 6728923020

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

@ -44,14 +44,16 @@ public class BatteryMoveTask : AbstractTaskHandler
return;
}
BinInfo? binInfo = _binInfoRepository.QueryListByClause(i => i.ChargeStatus == 4, "battery_enter_seq asc")
.First();
List<BinInfo> queryListByClause = _binInfoRepository.QueryListByClause(i => i.ChargeStatus == 4 && i.CacheBinFlag==0, "battery_enter_seq asc");
if (binInfo == null)
if (queryListByClause.Count<=0)
{
return;
}
var binInfo = queryListByClause[0];
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 log4net;
using Service.Execute;
using Service.Execute.StaticTools;
using Service.Plc.Client;
namespace Service.Mgr;
@ -34,7 +36,17 @@ public class PlcTaskMgr
{
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);
if (InvokeStatus.Exception == invokeStatus)

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

@ -27,7 +27,7 @@ public class MonitorService
public ChargeOrderRepository ChargeOrderRepository { get; set; }
public PlcTaskMgr PlcTaskMgr { get; set; }
public Result<SwapMonitorScreenResp> GetSwapMonitorData()
public Result<SwapMonitorScreenResp> GetSwapMonitorData()
{
var configBinInfo =
new MapperConfiguration(cfg => cfg.CreateMap<StepModel, SwappingStateInfoResp>().ReverseMap());
@ -35,7 +35,7 @@ public class MonitorService
List<SwappingStateInfoResp> stateInfoList =
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);
SwapMonitorScreenResp monitorScreenResp = new()
@ -55,8 +55,8 @@ public class MonitorService
VelMac = StationSoftMgr.SwappingStateMachine.RfidReadModel != null
? StationSoftMgr.SwappingStateMachine.RfidReadModel.VelMac
: null,
LockStatus = carInfo.Result != null ? carInfo.Result.HeartBeatMsg.LockStatus : null,
KeyStatus = carInfo.Result != null ? carInfo.Result.HeartBeatMsg.KeyStatus : null,
LockStatus = tboxCarInfoModel != null ? tboxCarInfoModel.HeartBeatMsg.LockStatus : null,
KeyStatus = tboxCarInfoModel != null ? tboxCarInfoModel.HeartBeatMsg.KeyStatus : null,
VelNo = StationSoftMgr.SwappingStateMachine.RfidReadModel != null
? StationSoftMgr.SwappingStateMachine.RfidReadModel.VelNo
: null,
@ -152,7 +152,7 @@ public class MonitorService
}
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);
if (putBin == null)
{

@ -2,7 +2,7 @@
"ConnectionStrings": {
"ConfigId": "master",
"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": {
"AutoUpdate": "false",
@ -10,7 +10,7 @@
"Url": "http://121.4.95.243:8090/Updates/AutoUpdaterStarter.xml"
},
"Redis": {
"Connection": "106.12.36.89:6379,password=123456",
"Connection": "127.0.0.1:6379,password=123456",
"InstanceName": "local",
"DefaultDB": "8"
},
@ -101,7 +101,7 @@
//
},
"HttpContextRequest": {
"Scheme": "http://0.0.0.0:5034"
"Scheme": ""
},
"Kestrel": {
"Endpoints": {
@ -111,7 +111,7 @@
}
},
"cloud": {
"enable": true
"enable": false
},
"plc": {
"enable": true

Loading…
Cancel
Save