Index: ssts-web/src/main/webapp/disinfectsystem/borrow/borrowingTousseView.js =================================================================== diff -u -r14591 -r14836 --- ssts-web/src/main/webapp/disinfectsystem/borrow/borrowingTousseView.js (.../borrowingTousseView.js) (revision 14591) +++ ssts-web/src/main/webapp/disinfectsystem/borrow/borrowingTousseView.js (.../borrowingTousseView.js) (revision 14836) @@ -181,7 +181,8 @@ {header : "流水号",width : 120,dataIndex : 'serialNumber',renderer : renderModifyFun}, {header : "申请人",width : 60,dataIndex : 'applicant'}, {header : "申请时间",width : 110,dataIndex : 'applicationTime',renderer : myDateFormatByMinute}, - {header : "类型",width : 100,dataIndex : 'type'}, + {header : "物品简要",width : 210,dataIndex : 'lendGoodsBrief'}, + {header : "类型",width : 100,dataIndex : 'type',hidden:true}, {header : "发货状态",width : 70,dataIndex : 'deliverStatus',renderer : renderColor}, {header : "归还状态",width : 70,dataIndex : 'returnStatus',renderer : renderColor2}, {header : "科室",width : 100,dataIndex : 'depart'}, @@ -224,6 +225,7 @@ {name : 'depart'}, {name : 'departCoding'}, {name : 'remark'}, + {name : 'lendGoodsBrief'}, {name : 'invoiceStatus'} ]; Index: ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/invoicemanager/InvoicePlan.java =================================================================== diff -u -r14761 -r14836 --- ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/invoicemanager/InvoicePlan.java (.../InvoicePlan.java) (revision 14761) +++ ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/invoicemanager/InvoicePlan.java (.../InvoicePlan.java) (revision 14836) @@ -1,8 +1,11 @@ package com.forgon.disinfectsystem.entity.invoicemanager; import java.text.SimpleDateFormat; +import java.util.ArrayList; import java.util.Date; +import java.util.HashMap; import java.util.List; +import java.util.Map; import javax.persistence.Column; import javax.persistence.Entity; @@ -16,6 +19,7 @@ import javax.persistence.Table; import javax.persistence.Transient; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang.StringUtils; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; @@ -180,6 +184,12 @@ private String hospitalNumber; //住院号 + /** + * 借物单的物品简要 + * 省医需要在列表显示,由于此字段不能影响过滤、查询与翻页功能,所以需要持久化到数据库,不保存数据,get方法返回item里面的物品与数量 + */ + private String lendGoodsBrief; + public final static Integer SIGNED_TRUE = 1; public final static Integer SIGNED_FALSE = 0; @@ -740,6 +750,32 @@ } return null; } + + public String getLendGoodsBrief() { + List lendGoodsBriefList = new ArrayList(); + String[] lendGoodsBriefArray = null; + if(TYPE_BORROWINGSINGLE.equals(getType()) && CollectionUtils.isNotEmpty(applicationItems)){ + Map map = new HashMap(); + for(TousseItem ti : applicationItems){ + if(map.get(ti.getTousseName()) == null){ + map.put(ti.getTousseName() , 1); + }else{ + map.put(ti.getTousseName() , map.get(ti.getTousseName()) + 1); + } + } + for(String key : map.keySet()){ + lendGoodsBriefList.add(key + "x" + map.get(key)); + } + } + lendGoodsBriefArray = new String[lendGoodsBriefList.size()]; + lendGoodsBriefList.toArray(lendGoodsBriefArray); + return StringUtils.join(lendGoodsBriefArray, ","); + } + + public void setLendGoodsBrief(String lendGoodsBrief) { + this.lendGoodsBrief = lendGoodsBrief; + } + @Transient public TousseItem findTousseItemById(Long id) { if (id == null) {