Index: ssts-packing/src/main/java/com/forgon/disinfectsystem/packing/action/PackingAction.java =================================================================== diff -u -r14855 -r14956 --- ssts-packing/src/main/java/com/forgon/disinfectsystem/packing/action/PackingAction.java (.../PackingAction.java) (revision 14855) +++ ssts-packing/src/main/java/com/forgon/disinfectsystem/packing/action/PackingAction.java (.../PackingAction.java) (revision 14956) @@ -38,6 +38,7 @@ import com.forgon.disinfectsystem.entity.basedatamanager.toussedefinition.TousseDefinition; import com.forgon.disinfectsystem.entity.basedatamanager.toussedefinition.TousseInstance; import com.forgon.disinfectsystem.entity.idcardinstance.IDCardInstance; +import com.forgon.disinfectsystem.entity.invoicemanager.InvoicePlan; import com.forgon.disinfectsystem.entity.packing.PackingRecord; import com.forgon.disinfectsystem.entity.packing.PackingTask; import com.forgon.disinfectsystem.expirationdateinfo.service.ExpirationDateInfoManager; @@ -650,12 +651,19 @@ .getPackingTaskById(packTaskId); if (packTask != null) { TousseDefinition td = packTask.getTousseDefinition(); - array = tousseDefinitionManager.getMaterialsOfTousseDefinition(td); - } + }else{ + String applicationId = StrutsParamUtils.getPraramValue("applicationId", ""); + String tousseName = StrutsParamUtils.getPraramValue("tousseName", ""); + String supplierName = StrutsParamUtils.getPraramValue("supplierName", ""); + if(StringUtils.isNotBlank(applicationId)){ + TousseDefinition tousseDefinition = tousseDefinitionManager.getForeignTousseDefinitionByNameAPPIDAndSupplierName(tousseName, applicationId, supplierName); + if(tousseDefinition != null){ + array = tousseDefinitionManager.getMaterialsOfTousseDefinition(tousseDefinition); + } + } } - HttpServletResponse response = StrutsParamUtils.getResponse(); try { response.setCharacterEncoding("utf-8"); @@ -664,7 +672,49 @@ e.printStackTrace(); } } - + + /** + * 外来器械申请单是否能拆分 + */ + public void isForeignTousseApplicationCanSplitTousse(){ + String applicationId = StrutsParamUtils.getPraramValue("applicationId", ""); + List tousseList = tousseInstanceManager.getForeignTousseTousseInstance(applicationId); + boolean isCanSplit = true; + String msg = ""; + if(tousseList == null || tousseList.size() == 0){ + isCanSplit = false; + msg = "该申请单未装配!"; + }else{ + for (TousseInstance ti : tousseList) { + TousseDefinition td = ti.getTousseDefinition(); + if(td != null){ + //已拆包不能再拆包 + if(TousseDefinition.PACKAGE_TYPE_SPLIT.equals(td.getTousseType())){ + isCanSplit = false; + msg = "该申请单已拆分,不能再次拆分!"; + break; + } + //非已装配、已审核 状态的器械包实例 不能再拆包 + if(!TousseInstance.STATUS_PACKED.equals(ti.getStatus()) && !TousseInstance.STATUS_REVIEWED.equals(ti.getStatus())){ + isCanSplit = false; + msg = "该申请单内的器械包状态为【" + ti.getStatus() + "】,不能重新拆包!"; + break; + } + } + } + } + HttpServletResponse response = StrutsParamUtils.getResponse(); + try { + response.setCharacterEncoding("utf-8"); + response.getWriter().print(JSONUtil.buildJsonObject(isCanSplit, msg).toString()); + } catch (IOException e) { + e.printStackTrace(); + } + + } + + + public void loadPackedTousses() { String packingRecordId = StrutsParamUtils.getPraramValue( "packingRecordId", ""); Index: ssts-packing/src/main/java/com/forgon/disinfectsystem/packing/service/PackingManagerImpl.java =================================================================== diff -u -r14929 -r14956 --- ssts-packing/src/main/java/com/forgon/disinfectsystem/packing/service/PackingManagerImpl.java (.../PackingManagerImpl.java) (revision 14929) +++ ssts-packing/src/main/java/com/forgon/disinfectsystem/packing/service/PackingManagerImpl.java (.../PackingManagerImpl.java) (revision 14956) @@ -3938,36 +3938,28 @@ } } //追溯清洗的多个篮筐 - if(td.isForeignTousse() || td.isSplit()){ - String classifyBasketIds = ""; - if(tousseInstance.getClassifyBasket_id() != null){ - classifyBasketIds = tousseInstance.getClassifyBasket_id().toString(); - } - tousseInstance.setClassifyBasketIds(classifyBasketIds); - }else{ - if(PackingTask.TASK_RECYCLINGRECORD.equals(currentPackingTask.getTaskType())){ - String basketBarcodes = currentPackingTask.getBasketBarcode(); - if(StringUtils.isNotBlank(basketBarcodes)){ - String sql = String.format("select distinct b.id from classifybasket b ,classifieditem i where " - + "b.id = i.classifybasket_id and b.containerbarcode in ('%s') and i.recyclingrecordid = %s ", - basketBarcodes.replaceAll(";", "','"),currentPackingTask.getSourceId()); - ResultSet rs = objectDao.executeSql(sql); - List li = new ArrayList(); - try { - while(rs.next()){ - String classifyBasketId = rs.getString(1); - li.add(classifyBasketId); - } - } catch (SQLException e) { - e.printStackTrace(); - } finally{ - DatabaseUtil.closeResultSetAndStatement(rs); + if(PackingTask.TASK_RECYCLINGRECORD.equals(currentPackingTask.getTaskType())){ + String basketBarcodes = currentPackingTask.getBasketBarcode(); + if(StringUtils.isNotBlank(basketBarcodes)){ + String sql = String.format("select distinct b.id from classifybasket b ,classifieditem i where " + + "b.id = i.classifybasket_id and b.containerbarcode in ('%s') and i.recyclingrecordid = %s ", + basketBarcodes.replaceAll(";", "','"),currentPackingTask.getSourceId()); + ResultSet rs = objectDao.executeSql(sql); + List li = new ArrayList(); + try { + while(rs.next()){ + String classifyBasketId = rs.getString(1); + li.add(classifyBasketId); } - if(li.size() > 0){ - String [] idArray = li.toArray(new String[li.size()]); - tousseInstance.setClassifyBasketIds(StringUtils.join(idArray, ";")); - } + } catch (SQLException e) { + e.printStackTrace(); + } finally{ + DatabaseUtil.closeResultSetAndStatement(rs); } + if(li.size() > 0){ + String [] idArray = li.toArray(new String[li.size()]); + tousseInstance.setClassifyBasketIds(StringUtils.join(idArray, ";")); + } } } } @@ -4254,4 +4246,199 @@ } } } + + @Override + public void interfereSplitForeignTousse(String params) { + + JSONObject obj = JSONObject.fromObject(params); + String applicationId = obj.optString("applicationId"); + List tiList = tousseInstanceManager.getForeignTousseTousseInstance(applicationId); + + if(tiList == null){ + throw new RuntimeException("未找到该外来器械申请单对应的器械包!"); + } + + if(tiList.size() > 1){ + throw new RuntimeException("该外来器械包已拆分!"); + } + + TousseInstance originalTousseInstance = tiList.get(0); + + TousseDefinition td = originalTousseInstance.getTousseDefinition(); + + String operator = obj.optString("operator"); + String operatorCode = obj.optString("operatorCode"); + String reviewer = obj.optString("reviewer"); + String reviewerCode = obj.optString("reviewerCode"); + + String sterilingType = obj.optString("sterilingType"); + String sterilizerName = obj.optString("sterilizer"); + String frequency = obj.optString("frequency"); + + String splitPackageStr = obj.optString("splitPackage"); + JSONArray splitPackages = JSONArray.fromObject(splitPackageStr); + if(splitPackages == null ||splitPackages.size() == 0){ + throw new RuntimeException("没有待拆分的器械包!"); + } + + SupplyRoomConfig config = supplyRoomConfigManager.getSystemParamsObj(); + double foreignTprice = config.getForeignToussePrice(); + double floatPercent = config.getToussePriceFluctuation(); + + String orgUnitCoding = ""; + String orgUnitName = ""; + LoginUserData loginUser = AcegiHelper.getLoginUser(); + if (loginUser != null) { + orgUnitCoding = loginUser.getOrgUnitCodingFromSupplyRoomConfig(); + orgUnitName = loginUser.getOrgUnitNameCodingFromSupplyRoomConfig(); + } + StringBuffer buff = new StringBuffer(); + for (int i = 0 ; i < splitPackages.size() ; i++) { + JSONObject tousse = (JSONObject)splitPackages.get(i); + + String tousseName = tousse.optString("tousseName"); + JSONArray materialsArray = tousse.optJSONArray("materialsJsonArray"); + String bigPackage = tousse.optString("bigPackage"); + String packageType = tousse.optString("packingType"); + + Date validUntil = null; + Date warningUntil = null; + Date sterileStartTime = new Date(); + + // 失效期和预警期计算 + JSONObject expirationObj = expirationDateInfoManager + .getExpirationDate(sterileStartTime.getTime() + "", packageType); + + + String validDateToPrint = ""; + String sterilizationDateToPrint = ""; + boolean markTousse = false; + + boolean isDefined = expirationObj.optBoolean("isDefined"); + if (isDefined){ + validUntil = (Date)JSONObject.toBean(expirationObj.optJSONObject("validUntil"), Date.class); + warningUntil = (Date)JSONObject.toBean(expirationObj.optJSONObject("warningUntil"), Date.class); + + validDateToPrint = Constants.SIMPLEDATEFORMAT_YYYYMMDD.format(validUntil); + sterilizationDateToPrint = Constants.SIMPLEDATEFORMAT_YYYYMMDD.format(sterileStartTime); + + markTousse = expirationObj.optBoolean("markTousse"); + } + + tousse.put("validDate", validDateToPrint); + tousse.put("sterilizationDate", sterilizationDateToPrint); + tousse.put("markTousse", markTousse); + // 创建新的外来器械包定义 + TousseDefinition tousseDefinition = createNewForeignTousseDefinition( + td, tousseName, materialsArray, bigPackage); + + double fluctuationPrice = supplyRoomConfigManager + .getFluctuationPrice(floatPercent, foreignTprice); + // 包实例 + TousseInstance tousseInstance = createForeignTousseInstance(originalTousseInstance,tousseDefinition,operator,operatorCode, + reviewer,reviewerCode,packageType,sterilingType,sterilizerName,frequency,sterileStartTime,validUntil, + warningUntil,tousseName,foreignTprice,fluctuationPrice,orgUnitCoding,orgUnitName); + + tousseInstanceManager.saveOrUpdate(tousseInstance); + if(buff.length() > 0){ + buff.append(","); + } + buff.append(tousseInstance.getBarcode()); + } + + updatePackingRecordInfo(splitPackages.size(),originalTousseInstance.getPackingRecord_id()); + + originalTousseInstance.setStatus(TousseInstance.STATUS_DISCARD); + originalTousseInstance.setPackingRecord_id(null);//去掉装配记录 + originalTousseInstance.setForeignTousseApp_id(null); + originalTousseInstance.setInvoicePlanID(null); + objectDao.saveOrUpdate(originalTousseInstance); + + + appLogManager.saveLog(loginUser, Log.MODEL_PACKING, "U", "ID=" + applicationId + "的外来器械申请单,将条码为" + + originalTousseInstance.getBarcode()+"的器械包重新拆成条码为[" + buff.toString() + "]的小包!"); + } + + /** + * 更新装配记录数量 + * @param amount + * @param packingRecordId + */ + private void updatePackingRecordInfo(Integer amount,Long packingRecordId){ + String sql = "update PackingRecord set amount = " + amount + " where id = " + packingRecordId; + objectDao.excuteSQL(sql); + } + + private TousseInstance createForeignTousseInstance(TousseInstance originalTousseInstance,TousseDefinition td,String operator, + String operatorCode,String reviewer,String reviewerCode,String packageType, + String sterilingType,String sterilizerName,String frequency,Date sterileStartTime,Date validUntil, + Date warningUntil,String tousseName,Double foreignTprice,Double fluctuationPrice, + String orgUnitCoding,String orgUnitName) { + TousseInstance tousseInstance = new TousseInstance(); + + tousseInstance.setBarcode(serialNumManager.getSerialNumberStr(SerialNum.TYPE_BARCODE)); + tousseInstance.setWeight(originalTousseInstance.getWeight()); + tousseInstance.setType(BarcodeDevice.BARCODE_TYPE_PACKAGE); + tousseInstance.setTousseDefinition(td); + //对于不需要审核的器械包,修改其状态 + if(TousseDefinition.STR_NO.equals(td.getIsReview())){ + tousseInstance.setStatus(TousseInstance.STATUS_REVIEWED); + }else{ + tousseInstance.setStatus(TousseInstance.STATUS_PACKED); + } + tousseInstance.setTousseName(td.getName()); + + tousseInstance.setOperator(operator); + tousseInstance.setOperatorCode(operatorCode); + tousseInstance.setOperationTime(new Date()); + + // 装配时输入了审核人信息 + if (StringUtils.isNotBlank(reviewer) && StringUtils.isNotBlank(reviewerCode)){ + tousseInstance.setReviewer(reviewer);// 审核员 + tousseInstance.setReviewerCode(reviewerCode); + } + + // 器械包或者消毒物品定义为不需要审核 + if(TousseDefinition.STR_NO.equals(td.getIsReview())){ + // 将审核人和审核时间设置为装配人 + if (StringUtils.isBlank(tousseInstance.getReviewer())){ + tousseInstance.setReviewer(operator); + tousseInstance.setReviewerCode(operatorCode); + } + tousseInstance.setReviewTime(new Date()); + } + + // 器械包价格、浮动价格 + tousseInstance.setPrice(foreignTprice); + tousseInstance.setFluctuationPrice(fluctuationPrice); + + + tousseInstance.setPackageType(packageType);// 包装类型 + tousseInstance.setSterilingType(sterilingType);// 灭菌程序 + tousseInstance.setUnTraceableTousse(false); + tousseInstance.setStatisticsAmount(td.getTousseAmount()); + + tousseInstance.setSterilizerName(sterilizerName); + tousseInstance.setSterileFrequency(frequency); + tousseInstance.setSterileStartTime(Constants.SIMPLEDATEFORMAT_YYYYMMDDHHMMSS.format(sterileStartTime)); + tousseInstance.setValidUntil(validUntil);// 失效期 + tousseInstance.setWarningUntil(warningUntil);// 预警日期 + tousseInstance.setOrgUnitCoding(orgUnitCoding); + tousseInstance.setOrgUnitName(orgUnitName); + tousseInstance.setClassifyBasket_id(originalTousseInstance.getClassifyBasket_id()); + tousseInstance.setDisinfectIdentification(originalTousseInstance.getDisinfectIdentification()); + tousseInstance.setDisinfectProgram(originalTousseInstance.getDisinfectProgram()); + tousseInstance.setWashOperator(originalTousseInstance.getOperator()); + tousseInstance.setWashStartTime(originalTousseInstance.getWashStartTime()); + tousseInstance.setWashEndTime(originalTousseInstance.getWashEndTime()); + tousseInstance.setClassifyBasketIds(originalTousseInstance.getClassifyBasketIds()); + tousseInstance.setWashOperator(originalTousseInstance.getWashOperator()); + tousseInstance.setWashStartTime(originalTousseInstance.getWashStartTime()); + tousseInstance.setPackingRecord_id(originalTousseInstance.getPackingRecord_id()); + tousseInstance.setForeignTousseApp_id(originalTousseInstance.getForeignTousseApp_id()); + tousseInstance.setInvoicePlanID(originalTousseInstance.getInvoicePlanID()); + tousseInstance.setWashBasket(originalTousseInstance.getWashBasket()); + tousseInstance.setRecyclingRecordId(originalTousseInstance.getRecyclingRecordId()); + return tousseInstance; + } } Index: ssts-web/src/main/webapp/disinfectsystem/interfere/interfereForeignTousseApplicationForm.js =================================================================== diff -u --- ssts-web/src/main/webapp/disinfectsystem/interfere/interfereForeignTousseApplicationForm.js (revision 0) +++ ssts-web/src/main/webapp/disinfectsystem/interfere/interfereForeignTousseApplicationForm.js (revision 14956) @@ -0,0 +1,943 @@ +//拆分外来器械包 +var leftMaterialGridPanel; +var leftMaterialStore; +var addSplitMaterial; +var rightMaterialGridPanel; +var rightMaterialStore; + +var childPackagePanel; +var childPackageStore; +var addMaterial; + +var splitforeignPanel; + +var tempforeignTousseName=""; + +var packageTypeStoreExt = new Ext.data.SimpleStore({ + fields : [ 'typeName' ], + url : WWWROOT + '/disinfectSystem/baseData/expirationDateInfoAction!getPackageType.do' +}); +packageTypeStoreExt.load(); + +var isBigPackageStore = new Ext.data.SimpleStore( { + fields : ['result'], + data : [['是'],['否']] +}); + +var sterilizerTypeStore = new Ext4.data.Store({ + proxy : { + type : 'ajax', + url : WWWROOT + '/disinfectSystem/baseData/sterilizerAction!getSterilizerType.do', + reader : { + type : 'array' + } + }, + fields : [ 'id','typeName' ], + autoLoad : true +}); + +var sterilizerJsonStore = new Ext4.data.Store({ + proxy : { + type : 'ajax', + url : WWWROOT + '/disinfectSystem/baseData/sterilizerAction!getAllSterilizer.do?includeNone=yes', + reader : { + type : 'array' + } + }, + fields : [ 'sterilizerName' ], + autoLoad : true +}); + +function validateValidUntil(foreignTousseName,supplierName){ + var showResult = ""; + for ( var i = 0; i < childPackageStore.getCount(); i++) { + var record = childPackageStore.getAt(i); + var packageType = record.get("packingType"); + DWREngine.setAsync(false); + var date = new Date(); + ExpirationDateInfoTableManager.getExpirationDate(date,packageType,function(result){ + var json = JSON.parse(result); + if (!json.isDefined){ + showResult += (packageType + ","); + } + }); + DWREngine.setAsync(true); + } + return showResult; +} + +function toRightGrid(){ + var records = leftMaterialGridPanel.getSelectionModel().getSelections(); + if (records.length == 0) { + showResult("请选择!"); + return false; + } + //添加 + for ( var j = 0; j < records.length; j++) { + var materialName = records[j].data['materialName']; + var splitAmount = records[j].data['splitAmount']; + var materialAmount = records[j].data['materialAmount']; + var includeImplant = records[j].data['includeImplant']; + if(splitAmount > materialAmount){ + showResult("拆分数量不能大于剩余数量!"); + return false; + } + if(splitAmount == 0){ + continue; + } + var b = false; + for ( var n = 0; n < rightMaterialStore.getCount(); n++) { + var record = rightMaterialStore.getAt(n); + var name =record.get('materialName'); + var amount = record.get('materialAmount'); + if(name == materialName){ + b =true; + var num = Number(amount) + Number(splitAmount); + record.set('materialAmount', num); + } + } + if(!b){ + var record = new addSplitMaterial({ + materialName : materialName, + materialAmount : splitAmount, + includeImplant : includeImplant + }); + rightMaterialStore.addSorted(record); + } + } + //删除 + var rows = top.Ext.getCmp('splitMaterialGrid2').getSelectionModel().getSelections();// 返回值为 + if (rows) { + for ( var i = 0; i < rows.length; i++) { + var splitAmount = rows[i].data['splitAmount']; + var materialAmount = rows[i].data['materialAmount']; + if(splitAmount == materialAmount){ + leftMaterialStore.remove(rows[i]); + }else{ + var num = Number(materialAmount) - Number(splitAmount); + rows[i].set('splitAmount', num); + rows[i].set('materialAmount', num); + } + } + } +} + +function allToRightGrid(){ + var objArray = new Array(); + for ( var i = 0; i < leftMaterialStore.getCount(); i++) { + var record = leftMaterialStore.getAt(i); + var name =record.get('materialName'); + var amount = record.get('splitAmount'); + var materialAmount = record.get('materialAmount'); + var includeImplant = record.get('includeImplant'); + if(Number(amount) > Number(materialAmount)){ + amount = materialAmount; + } + if(Number(amount) < Number(materialAmount)){ + var num = Number(materialAmount) - Number(amount); + record.set('splitAmount', num); + record.set('materialAmount', num); + } + + var b =false; + for ( var n = 0; n < rightMaterialStore.getCount(); n++) { + var rightRecord = rightMaterialStore.getAt(n); + var rightName =rightRecord.get('materialName'); + var rightAmount = rightRecord.get('materialAmount'); + if(rightName == name){ + b = true; + var num = Number(rightAmount) + Number(amount); + rightRecord.set('materialAmount', num); + } + } + if(!b){ + var rightrecord = new addSplitMaterial({ + materialName : name, + materialAmount : amount, + includeImplant:includeImplant + }); + rightMaterialStore.add(rightrecord); + } + + if(amount == materialAmount){ + var index = objArray.length; + objArray[index] = record; + } + } + if(objArray.length > 0){ + for ( var j = 0; j < objArray.length; j++) { + leftMaterialStore.remove(objArray[j]); + } + } +} +function allToLeftGrid(){ + for ( var i = 0; i < rightMaterialStore.getCount(); i++) { + var record = rightMaterialStore.getAt(i); + var name =record.get('materialName'); + var amount = record.get('materialAmount'); + var includeImplant = record.get('includeImplant'); + + var b = false; + for ( var n = 0; n < leftMaterialStore.getCount(); n++) { + var leftRecord = leftMaterialStore.getAt(n); + var leftName =leftRecord.get('materialName'); + var leftAmount = leftRecord.get('materialAmount'); + if(leftName == name){ + b =true; + var num = Number(leftAmount) + Number(amount); + leftRecord.set('materialAmount', num); + leftRecord.set('splitAmount', num); + + } + } + if(!b){ + var rightrecord = new addSplitMaterial({ + materialName : name, + splitAmount : amount, + materialAmount : amount, + includeImplant:includeImplant + }); + leftMaterialStore.addSorted(rightrecord); + } + } + rightMaterialStore.removeAll(); +} + +function toLeftGrid(){ + var records = rightMaterialGridPanel.getSelectionModel().getSelections(); + if (records.length == 0) { + showResult("请选择!"); + return false; + } + for ( var j = 0; j < records.length; j++) { + var materialName = records[j].data['materialName']; + var materialAmount = records[j].data['materialAmount']; + var includeImplant = records[j].data['includeImplant']; + + var b = false; + for ( var n = 0; n < leftMaterialStore.getCount(); n++) { + var record = leftMaterialStore.getAt(n); + var name =record.get('materialName'); + var amount = record.get('materialAmount'); + if(name == materialName){ + b =true; + var num = Number(amount) + Number(materialAmount); + record.set('materialAmount', num); + record.set('splitAmount', num); + } + } + if(!b){ + var record = new addSplitMaterial({ + materialName : materialName, + splitAmount : materialAmount, + materialAmount : materialAmount, + includeImplant:includeImplant + }); + leftMaterialStore.add(record); + } + } + //删除 + var rows = top.Ext.getCmp('splitMaterialGrid3').getSelectionModel().getSelections();// 返回值为 + if (rows) { + for ( var i = 0; i < rows.length; i++) { + rightMaterialStore.remove(rows[i]); + } + } +} +//拆包 +var j = 1; +function createChildPackage(){ + var materialsStr = ""; + var toolAmount = 0; // 工具数量 + var implantAmount = 0; // 植入物数量 + + var materialsArray = []; + + for ( var i = 0; i < rightMaterialStore.getCount(); i++) { + var record = rightMaterialStore.getAt(i); + var includeImplant = record.get('includeImplant'); + + if(includeImplant == "是"){ + implantAmount += Number(record.get('materialAmount')); + }else{ + includeImplant = "否"; + toolAmount += Number(record.get('materialAmount')); + } + var temp = record.get('materialName') + "["+includeImplant+"]" + "x" +record.get('materialAmount'); + if (materialsStr == null || materialsStr.length <= 0) { + materialsStr = temp; + } else { + materialsStr = materialsStr + ";" + temp; + } + + var materialObj = {}; + materialObj.name = record.get('materialName'); + materialObj.includeImplant = includeImplant; + materialObj.materialAmount = record.get('materialAmount'); + + materialsArray.push(materialObj); + } + + var packageName = tempforeignTousseName + "(部分"+j+")"; + var type = packageTypeStoreExt.getAt(0).get('typeName'); + if(materialsStr != ""){ + j++; + var record = new addMaterial({ + tousseName : packageName, + materialNames : materialsStr, + materialsJsonArray : materialsArray, + packingType : type, + bigPackage : "否", + toolAmount : toolAmount, + implantAmount : implantAmount + }); + childPackageStore.add(record); + //删除 + rightMaterialStore.removeAll(); + }else{ + showResult("请选择拆分的材料!"); + } +} + +//获取拆分的包的数据 +function getSplitForeignTousse(){ + var packages = []; + for ( var i = 0; i < childPackageStore.getCount(); i++) { + var record = childPackageStore.getAt(i); + + var tousse = {}; + tousse.tousseName = record.get('tousseName'); + tousse.materialNames = record.get('materialNames'); + tousse.materialsJsonArray = record.get('materialsJsonArray'); + tousse.bigPackage = record.get('bigPackage'); + tousse.packingType = record.get('packingType'); + tousse.toolAmount = record.get('toolAmount'); + tousse.implantAmount = record.get('implantAmount'); + packages.push(tousse); + + } + if(packages.length > 0){ + top.Ext.getCmp('splitPackages').setValue(JSON.stringify(packages)); + return true; + }else{ + top.Ext.getCmp('splitPackages').setValue(null); + return false; + } +} + +function loadReviewerByBarcode(barcodeField,elementName,elementCode){ + var nameTextfieldObj = top.Ext.getCmp(elementName); + var codeTextfieldObj = top.Ext.getCmp(elementCode); + + var peopleOfBarcode = barcodeField.getValue(); + if(peopleOfBarcode){ + UserTableManager.getUserByBarcode(peopleOfBarcode,function(responseText){ + if(responseText){ + var result = Ext.decode(responseText); + if(!result.success){ + showResult("输入的条码有误!"); + return; + }else{ + nameTextfieldObj.setValue(result.fullName); + codeTextfieldObj.setValue(result.name); + if(elementName == "operator"){ + top.Ext.getCmp('reviewerBarcode').focus('', 10); + } + } + }else{ + codeTextfieldObj.setValue(""); + nameTextfieldObj.setValue(""); + showResult('找不到该条码所对应的人员信息'); + } + }); + } + barcodeField.setValue(""); +} + +function splitForeignTousse(applicationId,foreignTousseName,supplierName){ + //器械报基础信息 + tempforeignTousseName = foreignTousseName; + + var isShowDefaultPackerOfSplitForeignTousse = getBoolValueFromJs("sstsConfig.isShowDefaultPackerOfSplitForeignTousse",true); + + splitforeignPanel = new top.Ext.form.FormPanel( { + labelAlign : 'right', + buttonAlign : 'center', + collapsible : true, + collapseMode : 'mini', + split : true, + border : 0, + labelSeparator : ':', +// bodyStyle : 'padding: 10px 10px 0 10px;', + frame : true, + layout: 'column', + bodyStyle : 'padding:0px auto;margin:0px',// padding:1px;padding-top:5px; + items : [{ + xtype : 'hidden', + id : 'selectTousseName', + name : 'selectTousseName' + },{ + xtype : 'hidden', + id : 'splitPackages', + name : 'splitPackages' + },{ + xtype : 'hidden', + id : 'operatorCode', + name : 'operatorCode', + value : (isShowDefaultPackerOfSplitForeignTousse ? $Id('userLoginName').value : "") + },{ + xtype : 'hidden', + id : 'reviewerCode', + name : 'reviewerCode' + },{ + columnWidth : .33, + layout : 'form', + labelWidth : 70, + items : [{ + xtype : 'textfield', + fieldLabel : "配包人条码", + name : "packerBarcode", + id : "packerBarcode", + allowBlank : true, + listeners : { + specialkey : function(thiz, e){ + if(e.getKey() == 13){ + loadReviewerByBarcode(thiz,"operator","operatorCode"); + } + } + }, + anchor : '80%' + }] + },{ + columnWidth : .33, + layout : 'form', + labelWidth : 70, + items : [{ + xtype : 'textfield', + fieldLabel : '配包人', + maxLength : '16', + id : 'operator', + name : 'operator', + value : (isShowDefaultPackerOfSplitForeignTousse ? $Id('userName').value : ""), + allowBlank : false, + readOnly : true, + anchor : '80%' + }] + },{ + columnWidth : .33, + layout : 'form', + labelWidth : 70, + items : [{ + xtype : 'textfield', + fieldLabel : "审核人条码", + name : "reviewerBarcode", + id : "reviewerBarcode", + allowBlank : true, + listeners : { + specialkey : function(thiz, e){ + if(e.getKey() == 13){ + loadReviewerByBarcode(thiz,"reviewer","reviewerCode"); + } + } + }, + anchor : '80%' + }] + },{ + columnWidth : .33, + layout : 'form', + labelWidth : 70, + items : [{ + xtype : 'textfield', + fieldLabel : "审核人", + name : "reviewer", + id : "reviewer", + allowBlank : false, + anchor : '80%', + value : Ext.state.Manager.getProvider().get('reviewer'), + readOnly: true + }] + }, { + columnWidth : .33, + layout : 'form', + labelWidth : 70, + items : [{ + xtype : 'combo', + fieldLabel : "灭菌程序", + valueField : 'typeName', + displayField : 'typeName', + store : sterilizerTypeStore, + forceSelection : true, + editable : false, + triggerAction : 'all', + name : "sterilingType", + id : "sterilingType", + anchor : '80%', + allowBlank : false + }] + },{ + columnWidth : .33, + layout : 'form', + labelWidth : 70, + hidden : !sstsConfig.showSterilizer, + items : [{ + xtype : 'combo', + fieldLabel : '灭菌炉', + id : 'sterilizer', + name : 'sterilizer', + valueField : 'sterilizerName', + displayField : 'sterilizerName', + store : sterilizerJsonStore, + triggerAction : 'all', + mode : 'remote', + editable : false, + forceSelection : true, + allowBlank : !sstsConfig.sterilizerNotAllowBlank, + anchor : '80%', + listeners : { + select : function(combo, record, index) { + SterilizationRecordTableManager.getMaxFrequency(combo.value,0,function(frequency){ + top.Ext.getCmp('frequency').setValue(frequency); + }); + } + } + }] + },{ + columnWidth : .33, + layout : 'form', + labelWidth : 70, + hidden : !sstsConfig.showSterilizer, + items : [{ + xtype : 'numberfield', + fieldLabel : '炉次', + allowDecimals : false, + allowNegative : false, + minValue : 1, + id : 'frequency', + name : 'frequency', + allowBlank : !sstsConfig.sterilizerNotAllowBlank, + value : 1, + anchor : '80%' + }] + }], + buttons : [{ + text : "重新装配", + handler : function() { + + if (!splitforeignPanel.form.isValid()) { + showResult('请正确填写表单各值'); + this.enable(); + return false; + } + + packingToussesArray = []; // 清除所装配的器械包数组 + + var v = leftMaterialStore.getCount(); + if(v > 0){ + showResult("待拆分的材料部分未拆分!"); + return false; + } + v = rightMaterialStore.getCount(); + if(v > 0){ + showResult("已拆分的材料部分未拆分!"); + return false; + } + + if(!top.Ext.getCmp('reviewer').getValue() && sstsConfig.printLabelWhenReviewing != true){ + showResult("请扫描审核人条码!"); + return false; + } + + if(!splitforeignPanel.getForm().isValid()){ + return false; + } + //验证失效期 + var result = validateValidUntil(foreignTousseName,supplierName); + if(result != ""){ + showResult(result + "此包装类型没有相应的失效日期!请设置此包装类型的失效日期!"); + return false; + } + if(!getSplitForeignTousse()){ + showResult("已拆分的器械包不能为空!"); + return false; + } + + + operator = top.Ext.getCmp('operator').getValue(); + operatorCode = top.Ext.getCmp('operatorCode').getValue(); + reviewer = top.Ext.getCmp('reviewer').getValue(); + reviewerCode = top.Ext.getCmp('reviewerCode').getValue(); + var sterilingType = top.Ext.getCmp('sterilingType').getValue(); + var splitPackages = top.Ext.getCmp('splitPackages').getValue(); + var sterilizer = top.Ext.getCmp("sterilizer").getValue(); + var frequency = top.Ext.getCmp("frequency").getValue(); + + var sterileDate = new Date(); //灭菌日期默认为当天 + + var params = { + applicationId:applicationId, + operator: operator, + operatorCode: operatorCode, + reviewer: reviewer, + reviewerCode: reviewerCode, + sterilingType: sterilingType, + sterileDate: sterileDate.getTime(), + splitPackage: splitPackages, + sterilizer: sterilizer, + frequency: frequency + } + + PackingTableManager.interfereSplitForeignTousse(JSON.stringify(params),function(rs){ + if (rs != null){ + var result = Ext.decode(rs); + if (result.success){ + showResult(result.message); + window.close(); + }else{ + showResult(result.message); + } + + } + + }); + } + }] + }); + + /**********************待拆分区域**************************************************************/ + + var leftMaterialCm = new Ext.grid.ColumnModel( [ { + header : "材料名称", + dataIndex : 'materialName', + width : 200, + menuDisabled: true + }, { + id:'materialAmount', + header : "拆分数量", + dataIndex : 'splitAmount', + width : 60, + menuDisabled: true, + editor : new Ext.form.NumberField({ + allowBlank : false, + listeners : { + focus : function(thiz){ + thiz.selectText(); + } + } + }) + }, { + id:'materialAmount', + header : "剩余数量", + dataIndex : 'materialAmount', + width : 60, + menuDisabled: true + },{ + id:'includeImplant', + header : "植入物", + width : 50, + dataIndex : 'includeImplant' + }]); + + var rightMaterialCm = new Ext.grid.ColumnModel( [ { + header : "材料名称", + dataIndex : 'materialName', + width : 200, + menuDisabled: true + }, { + id:'materialAmount', + header : "数量", + dataIndex : 'materialAmount', + width : 60, + menuDisabled: true + },{ + id:'includeImplant', + header : "植入物", + dataIndex : 'includeImplant', + width : 60 + }]); + + + var splitMaterialRd = new Ext.data.JsonReader({ + fields : [ + {name : 'materialName'}, + {name : 'splitAmount'}, + {name : 'materialAmount'}, + {name : 'includeImplant'} + ] + }); + //初始化加载器械包 + leftMaterialStore = new top.Ext.data.Store({ + proxy : new Ext.data.HttpProxy({ + url : WWWROOT + '/disinfectSystem/packingAction!getTousseIncludeMaterials.do', + method : 'POST' + }), + reader : splitMaterialRd + }); + leftMaterialStore.load({ + params:{applicationId:applicationId,tousseName:foreignTousseName,supplierName:supplierName}, + callback:function(records,options,success){ + if(records.length == 0){ + showResult("该器械包已灭菌或已拆包,不能重新拆包!"); + } + } + }); + + leftMaterialGridPanel = new top.Ext.grid.EditorGridPanel( { + id : 'splitMaterialGrid2', + height : 250, + store : leftMaterialStore, + cm : leftMaterialCm, + title : '待拆分的材料', + clicksToEdit : 1,// 设置点击几次才可编辑 + selModel : new top.Ext.grid.RowSelectionModel({ + singleSelect : false + }), + viewConfig: { + forceFit:true + }, + frame : false, + border : true, + autoExpandColumn : 'materialAmount', + stripeRows : true, + bodyStyle : 'border:1px solid #afd7af;padding-left:5px' + }); + + + + /**************分类区*************/ + addSplitMaterial = Ext.data.Record.create( [{ + name : 'materialName' + }, { + name : 'materialAmount' + }]); + + rightMaterialStore = new top.Ext.data.Store({ + proxy : new Ext.data.HttpProxy({ + url : WWWROOT + '/disinfectSystem/packingAction!getTousseIncludeMaterials.do', + method : 'POST' + }), + reader : splitMaterialRd + }); + + rightMaterialGridPanel = new top.Ext.grid.GridPanel( { + id : 'splitMaterialGrid3', + height : 250, + store : rightMaterialStore, + cm : rightMaterialCm, + enableHdMenu : false, + clicksToEdit : 1,// 设置点击几次才可编辑 + selModel : new top.Ext.grid.RowSelectionModel({ + singleSelect : false + }), + viewConfig: { + forceFit:true + }, + title : '已拆分的材料', +// frame : false, +// border : true, + autoExpandColumn : 'materialAmount', + bodyStyle : 'border:1px solid #afd7af;padding-left:5px' + }); + + + /*************************已拆分区域*************************************************************************************/ + + + addMaterial = Ext.data.Record.create( [{ + name : 'tousseName' + }, { + name : 'materialNames' + }, { + name : 'materialsJsonArray' + },{ + name : 'packingType' + }, { + name : 'toolAmount' + }, { + name : 'implantAmount' + },{ + name : 'bigPackage' + }]); + + var materialCm = new top.Ext.grid.ColumnModel( [ { + header : "器械包名称", + dataIndex : 'tousseName', + width : 160, + menuDisabled: true + },{ + id : 'bigPackage', + header : "超大超重包", + dataIndex : 'bigPackage', + width : 60, + editor :new top.Ext.form.ComboBox({ + fieldLabel : '是否装配', + valueField : 'result', + displayField : 'result', + store : isBigPackageStore, + forceSelection : true, + allowBlank : false, + triggerAction : 'all', + mode : 'local', + anchor : '97%' + }) + },{ + id : 'packingType', + header : "包装类型", + dataIndex : 'packingType', + width : 50, + editor :new top.Ext.form.ComboBox({ + fieldLabel : '包装类型', + valueField : 'typeName', + displayField : 'typeName', + listWidth : 150, + store : packageTypeStoreExt, + forceSelection : true, + allowBlank : false, + triggerAction : 'all', + mode : 'local', + anchor : '97%' + }) + }, { + id:'materialNames', + header : "包含的材料", + dataIndex : 'materialNames', + width : 200, + menuDisabled: true + },{ + id:"toolAmount", + header:"工具件数", + width : 60, + align : 'center', + dataIndex:'toolAmount' + },{ + id:"implantAmount", + header:"植入物件数", + width : 70, + align : 'center', + dataIndex:'implantAmount' + }]); + + + var rd = new Ext.data.JsonReader({ + fields : [ + {name : 'tousseName'}, + {name : 'materialNames'}, + {name : 'packingType'}, + {name : 'total'}, + {name : 'bigPackage'} + + ] + }); + //初始化加载器械包 + childPackageStore = new top.Ext.data.Store({ + proxy : new Ext.data.HttpProxy({ + url : WWWROOT + '/disinfectSystem/recyclingApplicationAction!loadTousseInstaceByid.do', + method : 'POST' + }), + reader : rd + }); + //拆分列表区 + childPackagePanel = new top.Ext.grid.EditorGridPanel( { + id : 'splitMaterialGrid', + height : 200, + width : 800, + store : childPackageStore, + cm : materialCm, + title : '已拆分的器械包', + frame : false, + border : true, + selModel : new top.Ext.grid.RowSelectionModel({ + singleSelect : false + }), + viewConfig: { + forceFit:true + }, +// autoExpandColumn : 'materialNames', + stripeRows : true, + bodyStyle : 'border:1px solid #afd7af;padding-left:5px' + }); + + var window = new top.Ext.Window( { + id : 'invoiceWin', + layout : 'border', + title : '['+foreignTousseName + ']拆分', + width : 850, + height:630, + autoHeight : false, + border : false, + plain : true, + modal :true, + items : [{ + region : 'north', + height : 130, + layout : 'fit', + items : [splitforeignPanel] + }, { + region : 'center', + height : 250, + layout : 'column', + items : [ + { + layout : 'form', + columnWidth : 0.47, + items : [ leftMaterialGridPanel ] + },{ + layout : 'form', + columnWidth : 0.06, + buttonAlign:'center', + height : 250, + items : [ + { height :100, + border:false + }, { + xtype :'button', + text : '>>', + minWidth:48, + handler : toRightGrid + }, { + xtype :'button', + text : '<<', + minWidth:48, + handler : toLeftGrid + }, { + xtype :'button', + text : '>>>>', + minWidth:48, + handler : allToRightGrid + }, { + xtype :'button', + text : '<<<<', + minWidth:48, + handler : allToLeftGrid + },{ + xtype :'button', + text:'拆分', + border:false, + minWidth:48, + frame : false, + handler : createChildPackage + + } ] + }, { + layout : 'form', + columnWidth : 0.47, + items : [ rightMaterialGridPanel ] + } ] + }, { + region : 'south', + height : 220, + layout : 'fit', + items : [ childPackagePanel ] + } ] + }); + window.on('beforeclose',function(){ + j=1; + }); + window.show(); + + if (sstsConfig.printLabelWhenReviewing == true){ + var reviewer = top.Ext.getCmp("reviewer"); + var reviewerBarcode = top.Ext.getCmp("reviewerBarcode"); + hideField(reviewer); + hideField(reviewerBarcode); + } +} Index: ssts-packing/src/main/java/com/forgon/disinfectsystem/packing/dwr/table/PackingTableManager.java =================================================================== diff -u -r14698 -r14956 --- ssts-packing/src/main/java/com/forgon/disinfectsystem/packing/dwr/table/PackingTableManager.java (.../PackingTableManager.java) (revision 14698) +++ ssts-packing/src/main/java/com/forgon/disinfectsystem/packing/dwr/table/PackingTableManager.java (.../PackingTableManager.java) (revision 14956) @@ -45,6 +45,7 @@ import com.forgon.disinfectsystem.tousse.toussedefinition.service.TousseInstanceManager; import com.forgon.security.model.User; import com.forgon.tools.hibernate.ObjectDao; +import com.forgon.tools.json.JSONUtil; import com.google.gson.JsonObject; /** @@ -444,6 +445,24 @@ } /** + * 干预外来器械拆包 + * @param params + * @param session + * @return + */ + public String interfereSplitForeignTousse(String params) { + boolean success = true; + String msg = "保存成功!"; + try { + packingManager.interfereSplitForeignTousse(params); + } catch (Exception e) { + success = false; + msg = e.getMessage(); + } + return JSONUtil.buildJsonObject(success, msg).toString(); + } + + /** * 验证是否打印的标签是否标记表格线:6个月或者180天有效期 * @param sterilizationDate 灭菌日期 * @param validDate 失效期 Index: ssts-web/src/main/webapp/disinfectsystem/interfere/interfereForeignTousseApplicationView.js =================================================================== diff -u -r14017 -r14956 --- ssts-web/src/main/webapp/disinfectsystem/interfere/interfereForeignTousseApplicationView.js (.../interfereForeignTousseApplicationView.js) (revision 14017) +++ ssts-web/src/main/webapp/disinfectsystem/interfere/interfereForeignTousseApplicationView.js (.../interfereForeignTousseApplicationView.js) (revision 14956) @@ -14,6 +14,31 @@ openForeignTousseForm(records[0].data.id,"interfere"); } +function foreignTousseCheck(applicationId,tousseName,supplierName){ + Ext.Ajax.request({ + url : WWWROOT + '/disinfectSystem/packingAction!isForeignTousseApplicationCanSplitTousse.do', + params : { + applicationId : applicationId + }, + success : function(response, options) { + var result = Ext4.decode(response.responseText); + if(result.success){ + splitForeignTousse(applicationId,tousseName,supplierName); + }else{ + showResult(result.message); + } + }, + failure : function(response, options) { + var result = Ext4.decode(response.responseText); + showResult(result.message); + } + }); +} + +function interfereForeignTousse(v,p,record){ + return ""; +} + Ext.onReady(function(){ Ext.QuickTips.init(); var columns = [ @@ -25,11 +50,13 @@ {header : "病人姓名",width : 60,dataIndex : 'patient'}, {header : "医生",width : 60,dataIndex : 'doctor'}, {header : "外来器械包名称",width : 150,dataIndex : 'tousseName'}, + {header : "供应商",width : 150,dataIndex : 'supplierName'}, {header : "手术名称",width : 120,dataIndex : 'surgery'}, {header : "接收人",width : 60,dataIndex : 'receiveMan'}, {header : "接收时间",width : 120,dataIndex : 'receiveTime', renderer : myDateFormatByMinute}, {header : "归还人",width : 60,dataIndex : 'returnMan'}, {header : "归还时间",width : 120,dataIndex : 'returnTime', renderer : myDateFormatByMinute}, + {header : "操作",width : 120,dataIndex : 'id', renderer : interfereForeignTousse}, {header: "备注", width : 400, dataIndex: 'remark'} ]; @@ -43,6 +70,7 @@ {name : 'patient'}, {name : 'doctor'}, {name : 'tousseName'}, + {name : 'supplierName'}, {name : 'surgery'}, {name : 'receiveMan'}, {name : 'receiveTime'}, @@ -61,6 +89,7 @@ {type: 'string', dataIndex: 'doctor'}, {type: 'string', dataIndex: 'surgery'}, {type: 'string', dataIndex: 'tousseName'}, + {type: 'string', dataIndex: 'supplierName'}, {type: 'string', dataIndex: 'receiveMan'}, {type: 'date', dataIndex: 'receiveTime'}, {type: 'string', dataIndex: 'returnMan'}, Index: ssts-packing/src/main/java/com/forgon/disinfectsystem/packing/service/PackingManager.java =================================================================== diff -u -r14913 -r14956 --- ssts-packing/src/main/java/com/forgon/disinfectsystem/packing/service/PackingManager.java (.../PackingManager.java) (revision 14913) +++ ssts-packing/src/main/java/com/forgon/disinfectsystem/packing/service/PackingManager.java (.../PackingManager.java) (revision 14956) @@ -125,4 +125,10 @@ * @param tousseInstances 需要重装的包实例的集合 */ public void createPackingTaskForRepacking(Collection tousseInstances); + + /** + * 干预外来器械拆包 + * @param params + */ + public void interfereSplitForeignTousse(String params); } Index: ssts-tousse/src/main/java/com/forgon/disinfectsystem/tousse/toussedefinition/service/TousseInstanceManager.java =================================================================== diff -u -r14930 -r14956 --- ssts-tousse/src/main/java/com/forgon/disinfectsystem/tousse/toussedefinition/service/TousseInstanceManager.java (.../TousseInstanceManager.java) (revision 14930) +++ ssts-tousse/src/main/java/com/forgon/disinfectsystem/tousse/toussedefinition/service/TousseInstanceManager.java (.../TousseInstanceManager.java) (revision 14956) @@ -1,27 +1,22 @@ package com.forgon.disinfectsystem.tousse.toussedefinition.service; import java.io.OutputStream; -import java.util.ArrayList; import java.util.Collection; import java.util.Date; import java.util.List; import java.util.Map; import java.util.Set; -import net.sf.json.JSONArray; import net.sf.json.JSONObject; -import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.Predicate; -import com.forgon.disinfectsystem.barcode.dwr.table.BarcodeTableManager; import com.forgon.disinfectsystem.entity.basedatamanager.toussedefinition.TousseDefinition; import com.forgon.disinfectsystem.entity.basedatamanager.toussedefinition.TousseInstance; import com.forgon.disinfectsystem.entity.basedatamanager.warehouse.WareHouse; import com.forgon.disinfectsystem.entity.packing.ReviewedBasket; import com.forgon.disinfectsystem.entity.sterilizationmanager.sterilizationrecord.SterilizationRecord; import com.forgon.disinfectsystem.vo.TousseSimpleVO; -import com.forgon.tools.SqlBuilder; /** * @author songwei 2012-3-27 下午13:59:34 @@ -156,6 +151,8 @@ public TousseInstance getTousseInstanceByNameAndAPPID(String tousseName,String appid); + public List getForeignTousseTousseInstance(String appid); + public List getBySql_ForUpdate(String sql); public List getByIDs_ForUpdate(String ids); Index: ssts-tousse/src/main/java/com/forgon/disinfectsystem/tousse/toussedefinition/service/TousseInstanceManagerImpl.java =================================================================== diff -u -r14930 -r14956 --- ssts-tousse/src/main/java/com/forgon/disinfectsystem/tousse/toussedefinition/service/TousseInstanceManagerImpl.java (.../TousseInstanceManagerImpl.java) (revision 14930) +++ ssts-tousse/src/main/java/com/forgon/disinfectsystem/tousse/toussedefinition/service/TousseInstanceManagerImpl.java (.../TousseInstanceManagerImpl.java) (revision 14956) @@ -1756,6 +1756,13 @@ jsonObj.put("returnType", returnType); return jsonObj; } + + @SuppressWarnings("unchecked") + @Override + public List getForeignTousseTousseInstance(String appid) { + return objectDao.findBySql( + TousseInstance.class.getSimpleName(), String.format(" where po.invoicePlanID=%s", appid)); + } } Index: ssts-web/src/main/webapp/disinfectsystem/interfere/interfereForeignTousseApplicationView.jsp =================================================================== diff -u -r14036 -r14956 --- ssts-web/src/main/webapp/disinfectsystem/interfere/interfereForeignTousseApplicationView.jsp (.../interfereForeignTousseApplicationView.jsp) (revision 14036) +++ ssts-web/src/main/webapp/disinfectsystem/interfere/interfereForeignTousseApplicationView.jsp (.../interfereForeignTousseApplicationView.jsp) (revision 14956) @@ -2,8 +2,9 @@ <%@ page contentType="text/html; charset=UTF-8"%> <%@ include file="/common/taglibs.jsp"%> <% - String userName = AcegiHelper.getLoginUser().getUserFullName(); - request.setAttribute("userName",userName); + LoginUserData loginUser = AcegiHelper.getLoginUser(); + request.setAttribute("userName",loginUser.getUserFullName()); + request.setAttribute("userLoginName",loginUser.getUserName()); request.setAttribute("depart",AcegiHelper.getLoginUser().getCurrentOrgUnitName()); request.setAttribute("departCoding",AcegiHelper.getLoginUser().getOrgUnitCodingFromSupplyRoomConfig()); %> @@ -12,18 +13,24 @@ <%@ include file="/common/includeExtJsAndCss.jsp"%> <%@ include file="/common/includeExtJs4_2.jsp"%> + + + + + + @@ -38,6 +45,7 @@ +