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())); } /**