farm模块-基地全量数据
This commit is contained in:
@@ -44,14 +44,12 @@ public class MessageCenterController {
|
|||||||
|
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@Operation(summary = "创建消息中心")
|
@Operation(summary = "创建消息中心")
|
||||||
|
|
||||||
public CommonResult<String> createMessageCenter(@Valid @RequestBody MessageCenterSaveReqVO createReqVO) {
|
public CommonResult<String> createMessageCenter(@Valid @RequestBody MessageCenterSaveReqVO createReqVO) {
|
||||||
return success(messageCenterService.createMessageCenter(createReqVO));
|
return success(messageCenterService.createMessageCenter(createReqVO));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping("/update")
|
@PutMapping("/update")
|
||||||
@Operation(summary = "更新消息中心")
|
@Operation(summary = "更新消息中心")
|
||||||
|
|
||||||
public CommonResult<Boolean> updateMessageCenter(@Valid @RequestBody MessageCenterSaveReqVO updateReqVO) {
|
public CommonResult<Boolean> updateMessageCenter(@Valid @RequestBody MessageCenterSaveReqVO updateReqVO) {
|
||||||
messageCenterService.updateMessageCenter(updateReqVO);
|
messageCenterService.updateMessageCenter(updateReqVO);
|
||||||
return success(true);
|
return success(true);
|
||||||
@@ -60,7 +58,6 @@ public class MessageCenterController {
|
|||||||
@DeleteMapping("/delete")
|
@DeleteMapping("/delete")
|
||||||
@Operation(summary = "删除消息中心")
|
@Operation(summary = "删除消息中心")
|
||||||
@Parameter(name = "id", description = "编号", required = true)
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
|
|
||||||
public CommonResult<Boolean> deleteMessageCenter(@RequestParam("id") String id) {
|
public CommonResult<Boolean> deleteMessageCenter(@RequestParam("id") String id) {
|
||||||
messageCenterService.deleteMessageCenter(id);
|
messageCenterService.deleteMessageCenter(id);
|
||||||
return success(true);
|
return success(true);
|
||||||
@@ -69,7 +66,6 @@ public class MessageCenterController {
|
|||||||
@DeleteMapping("/delete-list")
|
@DeleteMapping("/delete-list")
|
||||||
@Parameter(name = "ids", description = "编号", required = true)
|
@Parameter(name = "ids", description = "编号", required = true)
|
||||||
@Operation(summary = "批量删除消息中心")
|
@Operation(summary = "批量删除消息中心")
|
||||||
|
|
||||||
public CommonResult<Boolean> deleteMessageCenterList(@RequestParam("ids") List<String> ids) {
|
public CommonResult<Boolean> deleteMessageCenterList(@RequestParam("ids") List<String> ids) {
|
||||||
messageCenterService.deleteMessageCenterListByIds(ids);
|
messageCenterService.deleteMessageCenterListByIds(ids);
|
||||||
return success(true);
|
return success(true);
|
||||||
@@ -78,7 +74,6 @@ public class MessageCenterController {
|
|||||||
@GetMapping("/get")
|
@GetMapping("/get")
|
||||||
@Operation(summary = "获得消息中心")
|
@Operation(summary = "获得消息中心")
|
||||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
|
|
||||||
public CommonResult<MessageCenterRespVO> getMessageCenter(@RequestParam("id") String id) {
|
public CommonResult<MessageCenterRespVO> getMessageCenter(@RequestParam("id") String id) {
|
||||||
MessageCenterDO messageCenter = messageCenterService.getMessageCenter(id);
|
MessageCenterDO messageCenter = messageCenterService.getMessageCenter(id);
|
||||||
return success(BeanUtils.toBean(messageCenter, MessageCenterRespVO.class));
|
return success(BeanUtils.toBean(messageCenter, MessageCenterRespVO.class));
|
||||||
@@ -86,7 +81,6 @@ public class MessageCenterController {
|
|||||||
|
|
||||||
@GetMapping("/page")
|
@GetMapping("/page")
|
||||||
@Operation(summary = "获得消息中心分页")
|
@Operation(summary = "获得消息中心分页")
|
||||||
|
|
||||||
public CommonResult<PageResult<MessageCenterRespVO>> getMessageCenterPage(@Valid MessageCenterPageReqVO pageReqVO) {
|
public CommonResult<PageResult<MessageCenterRespVO>> getMessageCenterPage(@Valid MessageCenterPageReqVO pageReqVO) {
|
||||||
PageResult<MessageCenterDO> pageResult = messageCenterService.getMessageCenterPage(pageReqVO);
|
PageResult<MessageCenterDO> pageResult = messageCenterService.getMessageCenterPage(pageReqVO);
|
||||||
return success(BeanUtils.toBean(pageResult, MessageCenterRespVO.class));
|
return success(BeanUtils.toBean(pageResult, MessageCenterRespVO.class));
|
||||||
@@ -94,7 +88,6 @@ public class MessageCenterController {
|
|||||||
|
|
||||||
@GetMapping("/export-excel")
|
@GetMapping("/export-excel")
|
||||||
@Operation(summary = "导出消息中心 Excel")
|
@Operation(summary = "导出消息中心 Excel")
|
||||||
|
|
||||||
@ApiAccessLog(operateType = EXPORT)
|
@ApiAccessLog(operateType = EXPORT)
|
||||||
public void exportMessageCenterExcel(@Valid MessageCenterPageReqVO pageReqVO,
|
public void exportMessageCenterExcel(@Valid MessageCenterPageReqVO pageReqVO,
|
||||||
HttpServletResponse response) throws IOException {
|
HttpServletResponse response) throws IOException {
|
||||||
|
|||||||
@@ -99,6 +99,13 @@ public class ModelManagementController {
|
|||||||
return success(convertPageResult(pageResult));
|
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")
|
@GetMapping("/export-excel")
|
||||||
@Operation(summary = "导出模型管理 Excel")
|
@Operation(summary = "导出模型管理 Excel")
|
||||||
@ApiAccessLog(operateType = EXPORT)
|
@ApiAccessLog(operateType = EXPORT)
|
||||||
|
|||||||
@@ -67,4 +67,6 @@ public interface ModelManagementService {
|
|||||||
void isRelease(@Valid ModelManagementSaveReqVO updateReqVO);
|
void isRelease(@Valid ModelManagementSaveReqVO updateReqVO);
|
||||||
|
|
||||||
PageResult<ModelManagementDO> getModelManagementPageRelease(@Valid ModelManagementPageReqVO pageReqVO);
|
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.dal.mysql.modelweatherdisaster.ModelWeatherDisasterMapper;
|
||||||
import cn.iocoder.yudao.module.farm.enums.CommonConstants;
|
import cn.iocoder.yudao.module.farm.enums.CommonConstants;
|
||||||
import cn.iocoder.yudao.module.farm.service.sysDict.SysDictService;
|
import cn.iocoder.yudao.module.farm.service.sysDict.SysDictService;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
@@ -62,6 +63,7 @@ public class ModelManagementServiceImpl implements ModelManagementService {
|
|||||||
private ModelFarmingOperationInputMapper modelFarmingOperationInputMapper;
|
private ModelFarmingOperationInputMapper modelFarmingOperationInputMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private SysDictService dictService;
|
private SysDictService dictService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String createModelManagement(ModelManagementSaveReqVO createReqVO) {
|
public String createModelManagement(ModelManagementSaveReqVO createReqVO) {
|
||||||
LoginUser user = getLoginUser();
|
LoginUser user = getLoginUser();
|
||||||
@@ -346,4 +348,12 @@ private SysDictService dictService;
|
|||||||
return modelManagementMapper.selectPageRelease(pageReqVO);
|
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