farm模块-基地全量数据

This commit is contained in:
顾君禹
2025-08-25 22:12:26 +08:00
parent c50da48c1f
commit dd810006bd
4 changed files with 25 additions and 13 deletions

View File

@@ -44,14 +44,12 @@ public class MessageCenterController {
@PostMapping("/create")
@Operation(summary = "创建消息中心")
public CommonResult<String> createMessageCenter(@Valid @RequestBody MessageCenterSaveReqVO createReqVO) {
return success(messageCenterService.createMessageCenter(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新消息中心")
public CommonResult<Boolean> updateMessageCenter(@Valid @RequestBody MessageCenterSaveReqVO updateReqVO) {
messageCenterService.updateMessageCenter(updateReqVO);
return success(true);
@@ -60,7 +58,6 @@ public class MessageCenterController {
@DeleteMapping("/delete")
@Operation(summary = "删除消息中心")
@Parameter(name = "id", description = "编号", required = true)
public CommonResult<Boolean> deleteMessageCenter(@RequestParam("id") String id) {
messageCenterService.deleteMessageCenter(id);
return success(true);
@@ -69,7 +66,6 @@ public class MessageCenterController {
@DeleteMapping("/delete-list")
@Parameter(name = "ids", description = "编号", required = true)
@Operation(summary = "批量删除消息中心")
public CommonResult<Boolean> deleteMessageCenterList(@RequestParam("ids") List<String> ids) {
messageCenterService.deleteMessageCenterListByIds(ids);
return success(true);
@@ -78,7 +74,6 @@ public class MessageCenterController {
@GetMapping("/get")
@Operation(summary = "获得消息中心")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
public CommonResult<MessageCenterRespVO> getMessageCenter(@RequestParam("id") String id) {
MessageCenterDO messageCenter = messageCenterService.getMessageCenter(id);
return success(BeanUtils.toBean(messageCenter, MessageCenterRespVO.class));
@@ -86,7 +81,6 @@ public class MessageCenterController {
@GetMapping("/page")
@Operation(summary = "获得消息中心分页")
public CommonResult<PageResult<MessageCenterRespVO>> getMessageCenterPage(@Valid MessageCenterPageReqVO pageReqVO) {
PageResult<MessageCenterDO> pageResult = messageCenterService.getMessageCenterPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, MessageCenterRespVO.class));
@@ -94,7 +88,6 @@ public class MessageCenterController {
@GetMapping("/export-excel")
@Operation(summary = "导出消息中心 Excel")
@ApiAccessLog(operateType = EXPORT)
public void exportMessageCenterExcel(@Valid MessageCenterPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {

View File

@@ -99,6 +99,13 @@ public class ModelManagementController {
return success(convertPageResult(pageResult));
}
@GetMapping("/getList")
@Operation(summary = "获得模型管理分页")
public CommonResult<List<ModelManagementDO>> getList(@Valid ModelManagementPageReqVO pageReqVO) {
List<ModelManagementDO> pageResult = modelManagementService.getList(pageReqVO);
return success(pageResult);
}
@GetMapping("/export-excel")
@Operation(summary = "导出模型管理 Excel")
@ApiAccessLog(operateType = EXPORT)

View File

@@ -67,4 +67,6 @@ public interface ModelManagementService {
void isRelease(@Valid ModelManagementSaveReqVO updateReqVO);
PageResult<ModelManagementDO> getModelManagementPageRelease(@Valid ModelManagementPageReqVO pageReqVO);
List<ModelManagementDO> getList(@Valid ModelManagementPageReqVO pageReqVO);
}

View File

@@ -25,6 +25,7 @@ import cn.iocoder.yudao.module.farm.dal.mysql.modelpestdiseaseweed.ModelPestDise
import cn.iocoder.yudao.module.farm.dal.mysql.modelweatherdisaster.ModelWeatherDisasterMapper;
import cn.iocoder.yudao.module.farm.enums.CommonConstants;
import cn.iocoder.yudao.module.farm.service.sysDict.SysDictService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
@@ -62,6 +63,7 @@ public class ModelManagementServiceImpl implements ModelManagementService {
private ModelFarmingOperationInputMapper modelFarmingOperationInputMapper;
@Resource
private SysDictService dictService;
@Override
public String createModelManagement(ModelManagementSaveReqVO createReqVO) {
LoginUser user = getLoginUser();
@@ -346,4 +348,12 @@ private SysDictService dictService;
return modelManagementMapper.selectPageRelease(pageReqVO);
}
@Override
public List<ModelManagementDO> getList(ModelManagementPageReqVO pageReqVO) {
LambdaQueryWrapper<ModelManagementDO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(ModelManagementDO::getTenantId, getLoginUser().getTenantId());
lambdaQueryWrapper.eq(ModelManagementDO::getType, CommonConstants.MODEL_TYPE_1);
return modelManagementMapper.selectList(lambdaQueryWrapper);
}
}