Index: ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/foreigntousseapplication/service/ForeignTousseApplicationManagerImpl.java
===================================================================
diff -u -r24534 -r24654
--- ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/foreigntousseapplication/service/ForeignTousseApplicationManagerImpl.java (.../ForeignTousseApplicationManagerImpl.java) (revision 24534)
+++ ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/foreigntousseapplication/service/ForeignTousseApplicationManagerImpl.java (.../ForeignTousseApplicationManagerImpl.java) (revision 24654)
@@ -24,6 +24,7 @@
import com.forgon.directory.acegi.tools.AcegiHelper;
import com.forgon.directory.model.OrgUnit;
import com.forgon.directory.service.OrgUnitManager;
+import com.forgon.directory.vo.LoginUserData;
import com.forgon.disinfectsystem.basedatamanager.goodsstock.service.GoodsStockManager;
import com.forgon.disinfectsystem.basedatamanager.supplier.service.SupplierManager;
import com.forgon.disinfectsystem.basedatamanager.supplyroomconfig.service.SupplyRoomConfigManager;
@@ -56,10 +57,12 @@
import com.forgon.serialnumber.service.SerialNumManager;
import com.forgon.tools.GB2Alpha;
import com.forgon.tools.GB2WB;
+import com.forgon.tools.date.DateTools;
import com.forgon.tools.db.DatabaseUtil;
import com.forgon.tools.hibernate.BasePoManagerImpl;
import com.forgon.tools.json.JSONUtil;
import com.forgon.tools.string.StringTools;
+import com.forgon.tools.util.ForgonDateUtils;
import com.forgon.tools.util.SqlUtils;
/**
@@ -964,4 +967,163 @@
}
}
+ @Override
+ public void modifyPatientInfoOfForeignTousseApplication(Long id,
+ String originalPatientInfo , String patientInfo) {
+ ForeignTousseApplication foreignTousseApplication = getForUpdate(id);
+ if(foreignTousseApplication == null){
+ throw new RuntimeException("未找到id为"+ id +"的外来器械申请单");
+ }
+ try{
+ String originalRemark = foreignTousseApplication.getRemark();
+ StringBuffer needAppendRemark = new StringBuffer();
+ //页面回传的各个元素的值
+ JSONObject originalPatientInfoJsonObect = JSONObject.fromObject(originalPatientInfo);
+ String originalPatientName = originalPatientInfoJsonObect.optString("patientName");
+ String originalPatientSex = originalPatientInfoJsonObect.optString("patientSex");
+ String originalPatientAge = originalPatientInfoJsonObect.optString("patientAge");
+ String originalHospitalNumber = originalPatientInfoJsonObect.optString("hospitalNumber");
+ String originalClinicNumber = originalPatientInfoJsonObect.optString("clinicNumber");
+ String originalPatientArea = originalPatientInfoJsonObect.optString("patientArea");
+ String originalRoomNumber = originalPatientInfoJsonObect.optString("roomNumber");
+ String originalBedNumber = originalPatientInfoJsonObect.optString("bedNumber");
+ String originalDoctor = originalPatientInfoJsonObect.optString("doctor");
+ String originalSurgery = originalPatientInfoJsonObect.optString("surgery");
+ String originalOperationTime = originalPatientInfoJsonObect.optString("operationTime");
+ String originalOperationRoom = originalPatientInfoJsonObect.optString("operationRoom");
+ String originalAscriptionDepartment = originalPatientInfoJsonObect.optString("ascriptionDepartment");
+
+ //页面回传的各个元素的值
+ JSONObject patientInfoJsonObect = JSONObject.fromObject(patientInfo);
+ String patientName = patientInfoJsonObect.optString("patientName");
+ String patientSex = patientInfoJsonObect.optString("patientSex");
+ String patientAge = patientInfoJsonObect.optString("patientAge");
+ String hospitalNumber = patientInfoJsonObect.optString("hospitalNumber");
+ String clinicNumber = patientInfoJsonObect.optString("clinicNumber");
+ String patientArea = patientInfoJsonObect.optString("patientArea");
+ String roomNumber = patientInfoJsonObect.optString("roomNumber");
+ String bedNumber = patientInfoJsonObect.optString("bedNumber");
+ String doctor = patientInfoJsonObect.optString("doctor");
+ String surgery = patientInfoJsonObect.optString("surgery");
+ String operationTime = patientInfoJsonObect.optString("operationTime");
+ String operationRoom = patientInfoJsonObect.optString("operationRoom");
+ String ascriptionDepartment = patientInfoJsonObect.optString("ascriptionDepartment");
+
+ if((StringUtils.isNotBlank(originalPatientName) || StringUtils.isNotBlank(patientName))
+ && !StringUtils.equals(originalPatientName, patientName)){
+ needAppendRemark.append("病人名称由").append(originalPatientName).append("修改为").append(patientName);
+ foreignTousseApplication.setPatient(patientName);
+ }
+ if((StringUtils.isNotBlank(originalPatientAge) || StringUtils.isNotBlank(patientAge))
+ && !StringUtils.equals(originalPatientAge, patientAge)){
+ if(needAppendRemark.length() > 0){
+ needAppendRemark.append(";");
+ }
+ needAppendRemark.append("年龄由").append(originalPatientAge).append("修改为").append(patientAge);
+ foreignTousseApplication.setPatientAge(patientAge);
+ }
+ if((StringUtils.isNotBlank(originalPatientSex) || StringUtils.isNotBlank(patientSex))
+ && !StringUtils.equals(originalPatientSex, patientSex)){
+ if(needAppendRemark.length() > 0){
+ needAppendRemark.append(";");
+ }
+ needAppendRemark.append("性别由").append(originalPatientSex).append("修改为").append(patientSex);
+ foreignTousseApplication.setPatientSex(patientSex);
+ }
+ if((StringUtils.isNotBlank(originalHospitalNumber) || StringUtils.isNotBlank(hospitalNumber))
+ && !StringUtils.equals(originalHospitalNumber, hospitalNumber)){
+ if(needAppendRemark.length() > 0){
+ needAppendRemark.append(";");
+ }
+ needAppendRemark.append("住院号由").append(originalHospitalNumber).append("修改为").append(hospitalNumber);
+ foreignTousseApplication.setHospitalNumber(hospitalNumber);
+ }
+ if((StringUtils.isNotBlank(originalClinicNumber) || StringUtils.isNotBlank(clinicNumber))
+ && !StringUtils.equals(originalClinicNumber, clinicNumber)){
+ if(needAppendRemark.length() > 0){
+ needAppendRemark.append(";");
+ }
+ needAppendRemark.append("诊疗号由").append(originalClinicNumber).append("修改为").append(clinicNumber);
+ foreignTousseApplication.setClinicNumber(clinicNumber);
+ }
+ if((StringUtils.isNotBlank(originalPatientArea) || StringUtils.isNotBlank(patientArea))
+ && !StringUtils.equals(originalPatientArea, patientArea)){
+ if(needAppendRemark.length() > 0){
+ needAppendRemark.append(";");
+ }
+ needAppendRemark.append("病区由").append(originalPatientArea).append("修改为").append(patientArea);
+ foreignTousseApplication.setPatientArea(patientArea);
+ }
+ if((StringUtils.isNotBlank(originalRoomNumber) || StringUtils.isNotBlank(roomNumber))
+ && !StringUtils.equals(originalRoomNumber, roomNumber)){
+ if(needAppendRemark.length() > 0){
+ needAppendRemark.append(";");
+ }
+ needAppendRemark.append("病室由").append(originalRoomNumber).append("修改为").append(roomNumber);
+ foreignTousseApplication.setRoomNumber(roomNumber);
+ }
+ if((StringUtils.isNotBlank(originalBedNumber) || StringUtils.isNotBlank(bedNumber))
+ && !StringUtils.equals(originalBedNumber, bedNumber)){
+ if(needAppendRemark.length() > 0){
+ needAppendRemark.append(";");
+ }
+ needAppendRemark.append("床位由").append(originalBedNumber).append("修改为").append(bedNumber);
+ foreignTousseApplication.setBedNumber(bedNumber);
+ }
+ if((StringUtils.isNotBlank(originalDoctor) || StringUtils.isNotBlank(doctor))
+ && !StringUtils.equals(originalDoctor, doctor)){
+ if(needAppendRemark.length() > 0){
+ needAppendRemark.append(";");
+ }
+ needAppendRemark.append("医生由").append(originalDoctor).append("修改为").append(doctor);
+ foreignTousseApplication.setDoctor(doctor);
+ }
+ if((StringUtils.isNotBlank(originalSurgery) || StringUtils.isNotBlank(surgery))
+ && !StringUtils.equals(originalSurgery, surgery)){
+ if(needAppendRemark.length() > 0){
+ needAppendRemark.append(";");
+ }
+ needAppendRemark.append("手术名称由").append(originalSurgery).append("修改为").append(surgery);
+ foreignTousseApplication.setSurgery(surgery);
+ }
+ if((StringUtils.isNotBlank(originalOperationTime) || StringUtils.isNotBlank(operationTime))
+ && !StringUtils.equals(originalOperationTime, operationTime)){
+ if(needAppendRemark.length() > 0){
+ needAppendRemark.append(";");
+ }
+ needAppendRemark.append("手术时间由").append(originalOperationTime).append("修改为").append(operationTime);
+ foreignTousseApplication.setOperationTime(ForgonDateUtils.safelyParseDate(operationTime));
+ }
+ if((StringUtils.isNotBlank(originalOperationRoom) || StringUtils.isNotBlank(operationRoom))
+ && !StringUtils.equals(originalOperationRoom, operationRoom)){
+ if(needAppendRemark.length() > 0){
+ needAppendRemark.append(";");
+ }
+ needAppendRemark.append("手术间由").append(originalOperationRoom).append("修改为").append(operationRoom);
+ foreignTousseApplication.setOperationRoom(operationRoom);
+ }
+ if((StringUtils.isNotBlank(originalAscriptionDepartment) || StringUtils.isNotBlank(ascriptionDepartment))
+ && !StringUtils.equals(originalAscriptionDepartment, ascriptionDepartment)){
+ if(needAppendRemark.length() > 0){
+ needAppendRemark.append(";");
+ }
+ needAppendRemark.append("病人所属科室由").append(originalAscriptionDepartment).append("修改为").append(ascriptionDepartment);
+ foreignTousseApplication.setAscriptionDepartment(ascriptionDepartment);
+ }
+ LoginUserData userData = AcegiHelper.getLoginUser();
+ if(needAppendRemark.length() > 0){
+ String appendRemark = "【"+ userData.getUserFullName() +"于"+ DateTools.getFormatDateStr(new Date() , DateTools.COMMON_DATE_HMS) +"对该申请单的病人信息进行了修改,修改情况为:"+ needAppendRemark +"】";
+ if(StringUtils.isNotBlank(originalRemark)){
+ appendRemark = originalRemark + ";" + appendRemark;
+ }
+ foreignTousseApplication.setRemark(appendRemark);
+ objectDao.saveOrUpdate(foreignTousseApplication);
+ }else{
+ appLogManager.saveLog(userData, Log.MODEL_APPLICATION, Log.TYPE_UPDATE, userData.getUserFullName() +"于"+ DateTools.getFormatDateStr(new Date() , DateTools.COMMON_DATE_HMS) +"点击了id为"+ id +"的申请单的病人信息修改提交,但未修改内容");
+ }
+ }catch(Exception e){
+ throw new RuntimeException("参数originalPatientInfo的格式错误");
+ }
+ }
+
}
Index: ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.js
===================================================================
diff -u -r19885 -r24654
--- ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.js (.../foreignTousseApplicationView.js) (revision 19885)
+++ ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.js (.../foreignTousseApplicationView.js) (revision 24654)
@@ -249,6 +249,23 @@
handler : function() {
comfirmReturnOrEarlyReturn(ACTION_TYPE_EARLY_RETURN);
}
+ }, '-', {
+ text : '更改病人信息',
+ iconCls : 'btn_ext_application_edit',
+ id : 'editTbar',
+ hidden : SSTS_ForeignTousseApplication_Update,
+ handler : function() {
+ var records = grid.getSelectionModel().getSelections();
+
+ if (records.length == 0) {
+ showResult("请选择要修改的"+entityName+"!");
+ return false;
+ }else if(records.length != 1){
+ showResult("一次只能修改一个"+entityName+"!");
+ return false;
+ }
+ modifyPatientInfo(records[0].data.id);
+ }
}];
grid = new Ext.ux.ForgonPageGrid({
Index: ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.jsp
===================================================================
diff -u -r19885 -r24654
--- ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.jsp (.../foreignTousseApplicationView.jsp) (revision 19885)
+++ ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseApplicationView.jsp (.../foreignTousseApplicationView.jsp) (revision 24654)
@@ -109,6 +109,11 @@
+
+
+
+
+
@@ -125,6 +130,7 @@
+
Index: ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseInfoForm.js
===================================================================
diff -u -r24642 -r24654
--- ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseInfoForm.js (.../foreignTousseInfoForm.js) (revision 24642)
+++ ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/foreignTousseInfoForm.js (.../foreignTousseInfoForm.js) (revision 24654)
@@ -156,7 +156,6 @@
}
}
- top.Ext4.getCmp('ascriptionDepartment').setValue(patientInfo.ascriptionDepartment);
top.Ext4.getCmp('operationRoom').setValue(patientInfo.opRoomId);
top.Ext4.getCmp('ascriptionDepartment').setValue(patientInfo.ascriptionDepartment);
top.Ext4.getCmp('remark').setValue(patientInfo.remark);
Index: ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/modifyPatientOfForeignTousseInfoForm.js
===================================================================
diff -u
--- ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/modifyPatientOfForeignTousseInfoForm.js (revision 0)
+++ ssts-web/src/main/webapp/disinfectsystem/foreigntousseapplication/modifyPatientOfForeignTousseInfoForm.js (revision 24654)
@@ -0,0 +1,431 @@
+//修改前的病人信息
+var originalPatientInfo = {};
+//修改后的病人信息
+var patientInfo = {};
+function showPatientInfo(patientInfo){
+ top.Ext4.getCmp('patient').setValue(patientInfo.patientName);
+ top.Ext4.getCmp('patientAge').setValue(patientInfo.patientAge);
+ if(patientInfo.clinicNumber){
+ top.Ext4.getCmp('clinicNumber').setValue(patientInfo.clinicNumber);
+ }
+ if(patientInfo.hospitalNumber){
+ top.Ext4.getCmp('hospitalNumber').setValue(patientInfo.hospitalNumber);
+ }
+ if(patientInfo.patientIDCard){
+ top.Ext4.getCmp('patientIDCard').setValue(patientInfo.patientIDCard);
+ }
+ if(patientInfo.patientSex == '男'){
+ top.Ext4.getCmp('patientSex').setValue('男');
+ }else if(patientInfo.patientSex == '女'){
+ top.Ext4.getCmp('patientSex').setValue('女');
+ }else{
+ top.Ext4.getCmp('patientSex').setValue('');
+ }
+ top.Ext4.getCmp('patientArea').setValue(patientInfo.patientArea);
+ top.Ext4.getCmp('roomNumber').setValue(patientInfo.roomNumber);
+ top.Ext4.getCmp('bedNumber').setValue(patientInfo.bedNumber);
+ top.Ext4.getCmp('doctor').setValue(patientInfo.doctorName);
+ top.Ext4.getCmp('surgery').setValue(patientInfo.operation);
+ //手术时间需要特殊处理,需要将年和月之间的-符替换成/
+ if(patientInfo.operationTime){
+ try{
+ top.Ext4.getCmp('operationTime').setValue(new Date(patientInfo.operationTime.replace("-","/")));
+ }catch(e){
+
+ }
+ }
+ top.Ext4.getCmp('operationRoom').setValue(patientInfo.opRoomId);
+ top.Ext4.getCmp('ascriptionDepartment').setValue(patientInfo.ascriptionDepartment);
+}
+
+/**
+ * 更改病人信息提交
+ * @param id 外来器械申请单id
+ */
+function submitModifyPatientInfo(id){
+
+ //记录修改提交后的病人信息
+ patientInfo.patientName = top.Ext4.getCmp("patient").getValue();
+ patientInfo.patientSex = top.Ext4.getCmp("patientSex").getValue();
+ patientInfo.patientAge = top.Ext4.getCmp("patientAge").getValue();
+ patientInfo.hospitalNumber = top.Ext4.getCmp("hospitalNumber").getValue();
+ patientInfo.clinicNumber = top.Ext4.getCmp("clinicNumber").getValue();
+ patientInfo.patientArea = top.Ext4.getCmp("patientArea").getValue();
+ patientInfo.roomNumber = top.Ext4.getCmp("roomNumber").getValue();
+ patientInfo.bedNumber = top.Ext4.getCmp("bedNumber").getValue();
+ patientInfo.doctor = top.Ext4.getCmp("doctor").getValue();
+ patientInfo.surgery = top.Ext4.getCmp("surgery").getValue();
+ patientInfo.operationTime = top.Ext4.getCmp("operationTime").getRawValue();
+ patientInfo.operationRoom = top.Ext4.getCmp("operationRoom").getValue();
+ patientInfo.ascriptionDepartment = top.Ext4.getCmp("ascriptionDepartment").getValue();
+
+ top.Ext4.MessageBox.confirm("请确认","是否确定要更改病人信息?",function (btn) {
+ if (btn == 'yes') {
+ var loadMask = new top.Ext4.LoadMask({msg:"正在处理,请稍候...",target:foreignTousseApplyWindow});
+ loadMask.show();
+ top.Ext4.Ajax.request({
+ url : WWWROOT + '/disinfectSystem/foreigntousseapplication/foreignTousseApplicationAction!modifyPatientInfoOfForeignTousseApplication.do',
+ method : 'post',
+ params : {id : id , originalPatientInfo : JSON.stringify(originalPatientInfo) , patientInfo : JSON.stringify(patientInfo)},
+ success : function(action) {
+ loadMask.hide();
+ var result = Ext.decode(action.responseText);
+ if(result.message){
+ showResult(result.message);
+ if(result.success){
+ grid.dwrReload();
+ foreignTousseApplyWindow.close();
+ }
+ }else{
+ if(result.success){
+ showResult("操作成功");
+ grid.dwrReload();
+ foreignTousseApplyWindow.close();
+ }else{
+ showResult("操作失败");
+ }
+ }
+ },
+ failure : function(action) {
+ loadMask.hide();
+ if(action && action.result && action.result.message){
+ showResult(action.result.message);
+ }else{
+ showResult("操作失败");
+ }
+ }
+ });
+ }
+ });
+}
+
+/**
+ * 打开外来器械包申请单的窗口.
+ * @param id 外来器械包申请单
+ */
+function modifyPatientInfo(id){
+ /**
+ * 常用医生的store
+ */
+ var commonlyUsedDoctorJsonStore = new Ext4.data.Store({
+ pageSize:200,
+ proxy : {
+ type : 'ajax',
+ url : WWWROOT + '/disinfectSystem/baseData/commonlyUsedDoctorAction!getDoctorBykeyWord.do',
+ reader : {
+ type : 'json',
+ root : 'data'
+ }
+ },
+ fields : [{name : 'id',mapping : 'id'},
+ {name : 'doctor',mapping : 'doctor'}
+ ]
+ });
+
+ var bbars = [{
+ text : '提交',
+ id : 'commitBtn',
+ handler : function() {
+ submitModifyPatientInfo(id);
+ }
+ },{
+ text : '取消',
+ handler : function() {
+ foreignTousseApplyWindow.close();
+ }
+ }];
+
+ foreignTousseForm = new top.Ext4.form.Panel({
+ id : 'foreignToussForm',
+ frame : true,
+ border : 0,
+ labelSeparator : ':',
+ bodyPadding : '5 5 0',
+ autoScroll : true,
+ buttonAlign : 'center',
+ buttons : bbars,
+ fieldDefaults : {
+ labelAlign : 'right'
+ },
+ layout : {
+ type : 'vbox'
+ },
+ items : [
+ {
+ xtype : 'fieldset',
+ title : '基础信息',
+ collapsible : false,
+ height : 160,
+ width : 750,
+ defaultType : 'textfield',
+ layout : {
+ type : 'vbox'
+ },
+ items : [{
+ xtype : 'container',
+ width : '100%',
+ layout : 'hbox',
+ flex : 1,
+ items : [
+ {
+ xtype : 'textfield',
+ fieldLabel : '住院号',
+ maxLength : '50',
+ id : 'hospitalNumber',
+ name : 'hospitalNumber',
+ width : '33.3%',
+ allowBlank : true,
+ enableKeyEvents : true,
+ listeners : {
+ specialkey : function(field, ee) {
+ if (ee.getKey() == Ext4.EventObject.ENTER) {
+ var jsonStr = "{\"patientNum\":\"" + field.value
+ + "\",\"numType\":\"hospitalNum\",\"sourcePage\":\"0\"}";
+ loadPatientInfoByValAndType(jsonStr);
+ }
+ }
+ },
+ flex : 1
+ },{
+ xtype : 'textfield',
+ fieldLabel : '诊疗号',
+ maxLength : '100',
+ id : 'clinicNumber',
+ name : 'clinicNumber',
+ width : '33.3%',
+ allowBlank : true,
+ enableKeyEvents : true,
+ listeners : {
+ specialkey : function(field, ee) {
+ if (ee.getKey() == Ext4.EventObject.ENTER) {
+ var jsonStr = "{\"patientNum\":\"" + field.value
+ + "\",\"numType\":\"treatmentNum\",\"sourcePage\":\"0\"}";
+ loadPatientInfoByValAndType(jsonStr);
+ }
+ }
+ },
+ flex : 1
+ }, {
+ xtype : 'textfield',
+ fieldLabel : '病人姓名',
+ maxLength : '50',
+ id : 'patient',
+ name : 'patient',
+ width : '33.3%',
+ allowBlank : true,
+ flex : 1
+ }
+ ]
+ },{
+ xtype : 'container',
+ width : '100%',
+ layout : 'hbox',
+ hidden : sstsConfig.hidePatientArea,
+ flex : 1,
+ items : [{
+ xtype : 'textfield',
+ fieldLabel : '病区',
+ maxLength : '50',
+ id : 'patientArea',
+ name : 'patientArea',
+ width : '33.3%',
+ allowBlank : true,
+ flex : 1
+ },{
+ xtype : 'textfield',
+ fieldLabel : '病室',
+ maxLength : '50',
+ id : 'roomNumber',
+ name : 'roomNumber',
+ width : '33.3%',
+ allowBlank : true,
+ hidden : sstsConfig.hideRoomNumber,
+ flex : 1
+ }, {
+ xtype : 'textfield',
+ fieldLabel : '床位',
+ maxLength : '50',
+ id : 'bedNumber',
+ name : 'bedNumber',
+ width : '33.3%',
+ allowBlank : true,
+ hidden : sstsConfig.hideRoomNumber,
+ flex : 1
+ }
+ ]
+ },{
+ xtype : 'container',
+ width : '100%',
+ layout : 'hbox',
+ flex : 1,
+ items : [
+ {
+ xtype : 'textfield',
+ fieldLabel : '年龄',
+// maxLength : '3',
+ id : 'patientAge',
+ name : 'patientAge',
+ width : '33.3%',
+// allowDecimals : false,
+ allowNegative : false,
+ flex : 1
+ }, {
+ xtype : 'combo',
+ fieldLabel : '性别',
+ valueField : 'typeName',
+ displayField : 'typeName',
+ id : 'patientSex',
+ name : 'patientSex',
+ width : '33.3%',
+ mode : 'local',
+ triggerAction : 'all',
+ forceSelection : true,
+ editable : false,
+ store : new top.Ext4.data.SimpleStore( {
+ fields : [ 'typeName' ],
+ data : [['男'],['女']]
+ }),
+ flex : 1
+ },{
+ xtype : 'textfield',
+ fieldLabel : '病人所属科室',
+ maxLength : '16',
+ id : 'ascriptionDepartment',
+ name : 'ascriptionDepartment',
+ width : '33.3%',
+ allowBlank : true,
+ flex : 1
+ }
+ ]
+ },{
+ xtype : 'container',
+ width : '100%',
+ layout : 'hbox',
+ flex : 1,
+ items : [
+ {
+ xtype : 'textfield',
+ fieldLabel : '手术名称',
+ id : 'surgery',
+ name : 'surgery',
+ width : '33.3%',
+ allowBlank : true,
+ flex : 1
+ }, {
+ xtype : 'datefield',
+ fieldLabel : '手术时间',
+ id : 'operationTime',
+ name : 'operationTime',
+ width : '33.3%',
+ selectOnFocus :true,
+ format : 'Y-m-d H:i',
+ allowBlank : true,
+ flex : 1
+ },{
+ fieldLabel : '医生',
+ xtype : 'combo',
+ id : 'doctor',
+ name : 'doctor',
+ width : '33.3%',
+ flex : 1,
+ queryParam : 'spell',
+ minChars : 0,
+ //valueField : 'doctorName',
+ displayField : 'doctor',
+ pageSize : 0,
+ listConfig: {width: 300},
+ forceSelection : true,
+ lazyInit : true,
+ triggerAction : 'all',
+ hideTrigger : false,
+ typeAhead : false,
+ allowBlank : true,
+ forceSelection:false,
+ store : commonlyUsedDoctorJsonStore
+
+ }
+ ]
+ },{
+ xtype : 'container',
+ width : '100%',
+ layout : 'hbox',
+ flex : 1,
+ items : [
+ {
+ xtype : 'textfield',
+ fieldLabel : '手术间',
+ id : 'operationRoom',
+ name : 'operationRoom',
+ width : '33.3%',
+ allowBlank : true,
+ flex : .33
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ });
+
+ foreignTousseApplyWindow = new top.Ext4.window.Window({
+ id : 'foreignTousseApplicationWin',
+ title : '外来器械单-更改病人信息',
+ height : 250,
+ width : 780,
+ resizable :false,
+ modal : true,
+ border : false,
+ plain : true,
+ layout : 'fit',
+ items : [ foreignTousseForm ]
+ });
+
+ foreignTousseApplyWindow.show();
+
+ if (id) {// 编辑
+ foreignTousseForm.form.load( {
+ url : WWWROOT + '/disinfectSystem/foreigntousseapplication/foreignTousseApplicationAction!loadForeignTousseApplication.do',
+ method : 'GET',
+ waitMsg : '正在加载数据,请稍候',
+ success : function(form, action) {
+
+ //设置性别
+ var patientSex = action.result.data.patientSex;
+ top.Ext4.getCmp("patientSex").setValue(patientSex);
+
+ //设置手术间
+ top.Ext4.getCmp("operationRoom").setValue(action.result.data.operationRoom);
+
+ //设置手术时间
+ var operationTime = action.result.data.operationTime;
+ if(operationTime != ""){
+ var trainingStartTime = new Date(Date.parse(operationTime.replace(/-/g,"/")));
+ top.Ext4.getCmp("operationTime").setValue(trainingStartTime.format('Y-m-d H:i'));
+ }
+
+ //记录修改提交前的原病人信息
+ originalPatientInfo.patientName = top.Ext4.getCmp("patient").getValue();
+ originalPatientInfo.patientSex = top.Ext4.getCmp("patientSex").getValue();
+ originalPatientInfo.patientAge = top.Ext4.getCmp("patientAge").getValue();
+ originalPatientInfo.hospitalNumber = top.Ext4.getCmp("hospitalNumber").getValue();
+ originalPatientInfo.clinicNumber = top.Ext4.getCmp("clinicNumber").getValue();
+ originalPatientInfo.patientArea = top.Ext4.getCmp("patientArea").getValue();
+ originalPatientInfo.roomNumber = top.Ext4.getCmp("roomNumber").getValue();
+ originalPatientInfo.bedNumber = top.Ext4.getCmp("bedNumber").getValue();
+ originalPatientInfo.doctor = top.Ext4.getCmp("doctor").getValue();
+ originalPatientInfo.surgery = top.Ext4.getCmp("surgery").getValue();
+ originalPatientInfo.operationTime = top.Ext4.getCmp("operationTime").getRawValue();
+ originalPatientInfo.operationRoom = top.Ext4.getCmp("operationRoom").getValue();
+ originalPatientInfo.ascriptionDepartment = top.Ext4.getCmp("ascriptionDepartment").getValue();
+ },
+ failure : function(form, action) {
+ showResult("加载失败,请联系管理员!");
+ },
+ params : {
+ id : id
+ }
+ });
+ }else{
+ showResult("外来器械申请单id参数不能为空");
+ }
+}
\ No newline at end of file
Index: ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/foreigntousseapplication/service/ForeignTousseApplicationManager.java
===================================================================
diff -u -r22112 -r24654
--- ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/foreigntousseapplication/service/ForeignTousseApplicationManager.java (.../ForeignTousseApplicationManager.java) (revision 22112)
+++ ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/foreigntousseapplication/service/ForeignTousseApplicationManager.java (.../ForeignTousseApplicationManager.java) (revision 24654)
@@ -64,4 +64,12 @@
* @param returnType 归还的类型(值有两种情况:“确认归还”、“提前归还”)
*/
public void comfirmReturnOrEarlyReturn(List ids, String returnType);
+
+ /**
+ * 更改外来器械申请单的病人信息
+ * @param id 外来器械申请单id
+ * @param originalPatientInfo 修改前病人信息
+ * @param patientInfo 修改后病人信息
+ */
+ public void modifyPatientInfoOfForeignTousseApplication(Long id, String originalPatientInfo , String patientInfo);
}
Index: ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/foreigntousseapplication/action/ForeignTousseApplicationAction.java
===================================================================
diff -u -r23835 -r24654
--- ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/foreigntousseapplication/action/ForeignTousseApplicationAction.java (.../ForeignTousseApplicationAction.java) (revision 23835)
+++ ssts-recyclingapplication/src/main/java/com/forgon/disinfectsystem/foreigntousseapplication/action/ForeignTousseApplicationAction.java (.../ForeignTousseApplicationAction.java) (revision 24654)
@@ -39,6 +39,7 @@
import com.forgon.systemsetting.service.HttpOptionManager;
import com.forgon.tools.StrutsParamUtils;
import com.forgon.tools.StrutsResponseUtils;
+import com.forgon.tools.db.DatabaseUtil;
import com.forgon.tools.json.JSONUtil;
import com.forgon.tools.string.StringTools;
import com.forgon.tools.util.ForgonDateUtils;
@@ -387,6 +388,7 @@
*/
public String saveForeignTousseApplication() {
JSONObject jsonObject = new JSONObject();
+ //[{"tousseItemId":0,"tousseDefinitionId":218066,"oldTousseName":"笛形针","tousseName":"笛形针","oldSupplierName":"洁定","supplierName":"洁定","amount":1,"price":0,"packageSize":"大包","foreignToussePrintAmount":1,"splitNumber":1,"materials":[{"materialInstanceId":0,"materialName":"test1","amount":4,"includeImplant":"否","usedAmountOfIncludeImplant":0,"minDismantleAmount":0},{"materialInstanceId":0,"materialName":"test2","amount":0,"includeImplant":"是","usedAmountOfIncludeImplant":0,"minDismantleAmount":0}]}]
String foreignTousseInfo = StrutsParamUtils.getPraramValue("foreignTousseInfo", "");
//simon-add-begin handleDepart handleDepartCoding
String handleDepart= StrutsParamUtils.getPraramValue("handleDepart", "");
@@ -417,8 +419,33 @@
StrutsResponseUtils.output(jsonObject);
return null;
}
-
+
/**
+ * 更改外来器械申请单的病人信息
+ */
+ public void modifyPatientInfoOfForeignTousseApplication(){
+ JSONObject result = JSONUtil.buildJsonObject(false);
+ Long id = StrutsParamUtils.getPraramLongValue("id", null);
+ //修改前病人信息
+ String originalPatientInfo = StrutsParamUtils.getPraramValue("originalPatientInfo", null);
+ //修改后病人信息
+ String patientInfo = StrutsParamUtils.getPraramValue("patientInfo", null);
+ if(!DatabaseUtil.isPoIdValid(id)){
+ JSONUtil.addMessage(result, "参数id的值非法");
+ }else{
+ try{
+ foreignTousseApplicationManager.modifyPatientInfoOfForeignTousseApplication(id, originalPatientInfo , patientInfo);
+ JSONUtil.addSuccess(result, true);
+ }catch(RuntimeException e){
+ JSONUtil.addMessage(result, e.getMessage());
+ }catch(Exception e){
+ JSONUtil.addMessage(result, "后台异常,请稍后再试");
+ }
+ }
+ StrutsResponseUtils.output(result);
+ }
+
+ /**
* 更新外来器械包申请单(回收那里对外来器械包申请单的一些修改操作).
*/
public void updateForeignTousseDefiniton(){