TransPort_Tracking
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
package com.bestray.transtracking.dao.mapper;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
import com.bestray.trastrack.domain.JobEntry;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import org.springframework.dao.DataAccessException;
import org.springframework.jdbc.core.ResultSetExtractor;
/**
*
* @author User1
*/
public class NewJobEntryResulSetExtractor implements ResultSetExtractor<Object>{
public Object extractData(ResultSet rs) throws SQLException,
DataAccessException{
List <JobEntry> jobEntrys = new ArrayList<JobEntry>();
while (rs.next()) {
JobEntry jobEntry = new JobEntry();
jobEntry.setId(rs.getLong("id"));
// jobEntry.setJob_scroll(rs.getLong("job_scroll_id"));
jobEntry.setJob_date(rs.getDate("job_date"));
jobEntry.setJob_transaction_type(rs.getString("job_transaction_type"));
jobEntry.setVehicle_number_id(rs.getLong("vehicle_number_id"));
jobEntry.setClient_name_id(rs.getLong("client_name_id"));
jobEntry.setVehicle_driver_id(rs.getLong("vehicle_driver_id"));
jobEntry.setFrom_location(rs.getString("from_location"));
jobEntry.setTo_location(rs.getString("to_location"));
jobEntry.setDistance(rs.getDouble("distance"));
jobEntry.setGoods_quantity(rs.getDouble("goods_quantity"));
jobEntry.setReceivable_rate(rs.getDouble("receivable_rate"));
jobEntry.setReceivable_amount(rs.getDouble("receivable_amount"));
jobEntry.setReceivable_extra_charges(rs.getDouble("receivable_exatra_charges"));
jobEntry.setTotal_receivable_amount(rs.getDouble("total_receivable"));
jobEntry.setPayable_rate(rs.getDouble("payable_rate"));
jobEntry.setPayable_amount(rs.getDouble("payable_amount"));
jobEntry.setPayable_exira_charges(rs.getDouble("payable_extra_charges"));
jobEntry.setTotal_payable_amount(rs.getDouble("total_payable"));
jobEntry.setEstimated_profit(rs.getDouble("estimated_profit"));
jobEntry.setRemarks(rs.getString("remarks_1"));
jobEntrys.add(jobEntry);
}
return jobEntrys;
}
}
|
Revision |
Author |
Commited |
Message |
1
|
girijabapi
|
Sat 28 Jul, 2018 05:29:14 +0000 |
|