package com.example.duplicate.controller; import com.example.duplicate.controller.param.CallRequest; import com.example.duplicate.controller.param.RcvPageRequest; import com.example.duplicate.controller.vo.CallBasic; import com.example.duplicate.controller.vo.CallExpoetBasic; import com.example.duplicate.controller.vo.DeptCodeAndName; import com.example.duplicate.controller.vo.PageBasic; import com.example.duplicate.service.RcvCallService; import com.example.utils.CommonResult; import com.example.utils.ExcelExportHandler; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.CollectionUtils; 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 javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; import java.util.List; import java.util.Map; /** * @ClassName RcvCallController * @Description 回收系统催缴页面接口 * @Author linjj * @Date 2025/6/26 16:22 * @Version 1.0 */ @RestController @RequestMapping("/rcv/call") @Api(value = "催缴页面接口", tags = "催缴页面接口") @Slf4j public class RcvCallController { @Autowired private RcvCallService rcvCallService; @Resource private ExcelExportHandler excelExportHandler; @ApiOperation("获取科室接口") @PostMapping("/getDeptName") public CommonResult> deptName() { return CommonResult.success(rcvCallService.deptName()); } @ApiOperation("催缴查询") @PostMapping("/callAll") public CommonResult>> callAll(@RequestBody CallRequest callRequest) { return rcvCallService.callAll(callRequest); } @ApiOperation("催缴导出") @PostMapping("/callExport") public void pageExport(@RequestBody CallRequest callRequest, HttpServletResponse response) { List callExpoetBasics = rcvCallService.exportCall(callRequest); if (!CollectionUtils.isEmpty(callExpoetBasics)) { excelExportHandler.export(response, "催缴列表", callExpoetBasics, CallExpoetBasic.class); } } }