Index: ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/service/RecyclingRecordManagerImpl.java =================================================================== diff -u -r13853 -r13857 --- ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/service/RecyclingRecordManagerImpl.java (.../RecyclingRecordManagerImpl.java) (revision 13853) +++ ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/service/RecyclingRecordManagerImpl.java (.../RecyclingRecordManagerImpl.java) (revision 13857) @@ -1625,149 +1625,7 @@ return deleteRecord; } - /*** - * 加载回收报损 - */ - @Override - public List loadDepartRecyclingDamage(InvoicePlan invoicePlan) { - Map map = new HashMap(); - List tousseItemList = null; - if (invoicePlan instanceof RecyclingApplication) { - RecyclingApplication recyclingApplication = (RecyclingApplication) invoicePlan; - String recyclingappID = "" + recyclingApplication.getId(); - RecyclingRecord recyclingRecord = getByRecyclingApplicationId(recyclingappID); - if (recyclingRecord != null) { - tousseItemList = recyclingRecord.getItems(); - } - } - if (tousseItemList != null && tousseItemList.size() > 0) { - for (TousseItem tousseItem : tousseItemList) { - String materialName = null; - List damages = tousseItem - .getRecyclingDamages(); - if (damages != null && damages.size() > 0) { - for (RecyclingDamageItem item : damages) { - materialName = item.getMaterialName(); - Integer amount = item.getAmount(); - if (map.get(materialName) == null) { - map.put(materialName, amount); - } else { - map.put(materialName, - amount + map.get(materialName)); - } - } - } - } - } - List recyclingDamageList = new ArrayList(); - Iterator iterator = map.keySet().iterator(); - while (iterator.hasNext()) { - String materialName = iterator.next(); - if (!StringUtils.equals(MaterialInstance.MATERIAL_NAME_IDCARD, materialName)) { - String tempMaterialName = materialName; - String specification = null; - if (materialName.lastIndexOf("[") >= 0) { - String str = materialName; - materialName = materialName.substring(0, - materialName.lastIndexOf("[")); - specification = str.substring(str.lastIndexOf("[") + 1, - str.length() - 1); - } - MaterialDefinition materialDefinition = materialDefinitionManager - .getMaterialDefinitionByName(materialName, - specification); - Double cost = materialDefinition.getCost(); - if (cost == null) { - cost = 0.00; - } - GridDataVo recyclingError = new GridDataVo(); - recyclingError.setGoodsName(tempMaterialName); - recyclingError.setCount(map.get(tempMaterialName)); - recyclingError.setPrice(cost); - recyclingDamageList.add(recyclingError); - } - } - return recyclingDamageList; - } - /** - * 加载科室回收误差 - */ - public List loadDepartRecyclingError(InvoicePlan invoicePlan) { - if (invoicePlan.getInvoice() != null - && invoicePlan.getInvoice().size() > 0) { - return null; - } - Map map = new HashMap(); - List tousseItemList = null; - if (invoicePlan instanceof RecyclingApplication) { - RecyclingApplication application = (RecyclingApplication) invoicePlan; - RecyclingRecord recyclingRecord = application.getRecyclingRecord(objectDao); - if (recyclingRecord != null) { - tousseItemList = recyclingRecord.getItems(); - } - } - if (tousseItemList != null) { - for (TousseItem tousseItem : tousseItemList) { - List recyclingErrorArray = tousseItem - .getRecyclingErrors(); - for (RecyclingError recyclingError : recyclingErrorArray) { - if (RecyclingError.ERRORTYPE_REDUCE.equals(recyclingError - .getErrorType())) { - String materialName = recyclingError.getMaterialName(); - Integer amount = recyclingError.getAmount(); - if (map.get(materialName) == null) { - map.put(materialName, amount); - } else { - map.put(materialName, - amount + map.get(materialName)); - } - } - - } - } - } - - List recyclingErrorList = new ArrayList(); - Iterator iterator = map.keySet().iterator(); - while (iterator.hasNext()) { - String materialName = iterator.next(); - if (!StringUtils.equals(MaterialInstance.MATERIAL_NAME_IDCARD, materialName)) { - String tempMaterialName = materialName; - String specification = null; - if (materialName.lastIndexOf("[") >= 0) { - String str = materialName; - materialName = materialName.substring(0, - materialName.lastIndexOf("[")); - specification = str.substring(str.lastIndexOf("[") + 1, - str.length() - 1); - } - MaterialDefinition materialDefinition = materialDefinitionManager - .getMaterialDefinitionByName(materialName, - specification); - Double cost = materialDefinition.getCost(); - GridDataVo recyclingError = new GridDataVo(); - recyclingError.setGoodsName(tempMaterialName); - recyclingError.setCount(map.get(tempMaterialName)); - recyclingError.setPrice(cost); - recyclingErrorList.add(recyclingError); - } else { - Double idCardPrice = supplyRoomConfigManager - .getSystemParamsObj().getIdCardPrice(); - if (idCardPrice != null && idCardPrice > 0.0) { - GridDataVo recyclingError = new GridDataVo(); - recyclingError.setGoodsName(MaterialInstance.MATERIAL_NAME_IDCARD); - recyclingError.setCount(map.get(MaterialInstance.MATERIAL_NAME_IDCARD)); - recyclingError.setPrice(idCardPrice); - recyclingErrorList.add(recyclingError); - } - } - } - return recyclingErrorList; - } - - - /** * @param { tousseName:'胸腔穿刺包', Index: ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedForm.js =================================================================== diff -u -r13856 -r13857 --- ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedForm.js (.../invoicePlanExtractedForm.js) (revision 13856) +++ ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedForm.js (.../invoicePlanExtractedForm.js) (revision 13857) @@ -1,7 +1,5 @@ var sendOutGoodsStore; var recyclingapplicationStore; -var recyclingErrorStore; - //定义首篮筐的label变量 var beginBarcodeLabel = '扫描条码:'; var hiddenEndBarcode = true;//隐藏尾篮筐 @@ -604,23 +602,6 @@ } }); - //回收误差 - recyclingErrorStore = new Ext.data.Store({ - proxy : new Ext.data.HttpProxy({ - url : WWWROOT + '/disinfectSystem/recyclingRecordAction!loadRecyclingRecordError.do', - method : 'POST' - }), - reader : new Ext.data.JsonReader({ - root: 'data', - fields : [ - {name : 'id'}, - {name : 'goodsName'}, - {name : 'count'}, - {name : 'price'} - ] - }) - }); - recyclingapplicationStore.removeAll(); recyclingapplicationStore.on("beforeload", function(thiz, options) { thiz.baseParams["orgUnitCoding"] = orgUnitCoding; @@ -630,11 +611,6 @@ }); recyclingapplicationStore.load(); - recyclingErrorStore.removeAll(); - recyclingErrorStore.on("beforeload", function(thiz, options) { - thiz.baseParams["orgUnitCoding"] = orgUnitCoding; - }); - recyclingErrorStore.load(); sendOutGoodsStore.removeAll(); sendOutGoodsStore.on("beforeload", function(thiz, options) { thiz.baseParams["orgUnitCoding"] = orgUnitCoding; @@ -717,7 +693,7 @@ autoHeight : true, items : [{ layout : 'column', - columnWidth :.57, + columnWidth :1, items:[{ xtype : 'hidden', name : 'id', @@ -776,8 +752,8 @@ id : 'warehouseName' },{ layout : 'form', - labelWidth :90, - columnWidth :.5, + labelWidth :70, + columnWidth :.33, items : [{ xtype : 'textfield', fieldLabel : '申请科室', @@ -793,7 +769,7 @@ },{ layout : 'form', labelWidth :70, - columnWidth :.5, + columnWidth :.67, items : [{ xtype : 'textfield', fieldLabel : '发货员', @@ -808,8 +784,8 @@ }] },{ layout : 'form', - labelWidth :90, - columnWidth :.5, + labelWidth :70, + columnWidth :.33, items : [{ xtype : 'textfield', fieldLabel : '核对员条码', @@ -844,7 +820,7 @@ },{ layout : 'form', labelWidth :70, - columnWidth :.5, + columnWidth :.33, items : [{ xtype : 'textfield', fieldLabel : '核对员', @@ -859,7 +835,7 @@ },{ layout : 'form', labelWidth :90, - columnWidth :.5, + columnWidth :.33, items : [{ xtype : 'textfield', fieldLabel : '下送责任人条码', @@ -894,7 +870,7 @@ },{ layout : 'form', labelWidth :70, - columnWidth :.5, + columnWidth :.33, items : [{ xtype : 'textfield', fieldLabel : '下送责任人', @@ -907,8 +883,8 @@ }] },{ layout : 'form', - labelWidth :90, - columnWidth :.5, + labelWidth :70, + columnWidth :.33, items : [{ xtype : 'datefieldWithMin', fieldLabel : '发货时间', @@ -923,7 +899,8 @@ },{ columnWidth : .5, layout : 'form', - labelWidth : 70, + labelWidth : 90, + columnWidth :.33, items:[{ xtype : 'combo', fieldLabel : '仓库', @@ -957,40 +934,18 @@ },{ layout : 'form', columnWidth : 1, - labelWidth :90, + labelWidth :70, items : [{ xtype : 'textfield', fieldLabel : '备注', id : 'remark2', name : 'remark', - anchor : '99.5%', - height : 64, + anchor : '98.5%', + height : 40, readOnly:true }] }] - },{ - layout : 'form', - columnWidth : 0.43, - items:[new top.Ext.grid.EditorGridPanel({ - id : 'recyclingError', - title : '丢失材料明细', - store : recyclingErrorStore, - cm : recyclingErrorCm, - enableHdMenu : false, - width : 400, - height : 135, - autoExpandColumn : 'price', - frame : false, - bodyStyle : 'border:1px solid #afd7af', - viewConfig: { - forceFit:true - }, - clicksToEdit:1, - selModel : new top.Ext.grid.RowSelectionModel({ - singleSelect : false - }) - })] - }] + }] },{ layout:'column', items:[{ @@ -1003,7 +958,7 @@ columnWidth : 0.5, cm : cm, width : 560, - height : 385, + height : 425, autoExpandColumn : 'deleteItem', enableHdMenu : false, frame : false, @@ -1144,7 +1099,7 @@ cm : recyclingapplicationCm, enableHdMenu : false, width : 423, - height :385, + height :425, loadMask : true, tbar:[{ text:'申请单:' Index: ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/service/RecyclingRecordManager.java =================================================================== diff -u -r13493 -r13857 --- ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/service/RecyclingRecordManager.java (.../RecyclingRecordManager.java) (revision 13493) +++ ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/service/RecyclingRecordManager.java (.../RecyclingRecordManager.java) (revision 13857) @@ -33,9 +33,5 @@ Map getRecyclingRecordDepartAndCodeById(String id); - public List loadDepartRecyclingDamage(InvoicePlan invoicePlan); - - public List loadDepartRecyclingError(InvoicePlan invoicePlan); - public String getTousseIntoBasketAmount(String params); } Index: ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/action/RecyclingRecordAction.java =================================================================== diff -u -r13853 -r13857 --- ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/action/RecyclingRecordAction.java (.../RecyclingRecordAction.java) (revision 13853) +++ ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/action/RecyclingRecordAction.java (.../RecyclingRecordAction.java) (revision 13857) @@ -1765,43 +1765,6 @@ departTousseMap.put(depart, tdMap); } - /** - * 获取科室所有回收误差 - */ - public void loadRecyclingRecordError() { - String orgUnitCoding = StrutsParamUtils.getPraramValue("orgUnitCoding", - ""); - List list = invoicePlanManager - .getInvoicePlanByOrgUnitCoding(orgUnitCoding); - List departRecyclingError = new ArrayList(); - for (InvoicePlan invoicePlan : list) { - List recyclingErrors = recyclingRecordManager - .loadDepartRecyclingError(invoicePlan); - if (recyclingErrors != null) { - departRecyclingError.addAll(recyclingErrors); - } - List recyclingDamages = recyclingRecordManager - .loadDepartRecyclingDamage(invoicePlan); - if (recyclingDamages != null) { - departRecyclingError.addAll(recyclingDamages); - } - } - JsonConfig config = new JsonConfig(); - PropertyFilter propertyFilter = new JsonPropertyFilter(new String[] {}); - config.setJsonPropertyFilter(propertyFilter); - Map map = new HashMap(); - map.put("success", true); - map.put("data", departRecyclingError); - JSONObject jsonObject = JSONObject.fromObject(map, config); - try { - StrutsParamUtils.getResponse().setCharacterEncoding("UTF-8"); - StrutsParamUtils.getResponse().getWriter() - .println(jsonObject.toString()); - } catch (Exception e) { - e.printStackTrace(); - } - } - public void loadUnCleanedEntirelyMaterial(){ String data = StrutsParamUtils.getPraramValue("data", null); JSONArray result = new JSONArray(); Index: ssts-invoice/src/main/java/com/forgon/disinfectsystem/invoicemanager/service/InvoiceManagerImpl.java =================================================================== diff -u -r13855 -r13857 --- ssts-invoice/src/main/java/com/forgon/disinfectsystem/invoicemanager/service/InvoiceManagerImpl.java (.../InvoiceManagerImpl.java) (revision 13855) +++ ssts-invoice/src/main/java/com/forgon/disinfectsystem/invoicemanager/service/InvoiceManagerImpl.java (.../InvoiceManagerImpl.java) (revision 13857) @@ -2002,41 +2002,6 @@ invoice.setStatus(Invoice.STATUS_DELIVERED); invoice.setOrgUnitCoding(AcegiHelper.getLoginUser() .getCurrentOrgUnitCode()); - // 是否有回收误差(非一次性物品) - if (!invoicePlanType - .equals(InvoicePlan.TYPE_DIPOSABLE_GOODS_APPLICATION_FORM)) { - List lostMaterialItems = invoicePlanManager.getLostMaterialItems(invoicePlan); - invoice.setLostMaterialItems(lostMaterialItems); - // 回收记录有回收误差 - if (lostMaterialItems != null && lostMaterialItems.size() > 0) { - // 是否发货单已经加上了此误差金额 - // 把回收误差金额记到当前发货单上 - for (LostMaterialItem vo : lostMaterialItems) { - // 统计总价 - totalPrice = totalPrice.add( - new BigDecimal(vo.getTotalPrice())).setScale(4, - BigDecimal.ROUND_HALF_UP); - } - } - List recyclingDamageList = recyclingRecordManager.loadDepartRecyclingDamage(invoicePlan); - // 回收记录是否有器械报损 - if (recyclingDamageList != null && recyclingDamageList.size() > 0) { - // 是否发货单已经加上了此误差金额 - List invoiceList = invoicePlan.getInvoice(); - if (invoiceList == null || invoiceList.size() == 0) { - // 把回收误差金额记到当前发货单上 - for (GridDataVo vo : recyclingDamageList) { - BigDecimal itemPrice = new BigDecimal(vo.getCount()) - .multiply(new BigDecimal(vo.getPrice())) - .setScale(4, BigDecimal.ROUND_HALF_UP); - - // 统计总价 - totalPrice = totalPrice.add(itemPrice).setScale(4, - BigDecimal.ROUND_HALF_UP); - } - } - } - } // 发货物品总价 invoice.setTotalPrice(totalPrice.doubleValue()); // 工作量统计