Index: ssts-web/src/main/webapp/disinfectsystem/assestManagement/godownEntry/godownEntryView.js =================================================================== diff -u -r41349 -r41352 --- ssts-web/src/main/webapp/disinfectsystem/assestManagement/godownEntry/godownEntryView.js (.../godownEntryView.js) (revision 41349) +++ ssts-web/src/main/webapp/disinfectsystem/assestManagement/godownEntry/godownEntryView.js (.../godownEntryView.js) (revision 41352) @@ -640,8 +640,16 @@ if(targetData){ top.Ext.getCmp('name1').setValue(targetData.name); top.Ext.getCmp('disposableGoodsID').setValue(targetData.id); - top.Ext.getCmp('cost1').setValue(info.price); top.Ext.getCmp('hiddenItems').setValue(JSON.stringify(targetData)); + if(!isUndefinedOrNullOrEmpty(info.price)){ + top.Ext.getCmp('cost1').setValue(info.price); + } + if(!isUndefinedOrNullOrEmpty(info.supplierName)){ + top.Ext.getCmp('supplier1').setValue(info.supplierName); + } + if(!isUndefinedOrNullOrEmpty(info.certification)){ + top.Ext.getCmp('certification1').setValue(info.certification); + } }else{ showResult('输入的条码无效!'); } @@ -654,7 +662,7 @@ showResult('输入的条码无效!'); } }else{ - showResult('输入的条码无效!'); + showResult('输入的条码无效!'); } }else{ showResult('输入的条码无效!'); Index: ssts-diposablegoods/src/main/java/com/forgon/disinfectsystem/diposablegoods/service/GodownEntryManagerImpl.java =================================================================== diff -u -r40302 -r41352 --- ssts-diposablegoods/src/main/java/com/forgon/disinfectsystem/diposablegoods/service/GodownEntryManagerImpl.java (.../GodownEntryManagerImpl.java) (revision 40302) +++ ssts-diposablegoods/src/main/java/com/forgon/disinfectsystem/diposablegoods/service/GodownEntryManagerImpl.java (.../GodownEntryManagerImpl.java) (revision 41352) @@ -2904,12 +2904,37 @@ if(barcodeDevice instanceof BarcodeInformation){// 高值耗材处理 json.put("barcodeType", BarcodeDevice.BARCODE_TYPE_BARCODEINFORMATION); json.put("barcodeInformation", barcodeDevice); + JSONObject information = buildBarcodeInformationDisposableGoodsJson((BarcodeInformation)barcodeDevice); + if(information != null){ + json.optJSONObject("barcodeInformation").put("information", information); + } }else{ throw new RuntimeException("不支持的条码类型!"); } } return json; } + + /** + * 查询“条码信息”关联的一次性物品定义信息 + * @param barcodeInformation “条码信息” + * @return “条码信息”关联的一次性物品定义信息 + */ + private JSONObject buildBarcodeInformationDisposableGoodsJson(BarcodeInformation barcodeInformation) { + String information = barcodeInformation.getInformation(); + if(StringUtils.isBlank(information)){ + return null; + } + JSONObject informationJson = JSONObject.fromObject(information); + Long disposableGoodsId = informationJson.optLong("disposableGoodsId"); + DisposableGoods disposableGoods = diposableGoodsManager.get(disposableGoodsId); + if(disposableGoods != null){ + informationJson.put("batchAndExpDateAllowBlank", disposableGoods.getBatchAndExpDateAllowBlank()); + informationJson.put("disposableGoodsName", disposableGoods.getName()); + informationJson.put("showName", disposableGoods.getShowName()); + } + return informationJson; + } @Override public void addItemToGodownEntry(GodownEntry entry, JSONObject itemObject) {