Index: ssts-web/src/main/webapp/disinfectsystem/goodsBindingConfig/goodsBindHandler.js =================================================================== diff -u -r15971 -r20377 --- ssts-web/src/main/webapp/disinfectsystem/goodsBindingConfig/goodsBindHandler.js (.../goodsBindHandler.js) (revision 15971) +++ ssts-web/src/main/webapp/disinfectsystem/goodsBindingConfig/goodsBindHandler.js (.../goodsBindHandler.js) (revision 20377) @@ -36,7 +36,7 @@ /** * - * 向后台发送请求查找出需要绑定的物品,并且加载到bindGoodStore中 + * 向后台发送请求查找出所有绑定的物品的详细信息,并且加载到bindGoodStore中 * @param records 需要绑定物品记录的数组 * @param data 要让服务器查询的物品数据(即需要绑定的物品名字,数量,id) */ Index: ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/assestmanagement/DisposableGoods.java =================================================================== diff -u -r20183 -r20377 --- ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/assestmanagement/DisposableGoods.java (.../DisposableGoods.java) (revision 20183) +++ ssts-basedata/src/main/java/com/forgon/disinfectsystem/entity/assestmanagement/DisposableGoods.java (.../DisposableGoods.java) (revision 20377) @@ -39,70 +39,136 @@ public static final String TYPE_DIPOSABLEGOODS = "普通物品"; public static final String TYPE_EXPENSIVEDIPOSABLEGOODS = "高值耗材"; - //public final static String SUPPLYROOMGOODS_YES = "是"; - //public final static String SUPPLYROOMGOODS_NO = "否"; public final static String TYPE_NAME = "一次性物品"; + public static String GRADE_FIRST = "一类"; + public static String GRADE_SECOND = "二类"; + public static String GRADE_THIRD = "三类"; + + public static List gradeList = new ArrayList(); + static{ + gradeList.add(GRADE_FIRST); + gradeList.add(GRADE_SECOND); + gradeList.add(GRADE_THIRD); + } + + /** + * id + */ private Long id; private String guid; + /** + * 名称 + */ private String name; - private String orginalName;// 不保存到数据库,用于判断是否做了修改 + /** + * 外部编码 + */ + private String externalCode; - private Long amount = 0L; //总数 + /** + * 总数 + */ + private Long amount = 0L; - private String type; //类型(如复大肿瘤分为耗材与介入一次性耗材) + /** + * 类型(如复大肿瘤分为耗材与介入一次性耗材) + */ + private String type; - private String isPartOfTousseMaterial; //能否作为器械包材料 + /** + * 能否作为器械包材料 + */ + private String isPartOfTousseMaterial; - private String isApplicationMaterial = CONSTANT_YES; //能否被科室申请 + /** + * 能否被科室申请 + */ + private String isApplicationMaterial = CONSTANT_YES; - private String isSupplyRoomGoods = Constants.STR_YES; //供应室物品 + /** + * 供应室物品 + */ + private String isSupplyRoomGoods = Constants.STR_YES; - private String spelling; //拼音简称 + /** + * 拼音简称 + */ + private String spelling; - private Double unitConvertCoefficient;//单位转换调整系数 - - private String wbCode; //五笔简码 + /** + * 五笔简码 + */ + private String wbCode; - private Integer minStorage; //最小库存 + /** + * 最小库存 + */ + private Integer minStorage; - private Integer maxStorage; //最大库存 + /** + * 最大库存 + */ + private Integer maxStorage; - private Double referencePrice; //参考价 + /** + * 参考价 + */ + private Double referencePrice; - private String specification;//规格 + /** + * 规格 + */ + private String specification; - private String orginalSpecification;// 不保存到数据库,用于判断是否做了修改 + /** + * 包装规格 + */ + private String packageSpec; - private String packageSpec;//包装规格 + /** + * 单位 + */ + private String unit; - private String externalCode;//外部编码 - - private String unit; //单位 /** * 申领单位(原来叫中包装单位) */ private String middlePackageUnit; /** - * 不需要盘点的科室编码,默认都是要盘点的 , 多个科室(多仓库)编码用逗号分割,编码开始、结束也拼接上了逗号,如:,001,021,392,222, + * 申领规格 */ - private String notInventoryDeptCode; + private String applicationSpecification; - private String applicationSpecification; // 申领规格 - private String orginalApplicationSpecification;// 不保存到数据库,用于判断是否做了修改 + /** + * 中包装单位转换单位系数 + */ + private Integer transferScale; - private Integer transferScale; //中包装单位转换单位系数 + /** + * 单位转换调整系数(现在没用这个了) + */ + private Double unitConvertCoefficient; - private Integer minApplyAmount; //最小申请数量 + /** + * 最小申请数量 + */ + private Integer minApplyAmount; - private Integer maxApplyAmount; //最大申请数量 + /** + * 最大申请数量 + */ + private Integer maxApplyAmount; - private String certification;// 注册证号 + /** + * 注册证号 + */ + private String certification; /** * 分类级别(分一类、二类、三类.按药监局标准分别表示不与人体皮肤接触、用于皮肤表面及用于人体类) @@ -115,23 +181,16 @@ */ private String printInLabel; - public static String GRADE_FIRST = "一类"; - public static String GRADE_SECOND = "二类"; - public static String GRADE_THIRD = "三类"; + /** + * 物资系统的物资编码,用于与物资系统交互 + */ + private String inventorySerialNumber; - public static List gradeList = new ArrayList(); - static{ - gradeList.add(GRADE_FIRST); - gradeList.add(GRADE_SECOND); - gradeList.add(GRADE_THIRD); - } - - private String inventorySerialNumber; // 物资系统的物资编码,用于与物资系统交互 - + /** + * 物品类型 + */ private String goodsType = TYPE_DIPOSABLEGOODS; - private String originalGoodsType;// 不保存到数据库,用于判断是否做了修改 - /** * his接口同步时返回的id(同步科室接口时如接口返回科室id属性,则记录到字段) * 省医物资接口需要用到 @@ -143,6 +202,31 @@ */ private Integer sequence = 0; + /** + * 不需要盘点的科室编码,默认都是要盘点的 , 多个科室(多仓库)编码用逗号分割,编码开始、结束也拼接上了逗号,如:,001,021,392,222, + */ + private String notInventoryDeptCode; + + /** + * 不保存到数据库,用于判断是否做了修改 + */ + private String orginalName; + + /** + * 不保存到数据库,用于判断是否做了修改 + */ + private String orginalApplicationSpecification; + + /** + * 不保存到数据库,用于判断是否做了修改 + */ + private String originalGoodsType; + + /** + * 不保存到数据库,用于判断是否做了修改 + */ + private String orginalSpecification; + @JsonIgnore public static Map ColumnNameAndPoPropertyNameMap= new LinkedHashMap(8); Index: ssts-basedata/src/main/java/com/forgon/disinfectsystem/goodsBindingConfig/impl/GoodsBindSrvImpl.java =================================================================== diff -u -r15948 -r20377 --- ssts-basedata/src/main/java/com/forgon/disinfectsystem/goodsBindingConfig/impl/GoodsBindSrvImpl.java (.../GoodsBindSrvImpl.java) (revision 15948) +++ ssts-basedata/src/main/java/com/forgon/disinfectsystem/goodsBindingConfig/impl/GoodsBindSrvImpl.java (.../GoodsBindSrvImpl.java) (revision 20377) @@ -85,9 +85,9 @@ @Override public JSONArray handleBind(BindGoodVo bindGoodVo) { JSONArray jsonArray = new JSONArray(); - //先用主绑定物名称找出对应的次要绑定物 + //1、先用主绑物品的身份找出所有次绑物品 this.iterateHandleBindGoods(jsonArray, bindGoodVo, GoodType.MAIN); - //然后用次要绑定物名称去找双向绑定了的主要绑定物 + //2、再以次绑物品的身份找出所有的主绑物品(前提条件他们是双向绑定) this.iterateHandleBindGoods(jsonArray, bindGoodVo, GoodType.SECOND); logger.debug(String.format("[jsonArray]:%s", jsonArray)); return jsonArray; Index: ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationForm.js =================================================================== diff -u -r20349 -r20377 --- ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationForm.js (.../goodsApplicationForm.js) (revision 20349) +++ ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationForm.js (.../goodsApplicationForm.js) (revision 20377) @@ -14,7 +14,7 @@ function comboApplication(id,hiddenCommitButton,hiddenSaveButton,hiddenReturnEditButton,type,tousseGroups, originalCommittedStatus,handleDepartCoding,isInterveneAmount) { //器械包申请单的物品视图是否分成两个grid - var tousseApplicationFormGridSplit = false; + tousseApplicationFormGridSplit = false; if (sstsConfig.tousseApplicationFormGridSplit && type == tousseApplicationForm) { tousseApplicationFormGridSplit = true; } @@ -821,7 +821,7 @@ listeners : { specialkey : function(field, ee) { if (ee.getKey() == Ext.EventObject.ENTER && !checkAdd()) { - addRecyclingApplicationItem(tousseApplicationFormGridSplit); + addRecyclingApplicationItem(); } } } @@ -847,7 +847,7 @@ field.focus(); return false; } - addRecyclingApplicationItem(tousseApplicationFormGridSplit); + addRecyclingApplicationItem(); } } } @@ -857,7 +857,7 @@ iconCls : 'btn_ext_add', handler : function() { if (!checkAdd()){ - addRecyclingApplicationItem(tousseApplicationFormGridSplit); + addRecyclingApplicationItem(); } } },{ @@ -971,15 +971,15 @@ {xtype : 'hidden',name : 'maxApplyAmount',id : 'maxApplyAmount'}, {xtype : 'hidden',name : 'returnedItemInfo',id : 'returnedItemInfo'}, {xtype : 'hidden',name : 'isUpateStatus',id : 'isUpateStatus'}, - {xtype : 'hidden',name : 'departCoding',itemId : 'departCoding',id : "departCoding2"}, //申请科室的科室编码 + {xtype : 'hidden',name : 'departCoding',itemId : 'departCoding',id : "departCoding2"}, //申请科室的科室编码 {xtype : 'hidden',name : 'settleAccountsDepartCoding',id : 'settleAccountsDepartCoding'}, {xtype : 'hidden',name : 'handleDepartCoding',id : 'handleDepartCoding'}, {xtype : 'hidden',name : 'isDiposableGoods',id : 'isDiposableGoods'}, {xtype : 'hidden',name : 'tousseType',id : 'tousseType'}, {xtype : 'hidden',name : 'isApplyEntireTousse',id : 'isApplyEntireTousse'}, {xtype : 'hidden',name : 'materials',id : 'materials'}, {xtype : 'hidden',name : 'packageSpec',id : 'packageSpec'}, - {xtype : 'hidden',name : 'diposableGoodsAmount',id : 'diposableGoodsAmount'}, + {xtype : 'hidden',name : 'diposableGoodsAmount',id : 'diposableGoodsAmount'}, //一次性物品库存数量(说明:如果storageUseStorageSubtractWaitDeliver配置成true则:库存=现有的库存-待发货数量,否则就是现有的库存量) {xtype : 'hidden',name : 'unit',id : 'unit'}, {xtype : 'hidden',name : 'middlePackageUnit',id : 'middlePackageUnit'}, {xtype : 'hidden',name : 'transferScale',id : 'transferScale'}, Index: ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.js =================================================================== diff -u -r20365 -r20377 --- ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.js (.../goodsApplicationView.js) (revision 20365) +++ ssts-web/src/main/webapp/disinfectsystem/recyclingApplication/goodsApplicationView.js (.../goodsApplicationView.js) (revision 20377) @@ -13,6 +13,8 @@ if(isHideUrgentAmount != false){ isHideUrgentAmount = true; } +//器械包申请单的物品视图是否分成两个grid +var tousseApplicationFormGridSplit = false; var grid; var cm; var tousseSum; @@ -416,11 +418,11 @@ {name : 'type',mapping : 'type'}, {name : 'tousseType',mapping : 'tousseType'}, {name : 'isApplyEntireTousse',mapping : 'isApplyEntireTousse'}, - {name : 'displayName',mapping : 'displayName'}, //个性化物品名字 + {name : 'displayName',mapping : 'displayName'}, //个性化物品名字 {name : 'price',mapping : 'price'}, {name : 'packageSpec',mapping : 'packageSpec'}, {name : 'unit',mapping : 'unit'}, - {name : 'amount',mapping : 'amount'}, //库存数量(说明:如果storageUseStorageSubtractWaitDeliver配置成true则:库存=现有的库存-待发货数量,否则就是现有的库存量) + {name : 'amount',mapping : 'amount'}, //一次性物品库存数量(说明:如果storageUseStorageSubtractWaitDeliver配置成true则:库存=现有的库存-待发货数量,否则就是现有的库存量) {name : 'middlePackageUnit',mapping : 'middlePackageUnit'}, {name : 'middlePackageAmount',mapping : 'middlePackageAmount'}, {name : 'transferScale',mapping : 'transferScale'}, @@ -800,11 +802,10 @@ * @param minApplyAmount 最小申请数量(只用于一次性物品) * @param maxApplyAmount 最大申请数量(只用于一次性物品) * @param urgentAmount 加急数量 - * @param gridSplit 器械包申请单的物品视图是否分成两个grid * @param para 追加的参数,是一个对象,里面可以有多种属性,方便以后扩展用(目前只有{behavior:操作类型(添加或者提交交或者绑定物品),transferScale:中包装单位装换单位系数,middlePackageUnit:申领单位(原来叫中包装单位)}) */ function addItems(tousseDefinitionID,name,count,diposable,isApplyEntireTousse,price,externalCode, - storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount,maxApplyAmount,urgentAmount,gridSplit,para){ + storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount,maxApplyAmount,urgentAmount,para){ //1、处理从模板里面找到的(因为前面过滤已经添加的物品,所以剩下的只是模板的物品了) var foundNode = null; var needToCheckNode = {tousseDefinitionID : tousseDefinitionID,name : name,tousseType : tousseType}; @@ -904,7 +905,7 @@ }else{ var appendNode = null; var tempGrid = 'tousseTreeGrid'; - if (sstsConfig.applicationFormType == 1 || gridSplit) { + if (sstsConfig.applicationFormType == 1 || tousseApplicationFormGridSplit) { appendNode = leftTemplateStore.getRootNode().appendChild(tousseInstance); } else { appendNode = rightTemplateStore.getRootNode().appendChild(tousseInstance); @@ -991,10 +992,9 @@ /** * 添加物品(器械包和一次性物品)到物品申请列表中. - * @param gridSplit 器械包申请单的物品视图是否分成两个grid * @returns {Boolean} */ -function addRecyclingApplicationItem(gridSplit){ +function addRecyclingApplicationItem(){ var id = curSelectedGoods.id; var name = top.Ext4.getCmp('package1').getValue(); var count = top.Ext4.getCmp('count1').getValue(); @@ -1061,20 +1061,20 @@ if (btn != 'yes') { return false; }else{ - addItems(id,name,count,isDiposableGoods,isApplyEntireTousse,price,externalCode,storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount,maxApplyAmount,urgentAmount,gridSplit,para); + addItems(id,name,count,isDiposableGoods,isApplyEntireTousse,price,externalCode,storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount,maxApplyAmount,urgentAmount,para); afterAddItem(true); } }); }else if(!isUndefinedOrNullOrEmpty(maxApplyAmount) && count > maxApplyAmount){ top.Ext4.Msg.alert("提示消息","申请数量大于最大可申请数量"); - addItems(id,name,count,isDiposableGoods,isApplyEntireTousse,price,externalCode,storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount,maxApplyAmount,urgentAmount,gridSplit,para); + addItems(id,name,count,isDiposableGoods,isApplyEntireTousse,price,externalCode,storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount,maxApplyAmount,urgentAmount,para); afterAddItem(true); }else{ - addItems(id,name,count,isDiposableGoods,isApplyEntireTousse,price,externalCode,storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount,maxApplyAmount,urgentAmount,gridSplit,para); + addItems(id,name,count,isDiposableGoods,isApplyEntireTousse,price,externalCode,storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount,maxApplyAmount,urgentAmount,para); afterAddItem(true); } }else{ - addItems(id,name,count,isDiposableGoods,isApplyEntireTousse,price,externalCode,storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount,maxApplyAmount,urgentAmount,gridSplit,para); + addItems(id,name,count,isDiposableGoods,isApplyEntireTousse,price,externalCode,storageAmount,tousseType,materials,unit,packageSpec,minApplyAmount,maxApplyAmount,urgentAmount,para); afterAddItem(false); } } Index: ssts-basedata/src/main/java/com/forgon/disinfectsystem/goodsBindingConfig/ctrl/GoodsBindingCtrl.java =================================================================== diff -u -r15948 -r20377 --- ssts-basedata/src/main/java/com/forgon/disinfectsystem/goodsBindingConfig/ctrl/GoodsBindingCtrl.java (.../GoodsBindingCtrl.java) (revision 15948) +++ ssts-basedata/src/main/java/com/forgon/disinfectsystem/goodsBindingConfig/ctrl/GoodsBindingCtrl.java (.../GoodsBindingCtrl.java) (revision 20377) @@ -100,6 +100,11 @@ } + /** + * 根据申请的物品找出所有绑定的物品. + * @param bindGoodVo + * @param response + */ @ResponseBody @RequestMapping(value = "/handleBind") public void handleBind(@ModelAttribute("bindGoodVo") BindGoodVo bindGoodVo, HttpServletResponse response) {