mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-05 18:40:14 +08:00
新增 查询占桩订单费用相关接口
This commit is contained in:
@@ -10,9 +10,11 @@ import com.jsowell.common.response.RestApiResponse;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.pile.domain.OrderPileOccupy;
|
||||
import com.jsowell.pile.dto.GenerateOccupyOrderDTO;
|
||||
import com.jsowell.pile.service.IPileBillingTemplateService;
|
||||
import com.jsowell.pile.service.OrderPileOccupyService;
|
||||
import com.jsowell.pile.vo.uniapp.OccupyOrderDetailVO;
|
||||
import com.jsowell.pile.vo.uniapp.OrderPileOccupyVO;
|
||||
import com.jsowell.pile.vo.web.BillingTemplateVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -32,8 +34,12 @@ public class OccupyOrderController extends BaseController {
|
||||
@Autowired
|
||||
private OrderPileOccupyService orderPileOccupyService;
|
||||
|
||||
@Autowired
|
||||
private IPileBillingTemplateService pileBillingTemplateService;
|
||||
|
||||
/**
|
||||
* todo 查询站点占桩费率
|
||||
* 查询站点占桩费率
|
||||
* https://api.jsowellcloud.com/uniapp/occupyOrder/getStationOccupyFee/{stationId}
|
||||
* @param stationId
|
||||
* @return
|
||||
*/
|
||||
@@ -42,7 +48,8 @@ public class OccupyOrderController extends BaseController {
|
||||
logger.info("查询站点占桩费率 params:{}", stationId);
|
||||
RestApiResponse<?> response = null;
|
||||
try {
|
||||
|
||||
BillingTemplateVO vo = pileBillingTemplateService.queryUsedBillingTemplate(stationId);
|
||||
response = new RestApiResponse<>(vo);
|
||||
} catch (Exception e) {
|
||||
logger.error("查询站点占桩费率 error,", e);
|
||||
response = new RestApiResponse<>(e);
|
||||
|
||||
@@ -339,6 +339,8 @@ public class PileBillingTemplateServiceImpl implements IPileBillingTemplateServi
|
||||
result.setTemplateCode(billingTemplateVO.getTemplateCode());
|
||||
result.setStationId(stationId);
|
||||
result.setDateTime(localTime.toString());
|
||||
result.setFreeTime(billingTemplateVO.getFreeTime());
|
||||
result.setOccupyFee(billingTemplateVO.getOccupyFee());
|
||||
|
||||
List<BillingDetailVO> billingDetailList = billingTemplateVO.getBillingDetailList();
|
||||
for (BillingDetailVO detailVO : billingDetailList) {
|
||||
|
||||
@@ -430,6 +430,8 @@ public class PileStationInfoServiceImpl implements IPileStationInfoService {
|
||||
stationVO.setElectricityPrice(currentTimePriceDetails.getElectricityPrice());
|
||||
stationVO.setServicePrice(currentTimePriceDetails.getServicePrice());
|
||||
stationVO.setTotalPrice(currentTimePriceDetails.getTotalPrice());
|
||||
stationVO.setFreeTime(currentTimePriceDetails.getFreeTime());
|
||||
stationVO.setOccupyFee(currentTimePriceDetails.getOccupyFee());
|
||||
}
|
||||
stationVOList.add(stationVO);
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import lombok.NoArgsConstructor;
|
||||
import org.apache.commons.lang3.builder.EqualsBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -57,6 +58,16 @@ public class StationInfoVO {
|
||||
*/
|
||||
private String totalPrice;
|
||||
|
||||
/**
|
||||
* 占桩免费时长
|
||||
*/
|
||||
private Integer freeTime;
|
||||
|
||||
/**
|
||||
* 占桩费率
|
||||
*/
|
||||
private BigDecimal occupyFee;
|
||||
|
||||
/**
|
||||
* 快充枪口总数
|
||||
*/
|
||||
|
||||
@@ -5,6 +5,8 @@ import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@@ -39,4 +41,14 @@ public class CurrentTimePriceDetails {
|
||||
* 电费 + 服务费 每度单价
|
||||
*/
|
||||
private String totalPrice;
|
||||
|
||||
/**
|
||||
* 占桩免费时长
|
||||
*/
|
||||
private Integer freeTime;
|
||||
|
||||
/**
|
||||
* 占桩费率
|
||||
*/
|
||||
private BigDecimal occupyFee;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user