farm模块-基地全量数据
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -67,4 +67,6 @@ public interface ModelManagementService {
|
||||
void isRelease(@Valid ModelManagementSaveReqVO updateReqVO);
|
||||
|
||||
PageResult<ModelManagementDO> getModelManagementPageRelease(@Valid ModelManagementPageReqVO pageReqVO);
|
||||
|
||||
List<ModelManagementDO> getList(@Valid ModelManagementPageReqVO pageReqVO);
|
||||
}
|
||||
@@ -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;
|
||||
@@ -60,8 +61,9 @@ public class ModelManagementServiceImpl implements ModelManagementService {
|
||||
private ModelFarmingOperationMapper modelFarmingOperationMapper;
|
||||
@Resource
|
||||
private ModelFarmingOperationInputMapper modelFarmingOperationInputMapper;
|
||||
@Resource
|
||||
private SysDictService dictService;
|
||||
@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);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user