diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/feign/GenerateClient.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/feign/GenerateClient.java index a017445..22030a1 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/feign/GenerateClient.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/feign/GenerateClient.java @@ -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 generates = generateService.list(Wrappers.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)){ diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/GenerateServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/GenerateServiceImpl.java index 9cf07ec..b3141e0 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/GenerateServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/fill/service/impl/GenerateServiceImpl.java @@ -258,7 +258,7 @@ public class GenerateServiceImpl extends BaseServiceImpl 0){ entity.setId(null); entity.setFillDate(DateUtil.format(start,DateUtil.PATTERN_DATE)); - entity.setGenerate((random.nextDouble() * 2800) + 12000); + entity.setGenerate((random.nextDouble() * 1360) + 19000); this.save(entity); calendar.add(Calendar.DAY_OF_MONTH,1); start = calendar.getTime(); diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HydropowerServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HydropowerServiceImpl.java index cba31a3..98d399a 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HydropowerServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HydropowerServiceImpl.java @@ -631,6 +631,8 @@ public class HydropowerServiceImpl implements HydropowerService { // 年发电量 kpi.setGenerateYear(targets.stream().mapToDouble(HydropowerUnitTargetVo::getPowerYear).sum()); // 月发电量 + + kpi.setGenerateMon(targets.stream().mapToDouble(HydropowerUnitTargetVo::getPowerMon).sum()); // 日发电量 kpi.setGenerateDay(targets.stream().mapToDouble(HydropowerUnitTargetVo::getPowerDay).sum());