|
|
|
@ -6,10 +6,12 @@ import com.hnac.hzims.operational.fill.service.GenerateService;
|
|
|
|
|
import lombok.AllArgsConstructor; |
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
import org.springblade.core.tool.utils.CollectionUtil; |
|
|
|
|
import org.springblade.core.tool.utils.DateUtil; |
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping; |
|
|
|
|
import org.springframework.web.bind.annotation.RequestParam; |
|
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
|
|
|
|
|
|
import java.util.Date; |
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -28,9 +30,10 @@ public class GenerateClient implements IGenerateClient {
|
|
|
|
|
public Double stationGenerateByTime(@RequestParam("stationId") String stationId, |
|
|
|
|
@RequestParam("startTime") String startTime, |
|
|
|
|
@RequestParam("endTime") String endTime) { |
|
|
|
|
Date start = DateUtil.parse(startTime,DateUtil.PATTERN_DATETIME); |
|
|
|
|
List<GenerateEntity> generates = generateService.list(Wrappers.<GenerateEntity>lambdaQuery() |
|
|
|
|
.eq(GenerateEntity::getStationCode,stationId) |
|
|
|
|
.ge(GenerateEntity::getFillDate,startTime) |
|
|
|
|
.ge(GenerateEntity::getFillDate,DateUtil.format(start,DateUtil.PATTERN_DATE)) |
|
|
|
|
.le(GenerateEntity::getFillDate,endTime) |
|
|
|
|
); |
|
|
|
|
if(CollectionUtil.isEmpty(generates)){ |
|
|
|
|