|
| 1 | +//land form |
| 2 | + |
| 3 | + |
| 4 | +const selectQuery = ` |
| 5 | + SELECT |
| 6 | + forms.farmer_name, |
| 7 | + forms.spouse, |
| 8 | + forms.mcode, |
| 9 | + forms.hamlet, |
| 10 | + forms.panchayat, |
| 11 | + forms.district, |
| 12 | + forms.block, |
| 13 | + form_lands.revenue, |
| 14 | + form_lands.p_contribution, |
| 15 | + form_lands.f_contribution, |
| 16 | + form_lands.total_area, |
| 17 | + form_lands.measured_by, |
| 18 | + form_lands.verified_by, |
| 19 | + form_lands.total_est |
| 20 | + FROM |
| 21 | + forms |
| 22 | + LEFT JOIN |
| 23 | + form_lands ON forms.id = form_lands.form_id |
| 24 | + WHERE |
| 25 | + forms.id = ? |
| 26 | + AND forms.form_type = 1 |
| 27 | +`; |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | +//pond form |
| 32 | + |
| 33 | +const selectQuery1 = ` |
| 34 | + SELECT |
| 35 | + forms.farmer_name, |
| 36 | + forms.spouse, |
| 37 | + forms.mcode, |
| 38 | + forms.hamlet, |
| 39 | + forms.panchayat, |
| 40 | + forms.district, |
| 41 | + forms.block, |
| 42 | + farm_pond_details.revenue, |
| 43 | + farm_pond_details.p_contribution, |
| 44 | + farm_pond_details.f_contribution, |
| 45 | + farm_pond_details.length, |
| 46 | + farm_pond_details.breadth, |
| 47 | + farm_pond_details.depth, |
| 48 | + farm_pond_details.volume, |
| 49 | + farm_pond_details.measured_by, |
| 50 | + farm_pond_details.verified_by, |
| 51 | + farm_pond_details.total_est |
| 52 | + FROM |
| 53 | + forms |
| 54 | + LEFT JOIN |
| 55 | + farm_pond_details ON forms.id = farm_pond_details.form_id |
| 56 | + WHERE |
| 57 | + forms.id = ? |
| 58 | + AND forms.form_type = 2 |
| 59 | +`; |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | +//plantations |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | +const selectQuery2 = ` |
| 69 | + SELECT |
| 70 | + forms.farmer_name, |
| 71 | + forms.spouse, |
| 72 | + forms.mcode, |
| 73 | + forms.hamlet, |
| 74 | + forms.panchayat, |
| 75 | + forms.district, |
| 76 | + forms.block, |
| 77 | + plantation_details.revenue, |
| 78 | + plantation_details.total_area, |
| 79 | + plantation_details.plantaions, |
| 80 | + plantation_details.nos, |
| 81 | + plantation_details.price, |
| 82 | + plantation_details.other_exp, |
| 83 | + plantation_details.tot_nos, |
| 84 | + plantation_details.tot_price, |
| 85 | + plantation_details.p_contribution, |
| 86 | + plantation_details.f_contribution, |
| 87 | + plantation_details.measured_by, |
| 88 | + plantation_details.verified_by, |
| 89 | + plantation_details.total_est |
| 90 | + FROM |
| 91 | + forms |
| 92 | + LEFT JOIN |
| 93 | + plantation_details ON forms.id = plantation_details.form_id |
| 94 | + WHERE |
| 95 | + forms.id = ? |
| 96 | + AND forms.form_type = 3 |
| 97 | +`; |
0 commit comments