|  |  |  | 
|---|
|  |  |  | import com.doumee.core.model.PageWrap; | 
|---|
|  |  |  | import com.doumee.core.utils.Constants; | 
|---|
|  |  |  | import com.doumee.dao.business.model.YwContract; | 
|---|
|  |  |  | import com.doumee.dao.business.model.YwContractBill; | 
|---|
|  |  |  | import com.doumee.service.business.YwContractService; | 
|---|
|  |  |  | import io.swagger.annotations.Api; | 
|---|
|  |  |  | import io.swagger.annotations.ApiOperation; | 
|---|
|  |  |  | 
|---|
|  |  |  | public ApiResponse create(@RequestBody YwContract ywContract,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
|---|
|  |  |  | ywContract.setLoginUserInfo(this.getLoginUser(token)); | 
|---|
|  |  |  | return ApiResponse.success(ywContractService.create(ywContract)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | @PreventRepeat | 
|---|
|  |  |  | @ApiOperation("根据参数预生成账单信息") | 
|---|
|  |  |  | @PostMapping("/getBillList") | 
|---|
|  |  |  | @CloudRequiredPermission("business:ywcontract:create") | 
|---|
|  |  |  | public ApiResponse< List<YwContractBill> > getBillList(@RequestBody YwContract ywContract, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
|---|
|  |  |  | ywContract.setLoginUserInfo(this.getLoginUser(token)); | 
|---|
|  |  |  | return ApiResponse.success(ywContractService.getBillList(ywContract)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | @PreventRepeat | 
|---|
|  |  |  | @ApiOperation("退租") | 
|---|
|  |  |  | @PostMapping("/backRent") | 
|---|
|  |  |  | @CloudRequiredPermission("business:ywcontract:update") | 
|---|
|  |  |  | public ApiResponse backRent(@RequestBody YwContract ywContract,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
|---|
|  |  |  | ywContract.setLoginUserInfo(this.getLoginUser(token)); | 
|---|
|  |  |  | return ApiResponse.success(ywContractService.backRent(ywContract)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("根据ID删除") | 
|---|
|  |  |  | 
|---|
|  |  |  | return ApiResponse.success(ywContractService.findPage(pageWrap)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("列表") | 
|---|
|  |  |  | @PostMapping("/list") | 
|---|
|  |  |  | @CloudRequiredPermission("business:ywcontract:query") | 
|---|
|  |  |  | public ApiResponse<List<YwContract>> list (@RequestBody YwContract model,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
|---|
|  |  |  | return ApiResponse.success(ywContractService.findList(model)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("根据退租日期查询账单数据") | 
|---|
|  |  |  | @PostMapping("/findForBills") | 
|---|
|  |  |  | @CloudRequiredPermission("business:ywcontract:query") | 
|---|
|  |  |  | public ApiResponse<YwContract> findForBills (@RequestBody YwContract model,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
|---|
|  |  |  | return ApiResponse.success(ywContractService.findForBills(model)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("导出Excel") | 
|---|
|  |  |  | @PostMapping("/exportExcel") | 
|---|
|  |  |  | @CloudRequiredPermission("business:ywcontract:exportExcel") | 
|---|