From 7df8ed14d605bcc731341ff12349bc117714b69e Mon Sep 17 00:00:00 2001 From: zhubaomin <zhubaomin> Date: 星期四, 17 四月 2025 16:18:24 +0800 Subject: [PATCH] 优化代码 --- pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/CommandSv.java | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/CommandSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/CommandSv.java index f23d3b8..9b390ec 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/CommandSv.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-wechat/src/main/java/com/dy/pipIrrWechat/command/CommandSv.java @@ -415,6 +415,11 @@ myParam.setOpenType(openType); BaseResponse<Boolean> result = dealWithCommandResult(myParam); + // 濡傛灉鍛戒护鎵ц澶辫触锛屽垯鍐嶆鎵ц鍛戒护 + if(!result.isSuccess()) { + myParam.setComId(new IDLongGenerator().generate()); + result = dealWithCommandResult(myParam); + } Map map = new HashMap<>(); map.put("success", result.isSuccess()); @@ -612,7 +617,14 @@ myParam.setParam(param); myParam.setRtuResultSendWebUrl(rtuCallbackUrl_wx); myParam.setOperator(operator); + //BaseResponse<Boolean> result = dealWithCommandResult(myParam); + BaseResponse<Boolean> result = dealWithCommandResult(myParam); + // 濡傛灉鍛戒护鎵ц澶辫触锛屽垯鍐嶆鎵ц鍛戒护 + if(!result.isSuccess()) { + myParam.setComId(new IDLongGenerator().generate()); + result = dealWithCommandResult(myParam); + } Map map = new HashMap<>(); map.put("success", result.isSuccess()); @@ -706,6 +718,7 @@ irIntakeOperate.setOperateType(operatetype); irIntakeOperate.setCommandId(comId); irIntakeOperate.setIntakeId(intakeId); + irIntakeOperate.setCommandResult((byte)1); Long id = addIntakeOperate(irIntakeOperate); if(id == null) { @@ -783,7 +796,13 @@ myParam.setRtuResultSendWebUrl(rtuCallbackUrl_wx); myParam.setOperator(operator); //return dealWithCommandResult(myParam); + BaseResponse<Boolean> result = dealWithCommandResult(myParam); + // 濡傛灉鍛戒护鎵ц澶辫触锛屽垯鍐嶆鎵ц鍛戒护 + if(!result.isSuccess()) { + myParam.setComId(new IDLongGenerator().generate()); + result = dealWithCommandResult(myParam); + } Map map = new HashMap<>(); map.put("success", result.isSuccess()); -- Gitblit v1.8.0