Index: ssts-web/src/main/webapp/disinfectsystem/washanddisinfectmanager/basketMonitor/washBasketMonitorView.js =================================================================== diff -u -r16904 -r17094 --- ssts-web/src/main/webapp/disinfectsystem/washanddisinfectmanager/basketMonitor/washBasketMonitorView.js (.../washBasketMonitorView.js) (revision 16904) +++ ssts-web/src/main/webapp/disinfectsystem/washanddisinfectmanager/basketMonitor/washBasketMonitorView.js (.../washBasketMonitorView.js) (revision 17094) @@ -18,22 +18,24 @@ Ext4.Ajax.request({ url : WWWROOT + '/disinfectSystem/baseData/containerAction!checkBarcode.do', method : 'POST', - params : {barcode : searchKeyWord}, + params : {barcode : searchKeyWord, purpose : '清洗筐'}, success : function(response, options) { Ext4.getCmp('searchKeyWord').setValue(''); var result = Ext4.decode(response.responseText); - if (result.success && result.purpose == '清洗筐') { - basketStore.proxy.extraParams.basketDarcode = searchKeyWord; - basketStore.reload(); - basketStore.proxy.extraParams.basketDarcode = null; //请求完毕,把这个参数置空,以免影响后面的请求 - - getClassifyBasketContent(searchKeyWord, result.containerName, 1); - } else { - alert("请扫描清洗篮筐的条码"); + if (result) { + if (result.success) { + basketStore.proxy.extraParams.basketDarcode = searchKeyWord; + basketStore.reload(); + basketStore.proxy.extraParams.basketDarcode = null; //请求完毕,把这个参数置空,以免影响后面的请求 + + getClassifyBasketContent(searchKeyWord, result.containerName, 1); + } else { + showResult(result.message); + } } }, failure : function(response, options) { - alert("数据加载异常!"); + showResult("数据加载异常!"); } }); } else { //执行搜索列 Index: ssts-web/src/main/webapp/disinfectsystem/washanddisinfectmanager/basketMonitor/sterileBasketMonitorView.js =================================================================== diff -u -r16904 -r17094 --- ssts-web/src/main/webapp/disinfectsystem/washanddisinfectmanager/basketMonitor/sterileBasketMonitorView.js (.../sterileBasketMonitorView.js) (revision 16904) +++ ssts-web/src/main/webapp/disinfectsystem/washanddisinfectmanager/basketMonitor/sterileBasketMonitorView.js (.../sterileBasketMonitorView.js) (revision 17094) @@ -19,18 +19,20 @@ Ext4.Ajax.request({ url : WWWROOT + '/disinfectSystem/baseData/containerAction!checkBarcode.do', method : 'POST', - params : {barcode : searchKeyWord}, + params : {barcode : searchKeyWord, purpose : '灭菌筐'}, success : function(response, options) { Ext4.getCmp('searchKeyWord').setValue(''); var result = Ext4.decode(response.responseText); - if (result.success && result.purpose == '灭菌筐') { - basketStore.proxy.extraParams.basketDarcode = searchKeyWord; - basketStore.reload(); - basketStore.proxy.extraParams.basketDarcode = null; //请求完毕,把这个参数置空,以免影响后面的请求 - - getTousseInstances(searchKeyWord, result.containerName, 1); - } else { - alert("请扫描灭菌篮筐的条码"); + if (result) { + if (result.success) { + basketStore.proxy.extraParams.basketDarcode = searchKeyWord; + basketStore.reload(); + basketStore.proxy.extraParams.basketDarcode = null; //请求完毕,把这个参数置空,以免影响后面的请求 + + getTousseInstances(searchKeyWord, result.containerName, 1); + } else { + showResult(result.message); + } } }, failure : function(response, options) { Index: ssts-basedata/src/main/java/com/forgon/disinfectsystem/basedatamanager/container/action/ContainerAction.java =================================================================== diff -u -r16144 -r17094 --- ssts-basedata/src/main/java/com/forgon/disinfectsystem/basedatamanager/container/action/ContainerAction.java (.../ContainerAction.java) (revision 16144) +++ ssts-basedata/src/main/java/com/forgon/disinfectsystem/basedatamanager/container/action/ContainerAction.java (.../ContainerAction.java) (revision 17094) @@ -347,21 +347,26 @@ } /** - * 扫描篮筐时,验证条码是否合格 + * 扫描篮筐时,验证条码是否合格(不是容器条码,或者当前登录用户不是容器的处理科室即为不合格) * */ public void checkBarcode() { JSONObject jSONObject = new JSONObject(); String basketBarcode = StrutsParamUtils.getPraramValue("barcode", ""); + String purpose = StrutsParamUtils.getPraramValue("purpose", ""); if(StringUtils.isNotBlank(basketBarcode)){ Container container = containerManager.getContainerByBarcode(basketBarcode); - if (container != null) { + if (container == null + || !StringTools.equals(container.getPurpose(), purpose)) { //不是容器条码,或者不是指定类型的容器条码 + jSONObject.put("success", false); + jSONObject.put("message", "请扫描" + purpose + "条码"); + } else if (!StringTools.equals(container.getDepartCode(), AcegiHelper.getLoginUser().getCurrentOrgUnitCode())) { //不是本科室处理的容器 + jSONObject.put("success", false); + jSONObject.put("message", "请扫描本科室处理的" + purpose + "条码"); + } else { jSONObject.put("success", true); - jSONObject.put("purpose", container.getPurpose()); jSONObject.put("containerName", container.getContainerName()); - } else { - jSONObject.put("success", false); } StrutsResponseUtils.output(jSONObject); }