| | |
| | | import com.boying.entity.*; |
| | | import com.boying.service.*; |
| | | import com.boying.util.DateUtilOther; |
| | | import com.boying.util.FileUtil; |
| | | import com.boying.util.NumberToCN; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.math.BigDecimal; |
| | | import java.text.DateFormat; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | |
| | | public Object findPage(Page page, Ticket ticket){ |
| | | QueryWrapper<Ticket> wrapper = new QueryWrapper<>(); |
| | | wrapper.lambda() |
| | | .eq(StringUtils.isNotBlank(ticket.getCarNo()),Ticket::getCarNo,ticket.getCarNo()) |
| | | .like(StringUtils.isNotBlank(ticket.getCarNo()),Ticket::getCarNo,ticket.getCarNo()) |
| | | .eq(ticket.getType() != null,Ticket::getType,ticket.getType()) |
| | | .eq(ticket.getViolationTypeId() != null,Ticket::getViolationTypeId,ticket.getViolationTypeId()) |
| | | .eq(ticket.getPayStatus() != null,Ticket::getPayStatus,ticket.getPayStatus()) |
| | |
| | | public R getById(@PathVariable("id" ) Integer id) { |
| | | Ticket byId = ticketService.getById(id); |
| | | byId.setContent(violationTypeService.getById(byId.getViolationTypeId()).getContent()); |
| | | String shouQianMing = byId.getShouQianMing(); |
| | | String zfQianMing1 = byId.getZfQianMing1(); |
| | | String zfQianMing2 = byId.getZfQianMing2(); |
| | | if(shouQianMing != null){ |
| | | String get = FileUtil.netSourceToBase64(shouQianMing, "GET"); |
| | | byId.setShouQianMing("data:image/png;base64,"+get); |
| | | } |
| | | if(zfQianMing1 != null){ |
| | | String get = FileUtil.netSourceToBase64(zfQianMing1, "GET"); |
| | | byId.setZfQianMing1("data:image/png;base64,"+get); |
| | | } |
| | | if(zfQianMing2 != null){ |
| | | String get = FileUtil.netSourceToBase64(zfQianMing2, "GET"); |
| | | byId.setZfQianMing2("data:image/png;base64,"+get); |
| | | } |
| | | return R.ok(byId); |
| | | } |
| | | |
| | |
| | | String s = NumberToCN.number2CNMontrayUnit(numberOfMoney); |
| | | ticket.setMoneyStr(s.toString()); |
| | | } |
| | | return R.ok(ticketService.updateById(ticket)); |
| | | if(StringUtils.isBlank(ticket.getZfName1())){ |
| | | ticket.setZfName1("王俊详"); |
| | | ticket.setZfName1("张净雷"); |
| | | ticket.setZfNum1("03041699001"); |
| | | ticket.setZfNum2("03041618001"); |
| | | ticket.setZfQianMing1("http://183.196.93.178:8089/ffzf/fileinfo/showImg/wangjunxiang.png"); |
| | | ticket.setZfQianMing2("http://183.196.93.178:8089/ffzf/fileinfo/showImg/zhangjinglei.png"); |
| | | } |
| | | if(StringUtils.isBlank(ticket.getNumber())){ |
| | | ticket = ticketService.getNumber(ticket); |
| | | ticket.setPush(0); |
| | | ticketService.uploadInfo(ticket); |
| | | }else { |
| | | ticketService.updateById(ticket); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | //与执法对接 |
| | | @GetMapping("/getResult") |
| | | public Object getResult(Ticket ticket){ |
| | | if(StringUtils.isNotBlank(ticket.getShouQianMing())){ |
| | | ticketService.updateById(ticket); |
| | | return R.ok(); |
| | | }else { |
| | | return R.failed("更新失败"); |
| | | } |
| | | } |
| | | |
| | | public void saveLogo(String name,String lng,String lat){ |
| | |
| | | tb.setCarType(ticket.getCarType()); |
| | | tb.setColor(ticket.getColor()); |
| | | tb.setViolationCount(1); |
| | | tb.setIsActive(0); |
| | | ticketBlackService.saveOrUpdate(tb); |
| | | }else { |
| | | TicketBlack ticketBlack = all.get(0); |
| | |
| | | */ |
| | | @ApiOperation(value = "测试对接", notes = "测试对接") |
| | | @GetMapping("/test" ) |
| | | public void test() { |
| | | public R test() { |
| | | Ticket byId = ticketService.getById(13); |
| | | byId = ticketService.getNumber(byId); |
| | | byId.setPush(0); |
| | | ticketService.uploadInfo(byId); |
| | | return R.ok(); |
| | | } |
| | | } |