Index: ssts-webservice/src/main/java/com/forgon/disinfectsystem/webservice/operationschedule/zsyy/OperationScheduleWebServiceImpl.java =================================================================== diff -u -r16368 -r17129 --- ssts-webservice/src/main/java/com/forgon/disinfectsystem/webservice/operationschedule/zsyy/OperationScheduleWebServiceImpl.java (.../OperationScheduleWebServiceImpl.java) (revision 16368) +++ ssts-webservice/src/main/java/com/forgon/disinfectsystem/webservice/operationschedule/zsyy/OperationScheduleWebServiceImpl.java (.../OperationScheduleWebServiceImpl.java) (revision 17129) @@ -25,6 +25,8 @@ import com.forgon.directory.model.BarcodeDevice; import com.forgon.directory.model.OrgUnit; import com.forgon.disinfectsystem.common.CssdUtils; +import com.forgon.disinfectsystem.datasynchronization.dao.FindPatientInfoByHospitalNumDao; +import com.forgon.disinfectsystem.datasynchronization.model.PatientInfoVO; import com.forgon.disinfectsystem.entity.useRecord.OperationSchedule; import com.forgon.disinfectsystem.operationSchedule.service.OperationScheduleManager; import com.forgon.serialnumber.model.SerialNum; @@ -45,6 +47,7 @@ @SOAPBinding(style=SOAPBinding.Style.RPC) public class OperationScheduleWebServiceImpl implements OperationScheduleWebService { + private FindPatientInfoByHospitalNumDao findPatientInfoByHospitalNumDao; private JsonObject config; public void setConfig(JsonObject config) { @@ -58,6 +61,11 @@ this.operationScheduleManager = operationScheduleManager; } + public void setFindPatientInfoByHospitalNumDao( + FindPatientInfoByHospitalNumDao findPatientInfoByHospitalNumDao) { + this.findPatientInfoByHospitalNumDao = findPatientInfoByHospitalNumDao; + } + private final Logger logger = Logger.getLogger(this.getClass()); //接口是否在运行中,防止重复调用 @@ -93,6 +101,8 @@ 手术时间 巡回护士 洗手护士 + 手术台次 + 手术编号 ]]> @@ -119,6 +129,7 @@ 手术名称 手术时间 成功为0,失败为1 + 手术编号 ]]> @@ -168,6 +179,7 @@ resultXml += ""+ operationJSONObject.optString("OPERATION") +""; resultXml += ""+ operationJSONObject.optString("SCHEDULED_DATE_TIME") +""; resultXml += ""+ operationJSONObject.optString("RESULT") +""; + resultXml += ""+ operationJSONObject.optString("SCHEDULE_ID") +""; resultXml += ""; } @@ -205,14 +217,14 @@ responseHeaderJsonObject.put("msgPriority", requestHeaderJsonObject.opt("msgPriority")); responseHeaderJsonObject.put("msgVersion", requestHeaderJsonObject.opt("msgVersion")); - JSONArray requestBodyListJsonArray = requestParamterJsonObject.optJSONArray("requestBody"); - Object operationPatientInfoObject = requestBodyListJsonArray.optJSONObject(0).opt("OperationPatientInfo"); + JSONObject requestBodyJsonObject = requestParamterJsonObject.optJSONObject("requestBody"); + Object listObject = requestBodyJsonObject.opt("List"); JSONArray operationPatientInfoJsonArray = new JSONArray(); - if(operationPatientInfoObject instanceof JSONObject){ - operationPatientInfoJsonArray.add(operationPatientInfoObject); - }else if(operationPatientInfoObject instanceof JSONArray){ - operationPatientInfoJsonArray = (JSONArray)operationPatientInfoObject; + if(listObject instanceof JSONObject){ + operationPatientInfoJsonArray.add(((JSONObject)listObject).optJSONObject("OperationPatientInfo")); + }else if(listObject instanceof JSONArray){ + operationPatientInfoJsonArray = (JSONArray)listObject; } List list = new ArrayList(); for(int i = 0;i < operationPatientInfoJsonArray.size();i++){ @@ -228,7 +240,8 @@ Object scheduledDateTime = operationPatientInfoJsonObject.opt("SCHEDULED_DATE_TIME");//手术时间 Object firstSupplyNurse = operationPatientInfoJsonObject.opt("FIRST_SUPPLY_NURSE");//巡回护士 Object firstOperationNurse = operationPatientInfoJsonObject.opt("FIRST_OPERATION_NURSE");//洗手护士 - + Object consoleName = operationPatientInfoJsonObject.opt("CONSOLE_NAME");//手术台次 + Object scheduleId = operationPatientInfoJsonObject.opt("SCHEDULE_ID");//手术编号 /*************************/ @@ -261,7 +274,17 @@ operationSchedule.setScheduledDateTime(scheduledDateTime instanceof String ? (String)scheduledDateTime : null); operationSchedule.setFirstSupplyNurse(firstSupplyNurse instanceof String ? (String)firstSupplyNurse : null); operationSchedule.setFirstOperationNurse(firstOperationNurse instanceof String ? (String)firstOperationNurse : null); + operationSchedule.setConsoleName(consoleName instanceof String ? (String)consoleName : null); + operationSchedule.setScheduleId(scheduleId instanceof String ? (String)scheduleId : null); + + //科室(病区)代码与名称的数据根据住院号从住院患者接口调用出来 + if(findPatientInfoByHospitalNumDao != null){ + PatientInfoVO[] PatientInfo = findPatientInfoByHospitalNumDao.findPatientInfoByHospitalNum(operationSchedule.getPatientId()); + if(PatientInfo != null && PatientInfo.length > 0){ + operationSchedule.setDeptName(PatientInfo[0].getAscriptionDepartment()); + } + } list.add(operationSchedule); }