From e2046d01e4142e2e4bdfc5fc15f2d673120f8f69 Mon Sep 17 00:00:00 2001 From: gaojuan Date: Fri, 4 Nov 2022 11:35:19 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E6=8A=A5=E5=91=8A=E8=B0=83?= =?UTF-8?q?=E7=94=A8=E7=99=BE=E7=9B=9B=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../weixin/WeiXinEvaluationController.java | 11 +++++++---- .../main/java/com/fangjia/open/util/BHBankUtils.java | 8 ++------ .../fangjia-open/src/main/webapp/static/js/report.js | 9 +++++++-- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/weixin/WeiXinEvaluationController.java b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/weixin/WeiXinEvaluationController.java index 38d005b33..21121e8b7 100644 --- a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/weixin/WeiXinEvaluationController.java +++ b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/weixin/WeiXinEvaluationController.java @@ -1109,10 +1109,13 @@ public class WeiXinEvaluationController { formalReportService.update(formalReport); } } - Integer code = BHBankUtils.inquireToReport(bohaiEvaluationAudit.getQueryId(), model.getAddress()); - Map data = new HashMap(); - data.put("code", code); - jsonModel.setJsonModel(data); + JSONObject jsonObj = BHBankUtils.inquireToReport(bohaiEvaluationAudit.getQueryId(), model.getAddress()); + if(jsonObj!=null){ + Map data = new HashMap(); + data.put("code", (Integer)jsonObj.get("errCode")); + data.put("msg", (String)jsonObj.get("errMsg")); + jsonModel.setJsonModel(data); + } } } return jsonModel; diff --git a/projects/fangjia-open/src/main/java/com/fangjia/open/util/BHBankUtils.java b/projects/fangjia-open/src/main/java/com/fangjia/open/util/BHBankUtils.java index 3ae49cc24..cda323214 100644 --- a/projects/fangjia-open/src/main/java/com/fangjia/open/util/BHBankUtils.java +++ b/projects/fangjia-open/src/main/java/com/fangjia/open/util/BHBankUtils.java @@ -431,8 +431,7 @@ public class BHBankUtils { } - - public static Integer inquireToReport(String queryId, String reportMsg){ + public static JSONObject inquireToReport(String queryId, String reportMsg){ String feedbackId = null; List list = new ArrayList(); Map params = new HashMap(); @@ -475,10 +474,7 @@ public class BHBankUtils { if(StringUtils.isNotBlank(content)){ JSONObject jsonObj = JSONObject.fromObject(content); if(jsonObj.containsKey("errCode")){ - Integer code = (Integer) jsonObj.get("errCode"); - if (code == 0) { - return code; - } + return jsonObj; } } }catch (Exception e){ diff --git a/projects/fangjia-open/src/main/webapp/static/js/report.js b/projects/fangjia-open/src/main/webapp/static/js/report.js index f3d833ccf..b089f29ff 100644 --- a/projects/fangjia-open/src/main/webapp/static/js/report.js +++ b/projects/fangjia-open/src/main/webapp/static/js/report.js @@ -375,8 +375,13 @@ function clickFormalReport(){ }, dataType:"json", success:function(data){ - $.cookie("fjt-formal-report",address, {path:"/",expires: 30}) - alert("您的申请已提交,请耐心等待!"); + if(data && data.code!=0){ + alert(data.msg); + }else{ + $.cookie("fjt-formal-report",address, {path:"/",expires: 30}) + alert("您的申请已提交,请耐心等待!"); + } + } }) }