// 向服务器发送故障或调度命令 public boolean sendScheduleORErrorCommandToServer( int CommandType, int teamID, String name, String content) { // hu 2010-11-2 修改 // ScheduleErrorMessage sMsg = new ScheduleErrorMessage(); CommonMessage cMsg = new CommonMessage(); cMsg.setTeamID(teamID); if (name.equalsIgnoreCase("TDCS")) { cMsg.setCommandType(Constants.TYPE_DDZR_TO_ZNTDCS_ASYN); } else if (name.equalsIgnoreCase("CTC")) { cMsg.setCommandType(Constants.TYPE_DDZR_TO_ZNCTC_ASYN); } else if (name.equalsIgnoreCase("电务维修机")) { // 电务 cMsg.setCommandType(Constants.TYPE_DDZR_TO_DW_ASYN); } else { cMsg.setCommandType(Constants.TYPE_DDZR_TO_SICS_ASYN); cMsg.setStationName(name); } ScheduleErrorMessage sMsg = new ScheduleErrorMessage(); sMsg.setContent(content); sMsg.setTeamID(teamID); cMsg.setMeseageName("ScheduleErrorMessage"); cMsg.setMessage(JsonUtil.bean2json(sMsg)); databaseAccessHandler.sendCommonMessageToServer(cMsg); return true; }