| | |
| | | @RestController |
| | | @RequiredArgsConstructor |
| | | public class StateProjectCompensateStandardController { |
| | | |
| | | private final StateProjectCompensateStandardService stateProjectCompensateStandardService; |
| | | |
| | | @GetMapping(UrlConstants.STATE_PROJECT_COMPENSATE_STANDARD_LIST) |
| | | public AjaxResult<Map<String, List<StateProjectCompensateStandardVO>>> getAll(@RequestParam(required = false) String standardName, |
| | | @RequestParam(required = false) Integer stopFlag, |
| | | @RequestParam(required = false) Integer compensateType |
| | | public AjaxResult<Map<String, List<StateProjectCompensateStandardVO>>> getAll( |
| | | @RequestParam(required = false) String standardName, |
| | | @RequestParam(required = false) Integer stopFlag, |
| | | @RequestParam(required = false) Integer compensateType |
| | | ) { |
| | | |
| | | return AjaxResult.success(stateProjectCompensateStandardService.getCompensateStandardMap(standardName, stopFlag, compensateType)); |
| | | } |
| | | |
| | | @PostMapping(UrlConstants.STATE_PROJECT_COMPENSATE_STANDARD_ADD) |
| | | public AjaxResult<Boolean> create(@RequestBody StateProjectCompensateStandard stateProjectCompensateStandard) { |
| | | |
| | | return AjaxResult.success(stateProjectCompensateStandardService.createCompensatesStandard(stateProjectCompensateStandard)); |
| | | } |
| | | |
| | | @PostMapping(UrlConstants.STATE_PROJECT_COMPENSATE_STANDARD_UPDATE) |
| | | public AjaxResult<Boolean> update(@RequestBody StateProjectCompensateStandard stateProjectCompensateStandard) { |
| | | return AjaxResult.success(stateProjectCompensateStandardService.saveOrUpdate(stateProjectCompensateStandard)); |
| | | } |
| | | |
| | | @PostMapping(UrlConstants.STATE_PROJECT_COMPENSATE_STANDARD_UPDATE_NAME) |
| | | public AjaxResult<Boolean> updateName(@RequestBody StateProjectCompensateStandard stateProjectCompensateStandard) { |
| | | return AjaxResult.success(stateProjectCompensateStandardService.updateName(stateProjectCompensateStandard)); |
| | | } |
| | | |
| | | |
| | | |
| | | @PostMapping(UrlConstants.STATE_PROJECT_COMPENSATE_STANDARD_STOP) |
| | | public AjaxResult<Boolean> stop(@RequestParam String standardName, @RequestParam Integer compensateType) { |
| | |
| | | .set(StateProjectCompensateStandard::getStopFlag, 0); |
| | | return AjaxResult.success(stateProjectCompensateStandardService.update(wrapper)); |
| | | } |
| | | |
| | | @PostMapping(UrlConstants.STATE_PROJECT_COMPENSATE_STANDARD_START) |
| | | public AjaxResult<Boolean> start(@RequestParam String standardName, @RequestParam Integer compensateType) { |
| | | LambdaUpdateWrapper<StateProjectCompensateStandard> wrapper = new LambdaUpdateWrapper<>(); |
| | |
| | | .set(StateProjectCompensateStandard::getStopFlag, 1); |
| | | return AjaxResult.success(stateProjectCompensateStandardService.update(wrapper)); |
| | | } |
| | | |
| | | @PostMapping(UrlConstants.STATE_PROJECT_COMPENSATE_STANDARD_IMPORT) |
| | | public AjaxResult<Boolean> importExcelFile(@RequestParam("file") MultipartFile file) { |
| | | return AjaxResult.success(stateProjectCompensateStandardService.importByExcel(file)); |