From c5c4110ef623ba59e93765c1e194dfdbae75e5e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BE=BE=E5=AF=8C=E6=96=8C?= Date: Mon, 25 Aug 2025 16:04:08 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat=20(farm):=20=E7=A7=8D=E6=A4=8D?= =?UTF-8?q?=E4=B8=AD=E5=BF=83-=E7=94=9F=E4=BA=A7=E8=AE=A1=E5=88=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加任务概述信息 --- .../CropFarmingCenterController.java | 10 ++-- .../vo/ProductionPlanPageRespVO.java | 44 +++++++++++++++++ .../vo/ProductionPlanRespVO.java | 5 ++ .../vo/ProductionPlanUpdateReqVO.java | 2 +- .../productionplan/ProductionPlanMapper.java | 3 ++ .../CropFarmingCenterService.java | 9 +--- .../CropFarmingCenterServiceImpl.java | 48 ++++++++++--------- .../productionplan/ProductionPlanMapper.xml | 15 ++++++ 8 files changed, 98 insertions(+), 38 deletions(-) create mode 100644 yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/cropFarmingCenter/vo/ProductionPlanPageRespVO.java diff --git a/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/cropFarmingCenter/CropFarmingCenterController.java b/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/cropFarmingCenter/CropFarmingCenterController.java index e785aefc..e51f17be 100644 --- a/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/cropFarmingCenter/CropFarmingCenterController.java +++ b/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/cropFarmingCenter/CropFarmingCenterController.java @@ -3,18 +3,14 @@ package cn.iocoder.yudao.module.farm.controller.admin.cropFarmingCenter; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; +import cn.iocoder.yudao.module.farm.controller.admin.cropFarmingCenter.vo.ProductionPlanPageRespVO; import cn.iocoder.yudao.module.farm.controller.admin.cropFarmingCenter.vo.ProductionPlanUpdateReqVO; import cn.iocoder.yudao.module.farm.controller.admin.farmingrecord.vo.FarmingRecordPageReqVO; import cn.iocoder.yudao.module.farm.controller.admin.farmingrecord.vo.FarmingRecordRespVO; import cn.iocoder.yudao.module.farm.controller.admin.farmingrecord.vo.FarmingRecordSaveReqVO; -import cn.iocoder.yudao.module.farm.controller.admin.productionplan.vo.ProductionPlanPageReqVO; -import cn.iocoder.yudao.module.farm.controller.admin.productionplan.vo.ProductionPlanRespVO; -import cn.iocoder.yudao.module.farm.controller.admin.productionplan.vo.ProductionPlanSaveReqVO; import cn.iocoder.yudao.module.farm.dal.dataobject.farmingrecord.FarmingRecordDO; -import cn.iocoder.yudao.module.farm.dal.dataobject.productionplan.ProductionPlanDO; import cn.iocoder.yudao.module.farm.service.cropFarmingCenter.CropFarmingCenterService; import cn.iocoder.yudao.module.farm.service.farmingrecord.FarmingRecordService; -import cn.iocoder.yudao.module.farm.service.productionplan.ProductionPlanService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.validation.Valid; @@ -54,8 +50,8 @@ public class CropFarmingCenterController { // 生产计划 @GetMapping("/production-plan/page") @Operation(summary = "生产计划-分页") - public CommonResult> getProductionPlanPage(@Valid cn.iocoder.yudao.module.farm.controller.admin.cropFarmingCenter.vo.ProductionPlanPageReqVO pageReqVO) { - PageResult pageResult = cropFarmingCenterService.getProductionPlanPage(pageReqVO); + public CommonResult getProductionPlanPage(@Valid cn.iocoder.yudao.module.farm.controller.admin.cropFarmingCenter.vo.ProductionPlanPageReqVO pageReqVO) { + ProductionPlanPageRespVO pageResult = cropFarmingCenterService.getProductionPlanPage(pageReqVO); return success(pageResult); } diff --git a/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/cropFarmingCenter/vo/ProductionPlanPageRespVO.java b/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/cropFarmingCenter/vo/ProductionPlanPageRespVO.java new file mode 100644 index 00000000..84ecf5dd --- /dev/null +++ b/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/cropFarmingCenter/vo/ProductionPlanPageRespVO.java @@ -0,0 +1,44 @@ +package cn.iocoder.yudao.module.farm.controller.admin.cropFarmingCenter.vo; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.math.BigDecimal; + +/** + * @description: 分页响应实体 + * @author: binda + * @date: 2025/8/25 14:41 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +public class ProductionPlanPageRespVO { + + + @Schema(description = "分页数据") + private PageResult list; + + @Schema(description = "计划概括信息") + private PlanOverview planOverview; + + @Data + @AllArgsConstructor + @NoArgsConstructor + public static class PlanOverview{ + @Schema(description = "总面积") + private BigDecimal totalArea; + @Schema(description = "计划总数") + private Integer planCount; + @Schema(description = "已完成-计划个数") + private Integer planCompletedCount; + @Schema(description = "进行中-计划个数") + private Integer planInProgressCount; + @Schema(description = "逾期-计划个数") + private Integer planOverdueCount; + } + +} diff --git a/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/cropFarmingCenter/vo/ProductionPlanRespVO.java b/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/cropFarmingCenter/vo/ProductionPlanRespVO.java index ee1f4fca..052a9119 100644 --- a/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/cropFarmingCenter/vo/ProductionPlanRespVO.java +++ b/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/cropFarmingCenter/vo/ProductionPlanRespVO.java @@ -2,7 +2,9 @@ package cn.iocoder.yudao.module.farm.controller.admin.cropFarmingCenter.vo; import cn.iocoder.yudao.module.farm.controller.admin.modelmanagement.vo.ModelManagementRespVO; import io.swagger.v3.oas.annotations.media.Schema; +import lombok.AllArgsConstructor; import lombok.Data; +import lombok.NoArgsConstructor; import java.time.LocalDate; @@ -12,6 +14,8 @@ import java.time.LocalDate; * @date: 2025/8/21 14:17 */ @Data +@AllArgsConstructor +@NoArgsConstructor public class ProductionPlanRespVO { @Schema(description = "ID") @@ -74,4 +78,5 @@ public class ProductionPlanRespVO { @Schema(description = "模型", example = "芋艿") private ModelManagementRespVO modelManagementRespVO; + } diff --git a/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/cropFarmingCenter/vo/ProductionPlanUpdateReqVO.java b/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/cropFarmingCenter/vo/ProductionPlanUpdateReqVO.java index 96d7812a..2091a749 100644 --- a/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/cropFarmingCenter/vo/ProductionPlanUpdateReqVO.java +++ b/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/cropFarmingCenter/vo/ProductionPlanUpdateReqVO.java @@ -35,7 +35,7 @@ public class ProductionPlanUpdateReqVO { @Schema(description = "采收开始日期") private LocalDate harvestStartDate; - @Schema(description = "计划执行状态") + @Schema(description = "计划执行状态 (1:未开始;2:进行中;3:已完成;4:逾期)") private Integer planStatus; diff --git a/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/dal/mysql/productionplan/ProductionPlanMapper.java b/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/dal/mysql/productionplan/ProductionPlanMapper.java index 7dbc6035..dbceb505 100644 --- a/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/dal/mysql/productionplan/ProductionPlanMapper.java +++ b/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/dal/mysql/productionplan/ProductionPlanMapper.java @@ -3,9 +3,11 @@ package cn.iocoder.yudao.module.farm.dal.mysql.productionplan; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.farm.controller.admin.cropFarmingCenter.vo.ProductionPlanPageRespVO; import cn.iocoder.yudao.module.farm.controller.admin.productionplan.vo.ProductionPlanPageReqVO; import cn.iocoder.yudao.module.farm.dal.dataobject.productionplan.ProductionPlanDO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; /** * 种植中心-生产计划-生产计划 Mapper @@ -41,4 +43,5 @@ public interface ProductionPlanMapper extends BaseMapperX { ); } + ProductionPlanPageRespVO.PlanOverview getPlanOverview(@Param("baseId") String baseId); } \ No newline at end of file diff --git a/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/service/cropFarmingCenter/CropFarmingCenterService.java b/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/service/cropFarmingCenter/CropFarmingCenterService.java index 7cce31c0..bf423029 100644 --- a/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/service/cropFarmingCenter/CropFarmingCenterService.java +++ b/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/service/cropFarmingCenter/CropFarmingCenterService.java @@ -1,10 +1,6 @@ package cn.iocoder.yudao.module.farm.service.cropFarmingCenter; -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.farm.controller.admin.cropFarmingCenter.vo.ProductionPlanPageReqVO; -import cn.iocoder.yudao.module.farm.controller.admin.cropFarmingCenter.vo.ProductionPlanRespVO; -import cn.iocoder.yudao.module.farm.controller.admin.cropFarmingCenter.vo.ProductionPlanSaveReqVO; -import cn.iocoder.yudao.module.farm.controller.admin.cropFarmingCenter.vo.ProductionPlanUpdateReqVO; +import cn.iocoder.yudao.module.farm.controller.admin.cropFarmingCenter.vo.*; /** * @description: 种植中心 @@ -27,8 +23,7 @@ public interface CropFarmingCenterService { void updateProductionPlan(ProductionPlanUpdateReqVO updateReqVO); - PageResult getProductionPlanPage(ProductionPlanPageReqVO reqVO); - + ProductionPlanPageRespVO getProductionPlanPage(ProductionPlanPageReqVO reqVO); int getCropCount(Long tenantId); diff --git a/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/service/cropFarmingCenter/CropFarmingCenterServiceImpl.java b/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/service/cropFarmingCenter/CropFarmingCenterServiceImpl.java index 9113d9f7..29ccdde3 100644 --- a/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/service/cropFarmingCenter/CropFarmingCenterServiceImpl.java +++ b/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/service/cropFarmingCenter/CropFarmingCenterServiceImpl.java @@ -4,33 +4,27 @@ import cn.hutool.core.util.IdUtil; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; import cn.iocoder.yudao.framework.security.core.LoginUser; -import cn.iocoder.yudao.module.farm.controller.admin.cropFarmingCenter.vo.ProductionPlanPageReqVO; -import cn.iocoder.yudao.module.farm.controller.admin.cropFarmingCenter.vo.ProductionPlanRespVO; -import cn.iocoder.yudao.module.farm.controller.admin.cropFarmingCenter.vo.ProductionPlanSaveReqVO; -import cn.iocoder.yudao.module.farm.controller.admin.cropFarmingCenter.vo.ProductionPlanUpdateReqVO; +import cn.iocoder.yudao.module.farm.controller.admin.cropFarmingCenter.vo.*; import cn.iocoder.yudao.module.farm.controller.admin.farmingrecord.vo.FarmingRecordSaveReqVO; import cn.iocoder.yudao.module.farm.controller.admin.farmingrecordinput.vo.FarmingRecordInputSaveReqVO; import cn.iocoder.yudao.module.farm.controller.admin.modelcycle.vo.ModelCycleRespVO; import cn.iocoder.yudao.module.farm.controller.admin.modelmanagement.vo.ModelManagementRespVO; import cn.iocoder.yudao.module.farm.controller.admin.modelfarmingoperation.vo.ModelFarmingOperationRespVO; -import cn.iocoder.yudao.module.farm.dal.dataobject.farmingrecord.FarmingRecordDO; -import cn.iocoder.yudao.module.farm.dal.dataobject.farmingrecordinput.FarmingRecordInputDO; +import cn.iocoder.yudao.module.farm.dal.dataobject.baseinfo.BaseInfoDO; import cn.iocoder.yudao.module.farm.dal.dataobject.modelfarmingoperationinput.ModelFarmingOperationInputDO; import cn.iocoder.yudao.module.farm.dal.dataobject.productionplan.ProductionPlanDO; +import cn.iocoder.yudao.module.farm.dal.mysql.baseinfo.BaseInfoMapper; import cn.iocoder.yudao.module.farm.dal.mysql.productionplan.ProductionPlanMapper; import cn.iocoder.yudao.module.farm.enums.CommonConstants; -import cn.iocoder.yudao.module.farm.service.cultivationarea.CultivationAreaService; import cn.iocoder.yudao.module.farm.service.farmingrecord.FarmingRecordService; import cn.iocoder.yudao.module.farm.service.farmingrecordinput.FarmingRecordInputService; import cn.iocoder.yudao.module.farm.service.modelmanagement.ModelManagementService; -import cn.iocoder.yudao.module.farm.service.productionplan.ProductionPlanService; import cn.iocoder.yudao.module.farm.utils.StrHelperUtil; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import java.time.LocalDate; -import java.time.LocalDateTime; import java.util.ArrayList; import java.util.List; @@ -47,15 +41,17 @@ import static cn.iocoder.yudao.module.farm.enums.ErrorCodeConstants.PRODUCTION_P @Slf4j public class CropFarmingCenterServiceImpl implements CropFarmingCenterService { + private final BaseInfoMapper baseInfoMapper; private final ProductionPlanMapper productionPlanMapper; private final ModelManagementService modelManagementService; private final FarmingRecordService farmingRecordService; private final FarmingRecordInputService farmingRecordInputService; - public CropFarmingCenterServiceImpl(ProductionPlanMapper productionPlanMapper, - ModelManagementService modelManagementService, - FarmingRecordService farmingRecordService, - FarmingRecordInputService farmingRecordInputService) { + public CropFarmingCenterServiceImpl(BaseInfoMapper baseInfoMapper, ProductionPlanMapper productionPlanMapper, + ModelManagementService modelManagementService, + FarmingRecordService farmingRecordService, + FarmingRecordInputService farmingRecordInputService) { + this.baseInfoMapper = baseInfoMapper; this.productionPlanMapper = productionPlanMapper; this.modelManagementService = modelManagementService; this.farmingRecordService = farmingRecordService; @@ -189,12 +185,13 @@ public class CropFarmingCenterServiceImpl implements CropFarmingCenterService { @Override public ProductionPlanRespVO getProductionPlan(String id) { LoginUser user = getLoginUser(); - QueryWrapper queryWrapper = new QueryWrapper(); - queryWrapper.eq("id", id); - queryWrapper.eq("tenant_id", user.getTenantId()); - ProductionPlanDO productionPlanDO = productionPlanMapper.selectOne(queryWrapper); + ProductionPlanDO productionPlanDO = productionPlanMapper.selectOne( + Wrappers.lambdaQuery() + .eq(ProductionPlanDO::getId, id) + .eq(ProductionPlanDO::getTenantId, user.getTenantId()) + ); if (productionPlanDO == null) { - return new ProductionPlanRespVO(); + throw exception(PRODUCTION_PLAN_NOT_EXISTS); } ModelManagementRespVO modelManagementRespVO = modelManagementService.getModelManagement(productionPlanDO.getSpeciesModelId()); @@ -211,18 +208,23 @@ public class CropFarmingCenterServiceImpl implements CropFarmingCenterService { } @Override - public PageResult getProductionPlanPage(ProductionPlanPageReqVO reqVO) { + public ProductionPlanPageRespVO getProductionPlanPage(ProductionPlanPageReqVO reqVO) { PageResult productionPlanDOPageResult = productionPlanMapper.selectPage2(reqVO); - PageResult result = BeanUtils.toBean(productionPlanDOPageResult, ProductionPlanRespVO.class); - result.getList().forEach(e -> { + PageResult resultData = BeanUtils.toBean(productionPlanDOPageResult, ProductionPlanRespVO.class); + resultData.getList().forEach(e -> { ModelManagementRespVO modelManagementRespVO = modelManagementService.getModelManagement(e.getSpeciesModelId()); e.setModelManagementRespVO(modelManagementRespVO); }); - return result; + // 计划概述 + BaseInfoDO baseObj = baseInfoMapper.selectOne("base_id", reqVO.getBaseId()); + ProductionPlanPageRespVO.PlanOverview planOverview = productionPlanMapper.getPlanOverview(reqVO.getBaseId()); + planOverview.setTotalArea(baseObj.getArea()); + return new ProductionPlanPageRespVO(resultData,planOverview); + } @Override diff --git a/yudao-module-farm/src/main/resources/mapper/productionplan/ProductionPlanMapper.xml b/yudao-module-farm/src/main/resources/mapper/productionplan/ProductionPlanMapper.xml index e63e430c..546d4581 100644 --- a/yudao-module-farm/src/main/resources/mapper/productionplan/ProductionPlanMapper.xml +++ b/yudao-module-farm/src/main/resources/mapper/productionplan/ProductionPlanMapper.xml @@ -15,10 +15,25 @@ where tenant_id = #{tenantId} and deleted = 0 + + + \ No newline at end of file From efd19163edb5ac760e6debab4fd6b79c794308c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BE=BE=E5=AF=8C=E6=96=8C?= Date: Mon, 25 Aug 2025 16:31:55 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat=20(farm):=20=E5=AE=9A=E6=97=B6?= =?UTF-8?q?=E5=99=A8:=20=E7=A7=8D=E6=A4=8D=E4=B8=AD=E5=BF=83-=E7=94=9F?= =?UTF-8?q?=E4=BA=A7=E8=AE=A1=E5=88=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 更新任务状态 - 更新地块面积 - 创建农事记录 --- .../framework/tenant/core/job/TenantJob.java | 2 +- .../module/farm/enums/CommonConstants.java | 1 + .../farm/scheduled/ProductionPlanJob.java | 66 +++++++++++++++++++ 3 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/scheduled/ProductionPlanJob.java diff --git a/yudao-framework/yudao-spring-boot-starter-biz-tenant/src/main/java/cn/iocoder/yudao/framework/tenant/core/job/TenantJob.java b/yudao-framework/yudao-spring-boot-starter-biz-tenant/src/main/java/cn/iocoder/yudao/framework/tenant/core/job/TenantJob.java index 23474bbe..f638e67e 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-tenant/src/main/java/cn/iocoder/yudao/framework/tenant/core/job/TenantJob.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-tenant/src/main/java/cn/iocoder/yudao/framework/tenant/core/job/TenantJob.java @@ -8,7 +8,7 @@ import java.lang.annotation.Target; /** * 多租户 Job 注解 */ -@Target({ElementType.METHOD}) +@Target({ElementType.TYPE, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) public @interface TenantJob { } diff --git a/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/enums/CommonConstants.java b/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/enums/CommonConstants.java index 14051dc2..f2ce4523 100644 --- a/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/enums/CommonConstants.java +++ b/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/enums/CommonConstants.java @@ -29,6 +29,7 @@ public class CommonConstants { PLAN_MAP.put(2, "进行中"); PLAN_MAP.put(3, "已完成"); PLAN_MAP.put(4, "逾期"); + PLAN_MAP.put(5, "已结束"); } // 模型类型 (1:模型模板; 2:引用案例) diff --git a/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/scheduled/ProductionPlanJob.java b/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/scheduled/ProductionPlanJob.java new file mode 100644 index 00000000..7b1febda --- /dev/null +++ b/yudao-module-farm/src/main/java/cn/iocoder/yudao/module/farm/scheduled/ProductionPlanJob.java @@ -0,0 +1,66 @@ +package cn.iocoder.yudao.module.farm.scheduled; + +import cn.iocoder.yudao.framework.quartz.core.handler.JobHandler; +import cn.iocoder.yudao.framework.tenant.core.job.TenantJob; +import cn.iocoder.yudao.module.farm.service.farmingrecord.FarmingRecordService; +import cn.iocoder.yudao.module.farm.service.productionplan.ProductionPlanService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Component; + +/** + * @description: 生产计划 + * 表关系 + * 模型管理: farm_model_management + * 模型管理-管理周期: farm_model_cycle + * 模型管理-管理周期-环境指标: farm_model_environment_index + * 模型管理-管理周期-病虫草害: farm_model_pest_disease_weed + * 模型管理-管理周期-气象灾害: farm_model_weather_disaster + * 模型管理-管理周期-农事事操: farm_model_farming_operation + * 模型管理-管理周期-农事操作-投入品: farm_model_farming_operation_input + * @author: binda + * @date: 2025/8/22 17:12 + */ +@Component +@TenantJob +@Slf4j +public class ProductionPlanJob implements JobHandler { + + private final ProductionPlanService productionPlanService; + private final FarmingRecordService farmingRecordService; + + public ProductionPlanJob(ProductionPlanService productionPlanService, FarmingRecordService farmingRecordService) { + this.productionPlanService = productionPlanService; + this.farmingRecordService = farmingRecordService; + } + + /** + * 1. 更新任务状态 + * 2. 更新地块面积 + * 3. 创建农事记录 + * + * @param param 参数 + * @return + * @throws Exception + */ + @Override + public String execute(String param) throws Exception { + this.updatePlanStatusHandler(); + this.updatePlanAreaHandler(); + this.insertRecordHandler(); + return "success"; + } + + private void updatePlanStatusHandler() { + + } + + + private void updatePlanAreaHandler() { + + } + + private void insertRecordHandler() { + + } + +} \ No newline at end of file