11 changed files with 9707 additions and 6 deletions
-
20src/main/java/com/gcc/commissionerreview/configuration/DataSourceConfig.java
-
23src/main/java/com/gcc/commissionerreview/controller/MainController.java
-
20src/main/java/com/gcc/commissionerreview/controller/RoadWarApiController.java
-
114src/main/java/com/gcc/commissionerreview/controller/WorksController.java
-
368src/main/java/com/gcc/commissionerreview/service/RoadWarService.java
-
1714src/main/java/com/gcc/commissionerreview/service/WorksService.java
-
4src/main/resources/application.properties
-
1940src/main/resources/templates/modules/roadwarweb/roadwarregisterdashboard.html
-
2259src/main/resources/templates/modules/works/dashboard.html
-
1095src/main/resources/templates/modules/works/estimatedetails.html
-
2156src/main/resources/templates/modules/works/roadworksdetails.html
@ -0,0 +1,114 @@ |
|||||
|
package com.gcc.commissionerreview.controller; |
||||
|
|
||||
|
import com.gcc.commissionerreview.service.WorksService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.http.ResponseEntity; |
||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestParam; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
@RestController |
||||
|
@RequestMapping("/commissionerreview/api/works") |
||||
|
|
||||
|
public class WorksController { |
||||
|
|
||||
|
@Autowired |
||||
|
private WorksService worksService ; |
||||
|
|
||||
|
|
||||
|
@GetMapping("/financial-years") |
||||
|
public List<Map<String, Object>> getFinancialYears() { |
||||
|
return worksService.getFinancialYears(); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
@GetMapping("/work-types") |
||||
|
public List<Map<String, Object>> getWorkTypes() { |
||||
|
return worksService.getWorkTypes(); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
@GetMapping("/road-types") |
||||
|
public List<Map<String, Object>> getRoadTypes() { |
||||
|
return worksService.getRoadTypes(); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/fund-types") |
||||
|
public List<Map<String, Object>> getFundTypes() { |
||||
|
return worksService.getFundTypes(); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
@GetMapping("/progress-status") |
||||
|
public List<Map<String, Object>> getProgressStatus() { |
||||
|
return worksService.getProgressStatus(); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
@GetMapping("/zones") |
||||
|
public List<Map<String, Object>> getAllZones() { |
||||
|
return worksService.getAllZones(); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/wards") |
||||
|
public List<Map<String, Object>> getAllWards(int zone) { |
||||
|
return worksService.getAllWards(zone); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
@GetMapping("/dashboard-details") |
||||
|
public ResponseEntity<?> getDashboardSummary( |
||||
|
|
||||
|
@RequestParam(required = false) String financialYear, |
||||
|
|
||||
|
@RequestParam(required = false) Integer workType, |
||||
|
|
||||
|
@RequestParam(required = false) Integer roadType, |
||||
|
|
||||
|
@RequestParam(required = false) Integer fundType, |
||||
|
|
||||
|
@RequestParam(required = false) String progressStatus, |
||||
|
|
||||
|
@RequestParam(required = false) Integer zone, |
||||
|
|
||||
|
@RequestParam(required = false) Integer ward) { |
||||
|
|
||||
|
Map<String, Object> result = worksService.getDashboardDetails(financialYear, workType, roadType, fundType, |
||||
|
progressStatus, zone, ward); |
||||
|
|
||||
|
return ResponseEntity.ok(result); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/viewEstimateDetails") |
||||
|
public ResponseEntity<?> getDetailsByEstId(@RequestParam int estid) { |
||||
|
Map<String, Object> result =worksService.getDetailsByEstId(estid); |
||||
|
return ResponseEntity.ok(result); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
@GetMapping("/viewRoadWorks") |
||||
|
public List<Map<String, Object>> viewRoadWorks(int estid) { |
||||
|
return worksService.viewRoadWorks(estid); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/roadtabdetails") |
||||
|
public List<Map<String, Object>> viewRoadTabDetails(int estid,int ref_id) { |
||||
|
return worksService.viewRoadTabDetails(estid, ref_id); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/progresstabdetails") |
||||
|
public List<Map<String, Object>> viewProgressTabDetails(int estid,int ref_id) { |
||||
|
return worksService.viewProgressTabDetails(estid, ref_id); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/getRoadWarDetailsByRoadId") |
||||
|
public Map<String, Object> getRoadWarDetailsByRoadId(int estid,int ref_id){ |
||||
|
return worksService.getRoadWarDetailsByRoadId2(estid, ref_id); |
||||
|
} |
||||
|
|
||||
|
} |
||||
1714
src/main/java/com/gcc/commissionerreview/service/WorksService.java
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -1,2 +1,2 @@ |
|||||
spring.profiles.active=prod |
|
||||
#spring.profiles.active=dev |
|
||||
|
#spring.profiles.active=prod |
||||
|
spring.profiles.active=dev |
||||
1940
src/main/resources/templates/modules/roadwarweb/roadwarregisterdashboard.html
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
2259
src/main/resources/templates/modules/works/dashboard.html
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
1095
src/main/resources/templates/modules/works/estimatedetails.html
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
2156
src/main/resources/templates/modules/works/roadworksdetails.html
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
Write
Preview
Loading…
Cancel
Save
Reference in new issue