From 94aafe0f543196f9ea6c637b46a2d195125498c3 Mon Sep 17 00:00:00 2001
From: Administrator <zhubaomin>
Date: 星期一, 08 七月 2024 09:33:51 +0800
Subject: [PATCH] 2024-07-08 朱宝民 小程序远程开阀提供强制开阀功能
---
pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/general/GeneralCtrl.java | 71 +++++++++++++++++++++++++++++++++++
1 files changed, 70 insertions(+), 1 deletions(-)
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/general/GeneralCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/general/GeneralCtrl.java
index 6452465..7c177b2 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/general/GeneralCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-sell/src/main/java/com/dy/pipIrrSell/general/GeneralCtrl.java
@@ -11,6 +11,8 @@
import com.dy.pipIrrGlobal.voSe.VoGeneral;
import com.dy.pipIrrSell.general.dto.DtoGeneral;
import com.dy.pipIrrSell.general.qo.QoGeneral;
+import com.dy.pipIrrSell.general.qo.QoSummary;
+import com.dy.pipIrrSell.general.qo.QoToAudit;
import com.dy.pipIrrSell.result.SellResultCode;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
@@ -64,7 +66,11 @@
try {
add_general();
QueryResultVo<List<VoGeneral>> res = generalSv.getGenerals(vo);
- return BaseResponseUtils.buildSuccess(res);
+ if(res.itemTotal > 0) {
+ return BaseResponseUtils.buildSuccess(res);
+ }else {
+ return BaseResponseUtils.buildFail(SellResultCode.No_GENERALS.getMessage());
+ }
} catch (Exception e) {
log.error("鏌ヨ浜ゆ槗璁板綍寮傚父", e);
return BaseResponseUtils.buildException(e.getMessage()) ;
@@ -164,4 +170,67 @@
return BaseResponseUtils.buildSuccess() ;
}
+
+
+ /**
+ * 寮�鍗$郴缁熶氦鏄撴眹鎬绘煡璇笌瀵硅处绯荤粺浜ゆ槗姹囨�绘煡璇㈠叡鐢ㄦ帴鍙�
+ * 寮�鍗$郴缁熷弬鏁帮細鏀堕摱鍛業D銆佹煡璇㈣捣姝㈡棩鏈�
+ * 瀵硅处绯荤粺鍙傛暟锛氭敹閾跺憳ID銆佷氦鏄撴棩鏈�
+ * @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 = BaClient.class))}
+ )
+ })
+ @GetMapping(path = "getSummaries")
+ @SsoAop()
+ public BaseResponse<Map> getSummaries(QoSummary vo){
+ try {
+ Map res = generalSv.getSummaries(vo);
+ if(res.size() > 0) {
+ return BaseResponseUtils.buildSuccess(res);
+ }else {
+ return BaseResponseUtils.buildFail(SellResultCode.No_TRADE_SUMMARIES.getMessage());
+ }
+ } catch (Exception e) {
+ log.error("鏌ヨ浜ゆ槗姹囨�昏褰曞紓甯�", e);
+ return BaseResponseUtils.buildException(e.getMessage()) ;
+ }
+ }
+
+ /**
+ * 鑾峰彇璐㈠姟瀵硅处_浜ゆ槗鏄庣粏
+ * @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 = BaClient.class))}
+ )
+ })
+ @GetMapping(path = "get_trade_details")
+ @SsoAop()
+ public BaseResponse<Map> getTradeDetails(QoToAudit vo){
+ try {
+ Map res = Optional.ofNullable(generalSv.getTradeDetails(vo)).orElse(new HashMap());
+ if(res.size() > 0) {
+ return BaseResponseUtils.buildSuccess(res);
+ }else {
+ return BaseResponseUtils.buildFail(SellResultCode.No_TRADE_DETAILS.getMessage());
+ }
+ } catch (Exception e) {
+ log.error("鏌ヨ浜ゆ槗璁板綍寮傚父", e);
+ return BaseResponseUtils.buildException(e.getMessage()) ;
+ }
+ }
}
--
Gitblit v1.8.0