Index: ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/dwr/table/RecyclingApplicationTableManager.java =================================================================== diff -u -r16316 -r16319 --- ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/dwr/table/RecyclingApplicationTableManager.java (.../RecyclingApplicationTableManager.java) (revision 16316) +++ ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/dwr/table/RecyclingApplicationTableManager.java (.../RecyclingApplicationTableManager.java) (revision 16319) @@ -1231,11 +1231,18 @@ JSONObject sheet = new JSONObject(); sheet.put("name", tg.getTousseGroupName()); JSONArray tousseTypes = new JSONArray(); - JSONObject tt = new JSONObject(); - tt.put("type", "器械包"); - tt.put("tousseGroupName", tg.getTousseGroupName()); - tt.put("tousseGroupID", tg.getId()); - tousseTypes.add(tt); + JSONObject tousseType = new JSONObject(); + tousseType.put("type", "器械包"); + tousseType.put("tousseGroupName", tg.getTousseGroupName()); + tousseType.put("tousseGroupID", tg.getId()); + tousseTypes.add(tousseType); + + JSONObject disinfectType = new JSONObject(); + disinfectType.put("type", "消毒物品"); + disinfectType.put("tousseGroupName", tg.getTousseGroupName()); + disinfectType.put("tousseGroupID", tg.getId()); + tousseTypes.add(disinfectType); + sheet.put("tousseTypes", tousseTypes); sheets.add(sheet); } Index: ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsTemplateApplicationView.js =================================================================== diff -u -r16316 -r16319 --- ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsTemplateApplicationView.js (.../goodsTemplateApplicationView.js) (revision 16316) +++ ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsTemplateApplicationView.js (.../goodsTemplateApplicationView.js) (revision 16319) @@ -3741,7 +3741,7 @@ return; } if (ids != null && ids != false){ - top.Ext.MessageBox.confirm("请确认", "要打印所选申请单的全部物品吗?", + top.Ext.MessageBox.confirm("请确认", "要打印所选申请单的物品吗?", function(btn) { if (btn == 'yes') { //通过json stringify和parse克隆js对象 Index: ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/service/RecyclingApplicationManagerImpl.java =================================================================== diff -u -r16316 -r16319 --- ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/service/RecyclingApplicationManagerImpl.java (.../RecyclingApplicationManagerImpl.java) (revision 16316) +++ ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/service/RecyclingApplicationManagerImpl.java (.../RecyclingApplicationManagerImpl.java) (revision 16319) @@ -1600,6 +1600,7 @@ String type = groupType.optString("type"); String tousseGroupName = groupType.optString("tousseGroupName"); + Long tousseGroupId = groupType.optLong("tousseGroupID"); // 器械包(含自定义器械包和敷料包)// TODO:自定义器械包没有分组的定义,如何处理? if (isNormalTousseOrForeignTousse(type)) { @@ -1636,7 +1637,9 @@ } // 消毒物品 else if (TousseDefinition.PACKAGE_TYPE_DISINFECTION.equals(type)){ - + //消毒物品也要支持分组 + MultiValueMap tousseMap = new MultiValueMap(); + Collection col = CollectionUtils.select( allTousseItems, new Predicate() { @Override @@ -1649,9 +1652,29 @@ } } }); - - map.put(groupType, collection2MultiValueMap(col)); - + for(TousseItem item : col){ + String tousseType = item.getTousseType(); + Long applicationId = 0L; + InvoicePlan invoicePlan = item.getInvoicePlan(); + if (invoicePlan != null){ + applicationId = invoicePlan.getId(); + } + + if (tousseGroupId == null || tousseGroupId.longValue() == 0L){ + tousseMap.put(applicationId, item); + } + else { + // 获取该TousseItem的分组定义,此处有多次查询,需要优化性能 + TousseDefinition td = tousseDefinitionManager.getTousseDefinitionByNameAndTousseType(item.getTousseName(), tousseType); + + if (td != null){ + if (StringUtils.equals(tousseGroupName, td.getTousseGroupName())){ + tousseMap.put(applicationId, item); + } + } + } + } + map.put(groupType, tousseMap); } // 一次性物品 else if (TousseItem.TYPE_DIPOSABLE_GOODS.equals(type)){