feat (farm): 种植中心
- 农事记录-结束按钮
This commit is contained in:
@@ -31,6 +31,7 @@ import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
import static cn.iocoder.yudao.module.farm.enums.CommonConstants.FARMING_RECORD_STATUS_2;
|
||||
import static cn.iocoder.yudao.module.farm.enums.CommonConstants.FARMING_RECORD_TASK_STATUS_MAP;
|
||||
|
||||
/**
|
||||
@@ -249,5 +250,22 @@ public class CropFarmingCenterController {
|
||||
return success(res);
|
||||
}
|
||||
|
||||
@Operation(summary = "农事记录-结束按钮")
|
||||
@GetMapping("/farming-record/finished")
|
||||
@Parameter(name = "id", description = "农事记录ID")
|
||||
public CommonResult<Boolean> finishFarmRecord(String id) {
|
||||
FarmingRecordSaveReqVO updateReqVO = new FarmingRecordSaveReqVO();
|
||||
updateReqVO.setId(id);
|
||||
updateReqVO.setTaskStatus(FARMING_RECORD_STATUS_2);
|
||||
cropFarmingCenterService.updateFarmingRecord(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@Operation(summary = "农事报表")
|
||||
@GetMapping("/farming-report/1")
|
||||
public CommonResult<FarmingReport1RespVO> getFarmReport(FarmingReport1ReqVO req) {
|
||||
FarmingReport1RespVO res = null;
|
||||
return success(res);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package cn.iocoder.yudao.module.farm.controller.admin.cropfarmingcenter.vo;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @description: TODO
|
||||
* @author: binda
|
||||
* @date: 2025/10/23 11:05
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class FarmingReport1ReqVO {
|
||||
private String baseId;
|
||||
private String plotId;
|
||||
private String dataType;
|
||||
private String[] queryData;
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package cn.iocoder.yudao.module.farm.controller.admin.cropfarmingcenter.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* @description: 报表1
|
||||
* @author: binda
|
||||
* @date: 2025/10/23 10:45
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class FarmingReport1RespVO {
|
||||
private String id;
|
||||
private String baseId;
|
||||
private String baseName;
|
||||
|
||||
@Schema(description = "计划编号")
|
||||
private String planNumber;
|
||||
|
||||
@Schema(description = "排产开始日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate productionStartDate;
|
||||
|
||||
@Schema(description = "排产结束日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate productionEndDate;
|
||||
|
||||
@Schema(description = "持续天数")
|
||||
private Integer intervalDays;
|
||||
|
||||
@Schema(description = "投入品ID", example = "30559")
|
||||
private String inputId;
|
||||
private String inputName;
|
||||
|
||||
@Schema(description = "投入品总价")
|
||||
private Double inputTotalPrice;
|
||||
|
||||
|
||||
@Schema(description = "详情-用量")
|
||||
private Integer usageAmount;
|
||||
|
||||
private Integer currentSpecType;
|
||||
@Schema(description = "详情-单位")
|
||||
private Integer unit;
|
||||
private String unitName;
|
||||
}
|
||||
Reference in New Issue
Block a user