终端数量不能大于8

This commit is contained in:
yuyang 2021-09-13 11:28:03 +08:00
parent 530ecd5b98
commit 73a46e080a

View File

@ -50,7 +50,12 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService {
@Transactional @Transactional
public AjaxResult addXhpcChargingPile(XhpcChargingPile xhpcChargingPile) { public AjaxResult addXhpcChargingPile(XhpcChargingPile xhpcChargingPile) {
Long chargingStationId = xhpcChargingPile.getChargingStationId();
if(xhpcChargingPile.getGunNumber() !=null || xhpcChargingPile.getGunNumber()>9){
return AjaxResult.error("终端数量不能大于8");
}
Long chargingStationId = xhpcChargingPile.getChargingStationId();
//获取计费模型id //获取计费模型id
Map<String, Object> stringObjectMap = xhpcChargingPileMapper.selectXhpcChargingStationById(chargingStationId); Map<String, Object> stringObjectMap = xhpcChargingPileMapper.selectXhpcChargingStationById(chargingStationId);
Long rateModelId = Long.parseLong(StringUtils.valueOf(stringObjectMap.get("rateModelId"))); Long rateModelId = Long.parseLong(StringUtils.valueOf(stringObjectMap.get("rateModelId")));