| | |
| | | package com.kidgrow.oprationcenter.controller; |
| | | |
| | | import com.kidgrow.common.constant.PayConstants; |
| | | import com.kidgrow.common.controller.BaseController; |
| | | import com.kidgrow.common.model.PageResult; |
| | | import com.kidgrow.common.model.ResultBody; |
| | |
| | | import org.springframework.validation.ObjectError; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | import java.io.IOException; |
| | |
| | | ExcelUtil.exportExcel(saasClientPayExcel, null, "支付导出", SaasClientPayExcel.class, "saas_client_pay", response); |
| | | return ResultBody.ok().msg("导出成功"); |
| | | } |
| | | /** |
| | | * 获取微信和支付宝的二维码 |
| | | */ |
| | | @ApiOperation(value = "获取微信和支付宝的二维码") |
| | | @PostMapping("/getCode") |
| | | public ResultBody getCode(@Valid @RequestBody SaasClientPay saasClientPay, BindingResult bindingResult, HttpServletRequest request) throws Exception { |
| | | List<String> errMsg= new ArrayList<>(); |
| | | if (bindingResult.hasErrors()) { |
| | | for (ObjectError error : bindingResult.getAllErrors()) { |
| | | errMsg.add(error.getDefaultMessage()); |
| | | } |
| | | return ResultBody.failed().msg(errMsg.toString()); |
| | | } |
| | | return saasClientPayService.getCode(saasClientPay,request); |
| | | } |
| | | |
| | | /** |
| | | * 查询 |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询 支付状态是否为成功 |
| | | */ |
| | | @ApiOperation(value = "查询一个诊断的支付状态") |
| | | @GetMapping("/getDepartmentPay") |
| | | public ResultBody getDepartmentPayState(@RequestParam Long hospitalId, @RequestParam Long departmentId, @RequestParam String diaId) { |
| | | SaasClientPay model = saasClientPayService.findModelByObject(hospitalId,departmentId,diaId); |
| | | if (model != null) { |
| | | return ResultBody.ok().data(model.getPayStatus().equals(PayConstants.ORDER_PAY_SUCEESS)).msg("查询成功"); |
| | | } |
| | | return ResultBody.failed().data(false).msg("没有相关数据"); |
| | | } |
| | | /** |
| | | * 删除 |
| | | */ |