Index: ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/service/RecyclingRecordManagerImpl.java =================================================================== diff -u -r25827 -r25845 --- ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/service/RecyclingRecordManagerImpl.java (.../RecyclingRecordManagerImpl.java) (revision 25827) +++ ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/service/RecyclingRecordManagerImpl.java (.../RecyclingRecordManagerImpl.java) (revision 25845) @@ -2391,6 +2391,9 @@ String tousseName = urgentTousseItem.getTousseName(); Long tousseDefinitionID = urgentTousseItem.getTousseDefinitionID(); Integer urgentAmount = urgentTousseItem.getUrgentAmount(); + if (urgentAmount == null){ + urgentAmount = 0; + } if(!DatabaseUtil.isPoIdValid(tousseDefinitionID)){ throw new RuntimeException("加急物品参数错误!"); } @@ -2956,7 +2959,12 @@ //验证器械包处理科室 List vos = new ArrayList(); for (TousseItem item : tousseItems) { - if(item.getRecyclingAmount() == null || item.getRecyclingAmount() == 0){ + + // 回收数量为空或者0,并且清点数量为空或者0 + Integer recyclingAmount = item.getRecyclingAmount(); + Integer tallyAmount = item.getTallyAmount(); + + if((recyclingAmount == null || recyclingAmount == 0) && (tallyAmount == null || tallyAmount == 0)){ continue; } TousseItemVo vo = new TousseItemVo(); @@ -3030,6 +3038,9 @@ String tousseName = urgentTousseItem.getTousseName(); Long tousseDefinitionID = urgentTousseItem.getTousseDefinitionID(); Integer urgentAmount = urgentTousseItem.getUrgentAmount(); + if (urgentAmount == null){ + urgentAmount = 0; + } if(!DatabaseUtil.isPoIdValid(tousseDefinitionID)){ throw new RuntimeException("加急物品参数错误!"); } @@ -3066,6 +3077,9 @@ String tousseName = urgentTousseItem.getTousseName(); Long tousseDefinitionID = urgentTousseItem.getTousseDefinitionID(); Integer urgentAmount = urgentTousseItem.getUrgentAmount(); + if (urgentAmount == null){ + urgentAmount = 0; + } if(!DatabaseUtil.isPoIdValid(tousseDefinitionID)){ throw new RuntimeException("加急物品参数错误!"); } @@ -3205,6 +3219,7 @@ application.setHandleDepart(AcegiHelper.getCurrentOrgUnitName()); application.setHandleDepartCoding(AcegiHelper.getCurrentOrgUnitCode()); application.setRecyclingTime(recyclingRecord.getRecyclingTime()); + application.setIncludeRecyclingItems(InvoicePlan.SIGNED_TRUE); recyclingApplicationManager.saveOrUpdate(application); return application; } @@ -4709,6 +4724,15 @@ return json; } + /** + * 获取 TousseItem所包含的材料 + * 如下两种情况下忽略该TousseItem: + * 1、TousseItem为包含标识牌的器械包,不返回该包 + * 2、TousseItem已经入筐 + * + * @param tousseItem 申请或回收的物品,即器械包 + * @return 包内的材料清单 + */ private JSONArray getTousseItemMaterial(TousseItem tousseItem){ Long tousseIdLong = tousseItem.getTousseDefinitionId(); String tousseId = null; @@ -4717,9 +4741,19 @@ } Integer recycleAmount = tousseItem.getTallyAmount(); String idCardBarcode = null;// 标识牌暂不考虑,必须清点的时候入筐 + + // 如果器械包是有标识牌的,不进行处理 + if ("是".equals(tousseItem.getIsThereIdentificationCard())){ + return null; + } + if(recycleAmount == 0){ return null; } + + // TODO:如果该器械包已经入筐,则不返回到前台。需要找判断是否已经入筐的方法 + + TousseDefinition td = tousseDefinitionManager.get(tousseId); if(td == null){ return null; @@ -4737,7 +4771,7 @@ JSONObject obj = new JSONObject(); obj.put("materialDefinitionId", md.getId()); obj.put("materialName", materialName); - obj.put("amount", amount * recycleAmount); + obj.put("amount", amount); obj.put("washClassifyType",materialInstanceManager.getMaterialWashClassifyType(mi)); obj.put("materialInstanceId", mi.getId()); obj.put("tousseName", td.getName()); @@ -4753,7 +4787,7 @@ return materialItem; } /** - * 获取所有已清点的材料. + * 获取所有已清点的材料,来自状态处于已清点的申请单或者回收单 * @return */ public String loadAllTalliedMaterials(){ @@ -4765,6 +4799,7 @@ InvoicePlan.RECYCLINGSTATUS_TALLIED); List list = objectDao.findByHql(hql); if (list != null) { + // 遍历回收单 for (RecyclingRecord recyclingRecord : list) { JSONObject recyclingRecordObj = new JSONObject(); InvoicePlan recyclingApplication = recyclingRecord.getRecyclingApplication(); @@ -4776,6 +4811,7 @@ continue; } JSONArray tousses = new JSONArray(); + // 遍历回收单上的每种物品 for (TousseItem tousseItem : applicationItems) { JSONObject tousseObj = new JSONObject(); JSONArray materialItem = getTousseItemMaterial(tousseItem); Index: ssts-basedata/src/main/java/com/forgon/disinfectsystem/common/CssdUtils.java =================================================================== diff -u -r25833 -r25845 --- ssts-basedata/src/main/java/com/forgon/disinfectsystem/common/CssdUtils.java (.../CssdUtils.java) (revision 25833) +++ ssts-basedata/src/main/java/com/forgon/disinfectsystem/common/CssdUtils.java (.../CssdUtils.java) (revision 25845) @@ -509,7 +509,13 @@ appAmount = tousseItem.getRecyclingAmount(); // 回收数量为空,即还没有回收 或 不回收 if (appAmount == null) { - appAmount = tousseItem.getAmount(); + + // 判断是否已经做了清点,如果已经清点,则采用清点数量作为发货的依据 + appAmount = tousseItem.getTallyAmount(); + if (appAmount == null){ + // 如果既没有回收,也没有清点,则采用申请数量 + appAmount = tousseItem.getAmount(); + } } } else { // 发货数量的依据为申请数量 Index: ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/expressIntoBasket.js =================================================================== diff -u -r25837 -r25845 --- ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/expressIntoBasket.js (.../expressIntoBasket.js) (revision 25837) +++ ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/expressIntoBasket.js (.../expressIntoBasket.js) (revision 25845) @@ -1757,10 +1757,10 @@ $('#tousseItemTable').children().first().children().each(function(row,element){ if($('#deleted'+row).val() == '0'){ var amount = parseInt($('#recycleAmount'+row).val(),10) - parseInt($('#loadedAmount'+row).val(),10); - if(parseInt($('#recycleAmount'+row).val(),10) > parseInt($('#applicationQuantity'+row).val(),10)){ - alertDiv("回收数量大于申请数量,不能进行入筐操作"); - return false; - } +// if(parseInt($('#recycleAmount'+row).val(),10) > parseInt($('#applicationQuantity'+row).val(),10)){ +// alertDiv("回收数量大于申请数量,不能进行入筐操作"); +// return false; +// } if(amount > 0){ putMaterialInBasket(row,true); } Index: ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/expressIntoBasket.jsp =================================================================== diff -u -r25836 -r25845 --- ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/expressIntoBasket.jsp (.../expressIntoBasket.jsp) (revision 25836) +++ ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/expressIntoBasket.jsp (.../expressIntoBasket.jsp) (revision 25845) @@ -171,47 +171,62 @@