| | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.concurrent.ExecutionException; |
| | | |
| | | import org.springframework.validation.annotation.Validated; |
| | | import jakarta.validation.constraints.NotEmpty; |
| | | import io.swagger.annotations.Api; |
| | |
| | | |
| | | @GetMapping("/list") |
| | | @ApiOperation(value = "列表", notes = "列表") |
| | | @PreAuthorize("@ss.hasPermi('point:list')") |
| | | // @PreAuthorize("@ss.hasPermi('point:list')") |
| | | public Result list() { |
| | | return ywPointService.all(); |
| | | } |
| | |
| | | public Result importData(MultipartFile file, |
| | | Integer unitId, |
| | | String startTime, |
| | | String endTime) throws IOException, ParseException { |
| | | Boolean needUpdateUnit, |
| | | String endTime) throws IOException, ParseException, ExecutionException, InterruptedException { |
| | | Date start = null; |
| | | Date end = null; |
| | | if (-1 == unitId) { |
| | |
| | | SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); |
| | | end = format.parse(endTime); |
| | | } |
| | | return ywPointService.importData(file, unitId, start, end); |
| | | return ywPointService.importData(file, unitId, start, end, needUpdateUnit); |
| | | } |
| | | |
| | | |
| | | } |