Index: ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/service/InvoicePlanManagerImpl.java =================================================================== diff -u -r15732 -r15831 --- ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/service/InvoicePlanManagerImpl.java (.../InvoicePlanManagerImpl.java) (revision 15732) +++ ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/service/InvoicePlanManagerImpl.java (.../InvoicePlanManagerImpl.java) (revision 15831) @@ -1877,7 +1877,35 @@ return true; } - private JSONObject orgUnitw2json(OrgUnit orgUnit) { + @Override + public Collection filterQueryByPara(Collection vos) { + Collection list = new LinkedList<>(); + String appFormType = StrutsParamUtils.getPraramValue("appFormType", ""); + //如果不需要过滤,appFormType就是空的 + if (StringUtils.isNotBlank(appFormType)){ + for (InvoicePlanVo vo : vos) { + //过滤申请单类型(如果以后要扩展,可以写不同的方法,在对应的方法里写过滤条件,满足条件的返回InvoicePlanVo,添加到list里,这样只需要遍历一次这个列表就足够) + InvoicePlanVo invoicePlanVo = this.filterAppFormType(vo, appFormType); + if (invoicePlanVo != null){ + list.add(invoicePlanVo); + } + } + return list; + } + return vos; + } + + /** + * 过滤申请单类型 + * @param vo + * @return + */ + private InvoicePlanVo filterAppFormType(InvoicePlanVo vo, String appFormType) { + Map map = vo.getTypeAmountMap(); + return map.containsKey(appFormType) ? vo : null; + } + + private JSONObject orgUnitw2json(OrgUnit orgUnit) { JSONObject orgUnitJSONObject = new JSONObject(); orgUnitJSONObject.put("depart", orgUnit.getName()); orgUnitJSONObject.put("departCode", orgUnit.getOrgUnitCoding()); Index: ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/service/InvoicePlanManager.java =================================================================== diff -u -r15698 -r15831 --- ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/service/InvoicePlanManager.java (.../InvoicePlanManager.java) (revision 15698) +++ ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/service/InvoicePlanManager.java (.../InvoicePlanManager.java) (revision 15831) @@ -167,4 +167,11 @@ * @return */ boolean checkIsShowNoConBorrow(String type, String confirmStatus); + + /** + * 通过循环发货计划结果来过滤对应的参数,如果以后需要再增加过滤的参数,可以通过此参数进入,然后在循环里面加上对应的过滤方法 + * @param vos 要过滤的列表 + * @return + */ + Collection filterQueryByPara(Collection vos); } Index: ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedView.js =================================================================== diff -u -r15698 -r15831 --- ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedView.js (.../invoicePlanExtractedView.js) (revision 15698) +++ ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedView.js (.../invoicePlanExtractedView.js) (revision 15831) @@ -13,6 +13,8 @@ var startDate = Ext.getCmp('startDate'); var endDate = Ext.getCmp('endDate'); + + var appFormType = Ext.getCmp('appFormType').getValue(); if (!isUndefinedOrNullOrEmpty(isSetDateValue) && isSetDateValue == true){ var dateArray = selectedApplyDate.split(';'); startDate.setValue(dateArray[0]); @@ -32,6 +34,7 @@ store.baseParams['departCode'] = Ext.getCmp('invoiceDepartGroup').getValue(); store.baseParams['applyDate'] = selectedApplyDate; store.baseParams['tousseType'] = selectedTousseType; + store.baseParams['appFormType'] = appFormType; //刷新列表界面 store.load(); // } @@ -94,6 +97,43 @@ } }); } + +/** + * 创建申请单下拉框 + * @returns {Ext.form.ComboBox|Ext4.form.ComboBox} + */ +function createAppFormCombo() { + var appFormModel = sstsConfig.appFormModel || [ + ['全部申请单', ''] + ,['一次性物品申请单', '一次性物品申请单'] + ,['器械包申请单', '器械包申请单'] + ,['消毒物品申请单', '消毒物品申请单'] + ,['外来器械包申请单', '外来器械包申请单'] + ,['自定义器械包申请单', '自定义器械包申请单'] + ,['借物单', '借物单'] + ,['代理灭菌申请单', '代理灭菌申请单'] + ,['外部器械包代理灭菌申请单', '外部器械包代理灭菌申请单'] + ,['回收申请单', '回收申请单'] + ,['手术预约申请单', '手术预约申请单'] + ]; + var appFormStore = new Ext.data.SimpleStore({ + data: appFormModel, + fields: ['key', 'value'] + }); + var comboConfig = { + id: 'appFormType', + name: 'appFormType', + emptyText: '请选择申请单类型', + mode: 'local', + store: appFormStore, + listeners: { + select: function (combo, record, index) { + refreshList(); + } + } + }; + return ext2CompUtil.getComboBuilder().getCombo(comboConfig); +} Ext.onReady(function() { Ext.QuickTips.init(); @@ -265,6 +305,10 @@ }, anchor : '95%' },{ + text : '申请单类型:' + }, + createAppFormCombo() + ,{ text : '刷新列表', iconCls : 'btn_ext_refresh1', handler : function() { Index: ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/action/InvoicePlanAction.java =================================================================== diff -u -r15553 -r15831 --- ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/action/InvoicePlanAction.java (.../InvoicePlanAction.java) (revision 15553) +++ ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/action/InvoicePlanAction.java (.../InvoicePlanAction.java) (revision 15831) @@ -365,7 +365,10 @@ Collection vos = invoicePlanManager .getDepartInvoicePlan(Arrays.asList(departCodes),applyDate ,tousseType , TimeQuantum.All); - StrutsResponseUtils.output(JSONArray.fromObject(vos)); + + vos = invoicePlanManager.filterQueryByPara(vos); + + StrutsResponseUtils.output(JSONArray.fromObject(vos)); } /** Index: ssts-web/src/main/webapp/disinfectsystem/config/gdsy/config.js =================================================================== diff -u -r15807 -r15831 --- ssts-web/src/main/webapp/disinfectsystem/config/gdsy/config.js (.../config.js) (revision 15807) +++ ssts-web/src/main/webapp/disinfectsystem/config/gdsy/config.js (.../config.js) (revision 15831) @@ -117,5 +117,19 @@ //是否在点击批量打印后显示未打印的名单 isShowNoPrintList : true, //是否显示按照时间查询 - showTimeSearch : true + showTimeSearch : true, + //发货计划按申请单类型查询model + appFormModel : [ + ['全部申请单', ''] + ,['一次性物品申请单', '一次性物品申请单'] + ,['器械包申请单', '器械包申请单'] + ,['消毒物品申请单', '消毒物品申请单'] + ,['外来器械包申请单', '外来器械包申请单'] + ,['自定义器械包申请单', '自定义器械包申请单'] + ,['借物单', '借物单'] + ,['代理灭菌申请单', '代理灭菌申请单'] + ,['外部器械包代理灭菌申请单', '外部器械包代理灭菌申请单'] + ,['回收申请单', '回收申请单'] + ,['手术预约申请单', '手术预约申请单'] + ] } \ No newline at end of file Index: ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/vo/InvoicePlanVo.java =================================================================== diff -u -r15700 -r15831 --- ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/vo/InvoicePlanVo.java (.../InvoicePlanVo.java) (revision 15700) +++ ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/vo/InvoicePlanVo.java (.../InvoicePlanVo.java) (revision 15831) @@ -84,5 +84,12 @@ public void setHighLight(Boolean highLight) { this.highLight = highLight; } - + + public Map getTypeAmountMap() { + return typeAmountMap; + } + + public void setTypeAmountMap(Map typeAmountMap) { + this.typeAmountMap = typeAmountMap; + } } Index: ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedView.jsp =================================================================== diff -u -r15698 -r15831 --- ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedView.jsp (.../invoicePlanExtractedView.jsp) (revision 15698) +++ ssts-web/src/main/webapp/disinfectsystem/invoice/invoicePlanExtractedView.jsp (.../invoicePlanExtractedView.jsp) (revision 15831) @@ -41,11 +41,12 @@ %> - + + - + - + @@ -54,7 +55,7 @@ - +