| | |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.config.annotation.CloudRequiredPermission; |
| | | import com.doumee.config.annotation.LoginNoRequired; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.dto.YwSmsEmailBillCallDTO; |
| | | import com.doumee.dao.business.model.YwContractBill; |
| | | import com.doumee.dao.business.vo.YwContractBillCallDataVO; |
| | | import com.doumee.dao.business.vo.YwContractBillDataVO; |
| | | import com.doumee.service.business.YwContractBillService; |
| | | import com.doumee.service.business.YwContractService; |
| | | import com.doumee.service.business.impl.SmsEmailServiceImpl; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | @Autowired |
| | | private YwContractBillService ywContractBillService; |
| | | |
| | | @Autowired |
| | | private SmsEmailServiceImpl smsEmailService; |
| | | |
| | | @Autowired |
| | | private YwContractService ywContractService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("新建") |
| | |
| | | return ApiResponse.success(ywContractBillService.findPage(pageWrap)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("逾期账单") |
| | | @PostMapping("/findPageForOverdue") |
| | | @CloudRequiredPermission("business:ywcontractbill:query") |
| | | public ApiResponse<PageData<YwContractBill>> findPageForOverdue (@RequestBody PageWrap<YwContractBill> pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | pageWrap.getModel().setLoginUserInfo(this.getLoginUser(token)); |
| | | return ApiResponse.success(ywContractBillService.findPageForOverdue(pageWrap)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("可退款账单") |
| | | @PostMapping("/getCanBackBill") |
| | | @CloudRequiredPermission("business:ywcontractbill:query") |
| | | public ApiResponse<List<YwContractBill>> getCanBackBill (@RequestBody YwContractBill ywContractBill,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(ywContractBillService.getCanBackBill(ywContractBill)); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation("导出Excel") |
| | | @PostMapping("/exportExcel") |
| | | @CloudRequiredPermission("business:ywcontractbill:exportExcel") |
| | |
| | | public ApiResponse findById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(ywContractBillService.getDetail(id)); |
| | | } |
| | | |
| | | |
| | | @LoginNoRequired |
| | | @ApiOperation("生成账单编号") |
| | | @GetMapping("/dealDayBillCode") |
| | | public ApiResponse dealDayBillCode() { |
| | | ywContractBillService.dealDayBillCode(); |
| | | return ApiResponse.success("生成成功"); |
| | | } |
| | | |
| | | @LoginNoRequired |
| | | @ApiOperation("更新房源租赁状态") |
| | | @GetMapping("/dealRoomStatus") |
| | | public ApiResponse dealRoomStatus() { |
| | | ywContractService.updRentContractStatus(); |
| | | ywContractService.updRoomLeaseNowStatus(); |
| | | return ApiResponse.success("操作成功"); |
| | | } |
| | | |
| | | @ApiOperation("获取待处理账单") |
| | | @GetMapping("/getWaitDealList") |
| | | @CloudRequiredPermission("business:ywcontractbill:query") |
| | | public ApiResponse<YwContractBillDataVO> getWaitDealList(@RequestParam Integer contractId,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(ywContractBillService.getWaitDealList(contractId)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("获取批量催缴数据") |
| | | @PostMapping("/getNoticeCustomerData") |
| | | @CloudRequiredPermission("business:ywcontractbill:query") |
| | | public ApiResponse<List<YwContractBillCallDataVO>> getNoticeCustomerData(@RequestBody List<Integer> billIds,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(ywContractBillService.getNoticeCustomerData(billIds)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("下载催费文件") |
| | | @PostMapping("/downloadCallFeeDoc") |
| | | @CloudRequiredPermission("business:ywcontractbill:query") |
| | | public void downloadCallFeeDoc(@RequestBody List<Integer> billIds,@RequestHeader(Constants.HEADER_USER_TOKEN) String token,HttpServletResponse response) { |
| | | ywContractBillService.downloadCallFeeDoc(billIds,getLoginUser(token),response); |
| | | } |
| | | |
| | | @ApiOperation("发送短信与邮件") |
| | | @PostMapping("/sendSmsEmail") |
| | | @CloudRequiredPermission("business:ywcontractbill:query") |
| | | public ApiResponse sendSmsEmail(@RequestBody List<YwSmsEmailBillCallDTO> ywSmsEmailBillCallDTOList, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywContractBillService.sendSmsEmail(ywSmsEmailBillCallDTOList,smsEmailService,getLoginUser(token)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |