Index: ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/service/RecyclingRecordManagerImpl.java =================================================================== diff -u -r27475 -r27479 --- ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/service/RecyclingRecordManagerImpl.java (.../RecyclingRecordManagerImpl.java) (revision 27475) +++ ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/service/RecyclingRecordManagerImpl.java (.../RecyclingRecordManagerImpl.java) (revision 27479) @@ -830,11 +830,11 @@ if(cardinalNum != null && cardinalNum != 0){ Integer existsAmount = amountMap.get(TousseInstance.STATUS_USEDCARDINALNUM); if(existsAmount >= cardinalNum){ - throw new RuntimeException(tousseName + "基数数量已达上限,可回收数量为0"); + throw new RuntimeException(record.getDepart()+ "的" + tousseName + "的回收数量超过了基数上限,最大可回收数量为0"); } Integer surplusBaseAmount = cardinalNum - existsAmount; if(amount > surplusBaseAmount){ - throw new RuntimeException(tousseName + "基数数量已达上限,可回收数量为" + surplusBaseAmount); + throw new RuntimeException(record.getDepart()+ "的" + tousseName + "的回收数量超过了基数上限,最大可回收数量为" + surplusBaseAmount); } } } Index: ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/action/RecyclingRecordAction.java =================================================================== diff -u -r27470 -r27479 --- ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/action/RecyclingRecordAction.java (.../RecyclingRecordAction.java) (revision 27470) +++ ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/action/RecyclingRecordAction.java (.../RecyclingRecordAction.java) (revision 27479) @@ -528,21 +528,25 @@ */ public String saveExpressRecycling() { String paramsStr = StrutsParamUtils.getPraramValue("params", null); - String msg = "保存成功!"; - JSONObject json = JSONUtil.buildJsonObject(true, msg); + String msg = null; + JSONObject json = null; boolean versionNotMatch = false; if(StringUtils.isNotBlank(paramsStr)){ JSONObject params = JSONObject.fromObject(paramsStr); String app_id = params.optString("app_id"); try { recyclingRecordManager .saveExpressRecycling(params,app_id); + msg = "保存成功!"; + json = JSONUtil.buildJsonObject(true, msg); json.put("recyclingRecordId", params.opt("recyclingRecordId")); }catch(VersionNotMatchException e){ msg = exceptionHandler.handleException(e); versionNotMatch = true; + json = JSONUtil.buildJsonObject(false); } catch (Exception e) { msg = exceptionHandler.handleException(e); + json = JSONUtil.buildJsonObject(false); } } JSONUtil.addMessage(json, msg);