diff --git a/hzims-service-api/common-api/src/main/java/com/hnac/hzims/vo/SafeCheckStatisticVO.java b/hzims-service-api/common-api/src/main/java/com/hnac/hzims/vo/SafeCheckStatisticVO.java index 70bb67a..b7f0f4f 100644 --- a/hzims-service-api/common-api/src/main/java/com/hnac/hzims/vo/SafeCheckStatisticVO.java +++ b/hzims-service-api/common-api/src/main/java/com/hnac/hzims/vo/SafeCheckStatisticVO.java @@ -13,7 +13,7 @@ import java.io.Serializable; */ @ApiModel(value = "安全检查项目统计对象",description = "安全检查项目统计对象") @Data -public class SafeCheckStatisticVO implements Serializable { +public class SafeCheckStatisticVO { @ApiModelProperty(value = "项目类型") private String projectType; diff --git a/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/task/feign/IInspectTaskClient.java b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/task/feign/IInspectTaskClient.java index 2804780..79db235 100644 --- a/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/task/feign/IInspectTaskClient.java +++ b/hzims-service-api/inspect-api/src/main/java/com/hnac/hzinfo/inspect/task/feign/IInspectTaskClient.java @@ -42,7 +42,7 @@ public interface IInspectTaskClient { * @param inspectType 查询类型 1:为运行人员 2:管理及其他人员 * @return */ - @GetMapping(EXPIRE_INSPECT) + @GetMapping(GET_INSPECT_TASK_CHECK) R getInspectTaskCheck(@RequestParam("startDate") String startDate, @RequestParam("endDate") String endDate, @RequestParam("dept") Long dept, diff --git a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/MiddleApplication.java b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/MiddleApplication.java index b3e7bd1..99004da 100644 --- a/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/MiddleApplication.java +++ b/hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/MiddleApplication.java @@ -15,12 +15,6 @@ import org.springframework.context.annotation.ComponentScan; @MapperScan(basePackages = {"com.hnac.hzinfo.**.mapper","com.hnac.hzims.**.mapper"}) @EnableFeignClients(basePackages = {"org.springblade", "com.hnac"}) public class MiddleApplication { -// static { -// System.setProperty("spring.cloud.nacos.discovery.server-addr", "http://175.6.40.67:10042"); -// System.setProperty("spring.cloud.nacos.config.server-addr", "http://175.6.40.67:10042"); -// System.setProperty("spring.cloud.nacos.username", "nacos"); -// System.setProperty("spring.cloud.nacos.password", "nacos"); -// } public static void main(String[] args) { BladeApplication.run("hzims-middle", MiddleApplication.class, args); diff --git a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/RealTargetServiceImpl.java b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/RealTargetServiceImpl.java index 8db8fbc..746b25b 100644 --- a/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/RealTargetServiceImpl.java +++ b/hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/RealTargetServiceImpl.java @@ -313,7 +313,7 @@ public class RealTargetServiceImpl implements RealTargetService { target.setPowerDay(this.devicePowerDay(generations,device)); // 昨日发电量 target.setPowerYesterDay(this.devicePowerYesterDay(generations,device)); - // 当天有功功率 + // 近24小时有功功率 target.setActivePowerVoList(this.getLoadsByDay(device)); // 30天发电量 target.setGenerationPowerVoList(this.getGenerationPowerList(generations,device)); @@ -1483,10 +1483,12 @@ public class RealTargetServiceImpl implements RealTargetService { * @return */ private List getLoadsByDay(EminfoAndEmParamVo device) { - // 开始日期 - String start = DateUtil.format(new Date(),DateUtil.PATTERN_DATE) + " 00:00:00"; + Calendar calendar = Calendar.getInstance(); // 结束日期 - String end = DateUtil.format(new Date(),DateUtil.PATTERN_DATE) + " 23:59:59"; + String end = DateUtil.format(calendar.getTime(),DateUtil.PATTERN_DATETIME); + calendar.add(Calendar.DAY_OF_MONTH,-1); + // 开始日期 + String start = DateUtil.format(calendar.getTime(),DateUtil.PATTERN_DATE) + " 00:00:00"; List records = dataService.periodTargetData(start, end, 3, 2, device.getEmCode(), HomePageConstant.PV_LOAD); if (CollectionUtil.isEmpty(records)) { return new ArrayList<>(); @@ -1988,8 +1990,8 @@ public class RealTargetServiceImpl implements RealTargetService { */ private List thirtyGenerations(List stations) { Calendar calendar = Calendar.getInstance(); - String end = DateUtil.format(calendar.getTime(), DateUtil.PATTERN_DATETIME); - calendar.add(Calendar.DAY_OF_MONTH,-29); + String end = DateUtil.format(calendar.getTime(), DateUtil.PATTERN_DATE); + calendar.add(Calendar.DAY_OF_MONTH,-30); String start = DateUtil.format(calendar.getTime(), DateUtil.PATTERN_DATE); return thirtyGenerateService.list(Wrappers.lambdaQuery() .in(ThirtyGenerationEntity::getStationId,stations) @@ -2034,10 +2036,10 @@ public class RealTargetServiceImpl implements RealTargetService { private List getGenerationPowerList(List generations,EminfoAndEmParamVo device) { Calendar calendar = Calendar.getInstance(); Date end = calendar.getTime(); - calendar.add(Calendar.DAY_OF_MONTH,-29); + calendar.add(Calendar.DAY_OF_MONTH,-30); Date start = calendar.getTime(); List powers = new ArrayList<>(); - while (end.compareTo(start) >= 0){ + while (end.compareTo(start) > 0){ GenerationPowerVo power = new GenerationPowerVo(); if (CollectionUtil.isEmpty(generations)) { power.setDate(DateUtil.format(start,DateUtil.PATTERN_DATE)); diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/feign/InspectTaskClient.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/feign/InspectTaskClient.java index 0fc8788..b7df8c9 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/feign/InspectTaskClient.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/feign/InspectTaskClient.java @@ -84,6 +84,7 @@ public class InspectTaskClient implements IInspectTaskClient { * @param deptId * @return */ + @GetMapping(EXPIRE_INSPECT) @Override public List expireInspect(String start, String end, Long deptId) { return taskService.list(Wrappers.lambdaQuery() 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 4fa1ce6..f40aac0 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 @@ -405,12 +405,12 @@ public class HydropowerServiceImpl implements HydropowerService { private List> get30DayRain(String code) { Calendar calendar = Calendar.getInstance(); String endTime = DateUtil.format(calendar.getTime(),DateUtil.PATTERN_DATETIME); + calendar.add(Calendar.DAY_OF_MONTH,-1); String rainEnd = DateUtil.format(calendar.getTime(),DateUtil.PATTERN_DATE); calendar.add(Calendar.HOUR_OF_DAY,-calendar.get(Calendar.HOUR_OF_DAY)); calendar.add(Calendar.MINUTE,-calendar.get(Calendar.MINUTE)); calendar.add(Calendar.SECOND,-calendar.get(Calendar.SECOND)); calendar.add(Calendar.DAY_OF_MONTH,-29); - String startTime = DateUtil.format(calendar.getTime(),DateUtil.PATTERN_DATETIME); String rainStart = DateUtil.format(calendar.getTime(),DateUtil.PATTERN_DATE); R>> rains = rainfallClient.getDurationRainFall(code,rainStart,rainEnd); if(!rains.isSuccess() || CollectionUtil.isEmpty(rains.getData())){ diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/TicketApplication.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/TicketApplication.java index 4db5df6..17e8860 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/TicketApplication.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/TicketApplication.java @@ -24,10 +24,4 @@ public class TicketApplication { public static void main(String[] args) { BladeApplication.run(TicketConstants.APP_NAME, TicketApplication.class, args); } - -// @Override -// protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) { -// return BladeApplication.createSpringApplicationBuilder(builder, TicketConstants.APP_NAME, TicketApplication.class); -// } - -} +} \ No newline at end of file diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/mapper/xml/OperRepairMapper.xml b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/mapper/OperRepairMapper.xml similarity index 100% rename from hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/mapper/xml/OperRepairMapper.xml rename to hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/mapper/OperRepairMapper.xml diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/mapper/xml/WorkTaskMapper.xml b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/mapper/WorkTaskMapper.xml similarity index 100% rename from hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/mapper/xml/WorkTaskMapper.xml rename to hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/mapper/WorkTaskMapper.xml diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/mapper/StandardTicketInfoMapper.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/mapper/StandardTicketInfoMapper.java index 48cd76e..9a86545 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/mapper/StandardTicketInfoMapper.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/mapper/StandardTicketInfoMapper.java @@ -1,16 +1,11 @@ package com.hnac.hzims.ticket.standardTicket.mapper; -import com.baomidou.mybatisplus.core.conditions.Wrapper; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Constants; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.hnac.hzims.ticket.standardTicket.entity.StandardTicketInfoEntity; import com.hnac.hzims.ticket.standardTicket.vo.OperateTicketStatisticVO; -import com.hnac.hzims.ticket.standardTicket.vo.OperateVo; -import com.hnac.hzims.ticket.workTicket.entity.WorkTicketInfoEntity; import com.hnac.hzims.vo.SafeCheckStatisticVO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -30,14 +25,9 @@ public interface StandardTicketInfoMapper extends UserDataScopeBaseMapper deptIdList); - /** * 分页查询 * @param searchPage @@ -61,7 +50,6 @@ public interface StandardTicketInfoMapper extends UserDataScopeBaseMapper selectPages(Page searchPage, @Param(Constants.WRAPPER) QueryWrapper queryWrapper); - List selectTicketList(@Param(Constants.WRAPPER) QueryWrapper queryWrapper); IPage pageCondition(IPage page, @Param(Constants.WRAPPER) QueryWrapper queryWrapper); } diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/mapper/xml/StandardTicketInfoMapper.xml b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/mapper/StandardTicketInfoMapper.xml similarity index 92% rename from hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/mapper/xml/StandardTicketInfoMapper.xml rename to hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/mapper/StandardTicketInfoMapper.xml index e4071b5..4e1309d 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/mapper/xml/StandardTicketInfoMapper.xml +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/mapper/StandardTicketInfoMapper.xml @@ -39,23 +39,6 @@ and MONTH(t.CREATE_TIME) = #{month} and e.status = 1; - - + + diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/mapper/xml/StandardTicketMeasureMapper.xml b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/mapper/StandardTicketMeasureMapper.xml similarity index 100% rename from hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/mapper/xml/StandardTicketMeasureMapper.xml rename to hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/mapper/StandardTicketMeasureMapper.xml diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/IStandardTicketInfoService.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/IStandardTicketInfoService.java index af31217..6a98d18 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/IStandardTicketInfoService.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/IStandardTicketInfoService.java @@ -16,6 +16,7 @@ import com.hnac.hzims.ticket.twoTicket.vo.operation.StandardTicketInfoVo; import com.hnac.hzims.ticket.twoTicket.vo.ticket.StandardTicketCountQueryVo; import com.hnac.hzims.ticket.workTicket.vo.TicketMonthVO; +import com.hnac.hzims.vo.SafeCheckStatisticVO; import org.springblade.core.mp.support.BladePage; import org.springblade.core.mp.support.Query; import org.springblade.core.tool.api.R; @@ -81,10 +82,10 @@ public interface IStandardTicketInfoService extends IService depatList - * @param LocalDateTime firstDateTime - * @param LocalDateTime now - * @return DoublePassRateVO + * @param depatList + * @param firstDateTime + * @param now + * @return */ DoublePassRateVO getDoublePassRate(List depatList, LocalDateTime firstDateTime, LocalDateTime now); @@ -151,4 +152,6 @@ public interface IStandardTicketInfoService extends IService documents, String savePath) throws IOException { FileOutputStream out = new FileOutputStream(savePath); try { diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/feign/OperateTicketClient.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/feign/OperateTicketClient.java index de029a0..ccea0c9 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/feign/OperateTicketClient.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/feign/OperateTicketClient.java @@ -1,8 +1,10 @@ package com.hnac.hzims.ticket.workTicket.feign; import com.hnac.hzims.safeproduct.Constants; +import com.hnac.hzims.ticket.standardTicket.service.IStandardTicketInfoService; import com.hnac.hzims.ticket.standardTicket.service.impl.StandardTicketInfoServiceImpl; import com.hnac.hzims.vo.SafeCheckStatisticVO; +import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.ObjectUtil; @@ -18,9 +20,12 @@ import java.math.RoundingMode; * @author hx */ @RestController +@AllArgsConstructor @Slf4j public class OperateTicketClient implements IOperateTicketClient { + private final IStandardTicketInfoService standardTicketInfoService; + /** * 安全检查操作票事项统计 * @param startDate 开始时间 @@ -33,8 +38,7 @@ public class OperateTicketClient implements IOperateTicketClient { public R getOperateTicketCheck(@RequestParam("startDate") String startDate, @RequestParam("endDate") String endDate, @RequestParam("dept") Long dept) { - StandardTicketInfoServiceImpl service = SpringUtil.getBean(StandardTicketInfoServiceImpl.class); - SafeCheckStatisticVO vo = service.getBaseMapper().getOperateTicketStatistic(startDate,endDate,dept); + SafeCheckStatisticVO vo = standardTicketInfoService.getOperateTicketStatistic(startDate,endDate,dept); //查询合格率 保留两位小数 if(vo == null){ vo = new SafeCheckStatisticVO(); diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/xml/TwoTicketMatterLibraryMapper.xml b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/TwoTicketMatterLibraryMapper.xml similarity index 100% rename from hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/xml/TwoTicketMatterLibraryMapper.xml rename to hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/TwoTicketMatterLibraryMapper.xml diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/xml/WorkTicketDelayMapper.xml b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/WorkTicketDelayMapper.xml similarity index 100% rename from hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/xml/WorkTicketDelayMapper.xml rename to hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/WorkTicketDelayMapper.xml diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/xml/WorkTicketFlowMapper.xml b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/WorkTicketFlowMapper.xml similarity index 100% rename from hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/xml/WorkTicketFlowMapper.xml rename to hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/WorkTicketFlowMapper.xml diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/xml/WorkTicketInfoMapper.xml b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/WorkTicketInfoMapper.xml similarity index 99% rename from hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/xml/WorkTicketInfoMapper.xml rename to hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/WorkTicketInfoMapper.xml index e3183c2..4e301db 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/xml/WorkTicketInfoMapper.xml +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/WorkTicketInfoMapper.xml @@ -52,7 +52,7 @@ and ti.create_time < #{endDate} - + and ti.create_dept = #{dept} diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/xml/WorkTicketMembersChangeMapper.xml b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/WorkTicketMembersChangeMapper.xml similarity index 100% rename from hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/xml/WorkTicketMembersChangeMapper.xml rename to hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/WorkTicketMembersChangeMapper.xml diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/xml/WorkTicketOperateTimeMapper.xml b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/WorkTicketOperateTimeMapper.xml similarity index 100% rename from hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/xml/WorkTicketOperateTimeMapper.xml rename to hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/WorkTicketOperateTimeMapper.xml diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/xml/WorkTicketPrincipalChangeMapper.xml b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/WorkTicketPrincipalChangeMapper.xml similarity index 100% rename from hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/xml/WorkTicketPrincipalChangeMapper.xml rename to hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/WorkTicketPrincipalChangeMapper.xml diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/xml/WorkTicketSafetyMeasureMapper.xml b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/WorkTicketSafetyMeasureMapper.xml similarity index 100% rename from hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/xml/WorkTicketSafetyMeasureMapper.xml rename to hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/mapper/WorkTicketSafetyMeasureMapper.xml