Browse Source

#定时任务抽离

zhongwei
yang_shj 1 year ago
parent
commit
9c5d4a894b
  1. 8
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/controller/EcologyController.java
  2. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/service/EcologyFlowStationService.java
  3. 8
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/service/impl/EcologyFlowStationServiceImpl.java

8
hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/controller/EcologyController.java

@ -54,8 +54,8 @@ public class EcologyController extends BladeController {
@PostMapping("/station_top") @PostMapping("/station_top")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@ApiOperation(value = "站点数据及达标率排行", notes = "站点数据及达标率排行") @ApiOperation(value = "站点数据及达标率排行", notes = "站点数据及达标率排行")
public R station_top(@RequestParam String city) { public R station_top(@RequestParam Long deptId) {
return R.data(stationService.station_top(city)); return R.data(stationService.station_top(deptId));
} }
/** /**
@ -65,8 +65,8 @@ public class EcologyController extends BladeController {
@PostMapping("/trend_chart") @PostMapping("/trend_chart")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@ApiOperation(value = "指标趋势图", notes = "指标趋势图") @ApiOperation(value = "指标趋势图", notes = "指标趋势图")
public R trend_chart(@RequestParam String city,@RequestParam String type) { public R trend_chart(@RequestParam Long deptId,@RequestParam String type) {
return R.data(stationService.trend_chart(city,type)); return R.data(stationService.trend_chart(deptId,type));
} }

4
hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/service/EcologyFlowStationService.java

@ -14,12 +14,12 @@ import java.util.List;
*/ */
public interface EcologyFlowStationService extends BaseService<EcologyFlowStationEntity> { public interface EcologyFlowStationService extends BaseService<EcologyFlowStationEntity> {
EcologFlowStationVo station_top(String city); EcologFlowStationVo station_top(Long deptId);
Boolean generate(Long mon,String year); Boolean generate(Long mon,String year);
List<TrendChartVo> trend_chart(String city,String type); List<TrendChartVo> trend_chart(Long deptId,String type);
List<StationVo> station(); List<StationVo> station();
} }

8
hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/service/impl/EcologyFlowStationServiceImpl.java

@ -98,9 +98,9 @@ public class EcologyFlowStationServiceImpl extends BaseServiceImpl<EcologyFlowSt
* @return * @return
*/ */
@Override @Override
public EcologFlowStationVo station_top(String city) { public EcologFlowStationVo station_top(Long deptId) {
List<EcologyFlowStationEntity> stations = this.list(Wrappers.<EcologyFlowStationEntity>lambdaQuery() List<EcologyFlowStationEntity> stations = this.list(Wrappers.<EcologyFlowStationEntity>lambdaQuery()
.eq(EcologyFlowStationEntity::getCity,city)); .eq(EcologyFlowStationEntity::getCreateDept,deptId));
if(CollectionUtil.isEmpty(stations)){ if(CollectionUtil.isEmpty(stations)){
return new EcologFlowStationVo(); return new EcologFlowStationVo();
} }
@ -134,9 +134,9 @@ public class EcologyFlowStationServiceImpl extends BaseServiceImpl<EcologyFlowSt
* @return * @return
*/ */
@Override @Override
public List<TrendChartVo> trend_chart(String city,String type) { public List<TrendChartVo> trend_chart(Long deptId,String type) {
List<EcologyFlowStationEntity> stations = this.list(Wrappers.<EcologyFlowStationEntity>lambdaQuery() List<EcologyFlowStationEntity> stations = this.list(Wrappers.<EcologyFlowStationEntity>lambdaQuery()
.eq(EcologyFlowStationEntity::getCity,city)); .eq(EcologyFlowStationEntity::getCreateDept,deptId));
if(CollectionUtil.isEmpty(stations)){ if(CollectionUtil.isEmpty(stations)){
return new ArrayList<>(); return new ArrayList<>();
} }

Loading…
Cancel
Save