mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
新增 查询充电报告接口
This commit is contained in:
@@ -4,7 +4,7 @@ import com.jsowell.common.annotation.Anonymous;
|
||||
import com.jsowell.common.core.controller.BaseController;
|
||||
import com.jsowell.common.response.RestApiResponse;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.thirdparty.platform.dto.BatteryChargeReportDTO;
|
||||
import com.jsowell.pile.dto.BatteryChargeReportDTO;
|
||||
import com.jsowell.thirdparty.platform.service.impl.BatteryChargeReportService;
|
||||
import com.jsowell.thirdparty.platform.service.impl.ChargeAlgorithmService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
@@ -21,6 +21,8 @@ import com.jsowell.pile.vo.uniapp.customer.OrderVO;
|
||||
import com.jsowell.pile.vo.uniapp.customer.ParkingOrderVO;
|
||||
import com.jsowell.pile.vo.uniapp.customer.UniAppOrderVO;
|
||||
import com.jsowell.service.OrderService;
|
||||
import com.jsowell.pile.dto.BatteryChargeReportDTO;
|
||||
import com.jsowell.thirdparty.platform.service.impl.BatteryChargeReportService;
|
||||
import com.jsowell.wxpay.dto.WechatSendMsgDTO;
|
||||
import com.jsowell.wxpay.service.WxAppletRemoteService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -53,6 +55,8 @@ public class OrderController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private OrderBasicInfoService orderBasicInfoService;
|
||||
@Autowired
|
||||
private BatteryChargeReportService batteryChargeReportService;
|
||||
|
||||
/**
|
||||
* 生成订单/创建订单
|
||||
@@ -459,4 +463,23 @@ public class OrderController extends BaseController {
|
||||
logger.info("关闭订单:{}", orderCode);
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询充电报告
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/getBatteryReport")
|
||||
public RestApiResponse<?> getBatteryReport(@RequestBody BatteryChargeReportDTO dto) {
|
||||
RestApiResponse<?> response = null;
|
||||
try {
|
||||
String url = chargeAlgorithmRecordService.getUrlByParams(dto);
|
||||
response = new RestApiResponse<>(ImmutableMap.of("url", url));
|
||||
} catch (Exception e) {
|
||||
logger.error("查询订单号:{} 的充电报告 error:", dto.getOrderCode(), e);
|
||||
response = new RestApiResponse<>(e);
|
||||
}
|
||||
logger.info("查询订单号:{} 的充电报告 params:{}, result:{}", dto.getOrderCode(), JSON.toJSONString(dto), response);
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user