| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | |
| | |
| | | @ApiOperation(value = "堤防危害等级评定-添加或者修改", notes = "堤防危害等级评定-添加或者修改") |
| | | @PostMapping(value = "/submit") |
| | | public R submit(@RequestBody TbDykeUnitDanger tbDykeUnitDanger) { |
| | | // 获取当前日期 |
| | | LocalDate today = LocalDate.now(); |
| | | // 获取年份 |
| | | int year = today.getYear(); |
| | | tbDykeUnitDanger.setCreateTime(new Date()); |
| | | tbDykeUnitDanger.setTbYear(year); |
| | | return R.data(tbDykeUnitDangerService.saveOrUpdate(tbDykeUnitDanger)); |
| | | } |
| | | |