双重预防项目-国泰新华二开定制版
heheng
2025-06-19 46c37398a52d1dcf81788960ec90faa91249e77f
src/main/java/com/ruoyi/doublePrevention/controller/RiskOldInfoController.java
@@ -1,42 +1,51 @@
package com.ruoyi.doublePrevention.controller;
import com.ruoyi.doublePrevention.entity.RiskOldInfo;
import com.ruoyi.doublePrevention.entity.dto.req.RiskOldInfoQueryReqDTO;
import com.ruoyi.doublePrevention.entity.dto.resp.RiskOldInfoQueryRespDTO;
import com.ruoyi.doublePrevention.enums.ResultCodes;
import com.ruoyi.doublePrevention.service.baseService.RiskOldInfoService;
import com.ruoyi.doublePrevention.vo.ResultVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
@RequestMapping("/info")
public class RiskOldInfoController {
    @Autowired
    private RiskOldInfoService riskOldInfoService;
    @PostMapping("/selectOldRiskInfoPage")
    public ResultVO<RiskOldInfoQueryRespDTO> selectOldRiskInfoPage(@RequestBody RiskOldInfoQueryReqDTO queryReqDTO){
        ResultVO resultVO = new ResultVO<>();
        resultVO.setCode(ResultCodes.OK.getCode());
        resultVO.setMsg("查询成功");
        ResultVO<RiskOldInfoQueryRespDTO> respDTOResultVO = riskOldInfoService.selectOldRiskInfoPage(queryReqDTO);
        resultVO.setData(respDTOResultVO.getData());
        resultVO.setCount(respDTOResultVO.getCount());
        resultVO.setPageIndex(respDTOResultVO.getPageIndex());
        resultVO.setPageSize(respDTOResultVO.getPageSize());
        return resultVO;
    }
}
package com.ruoyi.doublePrevention.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ruoyi.doublePrevention.entity.RiskOldInfo;
import com.ruoyi.doublePrevention.entity.dto.req.RiskOldInfoQueryReqDTO;
import com.ruoyi.doublePrevention.entity.dto.resp.RiskOldInfoQueryRespDTO;
import com.ruoyi.doublePrevention.enums.ResultCodes;
import com.ruoyi.doublePrevention.repository.RiskOldInfoRepository;
import com.ruoyi.doublePrevention.scheduls.ZhunDongSchedule;
import com.ruoyi.doublePrevention.service.baseService.RiskOldInfoService;
import com.ruoyi.doublePrevention.vo.ResultVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/info")
public class RiskOldInfoController {
    @Autowired
    private RiskOldInfoService riskOldInfoService;
    @PostMapping("/selectOldRiskInfoPage")
    public ResultVO<RiskOldInfoQueryRespDTO> selectOldRiskInfoPage(@RequestBody RiskOldInfoQueryReqDTO queryReqDTO){
        ResultVO resultVO = new ResultVO<>();
        resultVO.setCode(ResultCodes.OK.getCode());
        resultVO.setMsg("查询成功");
        ResultVO<RiskOldInfoQueryRespDTO> respDTOResultVO = riskOldInfoService.selectOldRiskInfoPage(queryReqDTO);
        resultVO.setData(respDTOResultVO.getData());
        resultVO.setCount(respDTOResultVO.getCount());
        resultVO.setPageNum(respDTOResultVO.getPageNum());
        resultVO.setPageSize(respDTOResultVO.getPageSize());
        return resultVO;
//        return riskOldInfoService.selectOldRiskInfoPage(queryReqDTO);
    }
//
//    @Autowired
//    private ZhunDongSchedule zhunDongSchedule;
//    @GetMapping("/dataTest")
//    public ResultVO dataTest() {
//        zhunDongSchedule.updateHuaidongReportStatus();
//        ResultVO resultVO = new ResultVO<>();
//        resultVO.setCode(ResultCodes.OK.getCode());
//        return resultVO;
//    }
}