diff --git a/zsw-farm/zsw-farm-api/src/main/java/cn/iocoder/yudao/module/farm/enums/ErrorCodeConstants.java b/zsw-farm/zsw-farm-api/src/main/java/cn/iocoder/yudao/module/farm/enums/ErrorCodeConstants.java index 79a31f7c..a0f44473 100644 --- a/zsw-farm/zsw-farm-api/src/main/java/cn/iocoder/yudao/module/farm/enums/ErrorCodeConstants.java +++ b/zsw-farm/zsw-farm-api/src/main/java/cn/iocoder/yudao/module/farm/enums/ErrorCodeConstants.java @@ -19,6 +19,10 @@ public interface ErrorCodeConstants{ ErrorCode AREA_NOT_EXISTS = new ErrorCode(1000007007, "农村工作区域不存在"); + ErrorCode CROP_NOT_EXISTS = new ErrorCode(1000007008, "农场作物区域不存在"); + + ErrorCode CROP_RECORD_NOT_EXISTS = new ErrorCode(1000007009, "农场作物出入记录不存在"); + diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/crop/CropController.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/crop/CropController.java new file mode 100644 index 00000000..8eaf367b --- /dev/null +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/crop/CropController.java @@ -0,0 +1,100 @@ +package cn.iocoder.yudao.module.farm.controller.admin.crop; + +import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import io.swagger.annotations.*; + +import javax.validation.constraints.*; +import javax.validation.*; +import javax.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.farm.controller.admin.crop.vo.*; +import cn.iocoder.yudao.module.farm.dal.dataobject.crop.CropDO; +import cn.iocoder.yudao.module.farm.convert.crop.CropConvert; +import cn.iocoder.yudao.module.farm.service.crop.CropService; + +@Api(tags = "管理后台 - ") +@RestController +@RequestMapping("/farm/crop") +@Validated +public class CropController { + + @Resource + private CropService cropService; + + @PostMapping("/create") + @ApiOperation("创建") + @PreAuthorize("@ss.hasPermission('farm:crop:create')") + public CommonResult createCrop(@Valid @RequestBody CropCreateReqVO createReqVO) { + return success(cropService.createCrop(createReqVO)); + } + + @PutMapping("/update") + @ApiOperation("更新") + @PreAuthorize("@ss.hasPermission('farm:crop:update')") + public CommonResult updateCrop(@Valid @RequestBody CropUpdateReqVO updateReqVO) { + cropService.updateCrop(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @ApiOperation("删除") + @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) + @PreAuthorize("@ss.hasPermission('farm:crop:delete')") + public CommonResult deleteCrop(@RequestParam("id") Long id) { + cropService.deleteCrop(id); + return success(true); + } + + @GetMapping("/get") + @ApiOperation("获得") + @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) + @PreAuthorize("@ss.hasPermission('farm:crop:query')") + public CommonResult getCrop(@RequestParam("id") Long id) { + CropDO crop = cropService.getCrop(id); + return success(CropConvert.INSTANCE.convert(crop)); + } + + @GetMapping("/list") + @ApiOperation("获得列表") + @ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class) + @PreAuthorize("@ss.hasPermission('farm:crop:query')") + public CommonResult> getCropList(@RequestParam("ids") Collection ids) { + List list = cropService.getCropList(ids); + return success(CropConvert.INSTANCE.convertList(list)); + } + + @GetMapping("/page") + @ApiOperation("获得分页") + @PreAuthorize("@ss.hasPermission('farm:crop:query')") + public CommonResult> getCropPage(@Valid CropPageReqVO pageVO) { + PageResult pageResult = cropService.getCropPage(pageVO); + return success(CropConvert.INSTANCE.convertPage(pageResult)); + } + + @GetMapping("/export-excel") + @ApiOperation("导出 Excel") + @PreAuthorize("@ss.hasPermission('farm:crop:export')") + @OperateLog(type = EXPORT) + public void exportCropExcel(@Valid CropExportReqVO exportReqVO, + HttpServletResponse response) throws IOException { + List list = cropService.getCropList(exportReqVO); + // 导出 Excel + List datas = CropConvert.INSTANCE.convertList02(list); + ExcelUtils.write(response, ".xls", "数据", CropExcelVO.class, datas); + } + +} diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/crop/vo/CropBaseVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/crop/vo/CropBaseVO.java new file mode 100644 index 00000000..842af273 --- /dev/null +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/crop/vo/CropBaseVO.java @@ -0,0 +1,26 @@ +package cn.iocoder.yudao.module.farm.controller.admin.crop.vo; + +import lombok.*; +import java.util.*; +import io.swagger.annotations.*; +import javax.validation.constraints.*; + +/** +* Base VO,提供给添加、修改、详细的子 VO 使用 +* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 +*/ +@Data +public class CropBaseVO { + + @ApiModelProperty(value = "物料名", required = true) + @NotNull(message = "物料名不能为空") + private String name; + + @ApiModelProperty(value = "物料图片") + private String images; + + @ApiModelProperty(value = "当前库存", required = true) + @NotNull(message = "当前库存不能为空") + private Integer stock; + +} diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/crop/vo/CropCreateReqVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/crop/vo/CropCreateReqVO.java new file mode 100644 index 00000000..303ff053 --- /dev/null +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/crop/vo/CropCreateReqVO.java @@ -0,0 +1,14 @@ +package cn.iocoder.yudao.module.farm.controller.admin.crop.vo; + +import lombok.*; +import java.util.*; +import io.swagger.annotations.*; +import javax.validation.constraints.*; + +@ApiModel("管理后台 - 创建 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class CropCreateReqVO extends CropBaseVO { + +} diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/crop/vo/CropExcelVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/crop/vo/CropExcelVO.java new file mode 100644 index 00000000..0dacdb13 --- /dev/null +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/crop/vo/CropExcelVO.java @@ -0,0 +1,32 @@ +package cn.iocoder.yudao.module.farm.controller.admin.crop.vo; + +import lombok.*; +import java.util.*; +import io.swagger.annotations.*; + +import com.alibaba.excel.annotation.ExcelProperty; + +/** + * Excel VO + * + * @author 系统管理员 + */ +@Data +public class CropExcelVO { + + @ExcelProperty("物料id") + private Long id; + + @ExcelProperty("物料名") + private String name; + + @ExcelProperty("物料图片") + private String images; + + @ExcelProperty("当前库存") + private Integer stock; + + @ExcelProperty("") + private Date createTime; + +} diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/crop/vo/CropExportReqVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/crop/vo/CropExportReqVO.java new file mode 100644 index 00000000..67dc3350 --- /dev/null +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/crop/vo/CropExportReqVO.java @@ -0,0 +1,32 @@ +package cn.iocoder.yudao.module.farm.controller.admin.crop.vo; + +import lombok.*; +import java.util.*; +import io.swagger.annotations.*; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@ApiModel(value = "管理后台 - Excel 导出 Request VO", description = "参数和 CropPageReqVO 是一致的") +@Data +public class CropExportReqVO { + + @ApiModelProperty(value = "物料名") + private String name; + + @ApiModelProperty(value = "物料图片") + private String images; + + @ApiModelProperty(value = "当前库存") + private Integer stock; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "开始") + private Date beginCreateTime; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "结束") + private Date endCreateTime; + +} diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/crop/vo/CropPageReqVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/crop/vo/CropPageReqVO.java new file mode 100644 index 00000000..7141680d --- /dev/null +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/crop/vo/CropPageReqVO.java @@ -0,0 +1,34 @@ +package cn.iocoder.yudao.module.farm.controller.admin.crop.vo; + +import lombok.*; +import java.util.*; +import io.swagger.annotations.*; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@ApiModel("管理后台 - 分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class CropPageReqVO extends PageParam { + + @ApiModelProperty(value = "物料名") + private String name; + + @ApiModelProperty(value = "物料图片") + private String images; + + @ApiModelProperty(value = "当前库存") + private Integer stock; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "开始") + private Date beginCreateTime; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "结束") + private Date endCreateTime; + +} diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/crop/vo/CropRespVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/crop/vo/CropRespVO.java new file mode 100644 index 00000000..088ac108 --- /dev/null +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/crop/vo/CropRespVO.java @@ -0,0 +1,19 @@ +package cn.iocoder.yudao.module.farm.controller.admin.crop.vo; + +import lombok.*; +import java.util.*; +import io.swagger.annotations.*; + +@ApiModel("管理后台 - Response VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class CropRespVO extends CropBaseVO { + + @ApiModelProperty(value = "物料id", required = true) + private Long id; + + @ApiModelProperty(value = "") + private Date createTime; + +} diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/crop/vo/CropUpdateReqVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/crop/vo/CropUpdateReqVO.java new file mode 100644 index 00000000..3aaadf77 --- /dev/null +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/crop/vo/CropUpdateReqVO.java @@ -0,0 +1,18 @@ +package cn.iocoder.yudao.module.farm.controller.admin.crop.vo; + +import lombok.*; +import java.util.*; +import io.swagger.annotations.*; +import javax.validation.constraints.*; + +@ApiModel("管理后台 - 更新 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class CropUpdateReqVO extends CropBaseVO { + + @ApiModelProperty(value = "物料id", required = true) + @NotNull(message = "物料id不能为空") + private Long id; + +} diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/cropRecord/CropRecordController.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/cropRecord/CropRecordController.java new file mode 100644 index 00000000..b7159cc4 --- /dev/null +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/cropRecord/CropRecordController.java @@ -0,0 +1,100 @@ +package cn.iocoder.yudao.module.farm.controller.admin.cropRecord; + +import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import io.swagger.annotations.*; + +import javax.validation.constraints.*; +import javax.validation.*; +import javax.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; + +import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; + +import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; +import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*; + +import cn.iocoder.yudao.module.farm.controller.admin.cropRecord.vo.*; +import cn.iocoder.yudao.module.farm.dal.dataobject.cropRecord.CropRecordDO; +import cn.iocoder.yudao.module.farm.convert.cropRecord.CropRecordConvert; +import cn.iocoder.yudao.module.farm.service.cropRecord.CropRecordService; + +@Api(tags = "管理后台 - ") +@RestController +@RequestMapping("/farm/crop-record") +@Validated +public class CropRecordController { + + @Resource + private CropRecordService cropRecordService; + + @PostMapping("/create") + @ApiOperation("创建") + @PreAuthorize("@ss.hasPermission('farm:crop-record:create')") + public CommonResult createCropRecord(@Valid @RequestBody CropRecordCreateReqVO createReqVO) { + return success(cropRecordService.createCropRecord(createReqVO)); + } + + @PutMapping("/update") + @ApiOperation("更新") + @PreAuthorize("@ss.hasPermission('farm:crop-record:update')") + public CommonResult updateCropRecord(@Valid @RequestBody CropRecordUpdateReqVO updateReqVO) { + cropRecordService.updateCropRecord(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @ApiOperation("删除") + @ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class) + @PreAuthorize("@ss.hasPermission('farm:crop-record:delete')") + public CommonResult deleteCropRecord(@RequestParam("id") Long id) { + cropRecordService.deleteCropRecord(id); + return success(true); + } + + @GetMapping("/get") + @ApiOperation("获得") + @ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class) + @PreAuthorize("@ss.hasPermission('farm:crop-record:query')") + public CommonResult getCropRecord(@RequestParam("id") Long id) { + CropRecordDO cropRecord = cropRecordService.getCropRecord(id); + return success(CropRecordConvert.INSTANCE.convert(cropRecord)); + } + + @GetMapping("/list") + @ApiOperation("获得列表") + @ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class) + @PreAuthorize("@ss.hasPermission('farm:crop-record:query')") + public CommonResult> getCropRecordList(@RequestParam("ids") Collection ids) { + List list = cropRecordService.getCropRecordList(ids); + return success(CropRecordConvert.INSTANCE.convertList(list)); + } + + @GetMapping("/page") + @ApiOperation("获得分页") + @PreAuthorize("@ss.hasPermission('farm:crop-record:query')") + public CommonResult> getCropRecordPage(@Valid CropRecordPageReqVO pageVO) { + PageResult pageResult = cropRecordService.getCropRecordPage(pageVO); + return success(CropRecordConvert.INSTANCE.convertPage(pageResult)); + } + + @GetMapping("/export-excel") + @ApiOperation("导出 Excel") + @PreAuthorize("@ss.hasPermission('farm:crop-record:export')") + @OperateLog(type = EXPORT) + public void exportCropRecordExcel(@Valid CropRecordExportReqVO exportReqVO, + HttpServletResponse response) throws IOException { + List list = cropRecordService.getCropRecordList(exportReqVO); + // 导出 Excel + List datas = CropRecordConvert.INSTANCE.convertList02(list); + ExcelUtils.write(response, ".xls", "数据", CropRecordExcelVO.class, datas); + } + +} diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/cropRecord/vo/CropRecordBaseVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/cropRecord/vo/CropRecordBaseVO.java new file mode 100644 index 00000000..22a66c48 --- /dev/null +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/cropRecord/vo/CropRecordBaseVO.java @@ -0,0 +1,30 @@ +package cn.iocoder.yudao.module.farm.controller.admin.cropRecord.vo; + +import lombok.*; +import java.util.*; +import io.swagger.annotations.*; +import javax.validation.constraints.*; + +/** +* Base VO,提供给添加、修改、详细的子 VO 使用 +* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 +*/ +@Data +public class CropRecordBaseVO { + + @ApiModelProperty(value = "物料id", required = true) + @NotNull(message = "物料id不能为空") + private Long cropId; + + @ApiModelProperty(value = "出入库 0出 1入") + private Boolean type; + + @ApiModelProperty(value = "操作数量", required = true) + @NotNull(message = "操作数量不能为空") + private Integer stock; + + @ApiModelProperty(value = "剩余数量", required = true) + @NotNull(message = "剩余数量不能为空") + private Integer afterStock; + +} diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/cropRecord/vo/CropRecordCreateReqVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/cropRecord/vo/CropRecordCreateReqVO.java new file mode 100644 index 00000000..36090586 --- /dev/null +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/cropRecord/vo/CropRecordCreateReqVO.java @@ -0,0 +1,14 @@ +package cn.iocoder.yudao.module.farm.controller.admin.cropRecord.vo; + +import lombok.*; +import java.util.*; +import io.swagger.annotations.*; +import javax.validation.constraints.*; + +@ApiModel("管理后台 - 创建 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class CropRecordCreateReqVO extends CropRecordBaseVO { + +} diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/cropRecord/vo/CropRecordExcelVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/cropRecord/vo/CropRecordExcelVO.java new file mode 100644 index 00000000..cc5c5ffc --- /dev/null +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/cropRecord/vo/CropRecordExcelVO.java @@ -0,0 +1,35 @@ +package cn.iocoder.yudao.module.farm.controller.admin.cropRecord.vo; + +import lombok.*; +import java.util.*; +import io.swagger.annotations.*; + +import com.alibaba.excel.annotation.ExcelProperty; + +/** + * Excel VO + * + * @author 系统管理员 + */ +@Data +public class CropRecordExcelVO { + + @ExcelProperty("") + private Long id; + + @ExcelProperty("物料id") + private Long cropId; + + @ExcelProperty("出入库 0出 1入") + private Boolean type; + + @ExcelProperty("操作数量") + private Integer stock; + + @ExcelProperty("剩余数量") + private Integer afterStock; + + @ExcelProperty("") + private Date createTime; + +} diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/cropRecord/vo/CropRecordExportReqVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/cropRecord/vo/CropRecordExportReqVO.java new file mode 100644 index 00000000..fbfda851 --- /dev/null +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/cropRecord/vo/CropRecordExportReqVO.java @@ -0,0 +1,35 @@ +package cn.iocoder.yudao.module.farm.controller.admin.cropRecord.vo; + +import lombok.*; +import java.util.*; +import io.swagger.annotations.*; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@ApiModel(value = "管理后台 - Excel 导出 Request VO", description = "参数和 CropRecordPageReqVO 是一致的") +@Data +public class CropRecordExportReqVO { + + @ApiModelProperty(value = "物料id") + private Long cropId; + + @ApiModelProperty(value = "出入库 0出 1入") + private Boolean type; + + @ApiModelProperty(value = "操作数量") + private Integer stock; + + @ApiModelProperty(value = "剩余数量") + private Integer afterStock; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "开始") + private Date beginCreateTime; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "结束") + private Date endCreateTime; + +} diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/cropRecord/vo/CropRecordPageReqVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/cropRecord/vo/CropRecordPageReqVO.java new file mode 100644 index 00000000..d35158a1 --- /dev/null +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/cropRecord/vo/CropRecordPageReqVO.java @@ -0,0 +1,37 @@ +package cn.iocoder.yudao.module.farm.controller.admin.cropRecord.vo; + +import lombok.*; +import java.util.*; +import io.swagger.annotations.*; +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; + +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@ApiModel("管理后台 - 分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class CropRecordPageReqVO extends PageParam { + + @ApiModelProperty(value = "物料id") + private Long cropId; + + @ApiModelProperty(value = "出入库 0出 1入") + private Boolean type; + + @ApiModelProperty(value = "操作数量") + private Integer stock; + + @ApiModelProperty(value = "剩余数量") + private Integer afterStock; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "开始") + private Date beginCreateTime; + + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + @ApiModelProperty(value = "结束") + private Date endCreateTime; + +} diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/cropRecord/vo/CropRecordRespVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/cropRecord/vo/CropRecordRespVO.java new file mode 100644 index 00000000..d410d8ab --- /dev/null +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/cropRecord/vo/CropRecordRespVO.java @@ -0,0 +1,19 @@ +package cn.iocoder.yudao.module.farm.controller.admin.cropRecord.vo; + +import lombok.*; +import java.util.*; +import io.swagger.annotations.*; + +@ApiModel("管理后台 - Response VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class CropRecordRespVO extends CropRecordBaseVO { + + @ApiModelProperty(value = "", required = true) + private Long id; + + @ApiModelProperty(value = "") + private Date createTime; + +} diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/cropRecord/vo/CropRecordUpdateReqVO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/cropRecord/vo/CropRecordUpdateReqVO.java new file mode 100644 index 00000000..f687ea11 --- /dev/null +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/controller/admin/cropRecord/vo/CropRecordUpdateReqVO.java @@ -0,0 +1,18 @@ +package cn.iocoder.yudao.module.farm.controller.admin.cropRecord.vo; + +import lombok.*; +import java.util.*; +import io.swagger.annotations.*; +import javax.validation.constraints.*; + +@ApiModel("管理后台 - 更新 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class CropRecordUpdateReqVO extends CropRecordBaseVO { + + @ApiModelProperty(value = "", required = true) + @NotNull(message = "不能为空") + private Long id; + +} diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/convert/crop/CropConvert.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/convert/crop/CropConvert.java new file mode 100644 index 00000000..d354377d --- /dev/null +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/convert/crop/CropConvert.java @@ -0,0 +1,34 @@ +package cn.iocoder.yudao.module.farm.convert.crop; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; +import cn.iocoder.yudao.module.farm.controller.admin.crop.vo.*; +import cn.iocoder.yudao.module.farm.dal.dataobject.crop.CropDO; + +/** + * Convert + * + * @author 系统管理员 + */ +@Mapper +public interface CropConvert { + + CropConvert INSTANCE = Mappers.getMapper(CropConvert.class); + + CropDO convert(CropCreateReqVO bean); + + CropDO convert(CropUpdateReqVO bean); + + CropRespVO convert(CropDO bean); + + List convertList(List list); + + PageResult convertPage(PageResult page); + + List convertList02(List list); + +} diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/convert/cropRecord/CropRecordConvert.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/convert/cropRecord/CropRecordConvert.java new file mode 100644 index 00000000..05b17268 --- /dev/null +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/convert/cropRecord/CropRecordConvert.java @@ -0,0 +1,34 @@ +package cn.iocoder.yudao.module.farm.convert.cropRecord; + +import java.util.*; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import org.mapstruct.Mapper; +import org.mapstruct.factory.Mappers; +import cn.iocoder.yudao.module.farm.controller.admin.cropRecord.vo.*; +import cn.iocoder.yudao.module.farm.dal.dataobject.cropRecord.CropRecordDO; + +/** + * Convert + * + * @author 系统管理员 + */ +@Mapper +public interface CropRecordConvert { + + CropRecordConvert INSTANCE = Mappers.getMapper(CropRecordConvert.class); + + CropRecordDO convert(CropRecordCreateReqVO bean); + + CropRecordDO convert(CropRecordUpdateReqVO bean); + + CropRecordRespVO convert(CropRecordDO bean); + + List convertList(List list); + + PageResult convertPage(PageResult page); + + List convertList02(List list); + +} diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/crop/CropDO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/crop/CropDO.java new file mode 100644 index 00000000..db3701c4 --- /dev/null +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/crop/CropDO.java @@ -0,0 +1,40 @@ +package cn.iocoder.yudao.module.farm.dal.dataobject.crop; + +import lombok.*; +import java.util.*; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; + +/** + * DO + * + * @author 系统管理员 + */ +@TableName("farm_crop") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class CropDO extends BaseDO { + + /** + * 物料id + */ + @TableId + private Long id; + /** + * 物料名 + */ + private String name; + /** + * 物料图片 + */ + private String images; + /** + * 当前库存 + */ + private Integer stock; + +} diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/cropRecord/CropRecordDO.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/cropRecord/CropRecordDO.java new file mode 100644 index 00000000..b8834598 --- /dev/null +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/dataobject/cropRecord/CropRecordDO.java @@ -0,0 +1,44 @@ +package cn.iocoder.yudao.module.farm.dal.dataobject.cropRecord; + +import lombok.*; +import java.util.*; +import com.baomidou.mybatisplus.annotation.*; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; + +/** + * DO + * + * @author 系统管理员 + */ +@TableName("farm_crop_record") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class CropRecordDO extends BaseDO { + + /** + * + */ + @TableId + private Long id; + /** + * 物料id + */ + private Long cropId; + /** + * 出入库 0出 1入 + */ + private Boolean type; + /** + * 操作数量 + */ + private Integer stock; + /** + * 剩余数量 + */ + private Integer afterStock; + +} diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/mysql/crop/CropMapper.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/mysql/crop/CropMapper.java new file mode 100644 index 00000000..8ac2001f --- /dev/null +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/mysql/crop/CropMapper.java @@ -0,0 +1,38 @@ +package cn.iocoder.yudao.module.farm.dal.mysql.crop; + +import java.util.*; + +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.dal.dataobject.crop.CropDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.farm.controller.admin.crop.vo.*; + +/** + * Mapper + * + * @author 系统管理员 + */ +@Mapper +public interface CropMapper extends BaseMapperX { + + default PageResult selectPage(CropPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .likeIfPresent(CropDO::getName, reqVO.getName()) + .eqIfPresent(CropDO::getImages, reqVO.getImages()) + .eqIfPresent(CropDO::getStock, reqVO.getStock()) + .betweenIfPresent(CropDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) + .orderByDesc(CropDO::getId)); + } + + default List selectList(CropExportReqVO reqVO) { + return selectList(new LambdaQueryWrapperX() + .likeIfPresent(CropDO::getName, reqVO.getName()) + .eqIfPresent(CropDO::getImages, reqVO.getImages()) + .eqIfPresent(CropDO::getStock, reqVO.getStock()) + .betweenIfPresent(CropDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) + .orderByDesc(CropDO::getId)); + } + +} diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/mysql/cropRecord/CropRecordMapper.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/mysql/cropRecord/CropRecordMapper.java new file mode 100644 index 00000000..94383c82 --- /dev/null +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/dal/mysql/cropRecord/CropRecordMapper.java @@ -0,0 +1,40 @@ +package cn.iocoder.yudao.module.farm.dal.mysql.cropRecord; + +import java.util.*; + +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.dal.dataobject.cropRecord.CropRecordDO; +import org.apache.ibatis.annotations.Mapper; +import cn.iocoder.yudao.module.farm.controller.admin.cropRecord.vo.*; + +/** + * Mapper + * + * @author 系统管理员 + */ +@Mapper +public interface CropRecordMapper extends BaseMapperX { + + default PageResult selectPage(CropRecordPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .eqIfPresent(CropRecordDO::getCropId, reqVO.getCropId()) + .eqIfPresent(CropRecordDO::getType, reqVO.getType()) + .eqIfPresent(CropRecordDO::getStock, reqVO.getStock()) + .eqIfPresent(CropRecordDO::getAfterStock, reqVO.getAfterStock()) + .betweenIfPresent(CropRecordDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) + .orderByDesc(CropRecordDO::getId)); + } + + default List selectList(CropRecordExportReqVO reqVO) { + return selectList(new LambdaQueryWrapperX() + .eqIfPresent(CropRecordDO::getCropId, reqVO.getCropId()) + .eqIfPresent(CropRecordDO::getType, reqVO.getType()) + .eqIfPresent(CropRecordDO::getStock, reqVO.getStock()) + .eqIfPresent(CropRecordDO::getAfterStock, reqVO.getAfterStock()) + .betweenIfPresent(CropRecordDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) + .orderByDesc(CropRecordDO::getId)); + } + +} diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/crop/CropService.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/crop/CropService.java new file mode 100644 index 00000000..00242b78 --- /dev/null +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/crop/CropService.java @@ -0,0 +1,70 @@ +package cn.iocoder.yudao.module.farm.service.crop; + +import java.util.*; +import javax.validation.*; +import cn.iocoder.yudao.module.farm.controller.admin.crop.vo.*; +import cn.iocoder.yudao.module.farm.dal.dataobject.crop.CropDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +/** + * Service 接口 + * + * @author 系统管理员 + */ +public interface CropService { + + /** + * 创建 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createCrop(@Valid CropCreateReqVO createReqVO); + + /** + * 更新 + * + * @param updateReqVO 更新信息 + */ + void updateCrop(@Valid CropUpdateReqVO updateReqVO); + + /** + * 删除 + * + * @param id 编号 + */ + void deleteCrop(Long id); + + /** + * 获得 + * + * @param id 编号 + * @return + */ + CropDO getCrop(Long id); + + /** + * 获得列表 + * + * @param ids 编号 + * @return 列表 + */ + List getCropList(Collection ids); + + /** + * 获得分页 + * + * @param pageReqVO 分页查询 + * @return 分页 + */ + PageResult getCropPage(CropPageReqVO pageReqVO); + + /** + * 获得列表, 用于 Excel 导出 + * + * @param exportReqVO 查询条件 + * @return 列表 + */ + List getCropList(CropExportReqVO exportReqVO); + +} diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/crop/CropServiceImpl.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/crop/CropServiceImpl.java new file mode 100644 index 00000000..d6b30b64 --- /dev/null +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/crop/CropServiceImpl.java @@ -0,0 +1,82 @@ +package cn.iocoder.yudao.module.farm.service.crop; + +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import org.springframework.validation.annotation.Validated; + +import java.util.*; +import cn.iocoder.yudao.module.farm.controller.admin.crop.vo.*; +import cn.iocoder.yudao.module.farm.dal.dataobject.crop.CropDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import cn.iocoder.yudao.module.farm.convert.crop.CropConvert; +import cn.iocoder.yudao.module.farm.dal.mysql.crop.CropMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.farm.enums.ErrorCodeConstants.*; + +/** + * Service 实现类 + * + * @author 系统管理员 + */ +@Service +@Validated +public class CropServiceImpl implements CropService { + + @Resource + private CropMapper cropMapper; + + @Override + public Long createCrop(CropCreateReqVO createReqVO) { + // 插入 + CropDO crop = CropConvert.INSTANCE.convert(createReqVO); + cropMapper.insert(crop); + // 返回 + return crop.getId(); + } + + @Override + public void updateCrop(CropUpdateReqVO updateReqVO) { + // 校验存在 + this.validateCropExists(updateReqVO.getId()); + // 更新 + CropDO updateObj = CropConvert.INSTANCE.convert(updateReqVO); + cropMapper.updateById(updateObj); + } + + @Override + public void deleteCrop(Long id) { + // 校验存在 + this.validateCropExists(id); + // 删除 + cropMapper.deleteById(id); + } + + private void validateCropExists(Long id) { + if (cropMapper.selectById(id) == null) { + throw exception(CROP_NOT_EXISTS); + } + } + + @Override + public CropDO getCrop(Long id) { + return cropMapper.selectById(id); + } + + @Override + public List getCropList(Collection ids) { + return cropMapper.selectBatchIds(ids); + } + + @Override + public PageResult getCropPage(CropPageReqVO pageReqVO) { + return cropMapper.selectPage(pageReqVO); + } + + @Override + public List getCropList(CropExportReqVO exportReqVO) { + return cropMapper.selectList(exportReqVO); + } + +} diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/cropRecord/CropRecordService.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/cropRecord/CropRecordService.java new file mode 100644 index 00000000..2bc0bb1c --- /dev/null +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/cropRecord/CropRecordService.java @@ -0,0 +1,70 @@ +package cn.iocoder.yudao.module.farm.service.cropRecord; + +import java.util.*; +import javax.validation.*; +import cn.iocoder.yudao.module.farm.controller.admin.cropRecord.vo.*; +import cn.iocoder.yudao.module.farm.dal.dataobject.cropRecord.CropRecordDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +/** + * Service 接口 + * + * @author 系统管理员 + */ +public interface CropRecordService { + + /** + * 创建 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createCropRecord(@Valid CropRecordCreateReqVO createReqVO); + + /** + * 更新 + * + * @param updateReqVO 更新信息 + */ + void updateCropRecord(@Valid CropRecordUpdateReqVO updateReqVO); + + /** + * 删除 + * + * @param id 编号 + */ + void deleteCropRecord(Long id); + + /** + * 获得 + * + * @param id 编号 + * @return + */ + CropRecordDO getCropRecord(Long id); + + /** + * 获得列表 + * + * @param ids 编号 + * @return 列表 + */ + List getCropRecordList(Collection ids); + + /** + * 获得分页 + * + * @param pageReqVO 分页查询 + * @return 分页 + */ + PageResult getCropRecordPage(CropRecordPageReqVO pageReqVO); + + /** + * 获得列表, 用于 Excel 导出 + * + * @param exportReqVO 查询条件 + * @return 列表 + */ + List getCropRecordList(CropRecordExportReqVO exportReqVO); + +} diff --git a/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/cropRecord/CropRecordServiceImpl.java b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/cropRecord/CropRecordServiceImpl.java new file mode 100644 index 00000000..20d0731e --- /dev/null +++ b/zsw-farm/zsw-farm-impl/src/main/java/cn/iocoder/yudao/module/farm/service/cropRecord/CropRecordServiceImpl.java @@ -0,0 +1,82 @@ +package cn.iocoder.yudao.module.farm.service.cropRecord; + +import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import org.springframework.validation.annotation.Validated; + +import java.util.*; +import cn.iocoder.yudao.module.farm.controller.admin.cropRecord.vo.*; +import cn.iocoder.yudao.module.farm.dal.dataobject.cropRecord.CropRecordDO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; + +import cn.iocoder.yudao.module.farm.convert.cropRecord.CropRecordConvert; +import cn.iocoder.yudao.module.farm.dal.mysql.cropRecord.CropRecordMapper; + +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; +import static cn.iocoder.yudao.module.farm.enums.ErrorCodeConstants.*; + +/** + * Service 实现类 + * + * @author 系统管理员 + */ +@Service +@Validated +public class CropRecordServiceImpl implements CropRecordService { + + @Resource + private CropRecordMapper cropRecordMapper; + + @Override + public Long createCropRecord(CropRecordCreateReqVO createReqVO) { + // 插入 + CropRecordDO cropRecord = CropRecordConvert.INSTANCE.convert(createReqVO); + cropRecordMapper.insert(cropRecord); + // 返回 + return cropRecord.getId(); + } + + @Override + public void updateCropRecord(CropRecordUpdateReqVO updateReqVO) { + // 校验存在 + this.validateCropRecordExists(updateReqVO.getId()); + // 更新 + CropRecordDO updateObj = CropRecordConvert.INSTANCE.convert(updateReqVO); + cropRecordMapper.updateById(updateObj); + } + + @Override + public void deleteCropRecord(Long id) { + // 校验存在 + this.validateCropRecordExists(id); + // 删除 + cropRecordMapper.deleteById(id); + } + + private void validateCropRecordExists(Long id) { + if (cropRecordMapper.selectById(id) == null) { + throw exception(CROP_RECORD_NOT_EXISTS); + } + } + + @Override + public CropRecordDO getCropRecord(Long id) { + return cropRecordMapper.selectById(id); + } + + @Override + public List getCropRecordList(Collection ids) { + return cropRecordMapper.selectBatchIds(ids); + } + + @Override + public PageResult getCropRecordPage(CropRecordPageReqVO pageReqVO) { + return cropRecordMapper.selectPage(pageReqVO); + } + + @Override + public List getCropRecordList(CropRecordExportReqVO exportReqVO) { + return cropRecordMapper.selectList(exportReqVO); + } + +} diff --git a/zsw-farm/zsw-farm-impl/src/main/resources/mapper/crop/CropMapper.xml b/zsw-farm/zsw-farm-impl/src/main/resources/mapper/crop/CropMapper.xml new file mode 100644 index 00000000..9b589766 --- /dev/null +++ b/zsw-farm/zsw-farm-impl/src/main/resources/mapper/crop/CropMapper.xml @@ -0,0 +1,12 @@ + + + + + + + diff --git a/zsw-farm/zsw-farm-impl/src/main/resources/mapper/cropRecord/CropRecordMapper.xml b/zsw-farm/zsw-farm-impl/src/main/resources/mapper/cropRecord/CropRecordMapper.xml new file mode 100644 index 00000000..549d8bdc --- /dev/null +++ b/zsw-farm/zsw-farm-impl/src/main/resources/mapper/cropRecord/CropRecordMapper.xml @@ -0,0 +1,12 @@ + + + + + + +