mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 19:15:35 +08:00
update 电单车
This commit is contained in:
@@ -291,7 +291,7 @@ public class PileRemoteService {
|
||||
pileBillingTemplateService.updatePileBillingTemplate(pileBillingTemplate);
|
||||
|
||||
// 获取到站点下所有的桩, 下发计费模板, 电单车不支持
|
||||
if (StringUtils.equals(billingTemplateVO.getDeviceType(), "1")) {
|
||||
if (StringUtils.equals(billingTemplateVO.getDeviceType(), Constants.ONE)) {
|
||||
List<PileDetailVO> pileList = pileBasicInfoService.selectPileListByStationIds(Lists.newArrayList(Long.valueOf(dto.getStationId())));
|
||||
if (CollectionUtils.isNotEmpty(pileList)) {
|
||||
for (PileDetailVO pileInfoVO : pileList) {
|
||||
|
||||
@@ -74,7 +74,7 @@ public class EBikeSendCommandServiceImpl implements EBikeSendCommandService {
|
||||
message.setExtraFloatChargeTime(0);
|
||||
message.setSkipShortCircuitDetection(0);
|
||||
message.setNoUserPullOutCheck(0);
|
||||
message.setForceAutoStopWhenFull(0);
|
||||
message.setForceAutoStopWhenFull(1);
|
||||
message.setFullChargePower(0);
|
||||
message.setMaxFullChargePowerCheckTime(0);
|
||||
byte[] response = this.send(message);
|
||||
@@ -122,7 +122,7 @@ public class EBikeSendCommandServiceImpl implements EBikeSendCommandService {
|
||||
message.setExtraFloatChargeTime(0);
|
||||
message.setSkipShortCircuitDetection(0);
|
||||
message.setNoUserPullOutCheck(0);
|
||||
message.setForceAutoStopWhenFull(0);
|
||||
message.setForceAutoStopWhenFull(1);
|
||||
message.setFullChargePower(0);
|
||||
message.setMaxFullChargePowerCheckTime(0);
|
||||
byte[] response = this.send(message);
|
||||
|
||||
@@ -234,8 +234,6 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic
|
||||
return;
|
||||
}
|
||||
|
||||
// 查询站点信息
|
||||
billingTemplate.setName(dto.getName());
|
||||
billingTemplate.setType(dto.getType());
|
||||
billingTemplate.setTemplateRemark(dto.getTemplateRemark());
|
||||
billingTemplate.setUpdateBy(SecurityUtils.getUsername());
|
||||
@@ -243,15 +241,14 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic
|
||||
billingTemplate.setOccupyFee(dto.getOccupyFee());
|
||||
billingTemplate.setMaxOccupyFee(dto.getMaxOccupyFee());
|
||||
|
||||
// 修改私有模板的名称 如果类型是私有,并且名称是公用,就更新为: 站点名称 + ”的计费模板“
|
||||
if (StringUtils.equals(billingTemplate.getPublicFlag(), Constants.ZERO)
|
||||
&& StringUtils.equals(billingTemplate.getName(), "公用")) {
|
||||
// 查询站点信息
|
||||
PileStationInfo stationInfo = pileStationInfoService.selectPileStationInfoById(billingTemplate.getStationId());
|
||||
if (stationInfo != null) {
|
||||
billingTemplate.setName(stationInfo.getStationName() + "的会员计费模板");
|
||||
}
|
||||
}
|
||||
// 查询站点信息
|
||||
PileStationInfo stationInfo = pileStationInfoService.selectPileStationInfoById(billingTemplate.getStationId());
|
||||
String stationName = stationInfo.getStationName();
|
||||
String memberFlagStr = StringUtils.equals(billingTemplate.getMemberFlag(), "1") ? "会员" : "普通";
|
||||
String pileTypeStr = StringUtils.equals(dto.getType(), "1") ? "汽车" : "电单车";
|
||||
// 计费模板名称规则 站点名称 + ”的" + Type +"计费模板“
|
||||
String name = stationName + "的" + memberFlagStr + pileTypeStr + "计费模板";
|
||||
billingTemplate.setName(name);
|
||||
|
||||
// 生成计费详情list
|
||||
List<PileBillingDetail> pileBillingDetails = generateBillingDetailList(billingTemplate.getTemplateCode(), dto);
|
||||
|
||||
Reference in New Issue
Block a user