|
|
|
@ -54,12 +54,8 @@ public class CommonMgr
|
|
|
|
|
machine.StepModel[stepModel.StepNo.ToString()] = stepModel;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (machine.SwapOrder != null)
|
|
|
|
|
{
|
|
|
|
|
if (!string.IsNullOrEmpty(machine.SwapOrder.Sn))
|
|
|
|
|
_swapOrderStepService.InsertSwapStepForSwapMain(step, machine.StepSort++, machine.SwapOrder.Sn,
|
|
|
|
|
desc, param, type);
|
|
|
|
|
}
|
|
|
|
|
_swapOrderStepService.InsertSwapStepForSwapMain(step, machine.StepSort++, machine.SwapOrder!.Sn,
|
|
|
|
|
desc, param, type);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -189,11 +185,12 @@ public class CommonMgr
|
|
|
|
|
|
|
|
|
|
InBin(orderBatteryInfo, machine);
|
|
|
|
|
_log.Info($"InBin orderBatteryInfo={JsonConvert.SerializeObject(orderBatteryInfo)}");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (orderBatteryInfo.CanSwap != InfoEnum.SelectBinStatusInfo.Success)
|
|
|
|
|
{
|
|
|
|
|
return orderBatteryInfo;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//手动选包
|
|
|
|
|
ManualSelectPack(machine, orderBatteryInfo);
|
|
|
|
|
|
|
|
|
@ -212,7 +209,7 @@ public class CommonMgr
|
|
|
|
|
orderBatteryInfo.InBinInfo.Soh = carInfoBatteryInfos[0].Soh;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return orderBatteryInfo;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -292,12 +289,11 @@ public class CommonMgr
|
|
|
|
|
public void InBin(SwapOrderBatteryInfo orderBatteryInfo, SwappingStateMachine machine)
|
|
|
|
|
{
|
|
|
|
|
orderBatteryInfo.CanSwap = InfoEnum.SelectBinStatusInfo.WaitSelectDownBin;
|
|
|
|
|
SelectPackDto selectPackDto= _binInfoRepository.SelectPackInBin();
|
|
|
|
|
SelectPackDto selectPackDto = _binInfoRepository.SelectPackInBin();
|
|
|
|
|
|
|
|
|
|
orderBatteryInfo.CanDownBin = selectPackDto.CanSwapBinInfo;
|
|
|
|
|
orderBatteryInfo.InBinInfo = selectPackDto.BinInfo;
|
|
|
|
|
orderBatteryInfo.CanSwap = selectPackDto.Info;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -328,9 +324,8 @@ public class CommonMgr
|
|
|
|
|
|
|
|
|
|
if (binInfo != null)
|
|
|
|
|
{
|
|
|
|
|
orderBatteryInfo.CanSwap =InfoEnum.SelectBinStatusInfo.WaitSelectDownBin;
|
|
|
|
|
orderBatteryInfo.CanSwap = InfoEnum.SelectBinStatusInfo.WaitSelectDownBin;
|
|
|
|
|
orderBatteryInfo.UpBinInfo = binInfo;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -341,12 +336,10 @@ public class CommonMgr
|
|
|
|
|
|
|
|
|
|
if (binInfo != null)
|
|
|
|
|
{
|
|
|
|
|
orderBatteryInfo.CanSwap =InfoEnum.SelectBinStatusInfo.Success;
|
|
|
|
|
orderBatteryInfo.CanSwap = InfoEnum.SelectBinStatusInfo.Success;
|
|
|
|
|
orderBatteryInfo.InBinInfo = binInfo;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
@ -367,9 +360,9 @@ public class CommonMgr
|
|
|
|
|
/// <param name="machine"></param>
|
|
|
|
|
public void UpdateSwapOrder(SwappingStateMachine machine)
|
|
|
|
|
{
|
|
|
|
|
_swapOrderRepository.Update(BuildParamForSwap(machine));
|
|
|
|
|
_swapOrderRepository.Update(BuildParamForSwap(machine));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//赋值换电相关的数据,防止更新掉其他任务插入的数据
|
|
|
|
|
private SwapOrder BuildParamForSwap(SwappingStateMachine machine)
|
|
|
|
|
{
|
|
|
|
@ -418,7 +411,7 @@ public class CommonMgr
|
|
|
|
|
i => new BinInfo()
|
|
|
|
|
{
|
|
|
|
|
BatteryEnterSeq = inBinInfo.BatteryEnterSeq,
|
|
|
|
|
InTime=inBinInfo.InTime
|
|
|
|
|
InTime = inBinInfo.InTime
|
|
|
|
|
},
|
|
|
|
|
it => it.Id == inBinInfo.Id);
|
|
|
|
|
var upBinInfo = machineSwapOrderBatteryInfo.UpBinInfo;
|
|
|
|
@ -429,11 +422,10 @@ public class CommonMgr
|
|
|
|
|
i => new BinInfo()
|
|
|
|
|
{
|
|
|
|
|
Soc = -1,
|
|
|
|
|
Soe= -1,
|
|
|
|
|
BatteryNo="-1"
|
|
|
|
|
Soe = -1,
|
|
|
|
|
BatteryNo = "-1"
|
|
|
|
|
},
|
|
|
|
|
it => it.Id == upBinInfo.Id);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|