From 1129c4394c86d7b44edd47d6e50d3611e92798d1 Mon Sep 17 00:00:00 2001
From: Administrator <zhubaomin>
Date: 星期四, 01 二月 2024 21:46:38 +0800
Subject: [PATCH] 2024-02-01 朱宝民 票据接口,金额转大写,财务对账查询接口
---
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cardOperate/CardOperateCtrl.java | 53 +++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 49 insertions(+), 4 deletions(-)
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cardOperate/CardOperateCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cardOperate/CardOperateCtrl.java
index 13c1a20..1d3691f 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cardOperate/CardOperateCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/cardOperate/CardOperateCtrl.java
@@ -8,11 +8,9 @@
import com.dy.pipIrrGlobal.pojoBa.BaClient;
import com.dy.pipIrrGlobal.pojoSe.SeCardOperate;
import com.dy.pipIrrGlobal.pojoSe.SeClientCard;
+import com.dy.pipIrrGlobal.util.AmountToChinese;
import com.dy.pipIrrGlobal.util.Constant;
-import com.dy.pipIrrGlobal.voSe.VoActiveCard;
-import com.dy.pipIrrGlobal.voSe.VoActiveCardNew;
-import com.dy.pipIrrGlobal.voSe.VoRecharge;
-import com.dy.pipIrrGlobal.voSe.VoReissueCard;
+import com.dy.pipIrrGlobal.voSe.*;
import com.dy.pipIrrSell.cardOperate.converter.RechargeDtoMapper;
import com.dy.pipIrrSell.cardOperate.dto.*;
import com.dy.pipIrrSell.cardOperate.enums.OperateTypeENUM;
@@ -35,6 +33,7 @@
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
+import java.math.BigDecimal;
import java.time.format.DateTimeFormatter;
import java.util.*;
@@ -913,4 +912,50 @@
}
}
+ /**
+ * 鏍规嵁鎸囧畾鏉′欢鑾峰彇鏀舵嵁鍒楄〃
+ * @param vo
+ * @return
+ */
+ @Operation(summary = "鑾峰彇鏀舵嵁璁板綍", description = "杩斿洖鏀舵嵁璁板綍")
+ @ApiResponses(value = {
+ @ApiResponse(
+ responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE,
+ description = "杩斿洖涓�椤佃ˉ鍗℃暟鎹紙BaseResponse.content:QueryResultVo[{}]锛�",
+ content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE,
+ schema = @Schema(implementation = VoActiveCard.class))}
+ )
+ })
+ @GetMapping(path = "/get_receipts")
+ @SsoAop()
+ public BaseResponse<Map> getReceipts(QoReceipt vo){
+ try {
+ Map res = Optional.ofNullable(cardOperateSv.getReceipts(vo)).orElse(new HashMap());
+ if(res.size() == 0) {
+ return BaseResponseUtils.buildFail(SellResultCode.No_RECEIPTS.getMessage());
+ }
+ return BaseResponseUtils.buildSuccess(res);
+ } catch (Exception e) {
+ log.error("鑾峰彇鐢靛瓙閽卞寘璐︽埛璁板綍", e);
+ return BaseResponseUtils.buildException(e.getMessage()) ;
+ }
+ }
+
+ /**
+ * 閲戦杞ぇ鍐�
+ * @param amount
+ * @return
+ */
+
+ @GetMapping(path = "/amount_to_chinese")
+ public BaseResponse<Boolean> amountToChinese(BigDecimal amount) {
+ try {
+ AmountToChinese amountToChinese = new AmountToChinese();
+ String chinese = amountToChinese.toChinese(amount);
+ return BaseResponseUtils.buildSuccess(chinese) ;
+ } catch (Exception e) {
+ return BaseResponseUtils.buildException(e.getMessage()) ;
+ }
+
+ }
}
--
Gitblit v1.8.0