package com.jkcredit.invoice.controller.localBussiness; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.jkcredit.invoice.annotation.LoginRequired; import com.jkcredit.invoice.model.entity.Calculate.NoCarCalculateInfor; import com.jkcredit.invoice.model.entity.Calculate.SelfCarCalculateInfor; import com.jkcredit.invoice.model.entity.invoice.SelfCarInvoice; import com.jkcredit.invoice.model.entity.waybill.NoCarWayBill; import com.jkcredit.invoice.model.entity.waybill.SelfCarTrade; import com.jkcredit.invoice.service.CalculateInfor.SelfCarCalculateInfoService; import com.jkcredit.invoice.service.selfCar.SelfCarInvoiceService; import com.jkcredit.invoice.service.selfCar.SelfCarService; import com.jkcredit.invoice.service.selfCar.SelfCarTradeService; import com.jkcredit.invoice.util.RespR; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @Api(tags = "自有车操作") @RestController @RequestMapping(value = {"/selfCar"}) public class SelfCarController { @Autowired SelfCarService selfCarService; @Autowired SelfCarTradeService selfCarTradeService; @Autowired SelfCarInvoiceService selfCarInvoiceService; @Autowired SelfCarCalculateInfoService selfCarCalculateInfoService; /** * 解绑etc卡 * @param etcNum 参数集 * @return 用户集合 */ @PostMapping("/selfCarUnBind") @ApiOperation(value="解绑etc卡", notes="解绑etc卡") @LoginRequired public RespR selfCarUnBind(String etcNum) { try { RespR respR = selfCarService.selfCarUnBind(etcNum); return respR; }catch (Exception e){ e.printStackTrace(); return new RespR(false,e.getMessage()); } } /** * 分页查询自有车交易信息 * * @param page 参数集 * @return 交易信息 */ @PostMapping("/findTrades") @ApiOperation(value="分页查询自有车交易信息", notes="分页查询自有车交易信息") @LoginRequired public RespR findTrades(Page page, SelfCarTrade selfCarTrade) { try { RespR respR = new RespR(selfCarTradeService.findByPageAndTrade(page, selfCarTrade)); return respR; }catch (Exception e){ e.printStackTrace(); return new RespR(false,e.getMessage()); } } /** * 分页查询所有发票信息 * * @param page 参数集 * @return 交易信息 */ @PostMapping("/findSelfCarInvoices") @ApiOperation(value="分页查询自有车发票信息", notes="分页查询自有车发票信息") @LoginRequired public RespR findSelfCarInvoices(Page page, SelfCarInvoice selfCarInvoice) { try { RespR respR = new RespR(selfCarInvoiceService.findByPageAndInvoice(page, selfCarInvoice)); return respR; }catch (Exception e){ e.printStackTrace(); return new RespR(false,e.getMessage()); } } /** * 分页查询自有车计费信息 * * @param page 参数集 * @return 用户集合 */ @PostMapping("/findSelfcarCalculateInfo") @ApiOperation(value="分页查询自有车计费信息", notes="分页查询自有车计费信息") @LoginRequired public RespR findSelfcarCalculateInfo(Page page, SelfCarCalculateInfor carCalculateInfor) { try { RespR respR = new RespR(selfCarCalculateInfoService.findByPageAndCalculateInfor(page, carCalculateInfor)); return respR; }catch (Exception e){ e.printStackTrace(); return new RespR(false,e.getMessage()); } } }