新增 推送订单电池充电报告方法至0x3b中

This commit is contained in:
Lemon
2025-04-15 10:31:01 +08:00
parent 9c3eac914c
commit f9334d0be4
2 changed files with 41 additions and 4 deletions

View File

@@ -11,7 +11,9 @@ import com.jsowell.common.enums.ykc.ReturnCodeEnum;
import com.jsowell.common.exception.BusinessException;
import com.jsowell.common.response.RestApiResponse;
import com.jsowell.common.util.StringUtils;
import com.jsowell.pile.domain.ChargeAlgorithmRecord;
import com.jsowell.pile.dto.*;
import com.jsowell.pile.service.ChargeAlgorithmRecordService;
import com.jsowell.pile.vo.base.StationInfoVO;
import com.jsowell.pile.vo.uniapp.customer.OrderVO;
import com.jsowell.pile.vo.uniapp.customer.UniAppOrderVO;
@@ -19,10 +21,7 @@ import com.jsowell.service.OrderService;
import com.jsowell.wxpay.dto.WechatSendMsgDTO;
import com.jsowell.wxpay.service.WxAppletRemoteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
@@ -43,6 +42,9 @@ public class OrderController extends BaseController {
@Autowired
private WxAppletRemoteService wxAppletRemoteService;
@Autowired
private ChargeAlgorithmRecordService chargeAlgorithmRecordService;
/**
* 生成订单/创建订单
* http://localhost:8080/uniapp/order/generateOrder
@@ -389,4 +391,24 @@ public class OrderController extends BaseController {
}
return response;
}
/**
* 查询电池充电报告
* @param request
* @param orderCode
* @return
*/
@GetMapping("/queryChargeAlgorithmRecord/{orderCode}")
public RestApiResponse<?> queryChargeAlgorithmRecord(HttpServletRequest request, @PathVariable("orderCode") String orderCode) {
RestApiResponse<?> response = null;
try {
ChargeAlgorithmRecord record = chargeAlgorithmRecordService.queryRecordByOrderCode(orderCode);
response = new RestApiResponse<>(record);
} catch (Exception e) {
logger.error("查询电池充电报告 error, ", e);
response = new RestApiResponse<>(e);
}
logger.info("查询电池充电报告 params:{}, result:{}", orderCode, response);
return response;
}
}