From 2f0e8716db1d9ffe873b3a70057eb4bf4f61d802 Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Tue, 28 May 2024 09:38:21 +0800 Subject: [PATCH] =?UTF-8?q?#=E6=B0=B4=E7=94=B5=E7=AB=99=E8=BF=90=E8=A1=8C?= =?UTF-8?q?=E6=9C=88=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hnac/hzims/equipment/feign/IEmInfoClient.java | 2 +- .../hnac/hzims/equipment/feign/EmInfoClient.java | 3 ++- .../hnac/hzims/equipment/mapper/EmParamMapper.java | 2 +- .../report/mapper/RunMonReportMapper.java | 13 ++++++++++ .../report/service/RunMonthReportService.java | 11 +++++++++ .../service/impl/RunMonReportServiceImpl.java | 19 +++++++++++++++ .../report/service/impl/RunMonthServiceImpl.java | 28 ++++++++++++++++++---- 7 files changed, 71 insertions(+), 7 deletions(-) create mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/mapper/RunMonReportMapper.java create mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/RunMonthReportService.java create mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/RunMonReportServiceImpl.java diff --git a/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/equipment/feign/IEmInfoClient.java b/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/equipment/feign/IEmInfoClient.java index df356ed..45145c9 100644 --- a/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/equipment/feign/IEmInfoClient.java +++ b/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/equipment/feign/IEmInfoClient.java @@ -175,5 +175,5 @@ public interface IEmInfoClient { R> emInfoList(EmInfoEntity req); @GetMapping(RIDE_DEVICES) - List rideDevices(List longs); + List rideDevices(@RequestParam("deptIds") List deptIds); } diff --git a/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/feign/EmInfoClient.java b/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/feign/EmInfoClient.java index 444b59c..de29497 100644 --- a/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/feign/EmInfoClient.java +++ b/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/feign/EmInfoClient.java @@ -157,7 +157,8 @@ public class EmInfoClient implements IEmInfoClient { } @Override - public List rideDevices(List deptIds) { + @GetMapping(RIDE_DEVICES) + public List rideDevices(@RequestParam("deptIds") List deptIds) { return service.rideDevices(deptIds); } diff --git a/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/mapper/EmParamMapper.java b/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/mapper/EmParamMapper.java index 0e83b71..7244763 100644 --- a/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/mapper/EmParamMapper.java +++ b/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/mapper/EmParamMapper.java @@ -19,5 +19,5 @@ public interface EmParamMapper extends UserDataScopeBaseMapper { List selectRideCountGroupEmIdByDepts(@Param("list") List list); - List rides(List deviceIds); + List rides(@Param("deviceIds") List deviceIds); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/mapper/RunMonReportMapper.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/mapper/RunMonReportMapper.java new file mode 100644 index 0000000..87a4eb6 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/mapper/RunMonReportMapper.java @@ -0,0 +1,13 @@ +package com.hnac.hzims.operational.report.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.hnac.hzims.operational.report.entity.RunMonthEntity; + +/** + * @author ysj + * @date 2023/04/10 11:22:14 + * @version 4.0.0 + */ +public interface RunMonReportMapper extends BaseMapper { + +} \ No newline at end of file diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/RunMonthReportService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/RunMonthReportService.java new file mode 100644 index 0000000..68bca91 --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/RunMonthReportService.java @@ -0,0 +1,11 @@ +package com.hnac.hzims.operational.report.service; + +import com.hnac.hzims.operational.report.entity.RunMonthEntity; +import org.springblade.core.mp.base.BaseService; + +/** + * @author ysj + */ +public interface RunMonthReportService extends BaseService { + +} \ No newline at end of file diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/RunMonReportServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/RunMonReportServiceImpl.java new file mode 100644 index 0000000..8dda69a --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/RunMonReportServiceImpl.java @@ -0,0 +1,19 @@ +package com.hnac.hzims.operational.report.service.impl; + +import com.hnac.hzims.operational.report.entity.RunMonthEntity; +import com.hnac.hzims.operational.report.mapper.RunMonReportMapper; +import com.hnac.hzims.operational.report.service.RunMonthReportService; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springblade.core.mp.base.BaseServiceImpl; +import org.springframework.stereotype.Service; + +/** + * @author ysj + */ +@Service +@RequiredArgsConstructor +@Slf4j +public class RunMonReportServiceImpl extends BaseServiceImpl implements RunMonthReportService { + +} \ No newline at end of file diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/RunMonthServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/RunMonthServiceImpl.java index 6d278d2..12eebde 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/RunMonthServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/RunMonthServiceImpl.java @@ -15,6 +15,7 @@ import com.hnac.hzims.operational.main.constant.HomePageConstant; import com.hnac.hzims.operational.main.service.IAnalyseDataService; import com.hnac.hzims.operational.report.entity.RunMonthEntity; import com.hnac.hzims.operational.report.mapper.RunMonthMapper; +import com.hnac.hzims.operational.report.service.RunMonthReportService; import com.hnac.hzims.operational.report.service.RunMonthService; import com.hnac.hzims.operational.report.vo.*; import com.hnac.hzims.operational.station.entity.StationEntity; @@ -75,6 +76,8 @@ public class RunMonthServiceImpl extends BaseServiceImpl stationDevices = devices.stream().filter(device->device.getDepartment().equals(station.getRefDept())).collect(Collectors.toList()); @@ -208,9 +211,26 @@ public class RunMonthServiceImpl extends BaseServiceImpl runs = runMonthReportService.list(Wrappers.lambdaQuery() + .eq(RunMonthEntity::getMonth,mon) + .eq(RunMonthEntity::getStationCode,stationCode) + ); + if(CollectionUtil.isEmpty(runs)){ + return; + } + this.runMonthReportService.deleteLogic(runs.stream().map(RunMonthEntity::getId).collect(Collectors.toList())); } /**