|
|
@@ -1,10 +1,10 @@
|
|
|
package com.jzg.quotation.summary.controller;
|
|
|
|
|
|
|
|
|
+import cn.hutool.json.JSONUtil;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.jzg.commons.core.base.BaseController;
|
|
|
import com.jzg.commons.core.page.HttpResult;
|
|
|
-import com.jzg.commons.entity.dto.FeeAuditAddParam;
|
|
|
import com.jzg.commons.entity.dto.FeeAuditParam;
|
|
|
import com.jzg.commons.entity.dto.VerifyOrderParam;
|
|
|
import com.jzg.commons.entity.orders.vo.AuditCostInfoVo;
|
|
|
@@ -14,6 +14,8 @@ import com.jzg.commons.entity.vo.PtlAgreementCostRatioVo;
|
|
|
import com.jzg.quotation.summary.service.InsFeeAuditService;
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
@@ -24,6 +26,8 @@ import java.util.List;
|
|
|
@RequestMapping("/feeAudit")
|
|
|
public class InsFeeAuditController {
|
|
|
|
|
|
+ private static final Logger log = LoggerFactory.getLogger(InsFeeAuditController.class);
|
|
|
+
|
|
|
@Autowired
|
|
|
private InsFeeAuditService insFeeAuditService;
|
|
|
|
|
|
@@ -36,7 +40,7 @@ public class InsFeeAuditController {
|
|
|
*/
|
|
|
@PostMapping("/auditList")
|
|
|
@Operation(summary = "订单审核列表分页")
|
|
|
- public HttpResult auditList(@RequestBody FeeAuditParam param){
|
|
|
+ public HttpResult<Page<FeeAuditVo>> auditList(@RequestBody FeeAuditParam param){
|
|
|
param.setSystemCode(baseController.getUserSystemCode());
|
|
|
Page<FeeAuditVo> result = insFeeAuditService.queryPage(param);
|
|
|
return HttpResult.ok(result);
|
|
|
@@ -55,11 +59,11 @@ public class InsFeeAuditController {
|
|
|
|
|
|
/**
|
|
|
* 订单审核详情
|
|
|
- * @return
|
|
|
+ * @return HttpResult<QuoteEchoVo>
|
|
|
*/
|
|
|
@GetMapping("/auditInfo")
|
|
|
@Operation(summary = "订单审核详情")
|
|
|
- public HttpResult auditInfo(String orderNo){
|
|
|
+ public HttpResult<QuoteEchoVo> auditInfo(String orderNo){
|
|
|
QuoteEchoVo detailVo = insFeeAuditService.auditInfo(orderNo);
|
|
|
return HttpResult.ok(detailVo);
|
|
|
}
|
|
|
@@ -113,8 +117,14 @@ public class InsFeeAuditController {
|
|
|
*/
|
|
|
@PostMapping("/verifyOrder")
|
|
|
@Operation(summary = "审核订单")
|
|
|
- public HttpResult verifyOrder(@RequestBody VerifyOrderParam param){
|
|
|
- insFeeAuditService.verifyOrder(param);
|
|
|
+ public HttpResult<String> verifyOrder(@RequestBody VerifyOrderParam param){
|
|
|
+ try{
|
|
|
+ insFeeAuditService.verifyOrder(param);
|
|
|
+ }catch (Exception e){
|
|
|
+ log.info("审核订单发生异常:param=[{}], e", JSONUtil.toJsonStr(param), e);
|
|
|
+ return HttpResult.ok(e.getMessage());
|
|
|
+ }
|
|
|
+
|
|
|
return HttpResult.ok("订单审核成功");
|
|
|
}
|
|
|
|