From 676779d37adad7a7335e7145013e12f2f30f6760 Mon Sep 17 00:00:00 2001 From: liujiaji Date: Tue, 28 Aug 2018 10:47:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E5=8F=B0=20=E9=9C=80=E8=A6=81=20messa?= =?UTF-8?q?ge:=E5=BD=93=E5=89=8D=E7=BB=8F=E9=94=80=E5=95=86=E6=9C=AA?= =?UTF-8?q?=E6=BF=80=E6=B4=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/ApplyStartServiceImpl.java | 32 ++++++++++++------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/start/service/impl/ApplyStartServiceImpl.java b/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/start/service/impl/ApplyStartServiceImpl.java index eca63c962..93300e992 100644 --- a/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/start/service/impl/ApplyStartServiceImpl.java +++ b/src_app_fresh/apx/com/amarsoft/als/apzl/apply/business/start/service/impl/ApplyStartServiceImpl.java @@ -31,23 +31,33 @@ public class ApplyStartServiceImpl implements ApplyStartService { String applyType = fieldMap.get("applytype") == null ? "" : fieldMap .get("applytype").toString(); + String userid = fieldMap.get("userid") == null ? "" : fieldMap + .get("userid").toString(); + ASUser CurUser = new ASUser(userid, sqlca); + + ARE.getLog().info( + "用户:" + CurUser.getUserName() + ", 部门:" + + CurUser.getOrgName() + "请求发起申请!"); + Map body = new HashMap(); - body.put("applyResult", "true"); + body.put("enableApply", "true"); + body.put("message", ""); if (!StringX.isSpace(applyType)) { if ("BusinessApplyApply".equals(applyType)) { - String userid = fieldMap.get("userid") == null ? "" : fieldMap - .get("userid").toString(); - ASUser CurUser = new ASUser(userid, sqlca); - - ARE.getLog().info( - "用户:" + CurUser.getUserName() + ", 部门:" - + CurUser.getOrgName() + "请求发起申请!"); - CustomerInfoCheck applyStartEnable = new CustomerInfoCheck(); applyStartEnable.setId(CurUser.getOrgID()); - String result = applyStartEnable.checkDistributorStatus(tx); + String result; + try { + result = applyStartEnable.checkDistributorStatus(tx); + } catch (Exception e) { + ARE.getLog().error(e); + result = ""; + } result = result == null ? "" : result.trim(); - body.put("applyResult", result); + body.put("enableApply", result); + if (!"success".equals(result.toLowerCase())) { + body.put("message", "警告:当前经销商未激活!"); + } } }