日期:2014-05-19 浏览次数:20697 次
public class OpenOrdersDaoImpl implements OpenOrdersDao{
private JdbcTemplate jdbcTemplate;
private ResultSet mosMosaddResults ;
private ResultSet mosMospartResults ;
private ResultSet mosMosmiscResults ;
private ResultSet mosMosengResults ;
private ResultSet mosMosuserResults ;
private ResultSet mosMosmisccomResults ;
public MosDetailsVO getMosReport(final String mosId ,final String locId) {
MosDetailsVO vo=new MosDetailsVO() ;
try {
CallableStatementCallback csc = new CallableStatementCallback() {
public Object doInCallableStatement(
java.sql.CallableStatement cs) throws SQLException,
DataAccessException {
cs.setString(1,mosId);
cs.setString(2,locId);
cs.registerOutParameter(3, OracleTypes.CURSOR);
cs.registerOutParameter(4, OracleTypes.CURSOR);
cs.registerOutParameter(5, OracleTypes.CURSOR);
cs.registerOutParameter(6, OracleTypes.CURSOR);
cs.registerOutParameter(7, OracleTypes.CURSOR);
cs.registerOutParameter(8, OracleTypes.CURSOR);
cs.execute();
//mosDetailsResults
mosMosaddResults = (ResultSet)cs.getObject(3);
mosMospartResults = (ResultSet)cs.getObject(4);
mosMosmiscResults = (ResultSet)cs.getObject(5);
mosMosengResults = (ResultSet)cs.getObject(6);
mosMosuserResults = (ResultSet)cs.getObject(7);
mosMosmisccomResults = (ResultSet)cs.getObject(8);
return null;
}
};
jdbcTemplate.execute(CROSConstants.CRIF_REPAIR_STATUS_MOS_DETAILS,csc);
//mosadd
Object object = null;
object = mosMosaddResults.getObject(1);
if (null != object) {
vo.setServiceOperation(object.toString());
}
object = mosMosaddResults.getObject(2);
if (null != object) {
vo.setElectricCompany(object.toString());
}
object = mosMosaddResults.getObject(3);
if (null != object) {
vo.setToNumber(object.toString());
}
object = mosMosaddResults.getObject(4);
if (null != object) {
vo.setBlankNumber(object.toString());
}
object = mosMosaddResults.getObject(5);
if (null != object) {
vo.setWayNumber(object.toString());
}
object = mosMosaddResults.getObject(6);
if (null != object) {
vo.setAirLines(object.toString());
}
object = mosMosaddResults.getObject(7);
if (null != object) {
vo.setServiceRoad(object.toString());
}
object = mosMosaddResults.getObject(8);
if (null != object) {
vo.setAtlanta(object.toString());
}
object = mosMosaddResults.getObject(9);
if (null != object) {
vo.setUsa(object.toString());
}
object = mosMosaddResults.get