| | |
| | | List<TbLicence> page1 = licenceService.list(new LambdaQueryWrapper<TbLicence>().eq(TbLicence::getDelFlag,0).orderByDesc(TbLicence::getOrderNum)); |
| | | return R.ok(page1); |
| | | } |
| | | private static boolean checkName(String name,String sign) { |
| | | Object report = getReport(sign); |
| | | JSONObject jsonObject = JSONObject.parseObject(report.toString()); |
| | | Object data = jsonObject.get("data"); |
| | | JSONObject jsonObject1 = JSONObject.parseObject(data.toString()); |
| | | String company = jsonObject1.get("company").toString(); |
| | | if(name.equals(company)){ |
| | | return false; |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | Object report = getReport("ZZD20250321019744801521301"); |
| | | System.out.println(report); |
| | | } |
| | | @ApiOperation(value = "立即发布",tags = {"发布模块"}) |
| | | @PostMapping("/pushCompany") |
| | | public synchronized R<?> pushCompany(@Valid @RequestBody PushCompanyDto dto) { |
| | |
| | | if (count > 0) { |
| | | return R.fail("该公司已发布"); |
| | | } |
| | | // 判断水母报告和 公司名称是否一致 |
| | | String link = dto.getLink(); |
| | | String[] split = link.split("="); |
| | | String sign =split [split.length-1]; |
| | | boolean b = checkName(dto.getCompanyName(), sign); |
| | | if(b){ |
| | | return R.fail("水母报告和公司名称不一致"); |
| | | } |
| | | |
| | | String companyId = tbCompanyService.pushCompany(dto, userId); |
| | | return R.ok(companyId); |
| | | } |
| | |
| | | if (count > 0) { |
| | | return R.fail("订单状态不能修改"); |
| | | } |
| | | |
| | | // 判断水母报告和 公司名称是否一致 |
| | | String link = dto.getLink(); |
| | | String[] split = link.split("="); |
| | | String sign =split [split.length-1]; |
| | | boolean b = checkName(dto.getCompanyName(), sign); |
| | | if(b){ |
| | | return R.fail("水母报告和公司名称不一致"); |
| | | } |
| | | tbCompanyService.editCompany(dto,company,userId); |
| | | return R.ok(dto.getId()); |
| | | } |
| | |
| | | } |
| | | TbCompany company = tbCompanyService.getById(companyId); |
| | | String link = company.getLink(); |
| | | String sign = link.split("=")[1]; |
| | | String[] split = link.split("="); |
| | | String sign =split [split.length-1]; |
| | | Object report = getReport(sign); |
| | | return R.ok(report); |
| | | } |