Index: ssts-webservice/src/main/java/com/forgon/disinfectsystem/webservice/service/ServiceManagerImpl.java =================================================================== diff -u -r17031 -r17086 --- ssts-webservice/src/main/java/com/forgon/disinfectsystem/webservice/service/ServiceManagerImpl.java (.../ServiceManagerImpl.java) (revision 17031) +++ ssts-webservice/src/main/java/com/forgon/disinfectsystem/webservice/service/ServiceManagerImpl.java (.../ServiceManagerImpl.java) (revision 17086) @@ -412,9 +412,13 @@ if (jsonObject == null) { return JSONUtil.buildErrorMsgJsonResult("参数非JSON格式"); } + long start = 0; + JSONObject description = new JSONObject(); try { + start = Calendar.getInstance().getTimeInMillis(); // 用反射调用方法 String action = jsonObject.optString("action"); + description.put("action", action); Method method = this.getClass().getDeclaredMethod(action, JSONObject.class); if (method.getReturnType() != String.class) { @@ -433,6 +437,13 @@ logger.error("调用异常", e); // return buildErrorMsgJsonResult(e.getMessage()); retException = new RuntimeException(e.getMessage()); + }finally{ + long end = Calendar.getInstance().getTimeInMillis(); + description.put("time(ms)", end - start); + if(retException != null){ + description.put("exception", retException); + } + appLogManager.saveLog(AcegiHelper.getLoginUser(), "PDA", "A", description); } if(retException != null){ throw retException; @@ -1953,10 +1964,12 @@ new TypeToken>() { }.getType()); //由之前的循环单个包实例条码移除改为批量移除 - tousseInstanceManager.removeFromBasket(tousseInstanceBarcodes); - - return new JSONStringer().object().key("success").value(true) - .endObject().toString(); + JSONObject json = tousseInstanceManager.removeFromBasket(tousseInstanceBarcodes); + if(json == null){ + + json = JSONUtil.buildJsonObject(false); + } + return json.toString(); } private static PropertyFilter buildPropertyFilterForSterilizationRecord() {