| | |
| | | import com.boying.util.FileUtil; |
| | | import com.boying.util.NumberToCN; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.apache.commons.io.FileUtils; |
| | | import org.apache.commons.io.FilenameUtils; |
| | |
| | | @RestController |
| | | @RequestMapping("ffzf/ticket") |
| | | @RequiredArgsConstructor |
| | | @Tag(description = "ffzf/ticket" , name = "手持开罚单接口" ) |
| | | public class TicketController{ |
| | | |
| | | |
| | |
| | | |
| | | //图片回显 |
| | | @RequestMapping(value = "/showImg", method = RequestMethod.GET) |
| | | @Operation(summary = "图片回显" , description = "图片回显" ) |
| | | public void getAwardAsByteArray(HttpServletResponse response, HttpServletRequest request) throws IOException { |
| | | String result = request.getParameter("result"); |
| | | InputStream in = null; |
| | |
| | | } |
| | | |
| | | @PostMapping("findPage") |
| | | @Operation(summary = "分页查询" , description = "分页查询" ) |
| | | public Object findPage(Page page, Ticket ticket){ |
| | | QueryWrapper<Ticket> wrapper = new QueryWrapper<>(); |
| | | wrapper.lambda() |
| | |
| | | } |
| | | |
| | | @PostMapping("/save") |
| | | @Operation(summary = "保存罚单" , description = "保存罚单" ) |
| | | public Object save(Ticket ticket,HttpServletRequest request) throws IOException{ |
| | | String imgStr = ""; |
| | | MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; |
| | |
| | | } |
| | | |
| | | @PostMapping("/save2") |
| | | @Operation(summary = "保存罚单(废弃)" , description = "保存罚单(废弃)" ) |
| | | public Object save2(Ticket ticket) throws IOException{ |
| | | if(ticket.getUserId()!=null){ |
| | | User user = userService.getById(ticket.getUserId()); |
| | |
| | | */ |
| | | @ApiOperation(value = "通过id查询", notes = "通过id查询") |
| | | @GetMapping("/{id}" ) |
| | | @Operation(summary = "通过id查询罚单" , description = "通过id查询罚单" ) |
| | | public R getById(@PathVariable("id" ) Integer id) { |
| | | Ticket byId = ticketService.getById(id); |
| | | byId.setContent(violationTypeService.getById(byId.getViolationTypeId()).getContent()); |
| | |
| | | |
| | | |
| | | @PostMapping("/delete") |
| | | @Operation(summary = "删除罚单" , description = "删除罚单" ) |
| | | public Object delete(Long id){ |
| | | Ticket ticket =ticketService.getById(id); |
| | | ticket.setStatus(3); |
| | |
| | | } |
| | | |
| | | @PostMapping("/updateById") |
| | | @Operation(summary = "更新罚单状态" , description = "更新罚单状态" ) |
| | | public Object updateById(Ticket ticket){ |
| | | if(ticket.getMoney() >0){ |
| | | BigDecimal numberOfMoney = new BigDecimal(ticket.getMoney()+""); |
| | |
| | | |
| | | //与执法对接 |
| | | @GetMapping("/getResult") |
| | | @Operation(summary = "与执法平台对接,获取签字结果" , description = "与执法平台对接,获取签字结果" ) |
| | | public Object getResult(Ticket ticket){ |
| | | ticketService.updateById(ticket); |
| | | return R.ok(); |
| | |
| | | } |
| | | |
| | | @PostMapping("/getZhiFa") |
| | | @Operation(summary = "根据状态查询罚单" , description = "根据状态查询罚单" ) |
| | | public Object getZhiFa(Integer status,Page page){ |
| | | |
| | | QueryWrapper<Ticket> wrapper = new QueryWrapper<>(); |
| | |
| | | } |
| | | |
| | | @PostMapping("/getCar") |
| | | @Operation(summary = "获取黑名单车辆" , description = "获取黑名单车辆" ) |
| | | public Object getCar(String carNo,Page page,int type){ |
| | | QueryWrapper<TicketBlack> wrapper = new QueryWrapper<>(); |
| | | wrapper.lambda() |
| | |
| | | } |
| | | |
| | | @PostMapping("/getCarList") |
| | | @Operation(summary = "根据车牌分页获取罚单" , description = "根据车牌分页获取罚单" ) |
| | | public Object getCarList(String carNo,Page page){ |
| | | QueryWrapper<Ticket> wrapper = new QueryWrapper<>(); |
| | | wrapper.lambda() |
| | |
| | | |
| | | |
| | | @PostMapping("/noFound") |
| | | @Operation(summary = "更新罚单状态,增加备注" , description = "更新罚单状态,增加备注" ) |
| | | public Object noFound(Long ticketId,String remark){ |
| | | Ticket ticket = ticketService.getById(ticketId); |
| | | ticket.setStatus(2); |
| | |
| | | } |
| | | |
| | | @PostMapping("/getStatisticByYear") |
| | | @Operation(summary = "统计年度罚单" , description = "统计年度罚单" ) |
| | | public Object getStatistic(int year){ |
| | | Map<String,Object> map = new HashMap<>(); |
| | | List<Object> list = new ArrayList<>(); |
| | |
| | | } |
| | | |
| | | @PostMapping("/getOrderList") |
| | | @Operation(summary = "根据年和月统计罚单" , description = "根据年和月统计罚单" ) |
| | | public Object getOrderList(int year,int month){ |
| | | |
| | | Date yearFirst = DateUtilOther.getFirstDayOfMonth(year,month); |
| | |
| | | } |
| | | |
| | | @PostMapping("findById") |
| | | @Operation(summary = "根据id查询" , description = "根据id查询" ) |
| | | public Object findById(Long id){ |
| | | Ticket ticket = ticketService.getById(id); |
| | | if(ticket.getViolationTypeId()!=null){ |
| | |
| | | */ |
| | | @ApiOperation(value = "手动缴费", notes = "手动缴费") |
| | | @PostMapping("/jiaofei" ) |
| | | @Operation(summary = "手动缴费更新二维码" , description = "手动缴费更新二维码" ) |
| | | public R jiaofei(Integer id) { |
| | | Ticket byId = ticketService.getById(id); |
| | | if(byId.getPayStatus() == 1){ |
| | |
| | | */ |
| | | @ApiOperation(value = "测试对接", notes = "测试对接") |
| | | @GetMapping("/test" ) |
| | | @Operation(summary = "测试对接执法平台" , description = "测试对接执法平台" ) |
| | | public R test() { |
| | | Ticket byId = ticketService.getById(13); |
| | | byId = ticketService.getNumber(byId); |