Index: ssts-tousse/src/main/java/com/forgon/disinfectsystem/tousse/toussedefinition/service/TousseDefinitionManagerImpl.java =================================================================== diff -u -r20589 -r20881 --- ssts-tousse/src/main/java/com/forgon/disinfectsystem/tousse/toussedefinition/service/TousseDefinitionManagerImpl.java (.../TousseDefinitionManagerImpl.java) (revision 20589) +++ ssts-tousse/src/main/java/com/forgon/disinfectsystem/tousse/toussedefinition/service/TousseDefinitionManagerImpl.java (.../TousseDefinitionManagerImpl.java) (revision 20881) @@ -4,6 +4,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; +import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.Comparator; @@ -904,7 +905,7 @@ public JSONObject searchTousseAndDiposableGoods(String searchString) { List> mapList = searchTousseByKeywordAndTousseTypeArr(searchString, null, false, true); mapList.addAll(searchTousseOrDiposableGoodsBySpellAndWbCode( - searchString, false, true, false,false,false,"1","0",false,false,null)); + searchString, false, true, false,false,false,"1","0",false,false,null,null)); Map map = new HashMap(); map.put("totalCount", mapList.size()); @@ -918,9 +919,9 @@ @Override public JSONObject searchTousseAndForeignTousseDiposableGoods(String searchString) { List> mapList = searchTousseOrDiposableGoodsBySpellAndWbCode( - searchString, true, true, false,false,false,true,"1","0",false,false,null); + searchString, true, true, false,false,false,true,"1","0",false,false,null,null); mapList.addAll(searchTousseOrDiposableGoodsBySpellAndWbCode( - searchString, false, true, false,false,false,true,"1","0",false,false,null)); + searchString, false, true, false,false,false,true,"1","0",false,false,null,null)); Map map = new HashMap(); map.put("totalCount", mapList.size()); @@ -936,7 +937,7 @@ public JSONObject searchTousseOrDiposableGoods(String simpleSpell, boolean isSeachTousse) { List> mapList = searchTousseOrDiposableGoodsBySpellAndWbCode( - simpleSpell, isSeachTousse, true, false,false,false,"1","0",false,false,null); + simpleSpell, isSeachTousse, true, false,false,false,"1","0",false,false,null,null); Map map = new HashMap(); map.put("totalCount", mapList.size()); map.put("data", mapList); @@ -955,57 +956,20 @@ map.put("data", mapList); return JSONObject.fromObject(map); } - /** - * 根据关键字进行检索,获取器械包或一次性物品..
- * 如果searchString为中文,则按照器械包的(拼音码、五笔码、外部编码、名称)这四个字段进行检索
- * 如果searchString为英文,则根据用户属性表的searchMode字段来决定
- * - * @param simpleSpell 检索的关键字 - * @param isSeachTousse 为true时只查询器械包,为false时只查询一次性物品 - * @param includeCoustomTousse 为true时不过滤自定义器械包,为false时过滤自定义器械包 - * @param searchTousseBelonged 是否只搜索登录用户当前科室能处理的器械包 - * @param onlySearchRecyclingTousse 是否只搜索要回收的器械包 - * @param showReferencePrice - * @param pageIndex 页码 - * @param countOfLI 显示数目,当countOfLI为0时查询所有的记录,不分页 - * @param showDisableGoods 是否显示禁用物品 - * @param showExternalCodeOfDisposableGoods 是否显示一次性物品的外部编码 - * @param handleDepartCode - * - * @return - */ + @Override @SuppressWarnings("unchecked") public List> searchTousseOrDiposableGoodsBySpellAndWbCode( String simpleSpell, boolean isSeachTousse, boolean includeCoustomTousse, boolean searchTousseBelonged, boolean onlySearchRecyclingTousse,boolean showReferencePrice, String pageIndex, String countOfLI, boolean showDisableGoods, - boolean showExternalCodeOfDisposableGoods,String handleDepartCode) { + boolean showExternalCodeOfDisposableGoods,String handleDepartCode,String specifyDisposableTypes) { return searchTousseOrDiposableGoodsBySpellAndWbCode(simpleSpell,isSeachTousse,includeCoustomTousse, searchTousseBelonged,onlySearchRecyclingTousse,showReferencePrice,false,pageIndex, - countOfLI,showDisableGoods,showExternalCodeOfDisposableGoods,handleDepartCode); + countOfLI,showDisableGoods,showExternalCodeOfDisposableGoods,handleDepartCode,specifyDisposableTypes); } - /** - * 根据关键字进行检索,获取器械包或一次性物品..
- * 如果searchString为中文,则按照器械包的(拼音码、五笔码、外部编码、名称)这四个字段进行检索
- * 如果searchString为英文,则根据用户属性表的searchMode字段来决定
- * @param simpleSpell 检索的关键字 - * @param isSeachTousse 为true时只查询器械包,为false时只查询一次性物品 - * @param includeCoustomTousse 为true时不过滤自定义器械包,为false时过滤自定义器械包 - * @param includeForeignTousse 为true时包含外来器械包,为false时过滤外来器械包 - * @param searchTousseBelonged 是否只搜索登录用户当前科室能处理的器械包 - * @param onlySearchRecyclingTousse 是否只搜索要回收的器械包 - * @param showReferencePrice 是否显示窗参考价 - * @param pageIndex 页码 - * @param countOfLI 显示数目,当countOfLI为0时查询所有的记录,不分页 - * @param showDisableGoods 是否显示禁用物品 - * @param showExternalCodeOfDisposableGoods 是否显示一次性物品的外部编码 - * @param handleDepartCode 处理科室的科室编码 - * - * @return - */ @Override @SuppressWarnings("unchecked") public List> searchTousseOrDiposableGoodsBySpellAndWbCode( @@ -1014,7 +978,7 @@ boolean onlySearchRecyclingTousse,boolean showReferencePrice, boolean includeForeignTousse, String pageIndex, String countOfLI, boolean showDisableGoods, - boolean showExternalCodeOfDisposableGoods,String handleDepartCode) { + boolean showExternalCodeOfDisposableGoods,String handleDepartCode,String specifyDisposableTypes) { // 有些输入法会输入"'",要过滤掉,不过滤执行sql会报异常 if(StringUtils.isNotBlank(simpleSpell)){ simpleSpell = simpleSpell.replace("'", ""); @@ -1102,8 +1066,24 @@ } } else { if(!showDisableGoods){ - sql += " and po.isApplicationMaterial = '" + DisposableGoodsStock.CONSTANT_YES + "'"; + sql += " and po.isApplicationMaterial = '" + DisposableGoodsStock.CONSTANT_YES + "' "; } + //按一次性物品类型过滤 + if (StringTools.isNotBlank(specifyDisposableTypes)) { + JSONObject specifyDisposableTypeObj = JSONObject.fromObject(specifyDisposableTypes); + String[] split = specifyDisposableTypeObj.optString("disposableTypes").split(";"); + if (split.length > 0) { + List list = Arrays.asList(split); + + String typeSql = ""; + if (specifyDisposableTypeObj.optBoolean("include")) { + typeSql = String.format(" and %s ", SqlUtils.getStringFieldInCollectionsPredicate("po.type", list)); + } else { + typeSql = String.format(" and (%s or po.type='' or po.type is null) ", SqlUtils.getStringFieldNotInCollectionsPredicate("po.type", list)); + } + sql += typeSql; + } + } sql += " order by " + DatabaseUtil.getSqlLengthFunctionName(dbConnection) + "(po.name) asc"; @@ -1469,7 +1449,7 @@ // 只搜索一次性物品 else if (TousseItem.TYPE_DIPOSABLE_GOODS.equals(tousseType)){ mapList.addAll(searchTousseOrDiposableGoodsBySpellAndWbCode( - searchString, false, false, false,false,true,"1","0",false,showExternalCodeOfDisposableGoods,deptCode)); + searchString, false, false, false,false,true,"1","0",false,showExternalCodeOfDisposableGoods,deptCode,null)); } //只搜索消毒物品 else if (TousseDefinition.PACKAGE_TYPE_DISINFECTION.equals(tousseType)){ @@ -1483,7 +1463,7 @@ TousseDefinition.PACKAGE_TYPE_DISINFECTION },false ,true); mapList.addAll(searchTousseOrDiposableGoodsBySpellAndWbCode( - searchString, false, false, false,false,showReferencePrice,"1","0",false,showExternalCodeOfDisposableGoods,deptCode)); + searchString, false, false, false,false,showReferencePrice,"1","0",false,showExternalCodeOfDisposableGoods,deptCode,null)); } Map map = new HashMap(); @@ -1507,7 +1487,7 @@ @Override public List> searchAllTousseAndDiposableGoods(String simpleSpell,boolean showDisableGoods) { List> mapList = searchTousseByKeywordAndTousseTypeArr(simpleSpell, new String[] {},showDisableGoods ,false); - mapList.addAll(searchTousseOrDiposableGoodsBySpellAndWbCode(simpleSpell, false, false, false,false,false,"1","0",showDisableGoods,false,null)); + mapList.addAll(searchTousseOrDiposableGoodsBySpellAndWbCode(simpleSpell, false, false, false,false,false,"1","0",showDisableGoods,false,null,null)); return mapList; } @@ -1533,7 +1513,7 @@ mapList = searchTousseByKeywordAndTousseTypeArr(simpleSpell, new String[] { TousseDefinition.PACKAGE_TYPE_INSIDE, TousseDefinition.PACKAGE_TYPE_DRESSING, TousseDefinition.PACKAGE_TYPE_HOMEMADE },false ,false); } else { - mapList.addAll(searchTousseOrDiposableGoodsBySpellAndWbCode(simpleSpell, false, false, false,false,false,"1","0",false,false,null)); + mapList.addAll(searchTousseOrDiposableGoodsBySpellAndWbCode(simpleSpell, false, false, false,false,false,"1","0",false,false,null,null)); } return mapList; } @@ -1583,7 +1563,7 @@ public String searchInsideTousse(String simpleSpell, String pages, String countOfLI) { List> mapList = searchTousseOrDiposableGoodsBySpellAndWbCode( - simpleSpell, true, false, true, true,false, pages, countOfLI,false,false,null); + simpleSpell, true, false, true, true,false, pages, countOfLI,false,false,null,null); JSONArray array = new JSONArray(); if (mapList != null) { int count = mapList.size() > 10 ? 10 : mapList.size(); Index: ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/departmentapplicationtemplate/service/DepartmentAppTemplateManagerImpl.java =================================================================== diff -u -r20440 -r20881 --- ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/departmentapplicationtemplate/service/DepartmentAppTemplateManagerImpl.java (.../DepartmentAppTemplateManagerImpl.java) (revision 20440) +++ ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/departmentapplicationtemplate/service/DepartmentAppTemplateManagerImpl.java (.../DepartmentAppTemplateManagerImpl.java) (revision 20881) @@ -213,11 +213,35 @@ @Override public JSONArray diposableTemplateItems2JsonArray(String handleDepartCoding, JSONArray jsonArray, - List items, double diposablePriceFloatPercent) { + List items, double diposablePriceFloatPercent, String specifyDisposableTypes) { sortDiposableGoodsTemplateItems(items); + + //按一次性物品类型过滤 + JSONObject specifyDisposableTypesObj = new JSONObject(); + String disposableTypes = ""; + if (StringTools.isNotBlank(specifyDisposableTypes)) { + specifyDisposableTypesObj = JSONObject.fromObject(specifyDisposableTypes); + disposableTypes = specifyDisposableTypesObj.optString("disposableTypes"); + } + for (DiposableGoodsTemplateItem item : items){ DisposableGoods disposableGoods = item.getApplicationDiposableGoods(); String isApplicationMaterial = disposableGoods.getIsApplicationMaterial(); + + //按一次性物品类型过滤 + if (StringTools.isNotBlank(disposableTypes)) { + String disposableTypesTemp = String.format(";%s;", disposableTypes); + if (specifyDisposableTypesObj.optBoolean("include")) { + if (!disposableTypesTemp.contains(String.format(";%s;", disposableGoods.getType()))) { + continue; + } + } else { + if (disposableTypesTemp.contains(String.format(";%s;", disposableGoods.getType()))) { + continue; + } + } + } + if (DisposableGoodsStock.CONSTANT_YES.equals(isApplicationMaterial)){ JSONObject json = diposableItem2Json(handleDepartCoding, "0", null, disposableGoods, diposablePriceFloatPercent, null); // 如果该一次性物品设置了中包装单位和中包装单位装换单位系数,则重新设置他的中包装单位,中包装单位装换单位系数和最小单位, @@ -254,7 +278,7 @@ private void getDiposableItemsJsonArrayByTemplate(JSONArray jsonArray, DepartmentAppTemplate template, double floatPercent){ if (template != null) { List items = template.getDiposableGoodsTemplateItems(); - diposableTemplateItems2JsonArray(null, jsonArray, items, floatPercent); + diposableTemplateItems2JsonArray(null, jsonArray, items, floatPercent, null); } } Index: ssts-webservice/src/main/java/com/forgon/disinfectsystem/webservice/service/ServiceManagerImpl.java =================================================================== diff -u -r20555 -r20881 --- ssts-webservice/src/main/java/com/forgon/disinfectsystem/webservice/service/ServiceManagerImpl.java (.../ServiceManagerImpl.java) (revision 20555) +++ ssts-webservice/src/main/java/com/forgon/disinfectsystem/webservice/service/ServiceManagerImpl.java (.../ServiceManagerImpl.java) (revision 20881) @@ -980,7 +980,7 @@ String spell = params.optString("spell"); if(StringUtils.isNotBlank(spell)){ List> mapList = tousseDefinitionManager.searchTousseOrDiposableGoodsBySpellAndWbCode( - spell, true, false, true, true,false, "1", "10000",false,false,null); + spell, true, false, true, true,false, "1", "10000",false,false,null,null); if (mapList != null) { for (int i = 0; i < mapList.size(); i++) { Map map = mapList.get(i); Index: ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/action/RecyclingApplicationAction.java =================================================================== diff -u -r20846 -r20881 --- ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/action/RecyclingApplicationAction.java (.../RecyclingApplicationAction.java) (revision 20846) +++ ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/recyclingapplication/action/RecyclingApplicationAction.java (.../RecyclingApplicationAction.java) (revision 20881) @@ -542,13 +542,24 @@ // 检查并创建还物单或通用申请单 private JSONObject createReturnApplicationOrRecyclingApplication() { + //验证申请科室名称和科室编码是否一致 String departCoding = recyclingApplication.getDepartCoding(); - OrgUnit department = (OrgUnit) orgUnitManager.getOrgUnitByCode(departCoding); if (department == null || !StringTools.equals(recyclingApplication.getDepart(), department.getName())) { return JSONUtil.buildJsonObject(false, "申请科室名称和科室编码不一致,请联系系统管理员!"); } + //设置includeSpecifyDisposableTypes属性 + String specifyDisposableTypes = StrutsParamUtils.getPraramValue("specifyDisposableTypes", ""); + if (recyclingApplication.isDiposableGoodsAppliaction() && StringTools.isNotBlank(specifyDisposableTypes)) { + JSONObject specifyDisposableTypesObj = JSONObject.fromObject(specifyDisposableTypes); + if (specifyDisposableTypesObj.optBoolean("include")) { + recyclingApplication.setIncludeSpecifyDisposableTypes(com.forgon.Constants.STR_YES); + } else { + recyclingApplication.setIncludeSpecifyDisposableTypes(com.forgon.Constants.STR_NO); + } + } + Collection srcTousseItemVoList = getTousseItemVos(); Map> checkList = new HashMap<>(); @@ -703,6 +714,7 @@ * 同时加载了已经申请的物品信息,根据传入的申请单的id。// terry kwan, 2015-03-01 */ public void loadDepartmentAppTemplate() { + String specifyDisposableTypes = StrutsParamUtils.getPraramValue("specifyDisposableTypes", ""); String applicationFormType = StrutsParamUtils.getPraramValue("applicationType", ""); String handleDepartCoding = StrutsParamUtils.getPraramValue("handleDepartCoding", ""); //器械包申请单的物品视图是否分成两个grid @@ -787,7 +799,7 @@ List diposableGoodsItems = departmentAppTemplateManager.getDiposableGoodsTemplateItems(templates); departmentAppTemplateManager.tousseDefinitionTemplateItems2JsonArray(toussesJsonArray, tousseItems,tousseDefinitionFloatPercent); - departmentAppTemplateManager.diposableTemplateItems2JsonArray(handleDepartCoding, diposableJsonArray, diposableGoodsItems,diposableFloatPercent); + departmentAppTemplateManager.diposableTemplateItems2JsonArray(handleDepartCoding, diposableJsonArray, diposableGoodsItems,diposableFloatPercent,null); } updateItemsApplyInfo(applicationItemMap, toussesJsonArray); @@ -809,7 +821,8 @@ } if (diposableTemplate != null) { JSONArray diposableJsonArray = new JSONArray(); - departmentAppTemplateManager.diposableTemplateItems2JsonArray(handleDepartCoding, diposableJsonArray, diposableTemplate.getDiposableGoodsTemplateItems(), diposableFloatPercent); + departmentAppTemplateManager.diposableTemplateItems2JsonArray(handleDepartCoding, diposableJsonArray, + diposableTemplate.getDiposableGoodsTemplateItems(), diposableFloatPercent, specifyDisposableTypes); updateItemsApplyInfo(applicationItemMap, diposableJsonArray); appendJsonString(rightStoreJson, diposableJsonArray.toString()); } @@ -841,7 +854,8 @@ if (templates != null){ JSONArray diposableJsonArray = new JSONArray(); for (DepartmentAppTemplate template : templates) { - departmentAppTemplateManager.diposableTemplateItems2JsonArray(handleDepartCoding, diposableJsonArray, template.getDiposableGoodsTemplateItems(), diposableFloatPercent); + departmentAppTemplateManager.diposableTemplateItems2JsonArray(handleDepartCoding, diposableJsonArray, + template.getDiposableGoodsTemplateItems(), diposableFloatPercent, specifyDisposableTypes); } updateItemsApplyInfo(applicationItemMap, diposableJsonArray); Index: ssts-tousse/src/main/java/com/forgon/disinfectsystem/tousse/toussedefinition/service/TousseDefinitionHelper.java =================================================================== diff -u -r19716 -r20881 --- ssts-tousse/src/main/java/com/forgon/disinfectsystem/tousse/toussedefinition/service/TousseDefinitionHelper.java (.../TousseDefinitionHelper.java) (revision 19716) +++ ssts-tousse/src/main/java/com/forgon/disinfectsystem/tousse/toussedefinition/service/TousseDefinitionHelper.java (.../TousseDefinitionHelper.java) (revision 20881) @@ -159,7 +159,7 @@ tousseTypes.add(TousseDefinition.PACKAGE_TYPE_DRESSING); } else if (TousseDefinition.TOUSSE_GROUP_SPECIALIZED_INSTRUMENT.equals(tousseType)) { //专科器械组(即:专科器械组申请的器械包) predicates.add(SqlUtils.getStringFieldPredicate("tousseGroupName", TousseDefinition.TOUSSE_GROUP_SPECIALIZED_INSTRUMENT)); - } else { //按照器械包进行分组 + } else { //按照器械包分组过滤 if (tousseType.split(";") != null) { predicates.add(SqlUtils.getStringFieldInCollectionsPredicate("tousseGroupName", Arrays.asList(tousseType.split(";")))); } Index: ssts-tousse/src/main/java/com/forgon/disinfectsystem/tousse/toussedefinition/service/TousseDefinitionManager.java =================================================================== diff -u -r20410 -r20881 --- ssts-tousse/src/main/java/com/forgon/disinfectsystem/tousse/toussedefinition/service/TousseDefinitionManager.java (.../TousseDefinitionManager.java) (revision 20410) +++ ssts-tousse/src/main/java/com/forgon/disinfectsystem/tousse/toussedefinition/service/TousseDefinitionManager.java (.../TousseDefinitionManager.java) (revision 20881) @@ -368,14 +368,15 @@ * @param showDisableGoods 是否显示禁用物品 * @param showExternalCodeOfDisposableGoods 是否显示一次性物品的外部编码 * @param handleDepartCode + * @param specifyDisposableTypes 是否包含指定的一次性物品类型,格式:{include:是否包含,disposableTypes:'一次性物品类型集合'} * @return */ public List> searchTousseOrDiposableGoodsBySpellAndWbCode( String simpleSpell, boolean isSeachTousse, boolean includeCoustomTousse, boolean searchTousseBelonged, boolean onlySearchRecyclingTousse, boolean displayPrice, String pageIndex, String countOfLI, boolean showDisableGoods, - boolean showExternalCodeOfDisposableGoods,String handleDepartCode); + boolean showExternalCodeOfDisposableGoods,String handleDepartCode,String specifyDisposableTypes); /** * 根据关键字进行检索,获取器械包或一次性物品..
@@ -393,6 +394,7 @@ * @param countOfLI 显示数目,当countOfLI为0时查询所有的记录,不分页 * @param showDisableGoods 是否显示禁用物品 * @param showExternalCodeOfDisposableGoods 是否显示一次性物品的外部编码 + * @param specifyDisposableTypes 是否包含指定的一次性物品类型,格式:{include:是否包含,disposableTypes:'一次性物品类型集合'} * @param handleDepartCode * * @return @@ -403,7 +405,7 @@ boolean onlySearchRecyclingTousse, boolean displayPrice, boolean includeForeignTousse, String pageIndex, String countOfLI, boolean showDisableGoods, - boolean showExternalCodeOfDisposableGoods,String handleDepartCode); + boolean showExternalCodeOfDisposableGoods,String handleDepartCode,String specifyDisposableTypes); /** * 根据包定义查找包定义,因为可能会存在多个,这里取id最大的. * @param tousseDefinition Index: ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationForm.js =================================================================== diff -u -r20846 -r20881 --- ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationForm.js (.../goodsApplicationForm.js) (revision 20846) +++ ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationForm.js (.../goodsApplicationForm.js) (revision 20881) @@ -8,11 +8,12 @@ * @param hiddenReturnEditButton 是否隐藏返回修改按钮 * @param type 申请单类型 * @param tousseGroups 器械包分组(需要显示的器械包分组,用分号分隔,为空则显示全部的器械包分组) + * @param specifyDisposableTypes 是否包含指定的一次性物品类型,格式:{include:是否包含,disposableTypes:'一次性物品类型集合'} * @param originalCommittedStatus 原申请单提交状态 * @param handleDepartCoding 处理科室的科室编码(修改才有值) * @param isInterveneAmount 是否为干预数量操作 */ -function comboApplication(id,deptCoding,hiddenCommitButton,hiddenSaveButton,hiddenReturnEditButton,type,tousseGroups, +function comboApplication(id,deptCoding,hiddenCommitButton,hiddenSaveButton,hiddenReturnEditButton,type,tousseGroups,specifyDisposableTypes, originalCommittedStatus,handleDepartCoding,isInterveneAmount) { //器械包申请单的物品视图是否分成两个grid tousseApplicationFormGridSplit = false; @@ -32,6 +33,10 @@ if (tousseGroups) { comboGoodsStore.proxy.extraParams.tousseType = tousseGroups; } + //如果specifyDisposableTypes不为空,需要显示申请的一次性物品 + if (specifyDisposableTypes) { + comboGoodsStore.proxy.extraParams.specifyDisposableTypes = JSON.stringify(specifyDisposableTypes); + } // 设置申请单的类型,如果是“敷料包申请单”和“专科器械申请单”,他们都属于器械包申请单,因此提交后申请单类型都算器械包申请单 var formType = type == dressingApplicationForm || type == spInstrumentApplicationForm ? tousseApplicationForm : type; @@ -187,6 +192,11 @@ top.Ext4.getCmp('storeCode').setValue(''); } + var specifyDisposableTypesTemp = ''; + if (specifyDisposableTypes) { + specifyDisposableTypesTemp = JSON.stringify(specifyDisposableTypes); + } + var flag = commitNew; /** * 提交申请表单 @@ -196,7 +206,11 @@ form.form.submit({ url : WWWROOT + '/disinfectSystem/recyclingApplicationAction!saveRecyclingApplication.do', method : 'POST', - params : {autoReturnTheBorrowingTousse:autoReturnTheBorrowingTousse,isInterveneAmount:isInterveneAmount}, + params : { + autoReturnTheBorrowingTousse: autoReturnTheBorrowingTousse, + isInterveneAmount: isInterveneAmount, + specifyDisposableTypes: (specifyDisposableTypesTemp ? specifyDisposableTypesTemp : '') + }, waitMsg : '正在保存数据,请稍候', waitTitle : '提交表单', success : function(form, action) { @@ -206,7 +220,7 @@ if (msg.length <= 6){ showResult(action.result.message); if (flag == true){ - openApplication(openFormObj.tousseType, openFormObj.form, openFormObj.tousseGroups); + openApplication(openFormObj.tousseType, openFormObj.form, openFormObj.tousseGroups, openFormObj.specifyDisposableTypes); } }else{ top.Ext4.Msg.show({ @@ -1390,6 +1404,10 @@ if (tousseGroups) { para.applicationType = tousseGroups; } + //如果specifyDisposableTypes不为空,需要显示申请的一次性物品 + if (specifyDisposableTypes) { + para.specifyDisposableTypes = JSON.stringify(specifyDisposableTypes); + } Ext4.Ajax.request({ url : WWWROOT + '/disinfectSystem/recyclingApplicationAction!loadDepartmentAppTemplate.do', params : para, Index: ssts-tousse/src/main/java/com/forgon/disinfectsystem/tousse/toussedefinition/action/TousseDefinitionAction.java =================================================================== diff -u -r20793 -r20881 --- ssts-tousse/src/main/java/com/forgon/disinfectsystem/tousse/toussedefinition/action/TousseDefinitionAction.java (.../TousseDefinitionAction.java) (revision 20793) +++ ssts-tousse/src/main/java/com/forgon/disinfectsystem/tousse/toussedefinition/action/TousseDefinitionAction.java (.../TousseDefinitionAction.java) (revision 20881) @@ -1932,6 +1932,9 @@ String hideDiposableGoodsPrice = StrutsParamUtils.getPraramValue("hideDiposableGoodsPrice", null); String showExternalCode = StrutsParamUtils.getPraramValue("showExternalCodeOfDisposableGoods", "false"); + + //是否包含指定的一次性物品类型,格式:{include:是否包含,disposableTypes:'一次性物品类型集合'} + String specifyDisposableTypes = StrutsParamUtils.getPraramValue("specifyDisposableTypes", ""); TousseDefinitionHelper tousseDefinitionHelper = TousseDefinitionHelper.getInstance(); tousseDefinitionHelper.setTousseDefinitionManager(tousseDefinitionManager); @@ -1991,13 +1994,13 @@ }else{ //只查出一次性物品 mapList2 = tousseDefinitionManager.searchTousseOrDiposableGoodsBySpellAndWbCode( - spell, false, false, false,false,showReferencePrice,"1","0",false,showExternalCodeOfDisposableGoods,cssdOrgUnitCode); + spell, false, false, false,false,showReferencePrice,"1","0",false,showExternalCodeOfDisposableGoods,cssdOrgUnitCode,specifyDisposableTypes); } //如果申请单类型为组合申请单,则需要再查询一次性物品出来和上面的器械包物品合并 if("combo".equals(tousseType)){ mapList2 = (tousseDefinitionManager.searchTousseOrDiposableGoodsBySpellAndWbCode( - spell, false, false, false,false,showReferencePrice,"1","0",false,showExternalCodeOfDisposableGoods,cssdOrgUnitCode)); + spell, false, false, false,false,showReferencePrice,"1","0",false,showExternalCodeOfDisposableGoods,cssdOrgUnitCode,null)); } List> mapDataList = new ArrayList>(); @@ -2041,7 +2044,7 @@ result.put("totalCount", totalCount); result.put("data", mapDataList); json = JSONObject.fromObject(result); - }else{ + }else{ //处理科室为空的是不合理的 Map result = tousseDefinitionManager.searchComboGoods(spell, tousseType,showReferencePrice,showExternalCodeOfDisposableGoods,null); List> mapList = (List>)result.get("data"); List> mapDataList = mapList; Index: ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.js =================================================================== diff -u -r20846 -r20881 --- ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.js (.../goodsApplicationView.js) (revision 20846) +++ ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.js (.../goodsApplicationView.js) (revision 20881) @@ -46,19 +46,21 @@ var openFormObj = { tousseType : '', form : '', - tousseGroups : '' + tousseGroups : '', + specifyDisposableTypes : '' } //表单的打印状态(1是未打印,2是已打印) var formPrinted = 1; // 申请单历史修改对象 var updateDetailObj = new UpdateDetailObj(); /** * 打开对应的表单(添加申请单操作) - * @param form 申请表单类型 - * @param tousseType 器械包类型 - * @param tousseGroups 器械包分组(需要显示的器械包分组,为空则显示全部的器械包分组) + * @param form 申请表单类型 + * @param tousseType 器械包类型 + * @param tousseGroups 器械包分组(需要显示的器械包分组,为空则显示全部的器械包分组) + * @param specifyDisposableTypes是否包含指定的一次性物品类型,格式:{include:是否包含,disposableTypes:'一次性物品类型集合'} */ -function openApplication(tousseType, form, tousseGroups) { +function openApplication(tousseType, form, tousseGroups, specifyDisposableTypes) { //限制同一个科室(供应室除外)只能申请一张申请单 if (sstsConfig.limitApply && form == comboApplicationForm && !isSupplyRoomUser) { var existRecyclingApplication = null; @@ -81,21 +83,25 @@ handleDepartStore.proxy.extraParams.applyDepartCode = ""; comboGoodsStore.proxy.extraParams.cssdOrgUnitCode = ""; //设置打开表单的对象 - setOpenFormObj(tousseType, form, tousseGroups); + setOpenFormObj(tousseType, form, tousseGroups, specifyDisposableTypes); if (!isUndefinedOrNullOrEmpty(form)){ - comboApplication(0,$Id('departCoding').value,false,false,true,form, tousseGroups, false, '',false); + comboApplication(0,$Id('departCoding').value,false,false,true,form, tousseGroups, specifyDisposableTypes, false, '',false); } } /** - * 设置打开表单的对象,用于保存和新建 - * @param tousseType 类型 - * @param form 表单类型 + * 设置打开表单的对象,用于保存和新建. + * @param tousseType 类型 + * @param form 表单类型 + * @param tousseGroups 器械包分组(需要显示的器械包分组,为空则显示全部的器械包分组) + * @param specifyDisposableTypes格式:{include:是否包含,disposableTypes:'一次性物品类型'} + * */ -function setOpenFormObj(tousseType, form, tousseGroups) { +function setOpenFormObj(tousseType, form, tousseGroups, specifyDisposableTypes) { openFormObj.tousseType = tousseType; openFormObj.form = form; openFormObj.tousseGroups = tousseGroups; + openFormObj.specifyDisposableTypes = specifyDisposableTypes; } /** @@ -1669,13 +1675,33 @@ hiddenReturnButton = false; } + //判断是否为省医版本3的“申请一次性物品”和“申请未消毒敷料”两个按钮提交的申请单,是的话要限制申请的一次物品 + var specifyDisposableTypes = ''; + var includeSpecifyDisposableTypes = recyclingApplication.includeSpecifyDisposableTypes; + if (includeSpecifyDisposableTypes) { + //临床“申请未消毒敷料”指定的一次性物品类型 + var disposableTypes = ''; + var disposableTypeByApply = sstsConfig.disposableTypeByApply; + if (disposableTypeByApply && disposableTypeByApply.length > 0) { + disposableTypes = disposableTypeByApply.join(';'); + } + + if (includeSpecifyDisposableTypes == '是') { + specifyDisposableTypes = {include: true, disposableTypes: disposableTypes}; + } else if (includeSpecifyDisposableTypes == '否') { + specifyDisposableTypes = {include: false, disposableTypes: disposableTypes}; + } + } + var status = recyclingApplication.status; if(type == recyclingCreateApplicationForm || type == comboApplicationForm || type == tousseApplicationForm || type == diposableGoodsApplicationForm || type == disinfectGoodsApplicationForm){ - comboApplication(recyclingApplication.id,recyclingApplication.departCoding,hiddenCommitButton,hiddenSaveButton,hiddenReturnButton,type, '', recyclingApplication.committedStatus,recyclingApplication.handleDepartCoding,isInterveneAmount); + comboApplication(recyclingApplication.id,recyclingApplication.departCoding,hiddenCommitButton,hiddenSaveButton, + hiddenReturnButton,type, '', specifyDisposableTypes,recyclingApplication.committedStatus, + recyclingApplication.handleDepartCoding,isInterveneAmount); } //设置“申请单id”、“流水号”、“发货状态”、“申请人”、“住院号”、“申请科室”、“结算科室”、“处理科室”、“申请时间”、“备注”、“仓库编码”、“项目”12个属性 @@ -2691,7 +2717,7 @@ hidden : SSTS_RecycApplication_Create || sstsConfig.applicationFormType != 1, handler : function() { formPrinted = 1; - openApplication("",comboApplicationForm,''); + openApplication("",comboApplicationForm,'',''); } },{ text : sstsConfig.packageName || '申请器械包', @@ -2701,7 +2727,7 @@ hidden : SSTS_PACKAGE_Create || sstsConfig.applicationFormType != 2 || (sstsConfig.hideClinicalDepartmentApplyButton && !isFirstSupplyRoomUser), handler : function() { formPrinted = 1; - openApplication(invoicePlanForTousseType_Tousse, tousseApplicationForm, ''); + openApplication(invoicePlanForTousseType_Tousse, tousseApplicationForm, '', ''); } },{ text : '申请一次性物品', @@ -2711,7 +2737,7 @@ hidden : SSTS_DisposableGoods_Create || sstsConfig.applicationFormType != 2 || (sstsConfig.hideClinicalDepartmentApplyButton && !isFirstSupplyRoomUser), handler : function() { formPrinted = 1; - openApplication(invoicePlanForTousseType_Diposable, diposableGoodsApplicationForm, ''); + openApplication(invoicePlanForTousseType_Diposable, diposableGoodsApplicationForm, '', ''); } },{ text : '申请消毒物品', @@ -2721,7 +2747,7 @@ hidden : SSTS_Disinfection_Create || sstsConfig.applicationFormType != 2 || (sstsConfig.hideClinicalDepartmentApplyButton && !isFirstSupplyRoomUser), handler : function() { formPrinted = 1; - openApplication(invoicePlanForTousseType_Tousse, disinfectGoodsApplicationForm, ''); + openApplication(invoicePlanForTousseType_Tousse, disinfectGoodsApplicationForm, '', ''); } },{ text : '申请外来器械', Index: ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/departmentapplicationtemplate/service/DepartmentAppTemplateManager.java =================================================================== diff -u -r20344 -r20881 --- ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/departmentapplicationtemplate/service/DepartmentAppTemplateManager.java (.../DepartmentAppTemplateManager.java) (revision 20344) +++ ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/departmentapplicationtemplate/service/DepartmentAppTemplateManager.java (.../DepartmentAppTemplateManager.java) (revision 20881) @@ -95,9 +95,10 @@ * @param jsonArray 作为输出对象 * @param items 科室申领模版里面的配置的器械包集合 * @param diposablePriceFloatPercent一次性物品的浮动价格系数 + * @param specifyDisposableTypes 是否包含指定的一次性物品类型,格式:{include:是否包含,disposableTypes:'一次性物品类型集合'} */ public JSONArray diposableTemplateItems2JsonArray(String handleDepartCoding, JSONArray jsonArray, - List items, double diposablePriceFloatPercent); + List items, double diposablePriceFloatPercent, String specifyDisposableTypes); /** * 机械包定义模板按照SortNumber排序 Index: ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationViewVersion3.js =================================================================== diff -u -r19716 -r20881 --- ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationViewVersion3.js (.../goodsApplicationViewVersion3.js) (revision 19716) +++ ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationViewVersion3.js (.../goodsApplicationViewVersion3.js) (revision 20881) @@ -5,7 +5,7 @@ //取消隐藏 Ext.get('desktop_normal').dom.style.display = ""; - //申领物品 + //申领敷料 Ext.get('tousseApplication').addListener('click', function (e) { var tousseGroups = ''; var tousseGroupByApply = sstsConfig.tousseGroupByApply; @@ -15,10 +15,25 @@ openApplication(invoicePlanForTousseType_Tousse, tousseApplicationForm, tousseGroups, ''); }); + + //临床“申请未消毒敷料”指定的一次性物品类型 + var disposableTypes = ''; + var disposableTypeByApply = sstsConfig.disposableTypeByApply; + if (disposableTypeByApply && disposableTypeByApply.length > 0) { + disposableTypes = disposableTypeByApply.join(';'); + } + //一次性物品申请单 Ext.get('diposableGoodsApplication').addListener('click', function (e) { - openApplication(invoicePlanForTousseType_Diposable, diposableGoodsApplicationForm, ''); + var specifyDisposableTypes = {include: false, disposableTypes: disposableTypes}; + openApplication(invoicePlanForTousseType_Diposable, diposableGoodsApplicationForm, '', specifyDisposableTypes); }); + + //一次性物品申请单(申领未消毒敷料) + Ext.get('diposableGoodsApplication2').addListener('click', function (e) { + var specifyDisposableTypes = {include: true, disposableTypes: disposableTypes}; + openApplication(invoicePlanForTousseType_Diposable, diposableGoodsApplicationForm, '', specifyDisposableTypes); + }); } }); Index: ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/invoicemanager/InvoicePlan.java =================================================================== diff -u -r20840 -r20881 --- ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/invoicemanager/InvoicePlan.java (.../InvoicePlan.java) (revision 20840) +++ ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/invoicemanager/InvoicePlan.java (.../InvoicePlan.java) (revision 20881) @@ -232,6 +232,14 @@ private String hospitalNumber; //住院号 /** + * jira问题:GDSRMYY-396 省医临床科室申领界面增加‘申领未消毒敷料’图标 + * 是否包含指定的一次性物品类型(此属性只针对一次性物品申请单,值为“是”则只能申请指定类型的一次性物品,值为“否”则只能申请非指定类型的一次性物品,值为空则不限制) + * 上面提到的“指定类型的一次性物品”在config.js配置的,配置项为disposableTypeByApply + * 目前只有省医版本3的“申请一次性物品”和“申请未消毒敷料”两个按钮申请的单才有值 + */ + private String includeSpecifyDisposableTypes; + + /** * 病人姓名 */ private String patient; @@ -1002,7 +1010,17 @@ public String getOrSpelling() { return orSpelling; } + + @Column(length = 10) + public String getIncludeSpecifyDisposableTypes() { + return includeSpecifyDisposableTypes; + } + public void setIncludeSpecifyDisposableTypes( + String includeSpecifyDisposableTypes) { + this.includeSpecifyDisposableTypes = includeSpecifyDisposableTypes; + } + public void setOrSpelling(String orSpelling) { this.orSpelling = orSpelling; } Index: ssts-web/src/main/webapp/disinfectsystem/config/gdsy/config.js =================================================================== diff -u -r20511 -r20881 --- ssts-web/src/main/webapp/disinfectsystem/config/gdsy/config.js (.../config.js) (revision 20511) +++ ssts-web/src/main/webapp/disinfectsystem/config/gdsy/config.js (.../config.js) (revision 20881) @@ -149,6 +149,8 @@ ], //临床申请器械包时,指定器械包分组的器械包( 值为数组,格式如:['A','B'...]) tousseGroupByApply : ['敷料组'], + //临床“申请未消毒敷料”指定的一次性物品类型( 值为数组,格式如:['A','B'...]) + disposableTypeByApply : ['未消毒敷料'], //是否显示科室分组选择框 isShowDeptGroup : true, //是否显示按器械包分组选择框 Index: ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationViewVersion2.js =================================================================== diff -u -r19716 -r20881 --- ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationViewVersion2.js (.../goodsApplicationViewVersion2.js) (revision 19716) +++ ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationViewVersion2.js (.../goodsApplicationViewVersion2.js) (revision 20881) @@ -7,28 +7,28 @@ //器械包申请单 Ext.get('tousseApplication').addListener('click', function (e) { - openApplication(invoicePlanForTousseType_Tousse, tousseApplicationForm, ''); + openApplication(invoicePlanForTousseType_Tousse, tousseApplicationForm, '', ''); }); //一次性物品申请单 Ext.get('diposableGoodsApplication').addListener('click', function (e) { - openApplication(invoicePlanForTousseType_Diposable, diposableGoodsApplicationForm, ''); + openApplication(invoicePlanForTousseType_Diposable, diposableGoodsApplicationForm, '', ''); }); //消毒物品申请单 Ext.get('disinfectGoodsApplication').addListener('click', function (e) { - openApplication(invoicePlanForTousseType_Tousse, disinfectGoodsApplicationForm, ''); + openApplication(invoicePlanForTousseType_Tousse, disinfectGoodsApplicationForm, '', ''); // addAndEditUntracableTousse('', 0, "01", function () { }); }); //敷料包申请单 Ext.get('dressingApplication').addListener('click', function (e) { - openApplication(invoicePlanForTousseType_Tousse, dressingApplicationForm, ''); + openApplication(invoicePlanForTousseType_Tousse, dressingApplicationForm, '', ''); }); //专科器械申请单 Ext.get('spInstrumentApplication').addListener('click', function (e) { - openApplication(invoicePlanForTousseType_Tousse, spInstrumentApplicationForm, ''); + openApplication(invoicePlanForTousseType_Tousse, spInstrumentApplicationForm, '', ''); }); } }); Index: ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationViewVersion3.jsp =================================================================== diff -u -r20313 -r20881 --- ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationViewVersion3.jsp (.../goodsApplicationViewVersion3.jsp) (revision 20313) +++ ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationViewVersion3.jsp (.../goodsApplicationViewVersion3.jsp) (revision 20881) @@ -64,6 +64,12 @@
申请一次性物品
+
  • +
    +

    +
    +
    申请未消毒敷料
    +