fix (farm): 大屏 (旧代码)
- 大屏接口删除
This commit is contained in:
@@ -1,95 +0,0 @@
|
|||||||
package cn.iocoder.yudao.module.farm.controller.admin.bigscreen;
|
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
|
||||||
import cn.iocoder.yudao.module.farm.controller.admin.bigscreen.vo.BaseAreaStatRespVO;
|
|
||||||
import cn.iocoder.yudao.module.farm.controller.admin.bigscreen.vo.BaseBasicInfoRespVO;
|
|
||||||
import cn.iocoder.yudao.module.farm.controller.admin.bigscreen.vo.BaseCountStatRespVO;
|
|
||||||
import cn.iocoder.yudao.module.farm.controller.admin.bigscreen.vo.BasePlotStatRespVO;
|
|
||||||
import cn.iocoder.yudao.module.farm.controller.admin.bigscreen.vo.PlantingDistributionPieItemVO;
|
|
||||||
import cn.iocoder.yudao.module.farm.controller.admin.bigscreen.vo.YieldCompareBarItemVO;
|
|
||||||
import cn.iocoder.yudao.module.farm.controller.admin.bigscreen.vo.YieldDistributionPieItemVO;
|
|
||||||
import cn.iocoder.yudao.module.farm.service.bigscreen.BigScreenService;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import jakarta.annotation.Resource;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 大屏接口
|
|
||||||
*/
|
|
||||||
@Tag(name = "管理后台 - 大屏")
|
|
||||||
@RestController
|
|
||||||
//@RequestMapping("/farm/big-screen")
|
|
||||||
@Validated
|
|
||||||
public class BigScreenController {
|
|
||||||
|
|
||||||
// @Resource
|
|
||||||
// private BigScreenService bigScreenService;
|
|
||||||
//
|
|
||||||
// // 基地板块 —— 基础信息
|
|
||||||
// @Operation(summary = "基地板块-基础信息")
|
|
||||||
// @Parameter(name = "baseId", description = "基地ID", required = true)
|
|
||||||
// @GetMapping("/base/basic-info")
|
|
||||||
// public CommonResult<BaseBasicInfoRespVO> getBaseBasicInfo(@RequestParam("baseId") String baseId) {
|
|
||||||
// return success(bigScreenService.getBaseBasicInfo(baseId));
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // 基地板块 —— 基地面积统计
|
|
||||||
// @Operation(summary = "基地板块-基地面积统计")
|
|
||||||
// @Parameter(name = "baseId", description = "基地ID", required = true)
|
|
||||||
// @GetMapping("/base/area-stats")
|
|
||||||
// public CommonResult<BaseAreaStatRespVO> getBaseAreaStats(@RequestParam("baseId") String baseId) {
|
|
||||||
// return success(bigScreenService.getBaseAreaStats(baseId));
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // 基地板块 —— 基地数量统计(地块、设施等数量)
|
|
||||||
// @Operation(summary = "基地板块-基地数量统计")
|
|
||||||
// @Parameter(name = "baseId", description = "基地ID", required = true)
|
|
||||||
// @GetMapping("/base/count-stats")
|
|
||||||
// public CommonResult<BaseCountStatRespVO> getBaseCountStats(@RequestParam("baseId") String baseId) {
|
|
||||||
// return success(bigScreenService.getBaseCountStats(baseId));
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // 基地板块 —— 地块统计
|
|
||||||
// @Operation(summary = "基地板块-地块统计")
|
|
||||||
// @Parameter(name = "baseId", description = "基地ID", required = true)
|
|
||||||
// @GetMapping("/base/plot-stats")
|
|
||||||
// public CommonResult<List<BasePlotStatRespVO>> getBasePlotStats(@RequestParam("baseId") String baseId) {
|
|
||||||
// return success(bigScreenService.getBasePlotStats(baseId));
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // 种植统计 —— 种植分布(饼图)
|
|
||||||
// @Operation(summary = "种植统计-种植分布饼图")
|
|
||||||
// @Parameter(name = "baseId", description = "基地ID", required = true)
|
|
||||||
// @GetMapping("/planting/distribution-pie")
|
|
||||||
// public CommonResult<List<PlantingDistributionPieItemVO>> getPlantingDistributionPie(@RequestParam("baseId") String baseId) {
|
|
||||||
// return success(bigScreenService.getPlantingDistributionPie(baseId));
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // 种植统计 —— 产量分布(饼图)
|
|
||||||
// @Operation(summary = "种植统计-产量分布饼图")
|
|
||||||
// @Parameter(name = "baseId", description = "基地ID", required = true)
|
|
||||||
// @GetMapping("/planting/yield-distribution-pie")
|
|
||||||
// public CommonResult<List<YieldDistributionPieItemVO>> getYieldDistributionPie(@RequestParam("baseId") String baseId) {
|
|
||||||
// return success(bigScreenService.getYieldDistributionPie(baseId));
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // 种植统计 —— 实际/预计产量对比(柱状图)
|
|
||||||
// @Operation(summary = "种植统计-实际预计产量对比柱状图")
|
|
||||||
// @Parameter(name = "baseId", description = "基地ID", required = true)
|
|
||||||
// @GetMapping("/planting/yield-compare-bar")
|
|
||||||
// public CommonResult<List<YieldCompareBarItemVO>> getYieldCompareBar(@RequestParam("baseId") String baseId) {
|
|
||||||
// return success(bigScreenService.getYieldCompareBar(baseId));
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
package cn.iocoder.yudao.module.farm.controller.admin.bigscreen.vo;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class BaseAreaStatRespVO {
|
|
||||||
|
|
||||||
@Schema(description = "基地ID")
|
|
||||||
private String baseId;
|
|
||||||
|
|
||||||
@Schema(description = "总面积(亩)")
|
|
||||||
private Double totalAreaMu;
|
|
||||||
|
|
||||||
@Schema(description = "已种植面积(亩)")
|
|
||||||
private Double plantedAreaMu;
|
|
||||||
|
|
||||||
@Schema(description = "未种植面积(亩)")
|
|
||||||
private Double idleAreaMu;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
package cn.iocoder.yudao.module.farm.controller.admin.bigscreen.vo;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class BaseBasicInfoRespVO {
|
|
||||||
|
|
||||||
@Schema(description = "基地ID")
|
|
||||||
private String baseId;
|
|
||||||
|
|
||||||
@Schema(description = "基地名称")
|
|
||||||
private String baseName;
|
|
||||||
|
|
||||||
@Schema(description = "地址")
|
|
||||||
private String address;
|
|
||||||
|
|
||||||
@Schema(description = "负责人")
|
|
||||||
private String principalName;
|
|
||||||
|
|
||||||
@Schema(description = "联系方式")
|
|
||||||
private String principalMobile;
|
|
||||||
|
|
||||||
@Schema(description = "总面积(亩)")
|
|
||||||
private Double totalAreaMu;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
package cn.iocoder.yudao.module.farm.controller.admin.bigscreen.vo;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class BaseCountStatRespVO {
|
|
||||||
|
|
||||||
@Schema(description = "基地ID")
|
|
||||||
private String baseId;
|
|
||||||
|
|
||||||
@Schema(description = "地块数量")
|
|
||||||
private Integer plotCount;
|
|
||||||
|
|
||||||
@Schema(description = "设施数量")
|
|
||||||
private Integer facilityCount;
|
|
||||||
|
|
||||||
@Schema(description = "品种数量")
|
|
||||||
private Integer varietyCount;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package cn.iocoder.yudao.module.farm.controller.admin.bigscreen.vo;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class BasePlotStatRespVO {
|
|
||||||
|
|
||||||
@Schema(description = "地块ID")
|
|
||||||
private String plotId;
|
|
||||||
|
|
||||||
@Schema(description = "地块名称")
|
|
||||||
private String plotName;
|
|
||||||
|
|
||||||
@Schema(description = "面积(亩)")
|
|
||||||
private Double areaMu;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package cn.iocoder.yudao.module.farm.controller.admin.bigscreen.vo;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class PlantingDistributionPieItemVO {
|
|
||||||
|
|
||||||
@Schema(description = "品种")
|
|
||||||
private String varietyName;
|
|
||||||
|
|
||||||
@Schema(description = "品种面积(亩)")
|
|
||||||
private Double varietyAreaMu;
|
|
||||||
|
|
||||||
@Schema(description = "面积占比(0-1)")
|
|
||||||
private Double areaRatio;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package cn.iocoder.yudao.module.farm.controller.admin.bigscreen.vo;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class YieldCompareBarItemVO {
|
|
||||||
|
|
||||||
@Schema(description = "品种")
|
|
||||||
private String varietyName;
|
|
||||||
|
|
||||||
@Schema(description = "实际产量(吨)")
|
|
||||||
private Double actualYieldTon;
|
|
||||||
|
|
||||||
@Schema(description = "预计产量(吨)")
|
|
||||||
private Double expectedYieldTon;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package cn.iocoder.yudao.module.farm.controller.admin.bigscreen.vo;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class YieldDistributionPieItemVO {
|
|
||||||
|
|
||||||
@Schema(description = "品种")
|
|
||||||
private String varietyName;
|
|
||||||
|
|
||||||
@Schema(description = "品种产量(吨)")
|
|
||||||
private Double varietyYieldTon;
|
|
||||||
|
|
||||||
@Schema(description = "产量占比(0-1)")
|
|
||||||
private Double yieldRatio;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
package cn.iocoder.yudao.module.farm.controller.admin.managementcenter.farmnews.vo;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description: TODO
|
|
||||||
* @author: binda
|
|
||||||
* @date: 2025/10/13 20:13
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@AllArgsConstructor
|
|
||||||
@NoArgsConstructor
|
|
||||||
public class FarmInformationDetailRespVO {
|
|
||||||
@Schema(description = "ID")
|
|
||||||
private String id;
|
|
||||||
@Schema(description = "资讯类型 (1: 要闻; 99:其他)")
|
|
||||||
private String infoType;
|
|
||||||
private String infoTypeName;
|
|
||||||
@Schema(description = "资讯标题")
|
|
||||||
private String infoTitle;
|
|
||||||
@Schema(description = "正文")
|
|
||||||
private String infoText;
|
|
||||||
}
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
package cn.iocoder.yudao.module.farm.service.bigscreen;
|
|
||||||
|
|
||||||
import cn.iocoder.yudao.module.farm.controller.admin.bigscreen.vo.BaseAreaStatRespVO;
|
|
||||||
import cn.iocoder.yudao.module.farm.controller.admin.bigscreen.vo.BaseBasicInfoRespVO;
|
|
||||||
import cn.iocoder.yudao.module.farm.controller.admin.bigscreen.vo.BaseCountStatRespVO;
|
|
||||||
import cn.iocoder.yudao.module.farm.controller.admin.bigscreen.vo.BasePlotStatRespVO;
|
|
||||||
import cn.iocoder.yudao.module.farm.controller.admin.bigscreen.vo.PlantingDistributionPieItemVO;
|
|
||||||
import cn.iocoder.yudao.module.farm.controller.admin.bigscreen.vo.YieldCompareBarItemVO;
|
|
||||||
import cn.iocoder.yudao.module.farm.controller.admin.bigscreen.vo.YieldDistributionPieItemVO;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public interface BigScreenService {
|
|
||||||
|
|
||||||
BaseBasicInfoRespVO getBaseBasicInfo(String baseId);
|
|
||||||
|
|
||||||
BaseAreaStatRespVO getBaseAreaStats(String baseId);
|
|
||||||
|
|
||||||
BaseCountStatRespVO getBaseCountStats(String baseId);
|
|
||||||
|
|
||||||
List<BasePlotStatRespVO> getBasePlotStats(String baseId);
|
|
||||||
|
|
||||||
List<PlantingDistributionPieItemVO> getPlantingDistributionPie(String baseId);
|
|
||||||
|
|
||||||
List<YieldDistributionPieItemVO> getYieldDistributionPie(String baseId);
|
|
||||||
|
|
||||||
List<YieldCompareBarItemVO> getYieldCompareBar(String baseId);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,110 +0,0 @@
|
|||||||
package cn.iocoder.yudao.module.farm.service.bigscreen.impl;
|
|
||||||
|
|
||||||
import cn.iocoder.yudao.module.farm.controller.admin.bigscreen.vo.*;
|
|
||||||
import cn.iocoder.yudao.module.farm.service.bigscreen.BigScreenService;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
public class BigScreenServiceImpl implements BigScreenService {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BaseBasicInfoRespVO getBaseBasicInfo(String baseId) {
|
|
||||||
BaseBasicInfoRespVO vo = new BaseBasicInfoRespVO();
|
|
||||||
vo.setBaseId(baseId);
|
|
||||||
vo.setBaseName("演示基地");
|
|
||||||
vo.setAddress("演示地址");
|
|
||||||
vo.setPrincipalName("负责人");
|
|
||||||
vo.setPrincipalMobile("13800000000");
|
|
||||||
vo.setTotalAreaMu(1000D);
|
|
||||||
return vo;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BaseAreaStatRespVO getBaseAreaStats(String baseId) {
|
|
||||||
BaseAreaStatRespVO vo = new BaseAreaStatRespVO();
|
|
||||||
vo.setBaseId(baseId);
|
|
||||||
vo.setTotalAreaMu(1000D);
|
|
||||||
vo.setPlantedAreaMu(650D);
|
|
||||||
vo.setIdleAreaMu(350D);
|
|
||||||
return vo;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BaseCountStatRespVO getBaseCountStats(String baseId) {
|
|
||||||
BaseCountStatRespVO vo = new BaseCountStatRespVO();
|
|
||||||
vo.setBaseId(baseId);
|
|
||||||
vo.setPlotCount(120);
|
|
||||||
vo.setFacilityCount(45);
|
|
||||||
vo.setVarietyCount(18);
|
|
||||||
return vo;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<BasePlotStatRespVO> getBasePlotStats(String baseId) {
|
|
||||||
List<BasePlotStatRespVO> list = new ArrayList<>();
|
|
||||||
BasePlotStatRespVO a = new BasePlotStatRespVO();
|
|
||||||
a.setPlotId("A");
|
|
||||||
a.setPlotName("一区");
|
|
||||||
a.setAreaMu(200D);
|
|
||||||
list.add(a);
|
|
||||||
BasePlotStatRespVO b = new BasePlotStatRespVO();
|
|
||||||
b.setPlotId("B");
|
|
||||||
b.setPlotName("二区");
|
|
||||||
b.setAreaMu(150D);
|
|
||||||
list.add(b);
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<PlantingDistributionPieItemVO> getPlantingDistributionPie(String baseId) {
|
|
||||||
List<PlantingDistributionPieItemVO> list = new ArrayList<>();
|
|
||||||
PlantingDistributionPieItemVO v1 = new PlantingDistributionPieItemVO();
|
|
||||||
v1.setVarietyName("水稻");
|
|
||||||
v1.setVarietyAreaMu(260D);
|
|
||||||
v1.setAreaRatio(0.4D);
|
|
||||||
list.add(v1);
|
|
||||||
PlantingDistributionPieItemVO v2 = new PlantingDistributionPieItemVO();
|
|
||||||
v2.setVarietyName("小麦");
|
|
||||||
v2.setVarietyAreaMu(195D);
|
|
||||||
v2.setAreaRatio(0.3D);
|
|
||||||
list.add(v2);
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<YieldDistributionPieItemVO> getYieldDistributionPie(String baseId) {
|
|
||||||
List<YieldDistributionPieItemVO> list = new ArrayList<>();
|
|
||||||
YieldDistributionPieItemVO y1 = new YieldDistributionPieItemVO();
|
|
||||||
y1.setVarietyName("水稻");
|
|
||||||
y1.setVarietyYieldTon(520D);
|
|
||||||
y1.setYieldRatio(0.5D);
|
|
||||||
list.add(y1);
|
|
||||||
YieldDistributionPieItemVO y2 = new YieldDistributionPieItemVO();
|
|
||||||
y2.setVarietyName("小麦");
|
|
||||||
y2.setVarietyYieldTon(312D);
|
|
||||||
y2.setYieldRatio(0.3D);
|
|
||||||
list.add(y2);
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<YieldCompareBarItemVO> getYieldCompareBar(String baseId) {
|
|
||||||
List<YieldCompareBarItemVO> list = new ArrayList<>();
|
|
||||||
YieldCompareBarItemVO c1 = new YieldCompareBarItemVO();
|
|
||||||
c1.setVarietyName("水稻");
|
|
||||||
c1.setActualYieldTon(520D);
|
|
||||||
c1.setExpectedYieldTon(500D);
|
|
||||||
list.add(c1);
|
|
||||||
YieldCompareBarItemVO c2 = new YieldCompareBarItemVO();
|
|
||||||
c2.setVarietyName("小麦");
|
|
||||||
c2.setActualYieldTon(300D);
|
|
||||||
c2.setExpectedYieldTon(320D);
|
|
||||||
list.add(c2);
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user