| | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | return Result.ok(adjustmentService.list(year)); |
| | | } |
| | | |
| | | @GetMapping("/source-value") |
| | | public Result<BigDecimal> sourceValue(@RequestParam("year") Integer year, |
| | | @RequestParam("flowDate") String flowDate) { |
| | | try { |
| | | return Result.ok(adjustmentService.findOriginalValue(year, LocalDate.parse(flowDate))); |
| | | } catch (Exception e) { |
| | | return Result.error(400, e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | @PostMapping("/save") |
| | | public Result<HolidayVehicleAdjustment> save(@RequestHeader(value = "Authorization", required = false) String auth, |
| | | @RequestBody Map<String, Object> params) { |