Index: ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/service/RecyclingRecordManagerImpl.java =================================================================== diff -u -r13840 -r13853 --- ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/service/RecyclingRecordManagerImpl.java (.../RecyclingRecordManagerImpl.java) (revision 13840) +++ ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/service/RecyclingRecordManagerImpl.java (.../RecyclingRecordManagerImpl.java) (revision 13853) @@ -1,5 +1,6 @@ package com.forgon.disinfectsystem.recyclingrecord.service; +import java.math.BigDecimal; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; @@ -407,6 +408,7 @@ throw new RuntimeException("丢失器械未找到相应的器械包"); } error.setTousseItemId(tousseItem.getId()); + error.setTousseName(tousseItem.getTousseName()); tousseItem.getRecyclingErrors().add(error); } error.setAmount(amount); @@ -1820,7 +1822,11 @@ } } if(intoBasketMaxAmount != null && intoBasketMaxAmount > 0){ - percentage += MathTools.divide(item.getAmount(), intoBasketMaxAmount, 4); + percentage = new BigDecimal(percentage + + MathTools.divide(item.getAmount(), + intoBasketMaxAmount, 4)) + .setScale(4, BigDecimal.ROUND_HALF_UP) + .doubleValue(); } } } @@ -1829,7 +1835,10 @@ JSONArray scanedGoods = json.optJSONArray("scanedGoods"); JSONArray scanedArray = getIntoBasketMaxAmount(scanedGoods); for(int j = 0;j ms = td.getMaterialInstances(); - Map materialMap = new HashMap(); - for (MaterialInstance mi : ms) { - MaterialDefinition md = mi.getMaterialDefinition(); - if(md != null){ - if(md.getIntoBasketMaxAmount() != null && md.getIntoBasketMaxAmount() > 0){ - materialMap.put(md, mi.getCount()); - } - } - } - for (int j = 0; j < waitLoadAmount; j++) { + //整包清洗 + if("是".equals(isCleanedEntirely)){ Integer maxAmount = td.getIntoBasketMaxAmount(); - if("是".equals(isCleanedEntirely)){ - if(maxAmount != null && maxAmount > 0){ - String barcode = barcodeMap.get(tousseName); - Double percentage = percentageMap.get(barcode); - Double newPercentage = percentage + (MathTools.divide(1,maxAmount,4)); - if(newPercentage > 1){ - break; + if(maxAmount != null && maxAmount > 0){ + String barcode = barcodeMap.get(tousseName); + if(StringUtils.isNotBlank(barcode)){ + Double usedPercentage = percentageMap.get(barcode); + if(usedPercentage != null && usedPercentage < 1){ + Double toussePercentage = MathTools.divide(1,maxAmount,4); + Integer canLoadAmount = Double.valueOf(MathTools.divide(1 - usedPercentage,toussePercentage,4)).intValue(); + if(canLoadAmount > waitLoadAmount){ + loadedAmount = waitLoadAmount; + }else{ + loadedAmount = canLoadAmount; + } } - loadedAmount++; - percentageMap.put(barcode, newPercentage); - }else{ - loadedAmount = waitLoadAmount; } }else{ - boolean pass = true; - for (MaterialDefinition md : materialMap.keySet()) { - String materialName = md.getName(); - if(StringUtils.isNotBlank(md.getSpecification())){ - materialName += "[" + md.getSpecification() + "]"; + loadedAmount = waitLoadAmount; + } + //拆包清洗 + }else{ + List ms = td.getMaterialInstances(); + Map materialMap = new HashMap(); + if(ms != null){ + for (MaterialInstance mi : ms) { + MaterialDefinition md = mi.getMaterialDefinition(); + if(md != null){ + if(md.getIntoBasketMaxAmount() != null && md.getIntoBasketMaxAmount() > 0){ + materialMap.put(md, mi.getCount()); + } } - Integer amount = materialMap.get(md); - String barcode = barcodeMap.get(materialName); - Double percentage = percentageMap.get(barcode); - Double newPercentage = percentage + (MathTools.divide(amount,md.getIntoBasketMaxAmount(),4)); - if (newPercentage > 1) { - pass = false; - break; + } + } + if(materialMap.size() > 0){ + //拆包清洗只能一个一个的添加,因为装载数量是以包为单位 + for (int j = 0; j < waitLoadAmount; j++) { + boolean pass = true; + for (MaterialDefinition md : materialMap.keySet()) { + Integer amount = materialMap.get(md); + String barcode = barcodeMap.get(CssdUtils.getMaterialName(md)); + Double percentage = percentageMap.get(barcode); + if(percentage != null){ + Double newPercentage = new BigDecimal(percentage + MathTools.divide(amount, md.getIntoBasketMaxAmount(), 4)) + .setScale(4,BigDecimal.ROUND_HALF_UP) + .doubleValue(); + if (newPercentage > 1) { + pass = false; + break; + }else{ + percentageMap.put(barcode, newPercentage); + } + } + } + if(pass){ + loadedAmount++; }else{ - percentageMap.put(barcode, newPercentage); + break; } } - if(pass){ - loadedAmount++; - }else{ - break; - } + }else{ + loadedAmount = waitLoadAmount; } } } Index: ssts-web/src/main/webapp/jasperRtp/invoiceItemsQuery_child_1.jasper =================================================================== diff -u -r13222 -r13853 Binary files differ Index: ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/expressRecycleForTouchScreen.jsp =================================================================== diff -u -r13757 -r13853 --- ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/expressRecycleForTouchScreen.jsp (.../expressRecycleForTouchScreen.jsp) (revision 13757) +++ ssts-web/src/main/webapp/disinfectsystem/touchScreen/recycle/expressRecycleForTouchScreen.jsp (.../expressRecycleForTouchScreen.jsp) (revision 13853) @@ -505,11 +505,11 @@ var materialName = json[i].materialName; var materialAmount = json[i].amount; var washClassifyType = json[i].washClassifyType; - if(washClassifyType == ""){ + /* if(washClassifyType == ""){ success = false; msg = materialName+",未定义材料分类类型!" return; - } + } */ var exist = false; var basketBarcode = ""; $("#basketsUl li").each(function(){ @@ -985,18 +985,23 @@ var tousseInstanceIds = document.getElementById('tousseInstanceIds').value; var recyclingErrors = ""; var recyclingDamage = ""; - var isSubmit = true; + var submitCheckFaildMsg = ""; $('#tousseItemTable').children().first().children().each(function(i,element){ var recycleAmount = parseInt($('#recycleAmount'+i).val(),10); var loadAmount = parseInt($('#loadedAmount'+i).val(),10); if(loadAmount > 0 && recycleAmount > loadAmount){ var depart = $('#depart'+i).val(); var showTousseName = $('#showTousseName'+i).val(); - alertDiv(depart+" 的 "+showTousseName+" 还有 "+(recycleAmount-loadAmount)+" 个未放入篮筐。"); - isSubmit = false; + submitCheckFaildMsg = (depart+" 的 "+showTousseName+" 还有 "+(recycleAmount-loadAmount)+" 个未放入篮筐。"); return false; } }); + + if(submitCheckFaildMsg != ""){ + alertDiv(submitCheckFaildMsg); + return false; + } + alertDiv("保存中,请稍候......", true); maxLen = array.length; Index: ssts-web/src/main/webapp/jasperRtp/invoiceItemsQuery_main_1.jasper =================================================================== diff -u -r13222 -r13853 Binary files differ Index: forgon-core/src/main/java/com/forgon/Constants.java =================================================================== diff -u -r13769 -r13853 --- forgon-core/src/main/java/com/forgon/Constants.java (.../Constants.java) (revision 13769) +++ forgon-core/src/main/java/com/forgon/Constants.java (.../Constants.java) (revision 13853) @@ -17,7 +17,7 @@ public final static String[] SOFTWARE_VERSION_ARRAY = new String[] { "3.3.0","3.3.8", "3.3.9", "3.3.10","3.3.12","3.3.13","3.8.0","3.9.0","3.9.1","3.9.2","4.0.2","4.0.3","4.0.4", - "4.0.5","4.0.6","4.0.44","4.0.45","4.1.0","4.1.1","4.1.2","4.1.3","4.1.4","4.1.5","4.1.6","4.1.7","4.1.8","4.1.9","4.2.0"};// 版本列表 + "4.0.5","4.0.6","4.0.44","4.0.45","4.1.0","4.1.1","4.1.2","4.1.3","4.1.4","4.1.5","4.1.6","4.1.7","4.1.8","4.1.9","4.2.0","4.2.1"};// 版本列表 public final static List SOFTWARE_VERSION_LIST = Arrays .asList(SOFTWARE_VERSION_ARRAY); public final static String SOFTWARE_VERSION = SOFTWARE_VERSION_ARRAY[SOFTWARE_VERSION_ARRAY.length - 1];// 软件最新版本 Index: ssts-web/src/main/webapp/jasperRtp/materialMissItemView.jasper =================================================================== diff -u -r12331 -r13853 Binary files differ Index: ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/action/RecyclingRecordAction.java =================================================================== diff -u -r13829 -r13853 --- ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/action/RecyclingRecordAction.java (.../RecyclingRecordAction.java) (revision 13829) +++ ssts-recyclingrecord/src/main/java/com/forgon/disinfectsystem/recyclingrecord/action/RecyclingRecordAction.java (.../RecyclingRecordAction.java) (revision 13853) @@ -401,6 +401,7 @@ recyclingRecord.setRecyclingUser(recyclingRecord .getOperator()); } + System.out.println(params.toString()); // 一条回收记录只能有一个对应的回收申请单/器械包申请单 if (recyclingRecord.getId() == null && application != null && application.getRecyclingRecord(objectDao) != null) { Index: ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/foreigntousseapplication/action/ForeignTousseApplicationAction.java =================================================================== diff -u -r13626 -r13853 --- ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/foreigntousseapplication/action/ForeignTousseApplicationAction.java (.../ForeignTousseApplicationAction.java) (revision 13626) +++ ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/foreigntousseapplication/action/ForeignTousseApplicationAction.java (.../ForeignTousseApplicationAction.java) (revision 13853) @@ -473,6 +473,14 @@ .setStatus(Container.CONTAINER_STATUS_WASHLOADING); containerManager.saveOrUpdate(container); } + + String remark = foreignTousseApplication.getRemark(); + if(StringUtils.isBlank(remark)){ + remark = barcodeStr; + }else{ + remark += ";" + barcodeStr; + } + foreignTousseApplication.setRemark(remark); } } Index: ssts-web/src/main/webapp/jasperRtp/invoiceItemsQuery_child_1.jrxml =================================================================== diff -u -r13222 -r13853 --- ssts-web/src/main/webapp/jasperRtp/invoiceItemsQuery_child_1.jrxml (.../invoiceItemsQuery_child_1.jrxml) (revision 13222) +++ ssts-web/src/main/webapp/jasperRtp/invoiceItemsQuery_child_1.jrxml (.../invoiceItemsQuery_child_1.jrxml) (revision 13853) @@ -1,5 +1,5 @@ - + @@ -59,6 +59,15 @@ + + + + + + + + + @@ -82,7 +91,7 @@ - + @@ -110,13 +119,34 @@ - - + + + + + + + + + + + + + + + + + + + + + + + Index: ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/recyclingerror/RecyclingError.java =================================================================== diff -u -r13493 -r13853 --- ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/recyclingerror/RecyclingError.java (.../RecyclingError.java) (revision 13493) +++ ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/recyclingerror/RecyclingError.java (.../RecyclingError.java) (revision 13853) @@ -72,6 +72,8 @@ private String warehouseName;//仓库名称 + private String tousseName;//材料所属器械包名称 + @Id @GeneratedValue(strategy = GenerationType.AUTO) public Long getId() { @@ -284,4 +286,12 @@ this.additionalTime = additionalTime; } + public String getTousseName() { + return tousseName; + } + + public void setTousseName(String tousseName) { + this.tousseName = tousseName; + } + } Index: ssts-web/src/main/webapp/jasperRtp/materialMissItemView.jrxml =================================================================== diff -u -r12331 -r13853 --- ssts-web/src/main/webapp/jasperRtp/materialMissItemView.jrxml (.../materialMissItemView.jrxml) (revision 12331) +++ ssts-web/src/main/webapp/jasperRtp/materialMissItemView.jrxml (.../materialMissItemView.jrxml) (revision 13853) @@ -29,13 +29,16 @@ - + + + + @@ -53,7 +56,7 @@ - + @@ -67,7 +70,7 @@ - + @@ -81,32 +84,39 @@ - + - + - + + + + + + + + - + @@ -121,7 +131,7 @@ - + @@ -136,7 +146,7 @@ - + @@ -151,7 +161,7 @@ - + @@ -166,7 +176,7 @@ - + @@ -180,6 +190,13 @@ + + + + + + + Index: ssts-basedata/src/main/java/com/forgon/disinfectsystem/common/CssdUtils.java =================================================================== diff -u -r13772 -r13853 --- ssts-basedata/src/main/java/com/forgon/disinfectsystem/common/CssdUtils.java (.../CssdUtils.java) (revision 13772) +++ ssts-basedata/src/main/java/com/forgon/disinfectsystem/common/CssdUtils.java (.../CssdUtils.java) (revision 13853) @@ -13,14 +13,10 @@ import java.util.Date; import java.util.List; import java.util.Properties; - import net.sf.json.JSONArray; import net.sf.json.JSONObject; - import org.apache.commons.lang3.StringUtils; - import com.forgon.directory.model.BarcodeDevice; -import com.forgon.disinfectsystem.basedatamanager.toussedefinition.service.TousseInstanceUtils; import com.forgon.disinfectsystem.entity.assestmanagement.DiposableGoodsInstance; import com.forgon.disinfectsystem.entity.assestmanagement.DisposableGoods; import com.forgon.disinfectsystem.entity.assestmanagement.DisposableGoodsStock; @@ -222,6 +218,40 @@ } return appAmount; } + + /** + * 获取待发货数量、不考虑是否回收后发货的情况 + * @param tousseItem + * @param invoiceOrigin + * @param isBorrowTousse + * @param objectDao + * @return + */ + public static int getWaitDeliverAmountForApply(TousseItem tousseItem, + String invoiceOrigin,boolean isBorrowTousse, ObjectDao objectDao) { + Integer appAmount = tousseItem.getAmount(); + String type = tousseItem.getTousseType(); + if (!isBorrowTousse + && (TousseDefinition.PACKAGE_TYPE_INSIDE.equals(type) + || TousseDefinition.PACKAGE_TYPE_DISINFECTION + .equals(type) || TousseDefinition.PACKAGE_TYPE_CUSTOM + .equals(type))) { + if (SupplyRoomConfig.INVOICE_ORIGIN_RECYCLING.equals(invoiceOrigin)) { + appAmount = tousseItem.getRecyclingAmount(); + // 回收数量为空,即还没有回收 或 不回收 + if (appAmount == null) { + appAmount = tousseItem.getAmount(); + } + } else { + // 发货数量的依据为申请数量 + appAmount = tousseItem.getAmount(); + } + } + if (appAmount == null) { + appAmount = 0; + } + return appAmount; + } // 过滤消毒物品的名字 public static String filterDisinfectGoodsName(String name) { Index: ssts-web/src/main/webapp/disinfectsystem/packing/packingView.jsp =================================================================== diff -u -r13718 -r13853 --- ssts-web/src/main/webapp/disinfectsystem/packing/packingView.jsp (.../packingView.jsp) (revision 13718) +++ ssts-web/src/main/webapp/disinfectsystem/packing/packingView.jsp (.../packingView.jsp) (revision 13853) @@ -56,6 +56,7 @@ + 装配管理 Index: ssts-web/src/main/webapp/dataUpdater/sqls/4.2.0_4.2.1.sql =================================================================== diff -u --- ssts-web/src/main/webapp/dataUpdater/sqls/4.2.0_4.2.1.sql (revision 0) +++ ssts-web/src/main/webapp/dataUpdater/sqls/4.2.0_4.2.1.sql (revision 13853) @@ -0,0 +1 @@ +update recyclingerror set tousseName = (select tousseName from tousseitem i where i.id = recyclingerror.tousseitem_id); \ No newline at end of file Index: ssts-web/src/main/webapp/jasperRtp/invoiceItemsQuery_main_1.jrxml =================================================================== diff -u -r13222 -r13853 --- ssts-web/src/main/webapp/jasperRtp/invoiceItemsQuery_main_1.jrxml (.../invoiceItemsQuery_main_1.jrxml) (revision 13222) +++ ssts-web/src/main/webapp/jasperRtp/invoiceItemsQuery_main_1.jrxml (.../invoiceItemsQuery_main_1.jrxml) (revision 13853) @@ -1,7 +1,7 @@ - + - +