fix (farm): 管理后台 - 病虫草害库维护
- 删除冗余代码
This commit is contained in:
@@ -1,108 +0,0 @@
|
||||
package cn.iocoder.yudao.module.farm.controller.admin.pestdiseaseweedlibrary;
|
||||
|
||||
import cn.iocoder.yudao.module.farm.controller.admin.pestdiseaseweedlibrary.vo.PestDiseaseWeedLibraryPageReqVO;
|
||||
import cn.iocoder.yudao.module.farm.controller.admin.pestdiseaseweedlibrary.vo.PestDiseaseWeedLibraryRespVO;
|
||||
import cn.iocoder.yudao.module.farm.controller.admin.pestdiseaseweedlibrary.vo.PestDiseaseWeedLibrarySaveReqVO;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
|
||||
import cn.iocoder.yudao.module.farm.dal.dataobject.pestdiseaseweedlibrary.PestDiseaseWeedLibraryDO;
|
||||
import cn.iocoder.yudao.module.farm.service.pestdiseaseweedlibrary.PestDiseaseWeedLibraryService;
|
||||
|
||||
//@Tag(name = "管理后台 - 病虫草害库维护")
|
||||
//@RestController
|
||||
//@RequestMapping("/farm/pest-disease-weed-library")
|
||||
//@Validated
|
||||
public class PestDiseaseWeedLibraryController {
|
||||
|
||||
// @Resource
|
||||
// private PestDiseaseWeedLibraryService pestDiseaseWeedLibraryService;
|
||||
//
|
||||
// @PostMapping("/create")
|
||||
// @Operation(summary = "创建病虫草害库维护")
|
||||
//
|
||||
// public CommonResult<String> createPestDiseaseWeedLibrary(@Valid @RequestBody PestDiseaseWeedLibrarySaveReqVO createReqVO) {
|
||||
// return success(pestDiseaseWeedLibraryService.createPestDiseaseWeedLibrary(createReqVO));
|
||||
// }
|
||||
//
|
||||
// @PutMapping("/update")
|
||||
// @Operation(summary = "更新病虫草害库维护")
|
||||
//
|
||||
// public CommonResult<Boolean> updatePestDiseaseWeedLibrary(@Valid @RequestBody PestDiseaseWeedLibrarySaveReqVO updateReqVO) {
|
||||
// pestDiseaseWeedLibraryService.updatePestDiseaseWeedLibrary(updateReqVO);
|
||||
// return success(true);
|
||||
// }
|
||||
//
|
||||
// @DeleteMapping("/delete")
|
||||
// @Operation(summary = "删除病虫草害库维护")
|
||||
// @Parameter(name = "id", description = "编号", required = true)
|
||||
//
|
||||
// public CommonResult<Boolean> deletePestDiseaseWeedLibrary(@RequestParam("id") String id) {
|
||||
// pestDiseaseWeedLibraryService.deletePestDiseaseWeedLibrary(id);
|
||||
// return success(true);
|
||||
// }
|
||||
//
|
||||
// @DeleteMapping("/delete-list")
|
||||
// @Parameter(name = "ids", description = "编号", required = true)
|
||||
// @Operation(summary = "批量删除病虫草害库维护")
|
||||
//
|
||||
// public CommonResult<Boolean> deletePestDiseaseWeedLibraryList(@RequestParam("ids") List<String> ids) {
|
||||
// pestDiseaseWeedLibraryService.deletePestDiseaseWeedLibraryListByIds(ids);
|
||||
// return success(true);
|
||||
// }
|
||||
//
|
||||
// @GetMapping("/get")
|
||||
// @Operation(summary = "获得病虫草害库维护")
|
||||
// @Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
//
|
||||
// public CommonResult<PestDiseaseWeedLibraryRespVO> getPestDiseaseWeedLibrary(@RequestParam("id") String id) {
|
||||
// PestDiseaseWeedLibraryDO pestDiseaseWeedLibrary = pestDiseaseWeedLibraryService.getPestDiseaseWeedLibrary(id);
|
||||
// return success(BeanUtils.toBean(pestDiseaseWeedLibrary, PestDiseaseWeedLibraryRespVO.class));
|
||||
// }
|
||||
//
|
||||
// @GetMapping("/page")
|
||||
// @Operation(summary = "获得病虫草害库维护分页")
|
||||
//
|
||||
// public CommonResult<PageResult<PestDiseaseWeedLibraryRespVO>> getPestDiseaseWeedLibraryPage(@Valid PestDiseaseWeedLibraryPageReqVO pageReqVO) {
|
||||
// PageResult<PestDiseaseWeedLibraryDO> pageResult = pestDiseaseWeedLibraryService.getPestDiseaseWeedLibraryPage(pageReqVO);
|
||||
// return success(BeanUtils.toBean(pageResult, PestDiseaseWeedLibraryRespVO.class));
|
||||
// }
|
||||
//
|
||||
// @GetMapping("/export-excel")
|
||||
// @Operation(summary = "导出病虫草害库维护 Excel")
|
||||
//
|
||||
// @ApiAccessLog(operateType = EXPORT)
|
||||
// public void exportPestDiseaseWeedLibraryExcel(@Valid PestDiseaseWeedLibraryPageReqVO pageReqVO,
|
||||
// HttpServletResponse response) throws IOException {
|
||||
// pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
// List<PestDiseaseWeedLibraryDO> list = pestDiseaseWeedLibraryService.getPestDiseaseWeedLibraryPage(pageReqVO).getList();
|
||||
// // 导出 Excel
|
||||
// ExcelUtils.write(response, "病虫草害库维护.xls", "数据", PestDiseaseWeedLibraryRespVO.class,
|
||||
// BeanUtils.toBean(list, PestDiseaseWeedLibraryRespVO.class));
|
||||
// }
|
||||
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
package cn.iocoder.yudao.module.farm.controller.admin.pestdiseaseweedlibrary.vo;
|
||||
|
||||
import lombok.*;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 病虫草害库维护分页 Request VO")
|
||||
@Data
|
||||
public class PestDiseaseWeedLibraryPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "灾害类型", example = "2")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "灾害名称", example = "李四")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "灾害描述", example = "你说的对")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "防治建议")
|
||||
private String propose;
|
||||
|
||||
@Schema(description = "图片")
|
||||
private String images;
|
||||
|
||||
@Schema(description = "0=启用,1=停用", example = "1")
|
||||
private Integer useStatus;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "基地id", example = "427")
|
||||
private String baseId;
|
||||
|
||||
@Schema(description = "基地", example = "王五")
|
||||
private String baseName;
|
||||
|
||||
@Schema(description = "地块ID", example = "27747")
|
||||
private String plotId;
|
||||
|
||||
@Schema(description = "地块", example = "芋艿")
|
||||
private String plotName;
|
||||
|
||||
@Schema(description = "租户id", example = "27978")
|
||||
private String tenantId;
|
||||
|
||||
}
|
||||
@@ -1,64 +0,0 @@
|
||||
package cn.iocoder.yudao.module.farm.controller.admin.pestdiseaseweedlibrary.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import cn.idev.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 病虫草害库维护 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class PestDiseaseWeedLibraryRespVO {
|
||||
|
||||
@Schema(description = "基础id", requiredMode = Schema.RequiredMode.REQUIRED, example = "521")
|
||||
@ExcelProperty("基础id")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "灾害类型", example = "2")
|
||||
@ExcelProperty("灾害类型")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "灾害名称", example = "李四")
|
||||
@ExcelProperty("灾害名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "灾害描述", example = "你说的对")
|
||||
@ExcelProperty("灾害描述")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "防治建议")
|
||||
@ExcelProperty("防治建议")
|
||||
private String propose;
|
||||
|
||||
@Schema(description = "图片")
|
||||
@ExcelProperty("图片")
|
||||
private String images;
|
||||
|
||||
@Schema(description = "0=启用,1=停用", example = "1")
|
||||
@ExcelProperty("0=启用,1=停用")
|
||||
private Integer useStatus;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "基地id", example = "427")
|
||||
@ExcelProperty("基地id")
|
||||
private String baseId;
|
||||
|
||||
@Schema(description = "基地", example = "王五")
|
||||
@ExcelProperty("基地")
|
||||
private String baseName;
|
||||
|
||||
@Schema(description = "地块ID", example = "27747")
|
||||
@ExcelProperty("地块ID")
|
||||
private String plotId;
|
||||
|
||||
@Schema(description = "地块", example = "芋艿")
|
||||
@ExcelProperty("地块")
|
||||
private String plotName;
|
||||
@Schema(description = "租户id")
|
||||
private String tenantId;
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
package cn.iocoder.yudao.module.farm.controller.admin.pestdiseaseweedlibrary.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
@Schema(description = "管理后台 - 病虫草害库维护新增/修改 Request VO")
|
||||
@Data
|
||||
public class PestDiseaseWeedLibrarySaveReqVO {
|
||||
|
||||
@Schema(description = "基础id", requiredMode = Schema.RequiredMode.REQUIRED, example = "521")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "灾害类型", example = "2")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "灾害名称", example = "李四")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "灾害描述", example = "你说的对")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "防治建议")
|
||||
private String propose;
|
||||
|
||||
@Schema(description = "图片")
|
||||
private String images;
|
||||
|
||||
@Schema(description = "0=启用,1=停用", example = "1")
|
||||
private Integer useStatus;
|
||||
|
||||
@Schema(description = "基地id", example = "427")
|
||||
private String baseId;
|
||||
|
||||
@Schema(description = "基地", example = "王五")
|
||||
private String baseName;
|
||||
|
||||
@Schema(description = "地块ID", example = "27747")
|
||||
private String plotId;
|
||||
|
||||
@Schema(description = "地块", example = "芋艿")
|
||||
private String plotName;
|
||||
|
||||
@Schema(description = "租户id", example = "27978")
|
||||
private String tenantId;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user