Index: ssts-web/src/main/webapp/disinfectsystem/sterilizationmanager/sterilizationrecord/sterilizationLoadingForm.js =================================================================== diff -u -r14839 -r15026 --- ssts-web/src/main/webapp/disinfectsystem/sterilizationmanager/sterilizationrecord/sterilizationLoadingForm.js (.../sterilizationLoadingForm.js) (revision 14839) +++ ssts-web/src/main/webapp/disinfectsystem/sterilizationmanager/sterilizationrecord/sterilizationLoadingForm.js (.../sterilizationLoadingForm.js) (revision 15026) @@ -110,7 +110,7 @@ function transformGridItem(ObjBarcode){ Ext.getCmp('barcode').setValue(ObjBarcode); - SterileLoadingTableManager.getResultJsonStrByBarcode(ObjBarcode,getTousseStoreBarcodes(),function(jsonStr){ + SterileLoadingTableManager.getResultJsonStrByBarcode(ObjBarcode,getTousseStoreBarcodes(),Ext.getCmp('basketBarcode').getValue(),function(jsonStr){ var obj = Ext.util.JSON.decode(jsonStr); var returnType = obj.returnType; @@ -190,6 +190,21 @@ }else if(returnType=="basketUsed"){//篮筐已被使用 showResult("无法录入篮筐,篮筐正处于[" + obj.status + "]状态"); Ext.getCmp('barcode').setValue(''); + }else if(returnType == "containerSterilizing"){ + showResult('该灭菌筐当前状态为灭菌中,不能进行灭菌装载!'); + }else if(returnType == "scanBasketFoundNotDeliverTousseInContainer"){ + Ext.MessageBox.confirm("请确认","该篮筐有未发货的器械包,是否继续",function(button, text) { + if ("yes" == button){ + Ext.getCmp("basketName").setValue(obj.containerName); + Ext.getCmp('basketBarcode').setValue(obj.basketBarcode); + Ext.getCmp('barcode').setValue(''); + + tousseStore.baseParams.basketBarcode = obj.basketBarcode; + tousseStore.load(); + stasticsStore.baseParams.basketBarcode = obj.basketBarcode; + stasticsStore.load(); + } + }); }else if(returnType=="containerSuccess"){//扫描的是篮筐 Ext.getCmp("basketName").setValue(obj.containerName); Ext.getCmp('basketBarcode').setValue(ObjBarcode); @@ -249,7 +264,7 @@ if(total != null || total > 0){ return null; }else{ - return ""; } @@ -275,7 +290,7 @@ return; } clearScanText(); - SterileLoadingTableManager.getResultJsonStrByBarcode(barcode,getTousseStoreBarcodes(),function(jsonStr){ + SterileLoadingTableManager.getResultJsonStrByBarcode(barcode,getTousseStoreBarcodes(),Ext.getCmp('basketBarcode').getValue(),function(jsonStr){ var obj = Ext.util.JSON.decode(jsonStr); var returnType = obj.returnType; var containerType = obj.containerType; @@ -284,6 +299,21 @@ Ext.getCmp('barcode').setValue(''); }else if(returnType == "noResult"){ showResult('未找到相应的结果'); + }else if(returnType == "containerSterilizing"){ + showResult('该灭菌筐当前状态为灭菌中,不能进行灭菌装载!'); + }else if(returnType == "scanBasketFoundNotDeliverTousseInContainer"){ + Ext.MessageBox.confirm("请确认","该篮筐有未发货的器械包,是否继续",function(button, text) { + if ("yes" == button){ + Ext.getCmp("basketName").setValue(obj.containerName); + Ext.getCmp('basketBarcode').setValue(obj.basketBarcode); + Ext.getCmp('barcode').setValue(''); + + tousseStore.baseParams.basketBarcode = obj.basketBarcode; + tousseStore.load(); + stasticsStore.baseParams.basketBarcode = obj.basketBarcode; + stasticsStore.load(); + } + }); }else if(returnType == "tousseInstanceSuccess"){//扫描的是包 if(Ext.getCmp('basketBarcode').getValue() == '') { showResult('请先录入篮筐'); @@ -406,7 +436,7 @@ showResult('条码(尾)不能为空'); return; } - SterileLoadingTableManager.getResultJsonStrByBarcode(barcode + ";" + barcodeEnd,getTousseStoreBarcodes(),function(jsonStr){ + SterileLoadingTableManager.getResultJsonStrByBarcode(barcode + ";" + barcodeEnd,getTousseStoreBarcodes(),Ext.getCmp('basketBarcode').getValue(),function(jsonStr){ var obj = Ext.util.JSON.decode(jsonStr); var returnType = obj.returnType; var containerType = obj.containerType; @@ -668,7 +698,8 @@ valueField : 'scanModeCode', displayField : 'scanModeName', triggerAction : 'all', - listWidth:65, + width:75, + listWidth:75, allowBlank : true, editable : false, value:currentScanMode, @@ -684,27 +715,48 @@ //alert(record.get("scanModeCode")); currentScanMode = record.get("scanModeCode"); } - }, - anchor : '90%' + }//,anchor : '90%' } ] },{ columnWidth : 0.5, layout : 'form', items : [{ - xtype : 'textfield', - id : 'barcode', - name : 'barcode', - fieldLabel : barcodeLable, - width:65, -// lableWidth:10, - enableKeyEvents : true, - listeners : { - render : function(c) { - c.getEl().on('keypress',keypressBeginBarcodeCallBack); - } - } - }] + layout: 'column', + items:[{ + columnWidth : 0.75, + layout : 'form', + items:[{ + xtype : 'textfield', + id : 'barcode', + name : 'barcode', + fieldLabel : barcodeLable, + width:75, + // lableWidth:10, + enableKeyEvents : true, + listeners : { + render : function(c) { + c.getEl().on('keypress',keypressBeginBarcodeCallBack); + } + } + }] + }, + { + columnWidth : 0.25, + layout : 'form', + items:[{ + xtype : 'button', + text : '刷新', + iconCls : 'btn_ext_refresh1', + handler : function (){ + window.location.reload(true); + //window.location.href = WWWROOT + '/disinfectsystem/sterilizationmanager/sterilizationrecord/sterilizationLoadingView.jsp'; + } + }] + } + ]} + ] + },{ columnWidth : 0.5, layout : 'form', @@ -714,7 +766,7 @@ id : 'barcodeEnd', name : 'barcodeEnd', fieldLabel : '条码(尾)', - width:65, + width:75, // lableWidth:10, enableKeyEvents : true, listeners : { @@ -730,7 +782,7 @@ xtype : 'textfield', id : 'basketName', name : 'basketName', - width:65, + width:75, // lableWidth:10, fieldLabel : '篮筐名称', readOnly : true Index: ssts-sterile/src/main/java/com/forgon/disinfectsystem/sterilizationmanager/sterileloading/dwr/table/SterileLoadingTableManager.java =================================================================== diff -u -r14309 -r15026 --- ssts-sterile/src/main/java/com/forgon/disinfectsystem/sterilizationmanager/sterileloading/dwr/table/SterileLoadingTableManager.java (.../SterileLoadingTableManager.java) (revision 14309) +++ ssts-sterile/src/main/java/com/forgon/disinfectsystem/sterilizationmanager/sterileloading/dwr/table/SterileLoadingTableManager.java (.../SterileLoadingTableManager.java) (revision 15026) @@ -42,7 +42,14 @@ this.tousseInstanceManager = tousseInstanceManager; } - public String getResultJsonStrByBarcode(String barcodes,JSONObject extraParam){ + /** + * 灭菌装载的条码扫描(灭菌筐条码、器械包实例条码、虚拟篮筐条码、器械包实例条码段、虚拟篮筐条码段等)调用的方法 + * @param barcodes 灭菌筐条码、器械包实例条码、虚拟篮筐条码、器械包实例条码段、虚拟篮筐条码段等.条码段的中间用逗号分隔 + * @param extraParam 已入筐的条码json参数,格式:{scannedBarcodes:['器械包条码1','器械包条码2'...,'器械包条码3']} + * @param basketBarcode 灭菌筐条码(只在扫描器械包条码时,才根据此参数判断) + * @return json字符串 {returnType:'',status:''...} + */ + public String getResultJsonStrByBarcode(String barcodes,JSONObject extraParam , String basketBarcode){ JSONObject json = new JSONObject(); JSONUtil.addProperty(json, "returnType", "basketNotFound"); if(StringUtils.isBlank(barcodes)){ @@ -67,12 +74,37 @@ .getCurrentOrgUnitCode(); if(barcodeDevice instanceof Container){ Container container = (Container)barcodeDevice; + //判断灭菌筐是否为灭菌中,如果为灭菌中则提示灭菌中的篮筐不能进行灭菌装载 + if(Container.CONTAINER_STATUS_STERILIZING.equals(container.getStatus())){ + JSONUtil.addProperty(json, "returnType", "containerSterilizing"); + return json.toString(); + } + //判断篮筐中是否有未发货(已灭菌)的器械包,如果有则进行提示 + if(CollectionUtils.isNotEmpty(tousseInstanceManager.getTousseInstanceBySql("where po.status='" + TousseInstance.STATUS_STERILED + + "' and po.reviewBasket_id in (select id from ReviewedBasket where container.id='" + container.getId() + "'))"))){ + JSONUtil.addProperty(json, "returnType", "scanBasketFoundNotDeliverTousseInContainer");//扫描篮筐时发现有未发货的器械包 + JSONUtil.addProperty(json, "containerName", container.getContainerName()); + JSONUtil.addProperty(json, "basketBarcode", container.getBarcode()); + return JSONUtil.addProperty(json, "containerType", container.getPurpose()).toString(); + } + //判断是否为虚拟篮筐 if(container.isVirtualBasket()){ tousseInstanceManager.getVirtualBasketTousse(json, barcode, barcodeEnd); return json.toString(); } return barcodeManager.getContainerResult(json, barcode, barcodeEnd, container); }else if(barcodeDevice instanceof TousseInstance){ + //根据灭菌条码条码判断灭菌筐的状态 + if(StringUtils.isNotBlank(basketBarcode)){ + BarcodeDevice basketBarcodeDevice = barcodeManager.getBarcodeByBarcode(basketBarcode); + Container container = (Container)basketBarcodeDevice; + + //判断灭菌筐是否为灭菌中,如果为灭菌中则提示灭菌中的篮筐不能进行灭菌装载 + if(Container.CONTAINER_STATUS_STERILIZING.equals(container.getStatus())){ + JSONUtil.addProperty(json, "returnType", "containerSterilizing"); + return json.toString(); + } + } TousseInstance tousseInstance = (TousseInstance)barcodeDevice; String status = tousseInstance.getStatus();